Skip to content

adam_flume_fnl_forcing_kernels ​

ADAM, FLUME FNL kernels of the mass-flow forcing (issue #119, T3.1).

Source: src/app/flume/fnl/adam_flume_fnl_forcing_kernels.F90

Dependencies

Contents ​

Subroutines ​

sum_momentum_dev ​

Sum the momentum along axis and the volume over the interior cells.

fortran
subroutine sum_momentum_dev(ni, nj, nk, ngc, blocks_number, axis, dxyz_gpu, q_gpu, sums)

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.
axisinteger(kind=I4P)inAxis of the flow.
dxyz_gpureal(kind=R8P)inBlocks space steps [nb, 3].
q_gpureal(kind=R8P)inConservative variables.
sumsreal(kind=R8P)outMomentum times volume, volume.

Call graph

add_uniform_momentum_dev ​

Add dm to the momentum along axis, and to the total energy the change of kinetic energy.

fortran
subroutine add_uniform_momentum_dev(ni, nj, nk, ngc, blocks_number, axis, dm, q_gpu)

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.
axisinteger(kind=I4P)inAxis of the flow.
dmreal(kind=R8P)inMomentum added.
q_gpureal(kind=R8P)inoutConservative variables.

Call graph

overwrite_wall_fluxes_dev ​

Overwrite the flux through the modelled wall faces of direction d (issue #119, T3.3): no mass, the parallel momentum by the modelled shear, the energy by the heat flux; the sample is the 3rd cell off the wall. The normal momentum keeps the mirrored inviscid flux, the pressure. With a filter time tf the sample is (1 - e) a + e s, e = min(dt / tf, 1) (1 when fresh), from the averages a of the face, which take it when commit.

fortran
subroutine overwrite_wall_fluxes_dev(d, di, dj, dk, ni, nj, nk, ngc, blocks_number, gamma, R, pr, mu0, tref, suth, omega_mu, faces_gpu, tw, hwm, sl, tf, dt, commit, fresh, avg_gpu, inv, ue, te, dxyz_gpu, q_aux_gpu, fl_gpu)

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, gas constant, Prandtl number.
Rreal(kind=R8P)inSpecific heats ratio, gas constant, Prandtl number.
prreal(kind=R8P)inSpecific heats ratio, gas constant, Prandtl number.
mu0real(kind=R8P)inViscosity law.
trefreal(kind=R8P)inViscosity law.
suthreal(kind=R8P)inViscosity law.
omega_mureal(kind=R8P)inViscosity law.
faces_gpuinteger(kind=I4P)inModelled block faces [nb, 6].
twreal(kind=R8P)inWall temperature per face.
hwmreal(kind=R8P)inMatching height per face, 0 for the 3rd cell.
sllogicalinSemi-local damping per face.
tfreal(kind=R8P)inFilter time per face, 0 for none.
dtreal(kind=R8P)inTime step.
commitlogicalinThe averages take this sample.
freshlogicalinThe averages hold no history.
avg_gpureal(kind=R8P)inoutAverages of the faces of direction d [nb, ni or 2, nj or 2, nk or 2, 5].
invlogicalinThe inverse-transformation model per face (T3.5), else the equilibrium one.
uereal(kind=R8P)inInverse model: speed and temperature at the edge of the layer per face.
tereal(kind=R8P)inInverse model: speed and temperature at the edge of the layer per face.
dxyz_gpureal(kind=R8P)inBlocks space steps.
q_aux_gpureal(kind=R8P)inAuxiliary variables.
fl_gpureal(kind=R8P)inoutFace fluxes of direction d.

Call graph

zero_mu_t_dev ​

Zero the eddy viscosity, ghost cells included: the wall model's eddy viscosity without a subgrid-scale model raises a zero field (issue #119).

fortran
subroutine zero_mu_t_dev(ni, nj, nk, ngc, blocks_number, mu_t_gpu)

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.
mu_t_gpureal(kind=R8P)inoutEddy viscosity, [nb, i, j, k, 1].

Call graph

add_wall_mu_t_dev ​

Device twin of add_wall_mu_t (issue #119, wall_model_eddy_viscosity).

fortran
subroutine add_wall_mu_t_dev(d, di, dj, dk, ni, nj, nk, ngc, blocks_number, gamma, R, pr, mu0, tref, suth, omega_mu, faces_gpu, ev, tw, hwm, sl, inv, ue, te, is_null, dxyz_gpu, q_aux_gpu, mu_t_gpu)

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, gas constant, Prandtl number.
Rreal(kind=R8P)inSpecific heats ratio, gas constant, Prandtl number.
prreal(kind=R8P)inSpecific heats ratio, gas constant, Prandtl number.
mu0real(kind=R8P)inViscosity law.
trefreal(kind=R8P)inViscosity law.
suthreal(kind=R8P)inViscosity law.
omega_mureal(kind=R8P)inViscosity law.
faces_gpuinteger(kind=I4P)inModelled block faces [nb, 6].
evlogicalinThe eddy viscosity per face.
twreal(kind=R8P)inWall temperature per face.
hwmreal(kind=R8P)inMatching height per face, 0 for the 3rd cell.
sllogicalinSemi-local damping per face.
invlogicalinThe inverse-transformation model per face.
uereal(kind=R8P)inInverse model: edge speed and temperature per face.
tereal(kind=R8P)inInverse model: edge speed and temperature per face.
is_nulllogicalinNull directions.
dxyz_gpureal(kind=R8P)inBlocks space steps [nb, 3].
q_aux_gpureal(kind=R8P)inAuxiliary variables.
mu_t_gpureal(kind=R8P)inoutEddy viscosity, [nb, i, j, k, 1].

Call graph

close_wall_fluxes_dev ​

Zero every flux of direction d through the flagged block faces of that direction but the normal momentum (issue #119, the #65 mass leak).

fortran
subroutine close_wall_fluxes_dev(d, di, dj, dk, ni, nj, nk, nv, blocks_number, faces_gpu, fl_gpu)

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, variables.
njinteger(kind=I4P)inGrid dimensions, variables.
nkinteger(kind=I4P)inGrid dimensions, variables.
nvinteger(kind=I4P)inGrid dimensions, variables.
blocks_numberinteger(kind=I4P)inActual blocks number.
faces_gpuinteger(kind=I4P)inFlagged block faces [nb, 6].
fl_gpureal(kind=R8P)inoutFace fluxes of direction d.

Call graph