Appearance
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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
dxyz | real(kind=R8P) | in | Cell spacings. | |
active | logical | in | Active (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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
h | real(kind=R8P) | in | Spacing. | |
nu | real(kind=R8P) | in | Kinematic viscosity. | |
g | real(kind=R8P) | in | Velocity 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
nv | integer(kind=I4P) | in | Auxiliary variables number. | |
ni | integer(kind=I4P) | in | Block cells, ghost cells. | |
nj | integer(kind=I4P) | in | Block cells, ghost cells. | |
nk | integer(kind=I4P) | in | Block cells, ghost cells. | |
ngc | integer(kind=I4P) | in | Block cells, ghost cells. | |
qa | real(kind=R8P) | in | Auxiliary variables of the block. | |
dxyz | real(kind=R8P) | in | Cell spacings. | |
active | logical | in | Active (not null) axes. | |
is_open | logical | in | The minus/plus face of each axis is internal (its ghosts valid). | |
mu0 | real(kind=R8P) | in | Viscosity at the reference temperature. | |
tref | real(kind=R8P) | in | Viscosity law (temperature_law). | |
suth | real(kind=R8P) | in | Viscosity law (temperature_law). | |
omega_mu | real(kind=R8P) | in | Viscosity law (temperature_law). |
Call graph