Object hierarchy
From Gerris
Revision as of 08:35, 9 November 2010 Popinet (Talk | contribs) (→Functions and macros - added GfsSpatialSum) ← Previous diff |
Revision as of 08:36, 9 November 2010 Popinet (Talk | contribs) (→Functions and macros) Next diff → |
||
Line 43: | Line 43: | ||
* '''[[GfsDefine]]''' — Text macros | * '''[[GfsDefine]]''' — Text macros | ||
- | |||
- | * '''[[GfsConstant]]''' — Spatially-constant values | ||
- | ** '''[[GfsSpatialSum]]''' — Spatial integral of a function | ||
=== Variables === | === Variables === |
Revision as of 08:36, 9 November 2010
Contents |
Introduction
This page describes all the objects which can be used in Gerris parameter files. The syntax of each object is given using a simple convention which expresses "inheritance" from the parent object. This is more simply explained using an example e.g. GfsOutputScalarSum. The syntax of this object is described as
[ GfsOutputScalar ]
which means that this object is a descendant of GfsOutputScalar. Following the link gives the syntax of GfsOutputScalar as
[ GfsOutput ] { v = [ GfsFunction ] maxlevel = 6 min = -12.1 max = 1e3 box = -0.1,-0.1,0.1,0.1 }
which in turns means that this object is a descendant of GfsOutput but also takes the additional arguments described. Similarly GfsOutput is a descendent of GfsEvent and finally GfsEvent is a "root object class" which has no parent. Putting it all together, an example of use of GfsOutputScalarSum is
GfsOutputScalarSum { istep = 1 } sum { v = U }
where the red text is "inherited" from the GfsEvent great-grandparent, the blue text from the GfsOutput grandparent and the green text from the GfsOutputScalar parent.
Common objects
Note that the way the following list is indented reflects the inheritance hierarchy of each object.
Solvers
- GfsSimulation — Incompressible Euler and Navier-Stokes solver
- GfsAxi — Cylindrical (axisymmetric) coordinates
- GfsSimulationMoving — Integration of moving solid boundaries
- GfsOcean
- GfsAdvection
- GfsPoisson
- GfsWave — Spectral wave model
- GfsRiver — Solves the Saint-Venant equations
Functions and macros
- GfsGlobal — Global functions
- GfsFunction — Numerical constants and expressions
- GfsDefine — Text macros
Variables
- GfsVariable — Scalar fields
- GfsVariableTracer — Advected scalar fields
- GfsVariableTracerVOF — Volume-Of-Fluid advection
- GfsVariableResidual
- GfsVariableFiltered — Spatial filtering
- GfsVariableFunction — Optimising function evaluations
- GfsVariableStreamFunction — Maintaining a velocity field defined by a stream function
- GfsVariableCurvature — Curvature of an interface
- GfsVariablePosition — Coordinates of a VOF interface
- GfsVariableDistance — Signed distance to a VOF interface
- GfsVariableBoolean — Boolean value consistent with adaptive refinement
- GfsVariableAge — How old is this cell?
- GfsVariableTracer — Advected scalar fields
- GfsConstant — Spatially-constant but time-dependent variables
- GfsDischargeElevation — Elevation for a given discharge
- GfsSpatialSum — Compute spatial sum of GfsFunction
Parameters
- GfsPhysicalParams — Tuning box size, gravity and density
- GfsProjectionParams — Tuning the Poisson solver
- GfsAdvectionParams — Tuning the advection schemes
Solid boundaries
- GfsSolid — Solid boundaries
- GfsSolidMoving — Moving solid boundaries
- GfsSurfaceBc — Boundary conditions for diffusion equations
General orthogonal coordinates
- GfsMap — Coordinates transformations
- GfsMapTransform — Isometric coordinates transformations
- GfsMapFunction
Topology
Boundary conditions
- GfsBoundary — Default boundary conditions (symmetry)
- GfsBoundaryInflowConstant — Constant inflow
- GfsBoundaryOutflow — Free outflow/inflow
- GfsBoundaryPeriodic
- GfsBc — Base class for boundary conditions on individual variables
- GfsBcDirichlet — Dirichlet boundary condition (i.e. value)
- GfsBcNeumann — Neumann boundary condition (i.e. value of the normal derivative)
- GfsBcNavier — Navier slip/Robin boundary condition
- GfsBcFlather — "Flather" boundary conditions for barotropic flows
- GfsBcSubcritical
Initial mesh refinement
- GfsRefine — Simple definition of the refinement levels
- GfsRefineSolid — Refine embedded solid surfaces
- GfsRefineSurface — Refine cells cut by a surface
- GfsRefineDistance — Refine cells as a function of the distance from a surface
- GfsInitMask — "Masking out" part of the mesh
Initialisation of fields
- GfsEvent — Any action to be performed at a given time
- GfsInit — Initialising variables
- GfsInitFraction — Initialising volume fractions from interface shapes
- GfsInitVorticity — Initialising a vorticity field
- GfsInitWave — Initial wave spectrum for wave model
Adaptive mesh refinement
- GfsEvent
- GfsAdapt — Base class for adaptive refinement criteria
- GfsAdaptVorticity — Adapting cells depending on the local vorticity
- GfsAdaptGradient — Adapting cells depending on the local gradient of a variable
- GfsAdaptError — Adapting using an a posteriori error estimate
- GfsAdaptStreamlineCurvature
- GfsAdaptFunction — Adapting cells depending on the value of a function
- GfsAdapt — Base class for adaptive refinement criteria
Various events
- GfsEvent
- GfsEventSum — Time-integral of a variable or function
- GfsEventHarmonic — Harmonic decomposition of a variable
- GfsEventStop — Stopping when steady-state is reached
- GfsEventScript — Executing a shell-script at given times
- GfsEventBalance — Dynamic load-balancing
- GfsRemoveDroplets — Controlling the topology of interfaces
- GfsRemovePonds — Controlling the domain topology
- GfsEventFilter — Exponential filtering of variables
- GfsEventList — A List of events
Source terms
- GfsEvent
- GfsSourceGeneric — Abstract class for source terms
- GfsSourceScalar — Source terms for scalar variables
- GfsSource — Source defined by a function
- GfsSourceControl — Controlling the spatially-averaged value of a scalar
- GfsSourceControlField — Controlling the value of a scalar averaged at a given spatial scale
- GfsSourceFlux — Adding a flux on a given area or volume
- GfsSourceDiffusion — Scalar diffusion
- GfsSourceDiffusionExplicit — Time-explicit scalar diffusion
- GfsSourceVelocity — Source terms for velocity
- GfsSourceViscosity — Viscous terms
- GfsSourceFriction
- GfsSourceCoriolis — Coriolis acceleration and linear friction
- GfsSourceTension — Surface tension
- GfsSourceTensionCSS
- GfsSourceHydrostatic
- GfsSourceScalar — Source terms for scalar variables
- GfsSourceGeneric — Abstract class for source terms
Outputs
- GfsEvent
- GfsOutput — Writing simulation data
- GfsOutputTime — Model time, timestep and computing times
- GfsOutputProgress
- GfsOutputProjectionStats
- GfsOutputDiffusionStats
- GfsOutputSolidStats
- GfsOutputAdaptStats — Information about the mesh adaptation
- GfsOutputTiming
- GfsOutputBalance — Writing simulation size statistics
- GfsOutputSolidForce — Forces and moments on the embedded solid boundaries
- GfsOutputLocation — Writing the values of variables at specified locations
- GfsOutputSimulation — Writing the whole simulation
- GfsOutputBoundaries
- GfsOutputParticle — Tracking Lagrangian particles
- GfsOutputScalar — Generic output of scalar fields
- GfsOutputScalarNorm — Computing the norms of a scalar field
- GfsOutputScalarStats — Computing simple statistics for a scalar field
- GfsOutputScalarSum — Computing the sum of a scalar field
- GfsOutputScalarMaxima
- GfsOutputScalarHistogram — Computing histograms
- GfsOutputDropletSums — Computing sums for each droplet
- GfsOutputErrorNorm — Computing differences to a reference solution
- GfsOutputSquares
- GfsOutputStreamline
- GfsOutputPPM — Writing 2D images
- GfsOutputGRD — Writing 2D ESRI raster files
- GfsOutputObject — Calling the write method of a given object
- GfsOutput — Writing simulation data
Modules
Map
The Map module defines the objects used to perform cartographic projections within Gerris. As all modules, it is optional and depends on the availability of the PROJ.4 cartographic projections library on your system. The module is initialised in parameter files using
GModule map
and defines the GfsMapProjection object with the following inheritance hierarchy
- GfsMap
- GfsMapProjection — Geographic transformations of model coordinates
Terrain
The Terrain module contains a set of objects which can be used to define solid boundaries using large Digital Terrain Model (DTM) databases. The databases are only limited in size by the amount of disk space available and include an Kd-tree spatial index for efficient retrieval of subsets of the original data. The module is initialised in parameter files using
GModule terrain
and defines the GfsRefineTerrain, GfsTerrain and GfsVariableTerrain objects with the following inheritance hierarchy
- GfsRefine
- GfsRefineTerrain — Refines the mesh and creates the corresponding terrain model
- GfsSolid
- GfsTerrain — Creates a solid boundary following a given terrain model
- GfsVariable
- GfsVariableTerrain — Defines a variable containing the terrain height
Real terrains are often defined in a geographic coordinate system (e.g. longitude, latitude and height) and in practice this module is often combined with the Map module.
The terrain databases used by GfsRefineTerrain and GfsVariableTerrain need to be created in a pre-processing step using the xyz2kdt command-line utility.
Wavewatch
The Wavewatch module can be used only in GfsWave simulations. When this module is included, the GfsWave simulation will call the source terms routines (wind, wave breaking etc...) of the WaveWatch III spectral wave model. The module is initialised in parameter files using
GModule wavewatch
The wind field is defined by the U10
and V10
variables: the coordinates of the local wind vector (in m/sec and at a reference height of 10 m).
If the AS
field is defined an "atmospheric stability correction" is applied to the wind field (see Section 2.3.5 of WaveWatch manual version 3.12). The AS
field must be initialised with the air/sea temperature difference in degree Celsius.
Note that due to the license of recent versions of WaveWatch III, the wavewatch module is not provided in pre-compiled binaries of Gerris. It needs to be installed from source first.
Okada
The Okada module defines objects computing displacement solutions for the Okada fault model. The module is initialised in parameter files using
GModule okada
and defines the GfsInitOkada object with the following inheritance hierarchy
- GfsInit
- GfsInitOkada — Initialises a field with the vertical displacement of an Okada fault model
Tide
DF3
The DF3 module allows to create a POV-Ray DF3 file mapping values of a variable from a simulation to a cube. Such output can be used to visualize a variable in 3D using POV-Ray. The module is initialised in parameter files using
GModule df3
and defines the GfsOutputPovrayDF3 object with the following inheritance hierarchy.
- GfsOutputScalar
- GfsOutputPovrayDF3 — Writes a POV-Ray df3 file
Particulates
This is an attempt at documenting the particulates module. I think I understand how it works, that might help you to get started. Please complete that section if you can.
The aim of the particulate module is to allow to have Lagrangian particles in a Gerris simulation. Contrarily to GfsOutputParticle which only allows to simulate inert particles, a GfsParticulate can have physical properties such as a mass and a volume. Initial forces and velocity can also be specified. The syntax for the use of the particulate module is completely different to the one of GfsOutputParticle and is mainly detailed in GfsParticleList.
The module is initialised in parameter files using
GModule particulates
and allows to create lists of Lagrangian particles using the keyword GfsParticleList. Each list contains GfsParticle (inert) or GfsParticulates which are advected by the velocity field and can experience various types of forces (GfsForceLift, GfsForceDrag, GfsForceBuoy).
Ode
The Open Dynamics Engine module.
Hypre
This module uses the Hypre library (the algebraic multigrid (AMG) solver in particular) instead of Gerris' native multigrid solver to solve Poisson equations. The module is initialised in parameter files using
GModule hypre
This will use default settings which can be changed using an optional parameter block.
Electrohydro
This module can be used to solve 2D/3D electrohydrodynamics problems. The module is initialised in parameter files using
GModule electrohydro
The module defines the following objects:
- GfsSimulation
- GfsElectroHydro — Electrohydrodynamics solver
- GfsElectroHydroAxi — Axisymmetric electrohydrodynamics solver
- GfsElectroHydro — Electrohydrodynamics solver
- GfsSourceVelocity
- GfsSourceElectric — Electric volumetric forces
- GfsOutput
- GfsOutputPotentialStats — Convergence statistics for the electric potential
GfsView
This module can be used to create GfsView visualisations from within Gerris. This eliminates the need to couple Gerris with GfsView through pipes and more importantly this means that the simulation does not need to be copied from Gerris into GfsView, thus saving CPU and memory. This can also be used to efficiently create visualisations of large-scale parallel computations: the visualisation itself is created in parallel for individual subdomains. The module is initialised in parameter files using
GModule gfsview
The module defines the following objects:
- GfsOutput
- GfsOutputView — Batch visualisation with GfsView