Changeset 3091
- Timestamp:
- Jun 6, 2006, 10:01:40 AM (19 years ago)
- Location:
- documentation/user_manual
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/user_manual/anuga_user_manual.tex
r3087 r3091 734 734 user. The user specifies the \emph{resolution}---that is, the maximal 735 735 area of a triangle used for triangulation---and mesh points are 736 created inside the polygon through a random process. Figure 736 created inside the polygon using a mesh generation engine. On any 737 given platform, the same mesh will be returned. Figure 737 738 \ref{fig:pentagon} shows a simple example of this, in which 738 739 the triangulation is carried out within a pentagon. … … 760 761 the user to specify a number of \emph{interior polygons}, which are 761 762 triangulated separately, each according to a separately specified 762 resolution . See Figure \ref{fig:interior meshes}. It is also763 resolution, see Figure \ref{fig:interior meshes}. It is also 763 764 possible to specify one or more `holes'---that is, areas bounded by 764 765 polygons in which no triangulation is required. … … 905 906 906 907 {\small \begin{verbatim} 907 domain.set_quantity('friction', 0.0 3)908 domain.set_quantity('friction', 0.0) 908 909 \end{verbatim}} 909 910 … … 962 963 963 964 With the basics established, the running of the `evolve' step is 964 very similar to the corresponding step in \file{runup.py}: 965 very similar to the corresponding step in \file{runup.py}. Here, 966 the simulation is run for five hours (18000 seconds) with 967 the output stored every two minutes (120 seconds). 965 968 966 969 {\small \begin{verbatim} … … 982 985 This chapter gives an overview of the features of \anuga available 983 986 to the user at the public interface. These are grouped under the 984 following headings: 987 following headings and follows the outline of the examples described 988 earlier: 985 989 986 990 \begin{itemize} … … 996 1000 The listings are intended merely to give the reader an idea of what 997 1001 each feature is, where to find it and how it can be used---they do 998 not give full specifications . For these the reader1002 not give full specifications; for these the reader 999 1003 may consult the code. The code for every function or class contains 1000 1004 a documentation string, or `docstring', that specifies the precise … … 1080 1084 1081 1085 This function allows a user to initiate the automatic creation of a 1082 mesh inside a specified polygon. Among the parameters that can be 1086 mesh inside a specified polygon (input \code{bounding_polygon}). 1087 Among the parameters that can be 1083 1088 set are the \emph{resolution} (maximal area for any triangle in the 1084 1089 mesh) and the minimal angle allowable in any triangle. The user can 1085 1090 specify a number of internal polygons within each of which a 1086 1091 separate mesh is to be created, generally with a smaller resolution. 1092 \code{interior_regions} is a paired list containing the interior 1093 polygon and its resolution. 1087 1094 Additionally, the user specifies a list of boundary tags, one for 1088 1095 each edge of the bounding polygon. … … 1105 1112 % Translate following into layman's language 1106 1113 This method is used to add a region to a \class{Mesh} instance. The 1107 region is described by the polygon passed in. Additionally, the1114 region is described by the input \code{polygon}. Additionally, the 1108 1115 user specifies a list of boundary tags, one for each edge of the 1109 1116 bounding polygon. … … 1117 1124 1118 1125 % Translate following into layman's language 1119 This method is used to add a `hole'---that is, a region where the 1126 This method is used to add a `hole' wihtin a region ---that is, to define a 1127 interior region where the 1120 1128 triangular mesh will not be generated---to a \class{Mesh} instance. 1121 1129 The region is described by the polygon passed in. Additionally, the … … 1289 1297 \item a function (e.g.\ see the samples introduced in Chapter 2) 1290 1298 \item an expression composed of other quantities and numbers, arrays, lists (for 1291 example, a linear combination of quantities) 1299 example, a linear combination of quantities, such as 1300 \code{domain.set\_quantity('stage','elevation'+x))} 1292 1301 \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. 1293 1302 \item a geospatial dataset (See ?????). Optional argument attribute_name applies here as with files. … … 1327 1336 with \code{set_quantity}. 1328 1337 1329 \begin{funcdesc}{ tsunami_slump}{length, depth, slope, width=None, thickness=None,1338 \begin{funcdesc}{slump_tsunami}{length, depth, slope, width=None, thickness=None, 1330 1339 x0=0.0, y0=0.0, alpha=0.0, 1331 1340 gravity=9.8, gamma=1.85, … … 1334 1343 domain=None, 1335 1344 verbose=False} 1345 Module: \module{pyvolution.smf} 1346 1336 1347 This function returns a callable object representing an initial water 1337 1348 displacement generated by a submarine sediment failure. These failures can take the form of 1338 a submarine slump or slide. 1349 a submarine slump or slide. In the case of a slide, use \code{slide_tsunami} instead. 1339 1350 1340 1351 The arguments include as a minimum, the slump or slide length, the water depth to the centre of sediment … … 1352 1363 Module: \module{pyvolution.util} 1353 1364 1354 Reads the time history of spatial data from NetCDF file and returns 1355 a callable object. Returns interpolated values based on the input 1365 Reads the time history of spatial data for 1366 specified interpolation points from a NetCDF file (\code{filename}) 1367 and returns 1368 a callable object. \code{filename} could be a \code{sww} file. 1369 Returns interpolated values based on the input 1356 1370 file using the underlying \code{interpolation_function}. 1357 1371 … … 1363 1377 for points at which values are sought. 1364 1378 1365 T o get access to the model time stored within the file function use1379 The model time stored within the file function can be accessed using 1366 1380 the method \code{f.get_time()} 1367 1381 \end{funcdesc} … … 1471 1485 1472 1486 A Dirichlet boundary returns constant values for the conserved 1473 quantities. 1487 quantities. In the example of \code{Dirichlet\_boundary([0.2, 0.0, 0.0])}, 1488 the \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 1490 a value for each conserved quantity. 1474 1491 \end{classdesc} 1475 1492 … … 1529 1546 outputting statistics whenever a user-specified period 1530 1547 \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 1532 1551 specifies the total time period over which the evolution is to take 1533 1552 place, by specifying values (in seconds) for either \code{duration} … … 1806 1825 \code{8644444.0} 1807 1826 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 1809 1829 coordinates (in this case (466600.0, 8644444.0)) of the lower left corner. 1810 1830 … … 1823 1843 1824 1844 An ASC file is an ASCII representation of DEM output from ArcView. 1825 It has the following format... 1845 It 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 1856 The remainder of the file contains the elevation data for each grid point 1857 in the grid defined by the above information. 1826 1858 1827 1859 A PRJ file is an ArcView file used in conjunction with an ASC file … … 1858 1890 Module: \module{pyvolution.data\_manager} 1859 1891 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. 1862 1897 \end{funcdesc} 1863 1898 … … 2017 2052 \begin{tabular}{|ll|} \hline 2018 2053 2019 \code{w} & toggle wireframe \\2054 \code{w} & toggle wireframe \\ 2020 2055 2021 2056 space bar & start/stop\\ … … 2171 2206 Module: \code{utilities.polygon} 2172 2207 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}]}. 2177 2213 \end{funcdesc} 2178 2214 … … 2451 2487 2452 2488 \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 mesh2454 in \code{domain.set_quantity}2489 You use \code{dem2pts} to convert your DEM to the required .pts format. This .pts file is then called 2490 when setting the elevation data to the mesh in \code{domain.set_quantity} 2455 2491 2456 2492 \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,2493 Try 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, 2458 2494 or non-existant. 2459 2495 … … 2465 2501 \subsubsection{How often should I store the output?} 2466 2502 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 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. 2503 to look in detail at the evolution, then you will need to balance your storage requirements and the duration of the simulation. 2504 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 2505 quantities 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). 2470 2507 2471 2508 \subsection{Boundary Conditions} 2472 2509 2473 2510 \subsubsection{How do I create a Dirichlet boundary condition?} 2511 2512 A Dirichlet boundary condition sets a constant value for the 2513 conserved quantities at the boundaries. A list containing 2514 the constant values for stage, xmomentum and ymomentum is constructed 2515 and used in the function call, e.g. \code{Dirichlet_boundary([0.2,0.,0.])} 2474 2516 2475 2517 \subsubsection{How do I know which boundary tags are available?} -
documentation/user_manual/examples/runup.py
r2893 r3091 27 27 domain.set_name('bedslope') # Output to bedslope.sww 28 28 domain.set_datadir('.') # Use current directory for output 29 domain.set_quantities_to_be_stored(['stage', 29 domain.set_quantities_to_be_stored(['stage',# Store all conserved quantities 30 30 'xmomentum', 31 31 'ymomentum'])
Note: See TracChangeset
for help on using the changeset viewer.