Changeset 3091


Ignore:
Timestamp:
Jun 6, 2006, 10:01:40 AM (18 years ago)
Author:
sexton
Message:

updates

Location:
documentation/user_manual
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • documentation/user_manual/anuga_user_manual.tex

    r3087 r3091  
    734734user. The user specifies the \emph{resolution}---that is, the maximal
    735735area of a triangle used for triangulation---and mesh points are
    736 created inside the polygon through a random process. Figure
     736created inside the polygon using a mesh generation engine. On any
     737given platform, the same mesh will be returned. Figure
    737738\ref{fig:pentagon} shows a simple example of this, in which
    738739the triangulation is carried out within a pentagon.
     
    760761the user to specify a number of \emph{interior polygons}, which are
    761762triangulated separately, each according to a separately specified
    762 resolution. See Figure \ref{fig:interior meshes}. It is also
     763resolution, see Figure \ref{fig:interior meshes}. It is also
    763764possible to specify one or more `holes'---that is, areas bounded by
    764765polygons in which no triangulation is required.
     
    905906
    906907{\small \begin{verbatim}
    907     domain.set_quantity('friction', 0.03)
     908    domain.set_quantity('friction', 0.0)
    908909\end{verbatim}}
    909910
     
    962963
    963964With the basics established, the running of the `evolve' step is
    964 very similar to the corresponding step in \file{runup.py}:
     965very similar to the corresponding step in \file{runup.py}. Here,
     966the simulation is run for five hours (18000 seconds) with
     967the output stored every two minutes (120 seconds).
    965968
    966969{\small \begin{verbatim}
     
    982985This chapter gives an overview of the features of \anuga available
    983986to the user at the public interface. These are grouped under the
    984 following headings:
     987following headings and follows the outline of the examples described
     988earlier:
    985989
    986990\begin{itemize}
     
    9961000The listings are intended merely to give the reader an idea of what
    9971001each feature is, where to find it and how it can be used---they do
    998 not give full specifications. For these the reader
     1002not give full specifications; for these the reader
    9991003may consult the code. The code for every function or class contains
    10001004a documentation string, or `docstring', that specifies the precise
     
    10801084
    10811085This function allows a user to initiate the automatic creation of a
    1082 mesh inside a specified polygon. Among the parameters that can be
     1086mesh inside a specified polygon (input \code{bounding_polygon}).
     1087Among the parameters that can be
    10831088set are the \emph{resolution} (maximal area for any triangle in the
    10841089mesh) and the minimal angle allowable in any triangle. The user can
    10851090specify a number of internal polygons within each of which a
    10861091separate mesh is to be created, generally with a smaller resolution.
     1092\code{interior_regions} is a paired list containing the interior
     1093polygon and its resolution.
    10871094Additionally, the user specifies a list of boundary tags, one for
    10881095each edge of the bounding polygon.
     
    11051112% Translate following into layman's language
    11061113This method is used to add a region to a \class{Mesh} instance.  The
    1107 region is described by the polygon passed in.  Additionally, the
     1114region is described by the input \code{polygon}.  Additionally, the
    11081115user specifies a list of boundary tags, one for each edge of the
    11091116bounding polygon.
     
    11171124
    11181125% Translate following into layman's language
    1119 This method is used to add a `hole'---that is, a region where the
     1126This method is used to add a `hole' wihtin a region ---that is, to define a
     1127interior region where the
    11201128triangular mesh will not be generated---to a \class{Mesh} instance.
    11211129The region is described by the polygon passed in.  Additionally, the
     
    12891297\item a function (e.g.\ see the samples introduced in Chapter 2)
    12901298\item an expression composed of other quantities and numbers, arrays, lists (for
    1291 example, a linear combination of quantities)
     1299example, a linear combination of quantities, such as
     1300\code{domain.set\_quantity('stage','elevation'+x))}
    12921301\item the name of a file from which the data can be read. In this case, the optional argument attribute_name will select which attribute to use from the file. If left out, set_quantity will pick one. This is useful in cases where there is only one attribute.
    12931302\item a geospatial dataset (See ?????). Optional argument attribute_name applies here as with files.
     
    13271336with \code{set_quantity}.
    13281337
    1329 \begin{funcdesc}{tsunami_slump}{length, depth, slope, width=None, thickness=None,
     1338\begin{funcdesc}{slump_tsunami}{length, depth, slope, width=None, thickness=None,
    13301339                x0=0.0, y0=0.0, alpha=0.0,
    13311340                gravity=9.8, gamma=1.85,
     
    13341343                domain=None,
    13351344                verbose=False}
     1345Module: \module{pyvolution.smf}
     1346
    13361347This function returns a callable object representing an initial water
    13371348displacement generated by a submarine sediment failure. These failures can take the form of
    1338 a submarine slump or slide.
     1349a submarine slump or slide. In the case of a slide, use \code{slide_tsunami} instead.
    13391350
    13401351The arguments include as a minimum, the slump or slide length, the water depth to the centre of sediment
     
    13521363Module: \module{pyvolution.util}
    13531364
    1354 Reads the time history of spatial data from NetCDF file and returns
    1355 a callable object. Returns interpolated values based on the input
     1365Reads the time history of spatial data for
     1366specified interpolation points from a NetCDF file (\code{filename})
     1367and returns
     1368a callable object. \code{filename} could be a \code{sww} file.
     1369Returns interpolated values based on the input
    13561370file using the underlying \code{interpolation_function}.
    13571371
     
    13631377for points at which values are sought.
    13641378
    1365 To get access to the model time stored within the file function use
     1379The model time stored within the file function can be accessed using
    13661380the method \code{f.get_time()}
    13671381\end{funcdesc}
     
    14711485
    14721486A Dirichlet boundary returns constant values for the conserved
    1473 quantities.
     1487quantities. In the example of \code{Dirichlet\_boundary([0.2, 0.0, 0.0])},
     1488the \code{stage} value at the boundary is 0.2 and the \code{xmomentum} and
     1489\code{ymomentum} at the boundary are set to 0.0. The list must contain
     1490a value for each conserved quantity.
    14741491\end{classdesc}
    14751492
     
    15291546  outputting statistics whenever a user-specified period
    15301547  \code{yieldstep} is completed (generally during this period the
    1531   model will evolve through several steps internally). The user
     1548  model will evolve through several steps internally
     1549  as the method forces the water speed to be calculated
     1550  on successive new cells). The user
    15321551  specifies the total time period over which the evolution is to take
    15331552  place, by specifying values (in seconds) for either \code{duration}
     
    18061825            \code{8644444.0}
    18071826
    1808         Here the first number specifies the zone (in this case zone 56)  and other numbers specify the
     1827        Here the first number specifies the UTM zone (in this case zone 56)  and other numbers specify the
     1828        easting and northing
    18091829        coordinates (in this case (466600.0, 8644444.0)) of the lower left corner.
    18101830
     
    18231843
    18241844An ASC file is an ASCII representation of DEM output from ArcView.
    1825 It has the following format...
     1845It contains a header with the following format:
     1846
     1847\begin{tabular}{l l}
     1848\code{ncols}      &   \code{753}
     1849\code{nrows}      &   \code{766}
     1850\code{xllcorner}  &   \code{314036.58727982}
     1851\code{yllcorner}  &   \code{6224951.2960092}
     1852\code{cellsize}   &   \code{100}
     1853\code{NODATA_value} & \code{-9999}
     1854\end{tabular}
     1855
     1856The remainder of the file contains the elevation data for each grid point
     1857in the grid defined by the above information.
    18261858
    18271859A PRJ file is an ArcView file used in conjunction with an ASC file
     
    18581890  Module: \module{pyvolution.data\_manager}
    18591891
    1860   Takes data from an SWW file and converts it to DEM format (ASC or
    1861   ERS)
     1892  Takes data from an SWW file \code{basename_in} and converts it to DEM format (ASC or
     1893  ERS) of a desired grid size \code{cellsize} in metres.
     1894  The easting and northing values are used if the user wished to clip the output
     1895  file to a specified rectangular area. The \code{reduction} input refers to a function
     1896  to reduce the quantities over all time step of the SWW file, example, maximum.
    18621897  \end{funcdesc}
    18631898
     
    20172052\begin{tabular}{|ll|}   \hline
    20182053
    2019 \code{w} & toggle wireframe\\
     2054\code{w} & toggle wireframe \\
    20202055
    20212056space bar & start/stop\\
     
    21712206  Module: \code{utilities.polygon}
    21722207
    2173   Plots each polygon contained in input polygon list, e.g. [poly1, poly2, poly3].
    2174  Each polygon is closed for plotting purposes and subsequent plot saved to figname.
    2175   Returns list containing the minimum and maximum of $x$ and $y$,
    2176   i.e. [$x_{min}, x_{max}, y_{min}, y_{max}$].
     2208  Plots each polygon contained in input polygon list, e.g.
     2209 \code{polygons = [poly1, poly2, poly3]} where \code{poly1 = [[x11,y11],[x12,y12],[x13,y13]]}
     2210 etc.  Each polygon is closed for plotting purposes and subsequent plot saved to \code{figname}.
     2211  Returns list containing the minimum and maximum of \code{x} and \code{y},
     2212  i.e. \code{[x_{min}, x_{max}, y_{min}, y_{max}]}.
    21772213  \end{funcdesc}
    21782214
     
    24512487
    24522488\subsubsection{How do I use a DEM in my simulation?}
    2453 You use \code{dem2pts} to convert your DEM to the required .pts format. This .pts file is then called When setting the elevation data to the mesh
    2454 in \code{domain.set_quantity}
     2489You use \code{dem2pts} to convert your DEM to the required .pts format. This .pts file is then called
     2490when setting the elevation data to the mesh in \code{domain.set_quantity}
    24552491
    24562492\subsubsection{What sort of DEM resolution should I use?}
    2457 Try and work with the "best" you have available. Onshore DEMs are typically available in 25m, 100m and 250m grids. Note, offshore data is often sparse,
     2493Try and work with the \emph{best} you have available. Onshore DEMs are typically available in 25m, 100m and 250m grids. Note, offshore data is often sparse,
    24582494or non-existant.
    24592495
     
    24652501\subsubsection{How often should I store the output?}
    24662502This 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
    2467 to look in detail at the evolution, then you will need to balance against your storage requirements and the duration of the simulation.
    2468 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
    2469 quantities on a mesh with approximately 300000 triangles on a 2 min interval for 5 hours will result in approximately 350Mb sww file.
     2503to look in detail at the evolution, then you will need to balance your storage requirements and the duration of the simulation.
     2504If 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
     2505quantities on a mesh with approximately 300000 triangles on a 2 min interval for 5 hours will result in approximately 350Mb SWW file
     2506(as for the \file{run\_sydney\_smf.py} example).
    24702507
    24712508\subsection{Boundary Conditions}
    24722509
    24732510\subsubsection{How do I create a Dirichlet boundary condition?}
     2511
     2512A Dirichlet boundary condition sets a constant value for the
     2513conserved quantities at the boundaries. A list containing
     2514the constant values for stage, xmomentum and ymomentum is constructed
     2515and used in the function call, e.g. \code{Dirichlet_boundary([0.2,0.,0.])}
    24742516
    24752517\subsubsection{How do I know which boundary tags are available?}
  • documentation/user_manual/examples/runup.py

    r2893 r3091  
    2727domain.set_name('bedslope')                 # Output to bedslope.sww
    2828domain.set_datadir('.')                     # Use current directory for output
    29 domain.set_quantities_to_be_stored(['stage',
     29domain.set_quantities_to_be_stored(['stage',# Store all conserved quantities
    3030                                    'xmomentum',
    3131                                    'ymomentum'])   
Note: See TracChangeset for help on using the changeset viewer.