Skip to content

adam_flume_kolmogorov_library ​

ADAM, FLUME local Kolmogorov resolution of a block, the estimator of the AMR marker mode = 7 (issue #133, phase 2).

On a cell the ratio of the grid spacing to the Kolmogorov length,

 r = h / eta,   eta = (nu^3 / eps)^(1/4),   eps = 2 nu S_d:S_d,   nu = mu(T) / rho,   h = (prod_d dx_d)^(1/n)

with S_d = S - tr(S) I / 3 the deviatoric part of the strain rate S = (grad u + grad u^T) / 2 (the trace over the three components whatever the active axes: a 2-D run is the 2-D section of a 3-D flow), mu(T) the viscosity law of the run (temperature_law, the same as the viscous fluxes') and h the geometric mean of the cell spacings over the n active (not null) axes: a null axis has no resolution to measure, so its extent does not enter h. Hence r = h (2 S_d:S_d)^(1/4) / nu^(1/2), r^2 = h^2 |dU/dy| / nu in a pure shear u = U(y) (2 S_d:S_d = U'^2). At a wall eps+ = 1 gives r = h+; in the log layer eps+ ~ 1/(kappa y+) gives r = h+ / (kappa y+)^(1/4).

The velocity gradient is the stencil of the gradient marker (mark_by_gradient, issue #76): along each active axis with more than one cell per block, second-order centred differences, across the block faces too (one ghost layer); first-order one-sided at a face on the realm boundary (physical or seam), whose ghosts it never reads. A linear velocity field is differentiated exactly everywhere. A block takes the largest r over its interior cells.

Host procedures (the markers run on the host on both backends, the FNL one after copying the state back).

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

Dependencies

Contents ​

Functions ​

kolmogorov_spacing ​

Return the cell spacing of the estimator, the geometric mean (prod_d dx_d)^(1/n) over the n active axes (0 if none is active).

Attributes: pure

Returns: real(kind=R8P)

fortran
function kolmogorov_spacing(dxyz, active) result(h)

Arguments

NameTypeIntentAttributesDescription
dxyzreal(kind=R8P)inCell spacings.
activelogicalinActive (not null) axes.

Call graph

kolmogorov_ratio ​

Return r = h / eta = h (2 S_d:S_d)^(1/4) / nu^(1/2) from the spacing h, the kinematic viscosity nu > 0 and the velocity gradient g(a,b) = d u_a / d x_b.

Attributes: pure

Returns: real(kind=R8P)

fortran
function kolmogorov_ratio(h, nu, g) result(r)

Arguments

NameTypeIntentAttributesDescription
hreal(kind=R8P)inSpacing.
nureal(kind=R8P)inKinematic viscosity.
greal(kind=R8P)inVelocity gradient.

Call graph

kolmogorov_block_max ​

Return the largest r = h / eta over the interior cells of one block from its auxiliary variables qa (density, velocity, temperature), one ghost layer read across its open faces.

Attributes: pure

Returns: real(kind=R8P)

fortran
function kolmogorov_block_max(nv, ni, nj, nk, ngc, qa, dxyz, active, is_open, mu0, tref, suth, omega_mu) result(r_max)

Arguments

NameTypeIntentAttributesDescription
nvinteger(kind=I4P)inAuxiliary variables number.
niinteger(kind=I4P)inBlock cells, ghost cells.
njinteger(kind=I4P)inBlock cells, ghost cells.
nkinteger(kind=I4P)inBlock cells, ghost cells.
ngcinteger(kind=I4P)inBlock cells, ghost cells.
qareal(kind=R8P)inAuxiliary variables of the block.
dxyzreal(kind=R8P)inCell spacings.
activelogicalinActive (not null) axes.
is_openlogicalinThe minus/plus face of each axis is internal (its ghosts valid).
mu0real(kind=R8P)inViscosity at the reference temperature.
trefreal(kind=R8P)inViscosity law (temperature_law).
suthreal(kind=R8P)inViscosity law (temperature_law).
omega_mureal(kind=R8P)inViscosity law (temperature_law).

Call graph