Appearance
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):
| form | keys | g (code units) |
|---|---|---|
| acceleration | g_x, g_y, g_z (each optional, default 0) | (g_x, g_y, g_z) |
| number | froude (> 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
| Name | Type | Attributes | Description |
|---|---|---|---|
INI_SECTION_NAME | character(len=7) | parameter | INI section name. |
G_KEY | character(len=3) | parameter | Acceleration component keys. |
AXIS_STR | character(len=2) | parameter | Accepted axis spellings. |
EQUILIBRIUM_NONE | character(len=4) | parameter | equilibrium: no well-balanced mode. |
EQUILIBRIUM_ATMOSPHERE | character(len=10) | parameter | equilibrium: the initial atmosphere. |
POTENTIAL_UNIFORM | character(len=7) | parameter | potential: constant acceleration. |
POTENTIAL_LINEAR | character(len=6) | parameter | potential: Phi = -g . x (M8-P1). |
POISSON_SOLVER_AUTO | character(len=4) | parameter | poisson_solver: FFT if uniform, else MG. |
POISSON_SOLVER_FFT | character(len=3) | parameter | poisson_solver: the FFT solver (M8-P2). |
POISSON_SOLVER_MULTIGRID | character(len=9) | parameter | poisson_solver: the multigrid (P5b). |
POISSON_BC_PERIODIC | character(len=8) | parameter | poisson_bc: periodic (mean removed). |
POISSON_BC_ISOLATED | character(len=8) | parameter | poisson_bc: isolated (issue #81, P4). |
PI | real(kind=R8P) | parameter | Pi. |
Derived Types
flume_gravity_object
FLUME external gravity, code units.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
g | real(kind=R8P) | Constant acceleration (the field the atmospheres and linear use). | |
g_uniform | real(kind=R8P) | The part of g the constant-g kernels apply: g, or 0 with linear. | |
froude | real(kind=R8P) | Froude number, 0 when g is given by its components. | |
equilibrium | character(len=:) | allocatable | Well-balanced equilibrium (M7-G2b): none or atmosphere. |
potential | character(len=:) | allocatable | Potential kind: uniform. |
is_active | logical | [gravity] given. | |
is_balanced | logical | Well-balanced mode on (equilibrium not none). | |
has_potential | logical | The sources read a cell potential (linear, self-gravity). | |
self_gravity | logical | Self-gravity on (M8-P3). | |
grav_const | real(kind=R8P) | Gravitational constant G, code units (self-gravity). | |
four_pi_g | real(kind=R8P) | 4 pi G, the source factor of the Poisson equation. | |
poisson_solver | character(len=:) | allocatable | Poisson solver: auto, fft or multigrid. |
poisson_bc | character(len=:) | allocatable | Poisson boundary conditions: periodic or isolated. |
isolated | logical | poisson_bc = isolated (M8-P4). |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
description | pass(self) | Return pretty-printed object description. |
load_from_file | pass(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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_gravity_object) | inout | Gravity. | |
file_parameters | type(file_ini) | in | Simulation parameters ini file handler. |
Call graph
Functions
description
Return a pretty-formatted object description.
Returns: character(len=:)
fortran
function description(self) result(desc)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_gravity_object) | in | Gravity. |
Call graph