Skip to content

adam_flume_cpu_hybrid_kernels ​

ADAM, FLUME CPU kernels of the hybrid central/WENO scheme (issue #119, T2).

compute_hybrid_sensor fills psi on the interior and 2 ghost layers per active direction, the WENO face fluxes having been computed as ever; overwrite_central_fluxes replaces the flux of direction d by the central one at a face whose cells -1 ... 2 along d are all below the threshold and whose stencil -2 ... 3 does not reach the ghost cells of a flagged block face along d: ngc >= 3. The two blocks of a same-level interface see the same stencil and, the ghosts of psi being copies, the same mask: one flux per face, conservative.

Source: src/app/flume/cpu/adam_flume_cpu_hybrid_kernels.F90

Dependencies

Contents ​

Subroutines ​

compute_hybrid_sensor ​

Compute the sensor from 2nd-order central velocity gradients; the floor of the denominator is floor (a / dx_min)^2 per cell.

fortran
subroutine compute_hybrid_sensor(ni, nj, nk, ngc, blocks_number, floor, jump_max, dxyz, is_null, q_aux, psi)

Arguments

NameTypeIntentAttributesDescription
niinteger(kind=I4P)inGrid dimensions.
njinteger(kind=I4P)inGrid dimensions.
nkinteger(kind=I4P)inGrid dimensions.
ngcinteger(kind=I4P)inGrid dimensions.
blocks_numberinteger(kind=I4P)inActual blocks number.
floorreal(kind=R8P)inDimensionless floor.
jump_maxreal(kind=R8P)inBound of the relative density jump.
dxyzreal(kind=R8P)inBlocks space steps [3, nb].
is_nulllogicalinNull directions.
q_auxreal(kind=R8P)inAuxiliary variables.
psireal(kind=R8P)inoutSensor, component 1, q-shaped.

Call graph

mask_mu_t ​

Zero the eddy viscosity of the cells the sensor flags (issue #119, T2.6): there WENO supplies the dissipation.

fortran
subroutine mask_mu_t(ni, nj, nk, ngc, blocks_number, threshold, is_null, psi, mu_t)

Arguments

NameTypeIntentAttributesDescription
niinteger(kind=I4P)inGrid dimensions.
njinteger(kind=I4P)inGrid dimensions.
nkinteger(kind=I4P)inGrid dimensions.
ngcinteger(kind=I4P)inGrid dimensions.
blocks_numberinteger(kind=I4P)inActual blocks number.
thresholdreal(kind=R8P)inSensor threshold.
is_nulllogicalinNull directions.
psireal(kind=R8P)inSensor, component 1, q-shaped.
mu_treal(kind=R8P)inoutEddy viscosity.

Call graph

overwrite_central_fluxes ​

Replace the flux of direction d by the central one where the sensor allows it.

fortran
subroutine overwrite_central_fluxes(d, di, dj, dk, ni, nj, nk, ngc, blocks_number, gamma, threshold, faces, q_aux, psi, fl)

Arguments

NameTypeIntentAttributesDescription
dinteger(kind=I4P)inDirection, 1=x, 2=y, 3=z.
diinteger(kind=I4P)inUnit step along d.
djinteger(kind=I4P)inUnit step along d.
dkinteger(kind=I4P)inUnit step along d.
niinteger(kind=I4P)inGrid dimensions.
njinteger(kind=I4P)inGrid dimensions.
nkinteger(kind=I4P)inGrid dimensions.
ngcinteger(kind=I4P)inGrid dimensions.
blocks_numberinteger(kind=I4P)inActual blocks number.
gammareal(kind=R8P)inSpecific heats ratio.
thresholdreal(kind=R8P)inSensor threshold.
facesinteger(kind=I4P)inBlock faces not to read across [nb, 6].
q_auxreal(kind=R8P)inAuxiliary variables.
psireal(kind=R8P)inSensor, component 1, q-shaped.
flreal(kind=R8P)inoutFace fluxes of direction d.

Call graph