Changeset 2542 for documentation


Ignore:
Timestamp:
Mar 13, 2006, 10:43:13 PM (19 years ago)
Author:
steve
Message:

Small typos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentation/user_manual/anuga_user_manual.tex

    r2536 r2542  
    171171The present example represents a simple scenario and does not
    172172include any forcing terms, nor is the data taken from a file as it
    173 would be in many typical cases. 
     173would be in many typical cases.
    174174
    175175The conserved quantities involved in the
    176176problem are water depth, $x$-momentum and $y$-momentum. Other quantities
    177 involved in the computation are the friction, stage (absolute height of water surface) 
     177involved in the computation are the friction, stage (absolute height of water surface)
    178178and elevation, the last two being related to
    179179the depth through the equation
    180180
    181181{\small \begin{verbatim}
    182 \code{stage} = \code{elevation} + \code{depth}
     182stage = elevation + depth
    183183\end{verbatim}}
    184184
     
    335335
    336336The stage (the height of the water surface) is related to the
    337 elevation and the depth at any time by the equation \[\code{stage} =
    338 \code{elevation} + \code{depth}\]
     337elevation and the depth at any time by the equation {\small
     338\begin{verbatim}
     339    stage = elevation + depth
     340\end{verbatim}}
    339341
    340342For this example, we simply assign a constant value to \code{stage},
     
    345347\end{verbatim}}
    346348
    347 which specifies that the surface level is set to a height of $-0.4$, i.e. 0.4 units 
     349which specifies that the surface level is set to a height of $-0.4$, i.e. 0.4 units
    348350below the zero level.
    349351
     
    353355involving other quantities. Suppose, instead of setting a constant value
    354356for the stage, we wished
    355 to specify a constant value for the \emph{depth}. For such a case we 
     357to specify a constant value for the \emph{depth}. For such a case we
    356358need to specify that \code{stage} is
    357359everywhere obtained by adding that value to the value already
     
    363365\end{verbatim}}
    364366
    365 That is, the value of \code{stage} is set to $\code{h} = 0.05$ plus the 
     367That is, the value of \code{stage} is set to $\code{h} = 0.05$ plus the
    366368value of \code{elevation} already defined.
    367369
    368 The reader will probably appreciate that this capability to incorporate 
     370The reader will probably appreciate that this capability to incorporate
    369371expressions into statements using \code{set\_quantity} greatly expands
    370372its power.)
     
    403405
    404406    \item[Dirichlet boundary]Specifies a fixed value at the
    405 boundary and assigns initial values to the $x$-momentum and $y$-momentum. 
     407boundary and assigns initial values to the $x$-momentum and $y$-momentum.
    406408
    407409    \item[Time boundary.]A Dirichlet boundary whose behaviour varies with time.
     
    421423
    422424The reader may wish to experiment by varying the choice of boundary types
    423 for one or more of the boundaries. In the case of \code{Bd} and \code{Bw}, 
    424 the three arguments in each case represent the 
     425for one or more of the boundaries. In the case of \code{Bd} and \code{Bw},
     426the three arguments in each case represent the
    425427
    426428{\small \begin{verbatim}
     
    476478
    477479
    478 \begin{figure}[hbt] 
    479 
    480   \centerline{ \includegraphics[width=75mm, height=75mm]{examples/bedslope_start.eps}}
    481  
     480\begin{figure}[hbt]
     481
     482  \centerline{ \includegraphics[width=75mm, height=75mm]{examples/bedslopestart.eps}}
     483
    482484  \caption{Bedslope example viewed with Swollen}
    483485  \label{fig:bedslopestart}
    484 \end{figure} 
    485 
    486 
    487 \begin{figure}[hbt] 
    488 
    489   \centerline{ 
    490     \includegraphics[width=75mm, height=75mm]{examples/bedslope_during.eps}
    491     \includegraphics[width=75mm, height=75mm]{examples/bedslope_end.eps}
    492    }   
    493  
     486\end{figure}
     487
     488
     489\begin{figure}[hbt]
     490
     491  \centerline{
     492    \includegraphics[width=75mm, height=75mm]{examples/bedslopeduring.eps}
     493    \includegraphics[width=75mm, height=75mm]{examples/bedslopeend.eps}
     494   }
     495
    494496  \caption{Bedslope example viewed with Swollen}
    495497  \label{fig:bedslope2}
    496 \end{figure} 
     498\end{figure}
    497499
    498500
     
    511513scenario, rather than the artificial illustrative one used in
    512514\code{bedslopephysical.py}. The domain of interest surrounds the Sydney region,
    513 and predominantly covers Sydney Harbour. A hypothetical tsunami wave is 
     515and predominantly covers Sydney Harbour. A hypothetical tsunami wave is
    514516generated by a submarine mass failure situated on the edge of the
    515517continental shelf.
     
    567569area of a triangle used for triangulation---and mesh points are
    568570created inside the polygon through a random process. Figure
    569 \ref{fig:pentagon} shows a simple example of this, in which 
     571\ref{fig:pentagon} shows a simple example of this, in which
    570572the triangulation is carried out within a pentagon.
    571573
    572574
    573 \begin{figure}[hbt] 
    574 
    575 
    576  
     575\begin{figure}[hbt]
     576
     577
     578
    577579  \caption{Mesh points are created inside the polygon}
    578   \label{fig:pentagon} 
    579 \end{figure} 
     580  \label{fig:pentagon}
     581\end{figure}
    580582
    581583Boundary tags are not restricted to \code{`left'}, \code{`right'},
     
    594596resolution. See Figure \ref{fig:interior meshes}.
    595597
    596 \begin{figure}[hbt] 
    597 
    598 
    599  
     598\begin{figure}[hbt]
     599
     600
     601
    600602  \caption{Interior meshes with individual resolution}
    601   \label{fig:interior meshes} 
    602 \end{figure} 
     603  \label{fig:interior meshes}
     604\end{figure}
    603605
    604606In its general form, \code{pmesh} takes for its input a bounding
     
    631633\code{meshname}.
    632634
    633 The statements 
     635The statements
    634636
    635637{\small \begin{verbatim}
     
    641643are used to read in the specific polygons \code{project.harbour\_polygon\_2} and
    642644\code{botanybay\_polygon\_2} from \code{project.py} and assign a
    643 common resolution of 5000 to each. The statement 
     645common resolution of 5000 to each. The statement
    644646
    645647{\small \begin{verbatim}
    646648    create_mesh_from_regions(project.diffpolygonall,%
    647                          boundary_tags= {'bottom': [0],% 
     649                         boundary_tags= {'bottom': [0],%
    648650                                         'right1': [1],%
    649651                                         'right0': [2],%
     
    654656                                         'left3': [7]},%
    655657                         maximum_triangle_area=100000,%
    656                          filename=meshname,%           
     658                         filename=meshname,%
    657659                         interior_regions=interior_regions)
    658660\end{verbatim}}
    659661
    660662is then used to create the mesh, taking the bounding polygon to be the polygon
    661 \code{diffpolygonall} specified in \code{project.py}. The 
    662 argument \code{boundary\_tags} assigns a dictionary, whose keys are the 
    663 names of the boundary tags used for the bounding polygon---\code{`bottom'}, 
    664 `right0', `right1', `right2', `top', `left1', `left2' and `left3'--- 
     663\code{diffpolygonall} specified in \code{project.py}. The
     664argument \code{boundary\_tags} assigns a dictionary, whose keys are the
     665names of the boundary tags used for the bounding polygon---\code{`bottom'},
     666`right0', `right1', `right2', `top', `left1', `left2' and `left3'---
    665667and whose values identify the indices of the segments associated with each of these
    666668tags. (The value associated with each boundary tag is a one-element list.)
     
    695697taken from \code{project.py}.
    696698
    697 {\small \begin{verbatim} 
     699{\small \begin{verbatim}
    698700    domain.set_name(project.basename)%
    699701    domain.set_datadir(project.outputdir)%
     
    718720\code{slump\_tsunami}. This is similar to how we set elevation in
    719721\code{bedslopephysical.py} using a function---however, in this case the
    720 function is both more complex and more interesting. 
    721 
    722 The function returns the water displacement for all \code{x} 
    723 and \code{y} in the domain. The water displacement is a ?? function that depends 
     722function is both more complex and more interesting.
     723
     724The function returns the water displacement for all \code{x}
     725and \code{y} in the domain. The water displacement is a ?? function that depends
    724726on the characteristics of the slump (length, thickness, slope, etc), its
    725 location (origin) and the depth at that location. 
     727location (origin) and the depth at that location.
    726728
    727729
     
    739741The elevation is specified by reading data from a file:
    740742
    741 {\small \begin{verbatim}%
    742     domain.set_quantity('elevation',%
    743                     filename = project.combineddemname + '.pts',%
    744                     use_cache = True,%
    745                     verbose = True)%
     743{\small \begin{verbatim}
     744    domain.set_quantity('elevation',
     745                    filename = project.combineddemname + '.pts',
     746                    use_cache = True,
     747                    verbose = True)
    746748\end{verbatim}}
    747749
     
    770772\subsection{Boundary Conditions}
    771773
    772 Setting boundaries follows a similar pattern to the one used for 
    773 \code{bedslopephysical.py}, except that in this case we need to associate a 
     774Setting boundaries follows a similar pattern to the one used for
     775\code{bedslopephysical.py}, except that in this case we need to associate a
    774776boundary type with each of the
    775 boundary tag names introduced when we established the mesh. In place of the four 
    776 boundary types introduced for \code{bedslopephysical.py}, we use the reflective 
     777boundary tag names introduced when we established the mesh. In place of the four
     778boundary types introduced for \code{bedslopephysical.py}, we use the reflective
    777779boundary for each of the
    778780eight tagged segments:
     
    792794{\small \begin{verbatim}
    793795    import time t0 = time.time()
    794    
     796
    795797    for t in domain.evolve(yieldstep = 120, duration = 18000):
    796798        print domain.timestepping_statistics()
    797799        print domain.boundary_statistics(tags = 'bottom')
    798    
     800
    799801    print 'That took %.2f seconds' %(time.time()
    800802\end{verbatim}}
     
    917919\section{Setting Quantities}
    918920
    919 \begin{funcdesc}{set\_quantity}{name, numeric = None, quantity = None, function = None, 
    920                    geospatial_data = None, filename = None, attribute_name = None, 
     921\begin{funcdesc}{set\_quantity}{name, numeric = None, quantity = None, function = None,
     922                   geospatial_data = None, filename = None, attribute_name = None,
    921923                   alpha = None, location = 'vertices', indices = None, verbose = False,
    922924                   use_cache = False}
     
    927929Compatible list, Numeric array (see below) or constant. If callable
    928930it will treated as a function (see below) If instance of another
    929 Quantity it will be treated as such. If geo_spatial object it will
     931Quantity it will be treated as such. If geo\_spatial object it will
    930932be treated as such
    931933
     
    12011203
    12021204  \end{funcdesc}
    1203  
    1204  
     1205
     1206
    12051207  \begin{funcdesc}{statistics}{???}
    12061208
    12071209    print domain.statistics() will provide basic structural statistics about e.g.\ mesh in the form of an area histogram
    1208   \end{funcdesc} 
    1209  
    1210  
     1210  \end{funcdesc}
     1211
     1212
    12111213  \begin{funcdesc}{get_quantity}{???}
    1212   Module: \code{pyvolution.domain} 
     1214  Module: \code{pyvolution.domain}
    12131215  Allow access to individual quantities and their methods
    1214  
    1215   \end{funcdesc} 
    1216  
    1217  
     1216
     1217  \end{funcdesc}
     1218
     1219
    12181220  \begin{funcdesc}{get_values}{???}
    1219   Module: \code{pyvolution.quantity}   
    1220  
     1221  Module: \code{pyvolution.quantity}
     1222
    12211223  Extract values for quantity as an array
    1222  
    1223   \end{funcdesc}   
    1224  
    1225  
     1224
     1225  \end{funcdesc}
     1226
     1227
    12261228  \begin{funcdesc}{get_integral}{???}
    1227   Module: \code{pyvolution.quantity}   
    1228  
     1229  Module: \code{pyvolution.quantity}
     1230
    12291231  Return computed integral over entire domain for this quantity
    1230  
    1231   \end{funcdesc}     
    1232  
    1233  
    1234 \section{Other} 
    1235 
    1236   \begin{funcdesc}{domain.create_quantity_from_expression}{???} 
    1237  
    1238   Handy for creating derived quantities on-the-fly. 
     1232
     1233  \end{funcdesc}
     1234
     1235
     1236\section{Other}
     1237
     1238  \begin{funcdesc}{domain.create_quantity_from_expression}{???}
     1239
     1240  Handy for creating derived quantities on-the-fly.
    12391241  See \code{Analytical\_solution\_circular\_hydraulic\_jump.py} for an example of use.
    1240   \end{funcdesc}       
     1242  \end{funcdesc}
    12411243
    12421244%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    13331335
    13341336  \begin{funcdesc}{sww2dem}{???}
    1335   Module: \code{pyvolution.data\_manager}   
    1336  
    1337  
    1338   \end{funcdesc}     
    1339 
    1340  
     1337  Module: \code{pyvolution.data\_manager}
     1338
     1339
     1340  \end{funcdesc}
     1341
     1342
    13411343  \begin{funcdesc}{dem2pts}{???}
    1342   Module: \code{pyvolution.data_manager}   
    1343  
    1344  
    1345   \end{funcdesc}       
     1344  Module: \code{pyvolution.data_manager}
     1345
     1346
     1347  \end{funcdesc}
    13461348
    13471349%\[
     
    15781580\section{geo_spatial_data}
    15791581
    1580 This describes a class that represents arbitrary point data in UTM 
     1582This describes a class that represents arbitrary point data in UTM
    15811583coordinates along with named attribute values.
    15821584
Note: See TracChangeset for help on using the changeset viewer.