Changeset 3103


Ignore:
Timestamp:
Jun 6, 2006, 3:49:35 PM (19 years ago)
Author:
ole
Message:

Comments to userguide from Ole (meeting with Howard)

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • documentation/user_manual/anuga_user_manual.tex

    r3102 r3103  
    176176conditions such as tide, and any forcing terms that may drive the
    177177system such as wind stress or atmospheric pressure gradients.
    178 Frictional resistance from the different terrains in the model is
     178Gravity and frictional resistance from the different terrains in the model are
    179179represented by predefined forcing terms.
    180180
     
    294294several other schemes that can be used for setting up meshes, but we
    295295shall not discuss these now.) The above assignment sets up a $10
    296 \times 10$ rectangular mesh, triangulated in a specific way. In
    297 general, the assignment
     296\times 10$ rectangular mesh, triangulated in a regular way. The assignment
    298297
    299298{\small \begin{verbatim}
     
    319318
    320319\end{itemize}
     320
     321An example of a general unstructured mesh and the
     322associated data structures \code{points}, \code{vertices} and \code{boundary}
     323is given in Section \ref{xxxx}.
     324
    321325
    322326Since these three variables encapsulate the information needed to
     
    502506\end{verbatim}}
    503507
    504 which specifies that the surface level is set to a height of $-0.4$, i.e. 0.4 units
    505 below the zero level.
    506 
    507 (Although it is not necessary for this example, it may be useful to
     508which specifies that the surface level is set to a height of $-0.4$,
     509i.e. 0.4 units (m) below the zero level.
     510
     511Although it is not necessary for this example, it may be useful to
    508512digress here and mention a variant to this requirement, which allows
    509513us to illustrate another way to use \method{set\_quantity}---namely,
     
    525529The reader will probably appreciate that this capability to
    526530incorporate expressions into statements using \method{set\_quantity}
    527 greatly expands its power.)
     531greatly expands its power.) See Section \ref{sec:Initial Conditions} for more
     532details.
    528533
    529534\subsection{Boundary Conditions}
     
    562567      may cause occasional spurious effects. If this occurs,
    563568      consider using e.g. a Dirichlet boundary condition.
    564     \item \textbf{[Dirichlet boundary}\label{def:dirichlet boundary} Specifies a fixed value at the
    565       boundary and assigns initial values to the $x$-momentum and $y$-momentum.
    566     \item \textbf{Time boundary}\label{def:time boundary} Like a Dirichlet boundary but with behaviour
    567       varying with time.
     569    \item \textbf{[Dirichlet boundary}\label{def:dirichlet boundary} Specifies
     570      constant values for stage, $x$-momentum and $y$-momentum at the boundary.
     571    \item \textbf{Time boundary}\label{def:time boundary} Like a Dirichlet
     572      boundary but with behaviour varying with time.
    568573\end{itemize}
    569574
     
    615620The output is a NetCDF file with the extension \code{.sww}. It
    616621contains stage and momentum information and can be used with the
    617 \code{swollen} visualisation package to generate a visual display.
     622\code{swollen} (see Section \ref{sec:swollen})
     623visualisation package to generate a visual display.
    618624See Section \ref{sec:file formats} (page \pageref{sec:file formats})
    619625for more on NetCDF and other file formats.
     
    625631
    626632\begin{itemize}
    627   \item{from a Windows command line} as in \code{python runup.py}
     633  \item{from a Windows or Unix command line} as in\ \code{python runup.py}
    628634  \item{within the Python IDLE environment}
    629635  \item{within emacs}
    630   \item{from a Linux command line} as in \code{python runup.py}
    631636\end{itemize}
    632637
     
    676681The following discussion builds on the concepts introduced through
    677682the \file{runup.py} example and introduces a second
    678 example, \file{run\_sydney\_smf.py}, that follows the same basic
     683example, \file{run\_sydney.py}, that follows the same basic
    679684outline, but incorporates more complex features and refers to a
    680685real-life scenario, rather than the artificial illustrative one used
     
    816821
    817822{\small \begin{verbatim}
    818     create_mesh_from_regions(project.diffpolygonall,%
    819                          boundary_tags= {'bottom': [0],%
    820                                          'right1': [1],%
    821                                          'right0': [2],%
    822                                          'right2': [3],%
    823                                          'top': [4],%
    824                                          'left1': [5],%
    825                                          'left2': [6],%
    826                                          'left3': [7]},%
    827                          maximum_triangle_area=100000,%
    828                          filename=meshname,%
     823    create_mesh_from_regions(project.diffpolygonall,
     824                         boundary_tags= {'bottom': [0],
     825                                         'right1': [1],
     826                                         'right0': [2],
     827                                         'right2': [3],
     828                                         'top': [4],
     829                                         'left1': [5],
     830                                         'left2': [6],
     831                                         'left3': [7]},
     832                         maximum_triangle_area=100000,
     833                         filename=meshname,
    829834                         interior_regions=interior_regions)
    830835\end{verbatim}}
     
    871876
    872877{\small \begin{verbatim}
    873     domain.set_name(project.basename)%
    874     domain.set_datadir(project.outputdir)%
     878    domain.set_name(project.basename)
     879    domain.set_datadir(project.outputdir)
    875880    domain.set_quantities_to_be_stored(['stage', 'xmomentum',
    876881        'ymomentum'])
     
    952957boundary types introduced for \file{runup.py}, we use the reflective
    953958boundary for each of the
    954 eight tagged segments:
     959eight tagged segments defined by \code{create_mesh_from_regions}:
    955960
    956961{\small \begin{verbatim}
     
    10501055%\textbf{Name } & \textbf{Description}\\
    10511056%\hline
    1052 \emph{usecache} & Specifies whether caching is to be used\\
     1057\emph{use\_cache} & Specifies whether caching is to be used for improved performance. See Section \ref{sec:caching} for details on the underlying caching functionality\\
    10531058\emph{verbose} & If \code{True}, provides detailed terminal output
    10541059to the user\\  % \hline
     
    12831288%%%%%%
    12841289\section{Initial Conditions}
    1285 
     1290\label{sec:Initial Conditions}
    12861291In standard usage of partial differential equations, initial conditions
    12871292refers to the values associated to the system variables (the conserved
     
    15361541
    15371542
     1543
     1544%%%
     1545\begin{classdesc}{Transmissive\_Momentum\_Set\_Stage\_boundary}{Boundary}
     1546Module: \module{pyvolution.shallow\_water}
     1547
     1548This boundary returns same momentum conserved quantities as
     1549those present in its neighbour volume but sets stage as in a Time\_boundary.
     1550The underlying domain must be specified when boundary is instantiated
     1551
     1552This type of boundary is useful when stage is known at the boundary as a
     1553function of time, but momenta (or speeds) aren't.
     1554
     1555This class is specific to the shallow water equation as it works with the
     1556momentum quantities assumed to be the second and third conserved quantities.
     1557\end{classdesc}
     1558
     1559
     1560
    15381561\subsection{User-defined boundary conditions}
    15391562\label{sec:roll your own}
    1540 [How to roll your own]
     1563[How to roll your own] TBA
    15411564
    15421565
     
    15921615\subsection{Diagnostics}
    15931616
     1617
     1618  \begin{funcdesc}{statistics}{}
     1619  Module: \module{pyvolution.domain}
     1620 
     1621 
    15941622  \begin{funcdesc}{timestepping\_statistics}{}
    15951623  Module: \module{pyvolution.domain}
     
    20342062  detected by examining the functions \code{bytecode (co\_code, co\_consts,
    20352063  func\_defaults, co\_argcount)} and the function will be recomputed.
     2064  However, caching will not detect changes in modules used by \code{func}.
     2065  In this case cache must be cleared manually.
    20362066
    20372067  Options are set by means of the function \code{set\_option(key, value)},
     
    24702500\label{mod:pyvolution.generalmesh}
    24712501
    2472 \section{\module{pyvolution.mesh} }
    2473 \declaremodule{}{pyvolution.mesh}
    2474 \label{mod:pyvolution.mesh}
     2502\section{\module{pyvolution.neighbour\_mesh} }
     2503\declaremodule[pyvolution.neighbourmesh]{}{pyvolution.neighbour\_mesh}
     2504\label{mod:pyvolution.neighbourmesh}
    24752505
    24762506\section{\module{pyvolution.domain} --- Generic module for 2D triangular domains for finite-volume computations of conservation laws}
     
    24822512\declaremodule{}{pyvolution.quantity}
    24832513\label{mod:pyvolution.quantity}
     2514
     2515
     2516Class Quantity - Implements values at each triangular element
     2517
     2518To create:
     2519
     2520   Quantity(domain, vertex_values)
     2521
     2522   domain: Associated domain structure. Required.
     2523
     2524   vertex_values: N x 3 array of values at each vertex for each element.
     2525                  Default None
     2526
     2527   If vertex_values are None Create array of zeros compatible with domain.
     2528   Otherwise check that it is compatible with dimenions of domain.
     2529   Otherwise raise an exception
     2530
    24842531
    24852532
  • inundation/utilities/numerical_tools.py

    r2976 r3103  
    7777
    7878def normal_vector(v):
    79     """Normal vector to v
     79    """Normal vector to v.
     80
     81    Returns vector 90 degrees counter clockwise to and of same length as v
    8082    """
    8183   
     
    117119       n = None: Max norm
    118120
    119        If denominator evaluates to zero or if y is omitted,
     121       If denominator evaluates to zero or
     122       if y is omitted or
     123       if keyword relative is False,
    120124       absolute error is returned
    121125    """
Note: See TracChangeset for help on using the changeset viewer.