Skip to content

adam_flume_gravity_object ​

ADAM, FLUME external gravity: the [gravity] input (issue #73, M7).

A constant acceleration g, given either as its components or as the number it stands for (issue #49, section 4.5):

formkeysg (code units)
accelerationg_x, g_y, g_z (each optional, default 0)(g_x, g_y, g_z)
numberfroude (> 0) and axis (+x, -x, +y, -y, +z, -z)1 / froude^2 along the signed axis

Giving both forms is fatal, as is a [gravity] section with neither. In code units the references are 1, so the number is 1 / Fr^2 = g L0 / u0^2; the [reference] layer converts the dimensional components (length / time^2) and leaves froude as it is. equilibrium selects the well-balanced mode (M7-G2b): none (default) or atmosphere (the atmosphere of the initial conditions, at rest, is kept to round-off: the residual of that state is subtracted from every residual). potential selects how g reaches the sources (issue #81, M8-P1): uniform (default), the constant g in every kernel, with the fourth-order energy source; or linear, the same field written as the cell potential Phi = -g . x and applied through the potential path of self-gravity (face gravity -dPhi/dx, cell gravity the mean of its two faces, second order): a test of that path against the constant one. Any other value is fatal, never ignored.

Self-gravity (issue #81, M8-P3): self_gravity = .true. solves L_h Phi = 4 pi G (rho - mean rho) every Runge-Kutta stage and applies it through the potential path. poisson_solver: auto (default) the library FFT solver on a uniform grid and the multigrid solver on an AMR grid (P5b), fft the FFT solver only (an AMR grid is fatal), multigrid the multigrid solver on any grid; poisson_bc = periodic: every active direction periodic. poisson_bc = isolated (M8-P4) solves L_h Phi = 4 pi G rho with Phi -> 0 at infinity instead (zero padding and the lattice Green's function: 3-D, every direction non-periodic, cubic cells; on AMR the multigrid's symmetric James step, issue #87, which also needs every leaf on the domain boundary at the coarsest level; the solver refuses anything else). The constant is G (dimensional: the [reference] layer converts it, dimension u0^2 / (rho0 L0^2)) or G_star (the number G rho0 L0^2 / u0^2, never converted); exactly one of them is required with self_gravity, and either without it is fatal. The constant g is optional with self_gravity (default 0) and is added through its own kernels (potential = uniform); potential = linear and equilibrium = atmosphere are refused with it.

Without the section there is no gravity (is_active false) and nothing changes. With it, g sets the atmosphere initial conditions and the hydrostatic boundary condition (M7-G0) and drives the momentum and energy sources (M7-G1): rho g, and the energy from the face mass fluxes, the fourth-order sum_d g_d (-F_{i-3/2} + 13 F_{i-1/2} + 13 F_{i+1/2} - F_{i+3/2}) / 24 (M7-G2a; the two-face average alone is second order), which reads the face beyond each block end: gravity needs one more ghost layer than the WENO stencil.

Source: src/app/flume/common/adam_flume_gravity_object.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
INI_SECTION_NAMEcharacter(len=7)parameterINI section name.
G_KEYcharacter(len=3)parameterAcceleration component keys.
AXIS_STRcharacter(len=2)parameterAccepted axis spellings.
EQUILIBRIUM_NONEcharacter(len=4)parameterequilibrium: no well-balanced mode.
EQUILIBRIUM_ATMOSPHEREcharacter(len=10)parameterequilibrium: the initial atmosphere.
POTENTIAL_UNIFORMcharacter(len=7)parameterpotential: constant acceleration.
POTENTIAL_LINEARcharacter(len=6)parameterpotential: Phi = -g . x (M8-P1).
POISSON_SOLVER_AUTOcharacter(len=4)parameterpoisson_solver: FFT if uniform, else MG.
POISSON_SOLVER_FFTcharacter(len=3)parameterpoisson_solver: the FFT solver (M8-P2).
POISSON_SOLVER_MULTIGRIDcharacter(len=9)parameterpoisson_solver: the multigrid (P5b).
POISSON_BC_PERIODICcharacter(len=8)parameterpoisson_bc: periodic (mean removed).
POISSON_BC_ISOLATEDcharacter(len=8)parameterpoisson_bc: isolated (issue #81, P4).
PIreal(kind=R8P)parameterPi.

Derived Types ​

flume_gravity_object ​

FLUME external gravity, code units.

Components ​

NameTypeAttributesDescription
greal(kind=R8P)Constant acceleration (the field the atmospheres and linear use).
g_uniformreal(kind=R8P)The part of g the constant-g kernels apply: g, or 0 with linear.
froudereal(kind=R8P)Froude number, 0 when g is given by its components.
equilibriumcharacter(len=:)allocatableWell-balanced equilibrium (M7-G2b): none or atmosphere.
potentialcharacter(len=:)allocatablePotential kind: uniform.
is_activelogical[gravity] given.
is_balancedlogicalWell-balanced mode on (equilibrium not none).
has_potentiallogicalThe sources read a cell potential (linear, self-gravity).
self_gravitylogicalSelf-gravity on (M8-P3).
grav_constreal(kind=R8P)Gravitational constant G, code units (self-gravity).
four_pi_greal(kind=R8P)4 pi G, the source factor of the Poisson equation.
poisson_solvercharacter(len=:)allocatablePoisson solver: auto, fft or multigrid.
poisson_bccharacter(len=:)allocatablePoisson boundary conditions: periodic or isolated.
isolatedlogicalpoisson_bc = isolated (M8-P4).

Type-Bound Procedures ​

NameAttributesDescription
descriptionpass(self)Return pretty-printed object description.
load_from_filepass(self)Load the gravity from file.

Subroutines ​

load_from_file ​

Load the gravity from file: the components or froude + axis (both fatal, neither fatal unless self_gravity), equilibrium and potential (optional: none or atmosphere, and uniform or linear), and the self-gravity keys self_gravity, G or G_star, poisson_solver, poisson_bc.

fortran
subroutine load_from_file(self, file_parameters)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_gravity_object)inoutGravity.
file_parameterstype(file_ini)inSimulation parameters ini file handler.

Call graph

Functions ​

description ​

Return a pretty-formatted object description.

Returns: character(len=:)

fortran
function description(self) result(desc)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_gravity_object)inGravity.

Call graph