Appearance
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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
ni | integer(kind=I4P) | in | Grid dimensions. | |
nj | integer(kind=I4P) | in | Grid dimensions. | |
nk | integer(kind=I4P) | in | Grid dimensions. | |
ngc | integer(kind=I4P) | in | Grid dimensions. | |
blocks_number | integer(kind=I4P) | in | Actual blocks number. | |
axis | integer(kind=I4P) | in | Axis of the flow. | |
dxyz | real(kind=R8P) | in | Blocks space steps [3, nb]. | |
q | real(kind=R8P) | in | Conservative variables. | |
sums | real(kind=R8P) | out | Momentum 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
ni | integer(kind=I4P) | in | Grid dimensions. | |
nj | integer(kind=I4P) | in | Grid dimensions. | |
nk | integer(kind=I4P) | in | Grid dimensions. | |
ngc | integer(kind=I4P) | in | Grid dimensions. | |
blocks_number | integer(kind=I4P) | in | Actual blocks number. | |
axis | integer(kind=I4P) | in | Axis of the flow. | |
dm | real(kind=R8P) | in | Momentum added. | |
q | real(kind=R8P) | inout | Conservative 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
d | integer(kind=I4P) | in | Direction, 1=x, 2=y, 3=z. | |
di | integer(kind=I4P) | in | Unit step along d. | |
dj | integer(kind=I4P) | in | Unit step along d. | |
dk | integer(kind=I4P) | in | Unit step along d. | |
ni | integer(kind=I4P) | in | Grid dimensions. | |
nj | integer(kind=I4P) | in | Grid dimensions. | |
nk | integer(kind=I4P) | in | Grid dimensions. | |
ngc | integer(kind=I4P) | in | Grid dimensions. | |
blocks_number | integer(kind=I4P) | in | Actual blocks number. | |
gamma | real(kind=R8P) | in | Specific heats ratio, gas constant, Prandtl number. | |
R | real(kind=R8P) | in | Specific heats ratio, gas constant, Prandtl number. | |
pr | real(kind=R8P) | in | Specific heats ratio, gas constant, Prandtl number. | |
mu0 | real(kind=R8P) | in | Viscosity law. | |
tref | real(kind=R8P) | in | Viscosity law. | |
suth | real(kind=R8P) | in | Viscosity law. | |
omega_mu | real(kind=R8P) | in | Viscosity law. | |
faces | integer(kind=I4P) | in | Modelled block faces [nb, 6]. | |
tw | real(kind=R8P) | in | Wall temperature per face. | |
hwm | real(kind=R8P) | in | Matching height per face, 0 for the 3rd cell. | |
sl | logical | in | Semi-local damping per face. | |
tf | real(kind=R8P) | in | Filter time per face, 0 for none. | |
dt | real(kind=R8P) | in | Time step. | |
commit | logical | in | The averages take this sample. | |
fresh | logical | in | The averages hold no history. | |
avg | real(kind=R8P) | inout | Averages of the faces of direction d [5, ni or 2, nj or 2, nk or 2, nb]. | |
inv | logical | in | The inverse-transformation model per face (T3.5), else the equilibrium one. | |
ue | real(kind=R8P) | in | Inverse model: speed and temperature at the edge of the layer per face. | |
te | real(kind=R8P) | in | Inverse model: speed and temperature at the edge of the layer per face. | |
dxyz | real(kind=R8P) | in | Blocks space steps. | |
q_aux | real(kind=R8P) | in | Auxiliary variables. | |
fl | real(kind=R8P) | inout | Face 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
d | integer(kind=I4P) | in | Direction, 1=x, 2=y, 3=z. | |
di | integer(kind=I4P) | in | Unit step along d. | |
dj | integer(kind=I4P) | in | Unit step along d. | |
dk | integer(kind=I4P) | in | Unit step along d. | |
ni | integer(kind=I4P) | in | Grid dimensions. | |
nj | integer(kind=I4P) | in | Grid dimensions. | |
nk | integer(kind=I4P) | in | Grid dimensions. | |
ngc | integer(kind=I4P) | in | Grid dimensions. | |
blocks_number | integer(kind=I4P) | in | Actual blocks number. | |
gamma | real(kind=R8P) | in | Specific heats ratio, gas constant, Prandtl number. | |
R | real(kind=R8P) | in | Specific heats ratio, gas constant, Prandtl number. | |
pr | real(kind=R8P) | in | Specific heats ratio, gas constant, Prandtl number. | |
mu0 | real(kind=R8P) | in | Viscosity law. | |
tref | real(kind=R8P) | in | Viscosity law. | |
suth | real(kind=R8P) | in | Viscosity law. | |
omega_mu | real(kind=R8P) | in | Viscosity law. | |
faces | integer(kind=I4P) | in | Modelled block faces [nb, 6]. | |
ev | logical | in | The eddy viscosity per face. | |
tw | real(kind=R8P) | in | Wall temperature per face. | |
hwm | real(kind=R8P) | in | Matching height per face, 0 for the 3rd cell. | |
sl | logical | in | Semi-local damping per face. | |
inv | logical | in | The inverse-transformation model per face. | |
ue | real(kind=R8P) | in | Inverse model: edge speed and temperature per face. | |
te | real(kind=R8P) | in | Inverse model: edge speed and temperature per face. | |
is_null | logical | in | Null directions. | |
dxyz | real(kind=R8P) | in | Blocks space steps. | |
q_aux | real(kind=R8P) | in | Auxiliary variables. | |
mu_t | real(kind=R8P) | inout | Eddy 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
d | integer(kind=I4P) | in | Direction, 1=x, 2=y, 3=z. | |
di | integer(kind=I4P) | in | Unit step along d. | |
dj | integer(kind=I4P) | in | Unit step along d. | |
dk | integer(kind=I4P) | in | Unit step along d. | |
ni | integer(kind=I4P) | in | Grid dimensions, variables. | |
nj | integer(kind=I4P) | in | Grid dimensions, variables. | |
nk | integer(kind=I4P) | in | Grid dimensions, variables. | |
nv | integer(kind=I4P) | in | Grid dimensions, variables. | |
blocks_number | integer(kind=I4P) | in | Actual blocks number. | |
faces | integer(kind=I4P) | in | Flagged block faces [nb, 6]. | |
fl | real(kind=R8P) | inout | Face fluxes of direction d. |
Call graph