Object hierarchy

From Gerris

(Difference between revisions)
Jump to: navigation, search
Revision as of 10:27, 9 October 2010
Popinet (Talk | contribs)
(Boundary conditions - added short descriptions)
← Previous diff
Current revision
Popinet (Talk | contribs)
(Particulates)
Line 27: Line 27:
=== Solvers === === Solvers ===
-* '''[[GfsSimulation]]'''+* '''[[GfsSimulation]]''' — Incompressible Euler and Navier-Stokes solver
** '''[[GfsAxi]]''' — Cylindrical (axisymmetric) coordinates ** '''[[GfsAxi]]''' — Cylindrical (axisymmetric) coordinates
** '''[[GfsSimulationMoving]]''' — Integration of moving solid boundaries ** '''[[GfsSimulationMoving]]''' — Integration of moving solid boundaries
Line 46: Line 46:
=== Variables === === Variables ===
-* '''[[GfsVariable]]''' — Scalar fields+* [[GfsEvent]]
-** '''[[GfsVariableTracer]]''' — Advected scalar fields+** '''[[GfsVariable]]''' — Scalar fields
-*** '''[[GfsVariableTracerVOF]]''' — Volume-Of-Fluid advection+*** '''[[GfsVariableTracer]]''' — Advected scalar fields
-** '''[[GfsVariableResidual]]'''+**** '''[[GfsVariableTracerVOF]]''' — Volume-Of-Fluid advection
-** '''[[GfsVariableFiltered]]''' — Spatial filtering+***** '''[[GfsVariableTracerVOFHeight]]''' — Volume-Of-Fluid advection (new implementation)
-** '''[[GfsVariableFunction]]''' — Optimising function evaluations+**** '''[[GfsVariableVOFConcentration]]''' — Concentration associated with a VOF phase
-*** '''[[GfsVariableStreamFunction]]''' — Maintaining a velocity field defined by a stream function+*** '''[[GfsVariableResidual]]'''
-** '''[[GfsVariableCurvature]]''' — Curvature of an interface+*** '''[[GfsVariableFiltered]]''' — Spatial filtering
-*** '''[[GfsVariablePosition]]''' — Coordinates of a VOF interface+*** '''[[GfsVariableFunction]]''' — Optimising function evaluations
-** '''[[GfsVariableDistance]]''' — Signed distance to a VOF interface+**** '''[[GfsVariableStreamFunction]]''' — Maintaining a velocity field defined by a stream function
-** '''[[GfsVariableBoolean]]''' — Boolean value consistent with adaptive refinement+**** '''[[GfsVariablePoisson]]''' — Maintaining a scalar field solution of a Poisson equation
-** '''[[GfsVariableAge]]''' — How old is this cell?+**** '''[[GfsVariableAverage]]'''
- +**** '''[[GfsVariableLaplacian]]''' — Laplacian of a function
-* '''[[GfsConstant]]''' — Spatially-constant but time-dependent variables+*** '''[[GfsVariableCurvature]]''' — Curvature of an interface
-**'''[[GfsDischargeElevation]]''' — Elevation for a given discharge+**** '''[[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?
 +*** '''[[GfsHydrostaticPressure]]''' — Hydrostatic pressure integration
 +** '''[[GfsConstant]]''' — Spatially-constant but time-dependent variables
 +***'''[[GfsDischargeElevation]]''' — Elevation for a given discharge
 +***'''[[GfsSpatialSum]]''' — Compute spatial sum of GfsFunction
=== Parameters === === Parameters ===
-* '''[[GfsPhysicalParams]]'''+* '''[[GfsPhysicalParams]]''' — Tuning box size, gravity and density
* '''[[GfsProjectionParams]]''' — Tuning the Poisson solver * '''[[GfsProjectionParams]]''' — Tuning the Poisson solver
* '''[[GfsAdvectionParams]]''' — Tuning the advection schemes * '''[[GfsAdvectionParams]]''' — Tuning the advection schemes
Line 73: Line 80:
** '''[[GfsSolidMoving]]''' — Moving solid boundaries ** '''[[GfsSolidMoving]]''' — Moving solid boundaries
-* '''[[GfsSurfaceBc]]''' — Boundary conditions for diffusion equations+* '''[[GfsSurfaceBc]]''' — Boundary conditions for diffusion and Poisson equations
=== General orthogonal coordinates === === General orthogonal coordinates ===
 +* '''[[GfsMetric]]''' — Analytical metrics
* '''[[GfsMetricLonLat]]''' * '''[[GfsMetricLonLat]]'''
* '''[[GfsMetricCubed]]''' * '''[[GfsMetricCubed]]'''
- +* '''[[GfsMetricStretch]]''' — Anisotropic mesh stretching
 +* '''[[GfsMetricLaplace]]''' — Numerically-defined transformation
* '''[[GfsMap]]''' — Coordinates transformations * '''[[GfsMap]]''' — Coordinates transformations
** '''[[GfsMapTransform]]''' — Isometric coordinates transformations ** '''[[GfsMapTransform]]''' — Isometric coordinates transformations
Line 90: Line 99:
=== Boundary conditions === === Boundary conditions ===
 +
 +* '''[[GfsBoundary]]''' — Default boundary conditions (symmetry)
 +** '''[[GfsBoundaryInflowConstant]]''' — Constant inflow
 +** '''[[GfsBoundaryOutflow]]''' — Free outflow/inflow
 +** '''[[GfsBoundaryPeriodic]]'''
 +*** '''[[GfsBoundaryMpi]]'''
* '''[[GfsBc]]''' — Base class for boundary conditions on individual variables * '''[[GfsBc]]''' — Base class for boundary conditions on individual variables
Line 95: Line 110:
** '''[[GfsBcNeumann]]''' — Neumann boundary condition (i.e. value of the normal derivative) ** '''[[GfsBcNeumann]]''' — Neumann boundary condition (i.e. value of the normal derivative)
** '''[[GfsBcNavier]]''' — Navier slip/Robin boundary condition ** '''[[GfsBcNavier]]''' — Navier slip/Robin boundary condition
 +** '''[[GfsBcAngle]]''' — Contact angle boundary condition for interfaces
** '''[[GfsBcFlather]]''' — "Flather" boundary conditions for barotropic flows ** '''[[GfsBcFlather]]''' — "Flather" boundary conditions for barotropic flows
** '''[[GfsBcSubcritical]]''' ** '''[[GfsBcSubcritical]]'''
- 
-* '''[[GfsBoundary]]''' — Default boundary conditions (symmetry) 
-** '''[[GfsBoundaryInflowConstant]]''' 
-** '''[[GfsBoundaryOutflow]]''' 
-** '''[[GfsBoundaryPeriodic]]''' 
-*** '''[[GfsBoundaryMpi]]''' 
=== Initial mesh refinement === === Initial mesh refinement ===
Line 127: Line 137:
*** '''[[GfsAdaptGradient]]''' — Adapting cells depending on the local gradient of a variable *** '''[[GfsAdaptGradient]]''' — Adapting cells depending on the local gradient of a variable
**** '''[[GfsAdaptError]]''' — Adapting using an a posteriori error estimate **** '''[[GfsAdaptError]]''' — Adapting using an a posteriori error estimate
-*** '''[[GfsAdaptStreamlineCurvature]]''' 
*** '''[[GfsAdaptFunction]]''' — Adapting cells depending on the value of a function *** '''[[GfsAdaptFunction]]''' — Adapting cells depending on the value of a function
 +*** '''[[GfsAdaptThickness]]''' — Adapting cells according to the thickness of interfacial films
=== Various events === === Various events ===
Line 153: Line 163:
***** '''[[GfsSourceFlux]]''' — Adding a flux on a given area or volume ***** '''[[GfsSourceFlux]]''' — Adding a flux on a given area or volume
**** '''[[GfsSourceDiffusion]]''' — Scalar diffusion **** '''[[GfsSourceDiffusion]]''' — Scalar diffusion
-***** '''[[GfsSourceDiffusionExplicit]]'''+***** '''[[GfsSourceDiffusionExplicit]]''' — Time-explicit scalar diffusion
*** '''[[GfsSourceVelocity]]''' — Source terms for velocity *** '''[[GfsSourceVelocity]]''' — Source terms for velocity
**** '''[[GfsSourceViscosity]]''' — Viscous terms **** '''[[GfsSourceViscosity]]''' — Viscous terms
Line 162: Line 172:
***** '''[[GfsSourceTensionCSS]]''' ***** '''[[GfsSourceTensionCSS]]'''
**** '''[[GfsSourceHydrostatic]]''' **** '''[[GfsSourceHydrostatic]]'''
 +*** '''[[GfsSourcePipe]]''' — Pipes and culverts models for [[GfsRiver]]
=== Outputs === === Outputs ===
Line 194: Line 205:
**** '''[[GfsOutputGRD]]''' — Writing 2D ESRI raster files **** '''[[GfsOutputGRD]]''' — Writing 2D ESRI raster files
*** '''[[GfsOutputObject]]''' — Calling the write method of a given object *** '''[[GfsOutputObject]]''' — Calling the write method of a given object
 +*** '''[[GfsOutputSectionFlux]]''' — Writing the the fluxes of tracers through specified planar slices either due to advection and diffusion
== Modules == == Modules ==
Line 268: Line 280:
=== Particulates === === Particulates ===
-This is an attempt at documenting the particulates module.+The particulate module defines (active) Lagrangian particles coupled with the flow. [[GfsParticulate]]s respond to forces (typically exerted by the fluid) and can exert forces on the fluid in response.
-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 The module is initialised in parameter files using
Line 279: Line 286:
GModule particulates GModule particulates
-and allows to create lists of Lagrangian particles using the keyword [[GfsParticleList]].+The module defines the following objects (in bold):
-Each list contains [[GfsParticle]] (inert) or [[GfsParticulates]] which are advected by the velocity field and can experience various types of forces ([[GfsForceLift]], [[GfsForceDrag]], [[GfsForceBuoy]]).+
* [[GfsEvent]] * [[GfsEvent]]
** [[GfsEventList]] ** [[GfsEventList]]
-*** [[GfsParticleList]]+*** '''[[GfsParticleList]]''' — List of [[GfsParticulate]]s acted on by forces
-**** [[GfsDropletToParticle]]+**** '''[[GfsFeedParticle]]''' — Injection of particles
 +**** '''[[GfsDropletToParticle]]''' — Conversion of tracers to particles
** [[GfsParticle]] ** [[GfsParticle]]
-*** [[GfsParticulate]]+*** '''[[GfsParticulate]]''' — A [[GfsParticle]] which responds to forces
 + 
 +* '''[[GfsParticleForce]]''' — A force acting on a [[GfsParticulate]]
 +** '''[[GfsForceBuoy]]''' — The buoyancy force
 +** '''[[GfsForceCoeff]]''' — Generic class for forces with coefficients
 +*** '''[[GfsForceLift]]''' — The lift force
 +*** '''[[GfsForceDrag]]''' — The drag force
 + 
 +* [[GfsVariable]]
 +** '''[[GfsParticulateField]]''' — Average density of particles
 + 
 +==== Bubbles ====
 + 
 +The module is initialised in parameter files using
 + 
 + GModule particulates
 + GModule bubbles
 + 
 +The module defines the following objects (in bold):
-* [[GtsSListContainee]]+* [[GfsParticulate]]
-** [[GfsParticleForce]]+** '''[[GfsBubble]]''' — Compressible gas bubbles
-*** [[GfsForceCoeff]]+* [[GfsParticulateField]]
-**** [[GfsForceLift]]+** '''[[GfsBubbleFraction]]''' — Kernel-averaged volume fraction of bubbles
-**** [[GfsForceDrag]]+*** '''[[GfsBubbleFractionDt]]''' — Time-derivative of volume fraction of bubbles
-**** [[GfsForceBuoy]]+
=== Ode === === Ode ===
Line 321: Line 345:
* [[GfsSourceVelocity]] * [[GfsSourceVelocity]]
** '''[[GfsSourceElectric]]''' — Electric volumetric forces ** '''[[GfsSourceElectric]]''' — Electric volumetric forces
-* [[GfsSource]] 
-** '''[[GfsSourceCharge]]''' — Electric charge conduction 
* [[GfsOutput]] * [[GfsOutput]]
** '''[[GfsOutputPotentialStats]]''' — Convergence statistics for the electric potential ** '''[[GfsOutputPotentialStats]]''' — Convergence statistics for the electric potential
 +
 +==== See also ====
 +
 +<bibtex>
 +@Article{lopez-herrera2010,
 + author = {J. M. Lopez-Herrera and S. Popinet and M. A. Herrada},
 + title = {A charge-conservative approach for simulating electrohydrodynamic two-phase flows using Volume-Of-Fluid},
 + journal = {Journal of Computational Physics},
 + year = {2010},
 + volume = {230},
 + pages = {1939-1955},
 + url = {http://gfs.sf.net/papers/ehd.pdf}
 +}
 +</bibtex>
 +
 +=== Skewsymmetric ===
 +
 +This module can be used to solve 2D/3D problems using the skew-symmetric formulation proposed by Verstappen (JCP, 2007). The module is initialised in parameter files using
 +
 + GModule skewsymmetric
 +
 +The module defines the following object:
 +
 +* [[GfsSimulation]]
 +** '''[[GfsSkewSymmetric]]''' — Skew-symmetric solver
 +
 +=== FFT ===
 +
 +This module computes FFTs of given variables
 +
 + GModule fft
 +
 +The module defines the following object:
 +
 +* [[GfsOutput]]
 +** '''[[GfsOutputSpectra]]''' — FFT output
 +
 +=== Culvert ===
 +
 +Modelling the effect of [[w:culverts|culverts]] within the [[GfsRiver]] solver. The module is initialised in parameter files using
 +
 + GModule culvert
 +
 +The module defines the following object:
 +
 +* [[GfsSourcePipe]]
 +** '''[[GfsSourceCulvert]]''' — Culvert model based on Boyd, 1987
=== GfsView === === GfsView ===
Line 336: Line 405:
* [[GfsOutput]] * [[GfsOutput]]
** '''[[GfsOutputView]]''' — Batch visualisation with GfsView ** '''[[GfsOutputView]]''' — Batch visualisation with GfsView
 +
 +=== Topics ===
 +
 +This module implements initial conditions for the simulation of landslide generated tsunamis. It is a directly inspired from the software TOPICS developped by Dr. P. Watts. The sources are that used in the version 1.2 of TOPICS, last modified in August 2009 by Dr. P. Watts and published under the GPL license.
 +
 + GModule topics
 +
 +The module defines the following objects:
 +* [[GfsInit]]
 +** '''[[GfsInitSubmarineLandslide]]''' — Initial conditions for the simulation of submarine landslide generated tsunamis in GfsRiver.
 +** '''[[GfsInitSubmarineSlump]]''' — Initial conditions for the simulation of submarine slumps.
 +** '''[[GfsInitSubaerialLandslide]]''' — Initial conditions for the simulation of subaerial landslide generated tsunamis in GfsRiver.
 +** '''[[GfsInitPyroclastic]]''' — Initial conditions for the simulation of pyroclastic flows.
 +
 +* [[GfsOutput]]
 +** '''[[GfsOutputInterfaceGrid]]''' — Outputs function that can be used to transport the characteristics of an interface generated in GfsSimulation 3D to GfsRiver.
 +
 +== Command-line programs ==
 +
 +* [[gerris]] — The Gerris flow solver simulation engine
 +* '''[[gfsview-batch]]''' — Command-line description of GfsView (in batch and interactive mode)

Current revision

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

Functions and macros

Variables

Parameters

Solid boundaries

  • GfsSurfaceBc — Boundary conditions for diffusion and Poisson equations

General orthogonal coordinates

Topology

Boundary conditions

  • GfsBc — Base class for boundary conditions on individual variables

Initial mesh refinement

Initialisation of fields

Adaptive mesh refinement

Various events

Source terms

Outputs

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

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

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.

Particulates

The particulate module defines (active) Lagrangian particles coupled with the flow. GfsParticulates respond to forces (typically exerted by the fluid) and can exert forces on the fluid in response.

The module is initialised in parameter files using

GModule particulates

The module defines the following objects (in bold):

Bubbles

The module is initialised in parameter files using

GModule particulates
GModule bubbles

The module defines the following objects (in bold):

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:

See also

J. M. Lopez-Herrera, S. Popinet, M. A. Herrada - A charge-conservative approach for simulating electrohydrodynamic two-phase flows using Volume-Of-Fluid

Journal of Computational Physics 230:1939-1955, 2010
Bibtex

Skewsymmetric

This module can be used to solve 2D/3D problems using the skew-symmetric formulation proposed by Verstappen (JCP, 2007). The module is initialised in parameter files using

GModule skewsymmetric

The module defines the following object:

FFT

This module computes FFTs of given variables

GModule fft

The module defines the following object:

Culvert

Modelling the effect of culverts within the GfsRiver solver. The module is initialised in parameter files using

GModule culvert

The module defines the following object:

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:

Topics

This module implements initial conditions for the simulation of landslide generated tsunamis. It is a directly inspired from the software TOPICS developped by Dr. P. Watts. The sources are that used in the version 1.2 of TOPICS, last modified in August 2009 by Dr. P. Watts and published under the GPL license.

GModule topics

The module defines the following objects:

  • GfsOutput
    • GfsOutputInterfaceGrid — Outputs function that can be used to transport the characteristics of an interface generated in GfsSimulation 3D to GfsRiver.

Command-line programs

  • gerris — The Gerris flow solver simulation engine
  • gfsview-batch — Command-line description of GfsView (in batch and interactive mode)
Personal tools
communication