Changeset 3103 for documentation/user_manual/anuga_user_manual.tex
- Timestamp:
- Jun 6, 2006, 3:49:35 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/user_manual/anuga_user_manual.tex
r3102 r3103 176 176 conditions such as tide, and any forcing terms that may drive the 177 177 system such as wind stress or atmospheric pressure gradients. 178 Frictional resistance from the different terrains in the model is 178 Gravity and frictional resistance from the different terrains in the model are 179 179 represented by predefined forcing terms. 180 180 … … 294 294 several other schemes that can be used for setting up meshes, but we 295 295 shall not discuss these now.) The above assignment sets up a $10 296 \times 10$ rectangular mesh, triangulated in a specific way. In 297 general, the assignment 296 \times 10$ rectangular mesh, triangulated in a regular way. The assignment 298 297 299 298 {\small \begin{verbatim} … … 319 318 320 319 \end{itemize} 320 321 An example of a general unstructured mesh and the 322 associated data structures \code{points}, \code{vertices} and \code{boundary} 323 is given in Section \ref{xxxx}. 324 321 325 322 326 Since these three variables encapsulate the information needed to … … 502 506 \end{verbatim}} 503 507 504 which specifies that the surface level is set to a height of $-0.4$, i.e. 0.4 units505 below the zero level.506 507 (Although it is not necessary for this example, it may be useful to508 which specifies that the surface level is set to a height of $-0.4$, 509 i.e. 0.4 units (m) below the zero level. 510 511 Although it is not necessary for this example, it may be useful to 508 512 digress here and mention a variant to this requirement, which allows 509 513 us to illustrate another way to use \method{set\_quantity}---namely, … … 525 529 The reader will probably appreciate that this capability to 526 530 incorporate expressions into statements using \method{set\_quantity} 527 greatly expands its power.) 531 greatly expands its power.) See Section \ref{sec:Initial Conditions} for more 532 details. 528 533 529 534 \subsection{Boundary Conditions} … … 562 567 may cause occasional spurious effects. If this occurs, 563 568 consider using e.g. a Dirichlet boundary condition. 564 \item \textbf{[Dirichlet boundary}\label{def:dirichlet boundary} Specifies a fixed value at the565 boundary and assigns initial values to the $x$-momentum and $y$-momentum.566 \item \textbf{Time boundary}\label{def:time boundary} Like a Dirichlet boundary but with behaviour567 varying with time.569 \item \textbf{[Dirichlet boundary}\label{def:dirichlet boundary} Specifies 570 constant values for stage, $x$-momentum and $y$-momentum at the boundary. 571 \item \textbf{Time boundary}\label{def:time boundary} Like a Dirichlet 572 boundary but with behaviour varying with time. 568 573 \end{itemize} 569 574 … … 615 620 The output is a NetCDF file with the extension \code{.sww}. It 616 621 contains stage and momentum information and can be used with the 617 \code{swollen} visualisation package to generate a visual display. 622 \code{swollen} (see Section \ref{sec:swollen}) 623 visualisation package to generate a visual display. 618 624 See Section \ref{sec:file formats} (page \pageref{sec:file formats}) 619 625 for more on NetCDF and other file formats. … … 625 631 626 632 \begin{itemize} 627 \item{from a Windows command line} as in\code{python runup.py}633 \item{from a Windows or Unix command line} as in\ \code{python runup.py} 628 634 \item{within the Python IDLE environment} 629 635 \item{within emacs} 630 \item{from a Linux command line} as in \code{python runup.py}631 636 \end{itemize} 632 637 … … 676 681 The following discussion builds on the concepts introduced through 677 682 the \file{runup.py} example and introduces a second 678 example, \file{run\_sydney \_smf.py}, that follows the same basic683 example, \file{run\_sydney.py}, that follows the same basic 679 684 outline, but incorporates more complex features and refers to a 680 685 real-life scenario, rather than the artificial illustrative one used … … 816 821 817 822 {\small \begin{verbatim} 818 create_mesh_from_regions(project.diffpolygonall, %819 boundary_tags= {'bottom': [0], %820 'right1': [1], %821 'right0': [2], %822 'right2': [3], %823 'top': [4], %824 'left1': [5], %825 'left2': [6], %826 'left3': [7]}, %827 maximum_triangle_area=100000, %828 filename=meshname, %823 create_mesh_from_regions(project.diffpolygonall, 824 boundary_tags= {'bottom': [0], 825 'right1': [1], 826 'right0': [2], 827 'right2': [3], 828 'top': [4], 829 'left1': [5], 830 'left2': [6], 831 'left3': [7]}, 832 maximum_triangle_area=100000, 833 filename=meshname, 829 834 interior_regions=interior_regions) 830 835 \end{verbatim}} … … 871 876 872 877 {\small \begin{verbatim} 873 domain.set_name(project.basename) %874 domain.set_datadir(project.outputdir) %878 domain.set_name(project.basename) 879 domain.set_datadir(project.outputdir) 875 880 domain.set_quantities_to_be_stored(['stage', 'xmomentum', 876 881 'ymomentum']) … … 952 957 boundary types introduced for \file{runup.py}, we use the reflective 953 958 boundary for each of the 954 eight tagged segments :959 eight tagged segments defined by \code{create_mesh_from_regions}: 955 960 956 961 {\small \begin{verbatim} … … 1050 1055 %\textbf{Name } & \textbf{Description}\\ 1051 1056 %\hline 1052 \emph{use cache} & Specifies whether caching is to be used\\1057 \emph{use\_cache} & Specifies whether caching is to be used for improved performance. See Section \ref{sec:caching} for details on the underlying caching functionality\\ 1053 1058 \emph{verbose} & If \code{True}, provides detailed terminal output 1054 1059 to the user\\ % \hline … … 1283 1288 %%%%%% 1284 1289 \section{Initial Conditions} 1285 1290 \label{sec:Initial Conditions} 1286 1291 In standard usage of partial differential equations, initial conditions 1287 1292 refers to the values associated to the system variables (the conserved … … 1536 1541 1537 1542 1543 1544 %%% 1545 \begin{classdesc}{Transmissive\_Momentum\_Set\_Stage\_boundary}{Boundary} 1546 Module: \module{pyvolution.shallow\_water} 1547 1548 This boundary returns same momentum conserved quantities as 1549 those present in its neighbour volume but sets stage as in a Time\_boundary. 1550 The underlying domain must be specified when boundary is instantiated 1551 1552 This type of boundary is useful when stage is known at the boundary as a 1553 function of time, but momenta (or speeds) aren't. 1554 1555 This class is specific to the shallow water equation as it works with the 1556 momentum quantities assumed to be the second and third conserved quantities. 1557 \end{classdesc} 1558 1559 1560 1538 1561 \subsection{User-defined boundary conditions} 1539 1562 \label{sec:roll your own} 1540 [How to roll your own] 1563 [How to roll your own] TBA 1541 1564 1542 1565 … … 1592 1615 \subsection{Diagnostics} 1593 1616 1617 1618 \begin{funcdesc}{statistics}{} 1619 Module: \module{pyvolution.domain} 1620 1621 1594 1622 \begin{funcdesc}{timestepping\_statistics}{} 1595 1623 Module: \module{pyvolution.domain} … … 2034 2062 detected by examining the functions \code{bytecode (co\_code, co\_consts, 2035 2063 func\_defaults, co\_argcount)} and the function will be recomputed. 2064 However, caching will not detect changes in modules used by \code{func}. 2065 In this case cache must be cleared manually. 2036 2066 2037 2067 Options are set by means of the function \code{set\_option(key, value)}, … … 2470 2500 \label{mod:pyvolution.generalmesh} 2471 2501 2472 \section{\module{pyvolution. mesh} }2473 \declaremodule {}{pyvolution.mesh}2474 \label{mod:pyvolution. mesh}2502 \section{\module{pyvolution.neighbour\_mesh} } 2503 \declaremodule[pyvolution.neighbourmesh]{}{pyvolution.neighbour\_mesh} 2504 \label{mod:pyvolution.neighbourmesh} 2475 2505 2476 2506 \section{\module{pyvolution.domain} --- Generic module for 2D triangular domains for finite-volume computations of conservation laws} … … 2482 2512 \declaremodule{}{pyvolution.quantity} 2483 2513 \label{mod:pyvolution.quantity} 2514 2515 2516 Class Quantity - Implements values at each triangular element 2517 2518 To create: 2519 2520 Quantity(domain, vertex_values) 2521 2522 domain: Associated domain structure. Required. 2523 2524 vertex_values: N x 3 array of values at each vertex for each element. 2525 Default None 2526 2527 If vertex_values are None Create array of zeros compatible with domain. 2528 Otherwise check that it is compatible with dimenions of domain. 2529 Otherwise raise an exception 2530 2484 2531 2485 2532
Note: See TracChangeset
for help on using the changeset viewer.