Changeset 3111
- Timestamp:
- Jun 8, 2006, 10:59:32 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified documentation/user_manual/anuga_user_manual.tex ¶
r3109 r3111 143 143 144 144 Readers are assumed to be familiar with the operating environment 145 and have a general understanding of the problem background, as well146 asenough programming experience to adapt the code to different147 requirements , as described in this manual, and to understand the148 basic terminology ofobject-oriented programming.145 and have a general understanding of the subject matter, as well as 146 enough programming experience to adapt the code to different 147 requirements and to understand the basic terminology of 148 object-oriented programming. 149 149 150 150 \pagebreak … … 173 173 174 174 To set up a particular scenario the user specifies the geometry 175 (bathymetry and topography), the initial water level, boundary 176 conditions such as tide, and any forcing terms that may drive the 177 system such as wind stress or atmospheric pressure gradients. 178 Gravity and frictional resistance from the different terrains in the model are 179 represented by predefined forcing terms. 175 (bathymetry and topography), the initial water level (stage) 176 , 177 boundary conditions such as tide, and any forcing terms that may 178 drive the system such as wind stress or atmospheric pressure 179 gradients. Gravity and frictional resistance from the different 180 terrains in the model are represented by predefined forcing terms. 180 181 181 182 A mesh generator, called pmesh, allows the user to set up the geometry … … 303 304 \begin{itemize} 304 305 305 \item a list \code{points} of length $N$, where $N = (m + 1)(n + 1)$, 306 comprising the coordinates \code{(x, y)} of each of the $N$ mesh 307 points, 308 309 \item a list \code{vertices} of length $2mn$ (each entry specifies the three 310 vertices of one of the triangles used in the triangulation) , and 311 312 \item a dictionary \code{boundary}, used to tag the triangle edges on 313 the boundaries. Each key corresponds to a triangle edge on one of 314 the four boundaries and its value is one of \code{`left'}, 315 \code{`right'}, \code{`top'} and \code{`bottom'}, indicating 316 which boundary the edge in question belongs to. 306 \item a list \code{points} giving the coordinates of each mesh point, 307 308 \item a list \code{vertices} specifying the three vertices of each triangle, and 309 310 \item a dictionary \code{boundary} that stores the edges on 311 the boundary and associates each with one of the symbolic tags \code{`left'}, \code{`right'}, 312 \code{`top'} or \code{`bottom'}. 317 313 318 314 \end{itemize} 319 315 320 An example of a general unstructured mesh and the 321 associated data structures \code{points}, \code{vertices} and \code{boundary} 322 is given in Section \ref{xxxx}. 323 324 325 316 An example of a general unstructured mesh and the associated data 317 structures \code{points}, \code{vertices} and \code{boundary} is 318 given in Section \ref{sec:meshexample}. 326 319 327 320 … … 338 331 339 332 This creates an instance of the \class{Domain} class, which 340 represents the domain of the simulation. Specific options for domain341 are set at this point, including setting the basename for the output 342 file and thedirectory to be used for data:333 represents the domain of the simulation. Specific options are set at 334 this point, including the basename for the output file and the 335 directory to be used for data: 343 336 344 337 {\small \begin{verbatim} … … 366 359 \method{set\_quantity}, used to specify these quantities. It is a 367 360 flexible method that allows the user to set quantities in a variety 368 of ways---using constants, functions, numeric arrays orexpressions369 involving other quantities, arbitrary data points with associated361 of ways---using constants, functions, numeric arrays, expressions 362 involving other quantities, or arbitrary data points with associated 370 363 values, all of which can be passed as arguments. All quantities can 371 364 be initialised using \method{set\_quantity}. For a conserved … … 392 385 the plane. It specifies that the bed slopes linearly in the 393 386 \code{x} direction, with slope $-\frac{1}{2}$, and is constant in 394 the \code{y} direction. %[screen shot?]387 the \code{y} direction. 395 388 396 389 Once the function \function{f} is specified, the quantity … … 412 405 \end{verbatim}} 413 406 414 This just specifies that the Manning friction coefficient is set415 to 0.1at every mesh point.407 This specifies that the Manning friction coefficient is set to 0.1 408 at every mesh point. 416 409 417 410 \subsubsection{Stage} … … 436 429 i.e. 0.4 units (m) below the zero level. 437 430 431 %FIXME (Howard): Can we put this para somewhere else? 438 432 Although it is not necessary for this example, it may be useful to 439 433 digress here and mention a variant to this requirement, which allows … … 501 495 502 496 Before describing how these boundary conditions are assigned, we 503 recall that the variable \code{boundary} returned by 504 \code{rectangular} not only stores the edges of the mesh that 505 constitute the boundary but also assigns to each a symbolic `tag', 506 which indicates whether that edge forms part of the `top' boundary, 507 the `left' boundary, the `bottom' boundary or the `right' boundary. 508 These tags provide the means to assign different boundary conditions 497 recall that the definition of a mesh uses a variable \code{boundary} 498 to store the edges of the mesh that lie on the boundary. (In the 499 code we are discussing, \code{boundary} was one of the three 500 variables returned by the function \code{rectangular}.) 501 502 This variable \code{boundary} is a Python dictionary and it serves 503 not only to hold the edges that make up the boundary but also to 504 assign symbolic tags to these edges to distinguish different parts 505 of the boundary. In this example, the tags used are \code{`left', 506 \code{`right'}, \code{`top'} and \code{`bottom'}, corresponding to 507 the left, right, top and bottom of the rectangle bounding the mesh, 508 and the function \code{rectangular} automatically assigns these tags 509 to the boundary edges when it generates the mesh. The tags are used 510 as keys for the dictionary, so that, for example, 511 \code{boundary[`left']} is a list of the mesh edges that lie along 512 the left part of the boundary. 513 514 The tags provide the means to assign different boundary conditions 509 515 to an edge depending on which part of the boundary it belongs to. 510 (Later we shall describe examples in which the boundary is divided 511 differently---we are not limited to the tags `left', `right', `top' 512 and `bottom'.) 513 514 With boundary objects assigned to variables as described above, we 515 can apply one to each part of the boundary by means of a statement 516 like 516 (Later we shall describe an example that uses different boundary 517 tags---we are not limited to using `left', `right', `top' and 518 `bottom'.) 519 520 Using the boundary objects described above, we assign a boundary 521 condition to each part of the boundary by means of a statement like 517 522 518 523 {\small \begin{verbatim} … … 756 761 \end{verbatim}} 757 762 758 is then used to create the mesh, taking the bounding polygon to be the polygon 759 \code{diffpolygonall} specified in \file{project.py}. The 760 argument \code{boundary\_tags} assigns a dictionary, whose keys are the 761 names of the boundary tags used for the bounding polygon---\code{`bottom'}, 762 `right0', `right1', `right2', `top', `left1', `left2' and `left3'--- 763 and whose values identify the indices of the segments associated with each of these 764 tags. (The value associated with each boundary tag is a one-element list.) 763 is then used to create the mesh, taking the bounding polygon to be 764 the polygon \code{diffpolygonall} specified in \file{project.py}. 765 The argument \code{boundary\_tags} assigns a dictionary, whose keys 766 are the names of the boundary tags used for the bounding 767 polygon---\code{`bottom'}, \code{`right0'}, \code{`right1'}, 768 \code{`right2'}, \code{`top'}, \code{`left1'}, \code{`left2'} and 769 \code{`left3'}--- and whose values identify the indices of the 770 segments associated with each of these tags. (The value associated 771 with each boundary tag is a one-element list.) 765 772 766 773 … … 988 995 mesh and use it to describe how mesh data is stored. 989 996 990 Figure \ref{fig:simplemesh} represents a very simple mesh comprising 991 just 11 points and 10 triangles.997 \label{sec:meshexample} Figure \ref{fig:simplemesh} represents a 998 very simple mesh comprising just 11 points and 10 triangles. 992 999 993 1000 … … 1880 1887 Use the same delimiter for the attribute names and the data. 1881 1888 1882 An XYA file can optionally end with lines of this type:1889 An XYA file can optionally end with a description of the georeference: 1883 1890 1884 1891 \code{\#geo reference}\\ … … 2098 2105 The output generated by \anuga may be viewed by 2099 2106 means of the visualisation tool \code{swollen}, which takes the 2100 \code{ sww} file output by \anuga and creates a visual representation2107 \code{SWW} file output by \anuga and creates a visual representation 2101 2108 of the data. Examples may be seen in Figures \ref{fig:runupstart} 2102 and \ref{fig:bedslope2}. To view an \code{ sww} file with2109 and \ref{fig:bedslope2}. To view an \code{SWW} file with 2103 2110 \code{swollen} in the Windows environment, you can simply drag the 2104 2111 icon representing the file over an icon on the desktop for the 2105 \code{swollen} executable file (or a shortcut to it). Alternatively, 2106 you can operate \code{swollen} from the command line, in both 2107 Windows and Linux environments. 2108 2109 On successful operation, you will see an interactive moving-picture display. You can use keys and the mouse 2110 to slow down, speed up or stop the display, change the viewing position or carry out a number of other 2111 simple operations. 2112 \code{swollen} executable file (or a shortcut to it), or set up a 2113 file association to make files with the extension \code{.sww} open 2114 with \code{swollen}. Alternatively, you can operate \code{swollen} 2115 from the command line, in both Windows and Linux environments. 2116 2117 On successful operation, you will see an interactive moving-picture 2118 display. You can use keys and the mouse to slow down, speed up or 2119 stop the display, change the viewing position or carry out a number 2120 of other simple operations. Help is also displayed when you press 2121 the \code{h} key. 2112 2122 2113 2123 The main keys operating the interactive screen are:\\
Note: See TracChangeset
for help on using the changeset viewer.