Appearance
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
- sum_momentum_dev
- add_uniform_momentum_dev
- overwrite_wall_fluxes_dev
- zero_mu_t_dev
- add_wall_mu_t_dev
- close_wall_fluxes_dev
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
| 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_gpu | real(kind=R8P) | in | Blocks space steps [nb, 3]. | |
q_gpu | real(kind=R8P) | in | Conservative variables. | |
sums | real(kind=R8P) | out | Momentum 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
| 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_gpu | real(kind=R8P) | inout | Conservative 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
| 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_gpu | 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_gpu | real(kind=R8P) | inout | Averages of the faces of direction d [nb, ni or 2, nj or 2, nk or 2, 5]. | |
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_gpu | real(kind=R8P) | in | Blocks space steps. | |
q_aux_gpu | real(kind=R8P) | in | Auxiliary variables. | |
fl_gpu | real(kind=R8P) | inout | Face 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
| 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. | |
mu_t_gpu | real(kind=R8P) | inout | Eddy 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
| 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_gpu | 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_gpu | real(kind=R8P) | in | Blocks space steps [nb, 3]. | |
q_aux_gpu | real(kind=R8P) | in | Auxiliary variables. | |
mu_t_gpu | real(kind=R8P) | inout | Eddy 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
| 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_gpu | integer(kind=I4P) | in | Flagged block faces [nb, 6]. | |
fl_gpu | real(kind=R8P) | inout | Face fluxes of direction d. |
Call graph