Skip to content

adam_flume_cpu_forcing_kernels ​

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

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

Dependencies

Contents ​

Subroutines ​

sum_momentum ​

Sum the momentum along axis and the volume over the interior cells; the volume includes the null directions, as the conservation integrals.

fortran
subroutine sum_momentum(ni, nj, nk, ngc, blocks_number, axis, dxyz, q, 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.
dxyzreal(kind=R8P)inBlocks space steps [3, nb].
qreal(kind=R8P)inConservative variables.
sumsreal(kind=R8P)outMomentum times volume, volume.

Call graph

add_uniform_momentum ​

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

fortran
subroutine add_uniform_momentum(ni, nj, nk, ngc, blocks_number, axis, dm, q)

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.
qreal(kind=R8P)inoutConservative variables.

Call graph

overwrite_wall_fluxes ​

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 (once per step, Kawai & Larsson 2012): tf -> 0 is the unfiltered model, bit for bit.

fortran
subroutine overwrite_wall_fluxes(d, di, dj, dk, ni, nj, nk, ngc, blocks_number, gamma, R, pr, mu0, tref, suth, omega_mu, faces, tw, hwm, sl, tf, dt, commit, fresh, avg, inv, ue, te, dxyz, q_aux, 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, 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.
facesinteger(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.
avgreal(kind=R8P)inoutAverages of the faces of direction d [5, ni or 2, nj or 2, nk or 2, nb].
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.
dxyzreal(kind=R8P)inBlocks space steps.
q_auxreal(kind=R8P)inAuxiliary variables.
flreal(kind=R8P)inoutFace fluxes of direction d.

Call graph

add_wall_mu_t ​

Raise mu_t to the wall model's eddy viscosity in the cells below the matching height of the modelled faces of direction d that ask for it (wall_model_eddy_viscosity, issue #119): wall_eddy_viscosity with the tau_w of the instantaneous sample (never the filtered one, which the ghost columns do not hold), the damping of the face (semi-local for the inverse model), the cell's density and viscosity. The columns of the 2 ghost layers along each active tangential direction are computed as well, from their ghost cells: the same inputs as the neighbour's interior column, so the same value, and the face fluxes of the two blocks agree (the edge columns, which no flux reads, are skipped).

fortran
subroutine add_wall_mu_t(d, di, dj, dk, ni, nj, nk, ngc, blocks_number, gamma, R, pr, mu0, tref, suth, omega_mu, faces, ev, tw, hwm, sl, inv, ue, te, is_null, dxyz, q_aux, mu_t)

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.
facesinteger(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.
dxyzreal(kind=R8P)inBlocks space steps.
q_auxreal(kind=R8P)inAuxiliary variables.
mu_treal(kind=R8P)inoutEddy viscosity.

Call graph

close_wall_fluxes ​

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(d, di, dj, dk, ni, nj, nk, nv, blocks_number, faces, 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, 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.
facesinteger(kind=I4P)inFlagged block faces [nb, 6].
flreal(kind=R8P)inoutFace fluxes of direction d.

Call graph