Changeset 2745
- Timestamp:
- Apr 21, 2006, 3:07:29 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/user_manual/anuga_user_manual.tex
r2742 r2745 43 43 %\settimeformat{xxivtime} % 24 hour Format 44 44 \settimeformat{oclock} % Verbose 45 \date{\today, \ \currenttime} 45 \date{\today, \ \currenttime} 46 46 47 47 \ifhtml 48 \date{\today} % latex2html does not know about datetime 48 \date{\today} % latex2html does not know about datetime 49 49 \fi 50 50 … … 211 211 212 212 In outline, \file{bedslopephysical.py} performs the following steps: 213 213 214 214 \begin{enumerate} 215 215 … … 292 292 This uses a Python class \class{Domain}, imported from 293 293 \module{shallow\_water}, which is an extension of a more generic 294 class of the same name in the module \refmodule{pyvolution.domain} 294 class of the same name in the module \refmodule{pyvolution.domain} 295 295 (page \pageref{mod:pyvolution.domain}), 296 296 and inherits … … 305 305 306 306 307 \subsection{ Specifying the Quantities}307 \subsection{Initial Conditions} 308 308 309 309 The next task is to specify a number of quantities that we wish to … … 349 349 \subsubsection{Friction} 350 350 351 The assignment of the friction quantity demonstrates another way 352 we can use \method{set\_quantity} to set quantities---namely, 353 assignthem to a constant numerical value:351 The assignment of the friction quantity demonstrates another way we 352 can use \method{set\_quantity} to set quantities---namely, assign 353 them to a constant numerical value: 354 354 355 355 {\small \begin{verbatim} … … 381 381 below the zero level. 382 382 383 (Although it is not necessary for this example, it may be useful to digress here384 and mention a variant to this requirement, which allows us to illustrate 385 another way to use \method{set\_quantity}---namely, incorporating an expression 386 in volving other quantities. Suppose, instead of setting a constant value387 for the stage, we wished 388 tospecify a constant value for the \emph{depth}. For such a case we389 need to specify that \code{stage} is 390 everywhere obtained by adding that value to the value already 391 specified for \code{elevation}. Wewould do this by means of the statements:383 (Although it is not necessary for this example, it may be useful to 384 digress here and mention a variant to this requirement, which allows 385 us to illustrate another way to use \method{set\_quantity}---namely, 386 incorporating an expression involving other quantities. Suppose, 387 instead of setting a constant value for the stage, we wished to 388 specify a constant value for the \emph{depth}. For such a case we 389 need to specify that \code{stage} is everywhere obtained by adding 390 that value to the value already specified for \code{elevation}. We 391 would do this by means of the statements: 392 392 393 393 {\small \begin{verbatim} … … 399 399 value of \code{elevation} already defined. 400 400 401 The reader will probably appreciate that this capability to incorporate402 expressions into statements using \method{set\_quantity} greatly expands 403 its power.)404 405 \subs ubsection{Boundary Conditions}401 The reader will probably appreciate that this capability to 402 incorporate expressions into statements using \method{set\_quantity} 403 greatly expands its power.) 404 405 \subsection{Boundary Conditions} 406 406 407 407 The boundary conditions are specified as follows: … … 453 453 boundaries are all reflective. 454 454 455 The reader may wish to experiment by varying the choice of boundary types 456 for one or more of the boundaries. In the case of \code{Bd} and \code{Bw}, 457 the three arguments in each case represent the 458 459 {\small \begin{verbatim} 460 Bw = Time_boundary(domain=domain, 461 f=lambda t: [(0.1*sin(t*2*pi)), 0.0, 0.0]) 462 \end{verbatim}} 455 The reader may wish to experiment by varying the choice of boundary 456 types for one or more of the boundaries. In the case of \code{Bd} 457 and \code{Bw}, the three arguments in each case represent the 458 elevation, $x$-momentum and $y$-momentum, respectively. 459 460 %{\small \begin{verbatim} 461 % Bw = Time_boundary(domain=domain, 462 % f=lambda t: [(0.1*sin(t*2*pi)), 0.0, 0.0]) 463 %\end{verbatim}} 463 464 464 465 … … 495 496 496 497 \begin{itemize} 497 \item{from a Windows command line} as in \ file{python bedslopephysical.py}498 \item{from a Windows command line} as in \codee{python bedslopephysical.py} 498 499 \item{within the Python IDLE environment} 499 500 \item{within emacs} 500 \item{from a Linux command line} as in \ file{python bedslopephysical.py}501 \item{from a Linux command line} as in \code{python bedslopephysical.py} 501 502 \end{itemize} 502 503 … … 539 540 540 541 The following discussion builds on the concepts introduced through 541 the \file{bedslopephysical.py} example and introduces a second example,542 \file{run\_sydney\_smf.py}, that follows the same basic outline, but 543 incorporates more complex features and refers to a real-life 544 scenario, rather than the artificial illustrative one used in 545 \file{bedslopephysical.py}. The domain of interest surrounds the Sydney region, 546 and predominantly covers Sydney Harbour. A hypothetical tsunami wave is 547 generated by a submarine mass failure situated on the edge of the548 continental shelf.542 the \file{bedslopephysical.py} example and introduces a second 543 example, \file{run\_sydney\_smf.py}, that follows the same basic 544 outline, but incorporates more complex features and refers to a 545 real-life scenario, rather than the artificial illustrative one used 546 in \file{bedslopephysical.py}. The domain of interest surrounds the 547 Sydney region, and predominantly covers Sydney Harbour. A 548 hypothetical tsunami wave is generated by a submarine mass failure 549 situated on the edge of the continental shelf. 549 550 550 551 \subsection{Overview} 551 As in the case of \file{bedslopephysical.py}, the actions carried out by the552 program can be organised according to this outline:552 As in the case of \file{bedslopephysical.py}, the actions carried 553 out by the program can be organised according to this outline: 553 554 554 555 \begin{enumerate} … … 586 587 587 588 One obvious way that the present example differs from 588 \file{bedslopephysical.py} is in the use of a more complex method to create589 the mesh. Instead of imposing a mesh structure on a rectangular 590 grid, the technique used for this example involves building mesh 591 structures inside polygons specified by the user, using a 592 mesh-generator referred to as \code{pmesh}.589 \file{bedslopephysical.py} is in the use of a more complex method to 590 create the mesh. Instead of imposing a mesh structure on a 591 rectangular grid, the technique used for this example involves 592 building mesh structures inside polygons specified by the user, 593 using a mesh-generator referred to as \code{pmesh}. 593 594 594 595 The following remarks may help the reader understand how … … 614 615 Boundary tags are not restricted to \code{`left'}, \code{`right'}, 615 616 \code{`bottom'} and \code{`top'}, as in the case of 616 \file{bedslopephysical.py}. Instead the user specifies a list of tags617 appropriate to the configuration being modelled.617 \file{bedslopephysical.py}. Instead the user specifies a list of 618 tags appropriate to the configuration being modelled. 618 619 619 620 While a mesh created inside a polygon offers more flexibility than … … 736 737 737 738 738 \subsection{ Specifying the Quantities}739 \subsection{Initial Conditions} 739 740 Quantities for \file{run\_sydney\_smf.py} are set 740 741 using similar methods to those in \file{bedslopephysical.py}. However, … … 873 874 874 875 \begin{center} 875 \code{pmesh/mesh\_interface.py} 876 % \code{pmesh/mesh\_interface.py} 877 \code{pmesh}$\slash$\code{mesh\_interface.py} 876 878 \end{center} 877 879 … … 1147 1149 a submarine slump or slide. 1148 1150 1149 The arguments include as a minimum, the slump or slide length, the water depth to the centre of sediment 1151 The arguments include as a minimum, the slump or slide length, the water depth to the centre of sediment 1150 1152 mass, and the bathymetric slope. Other slump or slide parameters can be included if they are known. 1151 1153 \end{funcdesc} … … 1392 1394 See \file{Analytical\_solution\_circular\_hydraulic\_jump.py} for an example of use. 1393 1395 \end{funcdesc} 1394 1395 1396 1397 1396 1398 \begin{funcdesc}{Geospatial_data}{???} 1397 1399 Module: \module{geospatial_data.geo_spatial_data} 1398 1400 Creates a georeferenced geospatial data object from either arrays or a file (pts or xya). 1399 1401 1400 1402 Objects of this class can be used with \method{set\_quantity}. 1401 \end{funcdesc} 1402 1403 1404 1405 1406 1403 \end{funcdesc} 1404 1405 1406 1407 1408 1407 1409 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1408 1410 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 1515 1517 The following is an excerpt from a CDL representation of the output file \code{bedslope.sww}. 1516 1518 1517 \verbatiminput{examples/bedslopeexcerpt.cdl} 1519 \verbatiminput{examples/bedslopeexcerpt.cdl} 1518 1520 1519 1521 … … 1853 1855 1854 1856 \subsubsection{Can I change values for any quantity during the simulation?} 1855 Yes, using \code{domain.set_quantity()} inside the domain.evolve loop you 1856 can change values of any quantity. This is for example useful if you wish to 1857 Yes, using \code{domain.set_quantity()} inside the domain.evolve loop you 1858 can change values of any quantity. This is for example useful if you wish to 1857 1859 let the system settle for a while before assigning an initial condition. Another example would be changing the values for elevation to model e.g. erosion. 1858 1860 … … 1861 1863 1862 1864 \subsubsection{Why does a file\_function return a list of numbers when evaluated?} 1863 Currently, file\_function works by returning values for the conserved 1865 Currently, file\_function works by returning values for the conserved 1864 1866 quantities \code{stage}, \code{xmomentum} and \code{ymomentum} at a given point in time and space as a triplet. To access e.g.\ \code{stage} one must specify element 0 of the triplet returned by file\_function. 1865 1867 … … 1875 1877 1876 1878 \subsubsection{What sort of mesh resolution should I use?} 1877 The mesh resolution should be commensurate with your DEM - it does not make sense to put in place a mesh which is finer than your DEM. As an example, 1879 The mesh resolution should be commensurate with your DEM - it does not make sense to put in place a mesh which is finer than your DEM. As an example, 1878 1880 if your DEM is on a 25m grid, then the cell resolution should be of the order of 315$m^2$ (this represents half the area of the square grid). Ideally, 1879 you need a fine mesh over regions where the DEM changes rapidly, and other areas of significant interest, such as the coast. 1881 you need a fine mesh over regions where the DEM changes rapidly, and other areas of significant interest, such as the coast. 1880 1882 1881 1883 \subsubsection{How often should I store the output?} 1882 1884 This will depend on what you are trying to answer with your model and how much memory you have available on your machine. If you need 1883 to look in detail at the evolution, then you will need to balance against your storage requirements and the duration of the simulation. 1885 to look in detail at the evolution, then you will need to balance against your storage requirements and the duration of the simulation. 1884 1886 If the sww file exceeds 1Gb, another sww file will be created until the end of the simulation. As an example, to store all the conserved 1885 1887 quantities on a mesh with approximately 300000 triangles on a 2 min interval for 5 hours will result in approximately 350Mb sww file. … … 1919 1921 \item \indexedbold{IDLE} - Development environment shipped with Python 1920 1922 1921 \item \indexedbold{Manning friction coefficient} 1923 \item \indexedbold{Manning friction coefficient} 1922 1924 1923 1925 \item \indexedbold{mesh} - Triangulation of domain … … 1970 1972 NOTE: More can be read in the module utilities/polygon.py .... 1971 1973 1972 \item \indexedbold{easting} - A rectangular (x,y) coordinate measurement of distance east from a north-south reference line, 1974 \item \indexedbold{easting} - A rectangular (x,y) coordinate measurement of distance east from a north-south reference line, 1973 1975 usually a meridian used as the axis of origin within a map zone or projection. Easting is a UTM (Universal Transverse Mercator) Coordinate. 1974 1976 1975 \item \indexedbold{northing} - A rectangular (x,y) coordinate measurement of distance north from a north-south reference line, 1977 \item \indexedbold{northing} - A rectangular (x,y) coordinate measurement of distance north from a north-south reference line, 1976 1978 usually a meridian used as the axis of origin within a map zone or projection. Northing is a UTM (Universal Transverse Mercator) Coordinate. 1977 1979 … … 1979 1981 \item \indexedbold{latitude} - The angular distance on a mericlear north and south of the equator, expressed in degrees and minutes. 1980 1982 1981 \item \indexedbold{longitude} - The angular distance east or west, between the meridian of a particular place on Earth and that of the 1983 \item \indexedbold{longitude} - The angular distance east or west, between the meridian of a particular place on Earth and that of the 1982 1984 Prime Meridian (located in Greenwich, England) expressed in degrees or time. 1983 1985 1984 1986 \item \indexedbold{edge} - A triangulare cell within the computational mesh can be depicted as a set of vertices joined by lines (the edges). 1985 1987 1986 \item \indexedbold{vertex} - A point at which edges meet. 1987 1988 \item \indexedbold{finite volume} - The method evaluates the terms in the shallow water wave equationas fluxes at the surfaces of each 1989 finite volume. Because the flux entering a given volume is identical to that leaving the adjacent volume, these methods are conservative. 1990 Another advantage of the finite volume method is that it is easily formulated to allow for unstructured meshes. 1988 \item \indexedbold{vertex} - A point at which edges meet. 1989 1990 \item \indexedbold{finite volume} - The method evaluates the terms in the shallow water wave equationas fluxes at the surfaces of each 1991 finite volume. Because the flux entering a given volume is identical to that leaving the adjacent volume, these methods are conservative. 1992 Another advantage of the finite volume method is that it is easily formulated to allow for unstructured meshes. 1991 1993 The method is used in many computational fluid dynamics packages. 1992 1994 1993 1995 1994 \item \indexedbold{flux} - the amount of flow through the volume per unit time 1995 1996 \item \indexedbold{Digital Elevation Model (DEM)} - DEMs are digital files consisting of points of elevations, 1997 sampled systematically at equally spaced intervals. 1996 \item \indexedbold{flux} - the amount of flow through the volume per unit time 1997 1998 \item \indexedbold{Digital Elevation Model (DEM)} - DEMs are digital files consisting of points of elevations, 1999 sampled systematically at equally spaced intervals. 1998 2000 1999 2001
Note: See TracChangeset
for help on using the changeset viewer.