Appearance
adam_flume_wall_model_library
ADAM, FLUME equilibrium wall model (issue #119, T3.4).
The thin-layer equations between the wall and a sample at height h, parallel velocity us, temperature ts, pressure ps (uniform across the layer): d/dy[(mu + mu_t) dU/dy] = 0, d/dy[(mu + mu_t) U dU/dy + cp (mu/Pr + mu_t/Pr_t) dT/dy] = 0, with mu_t = kappa y sqrt(rho tau_w) (1 - exp(-y+ / A+))^2, with the local density, y+ = y sqrt(tau_w rho_w) / mu_w, kappa 0.41, A+ 17, Pr_t 0.9 (Kawai & Larsson 2012). Both integrate once: (mu + mu_t) dU/dy = tau_w, cp (mu/Pr + mu_t/Pr_t) dT/dy + tau_w U = Q_w, Q_w = k_w dT/dy|_w. Given T(y), the two quadratures on a fixed stretched grid give tau_w and Q_w from the sample values: a fixed number of iterations, so a fixed cost per wall face on the device, with no tridiagonal solve.
Source: src/app/flume/common/adam_flume_wall_model_library.F90
Dependencies
Contents
- sample_cells
- wall_model_solve
- wall_model_solve_inverse
- wall_eddy_viscosity
- inverse_layer_speed
- inverse_strain
- log_mean_inverse
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
WM_POINTS | integer(kind=I4P) | parameter | Intervals of the layer; tau within 1 % up to h+ = 1e5, 5.5 % off at 1e6. |
WM_ITERATIONS | integer(kind=I4P) | parameter | Iterations, Aitken every second one. |
WM_STRETCH | real(kind=R8P) | parameter | Ratio of consecutive intervals. |
WM_KAPPA | real(kind=R8P) | parameter | von Karman constant. |
WM_APLUS | real(kind=R8P) | parameter | Damping constant. |
WM_PRT | real(kind=R8P) | parameter | Turbulent Prandtl number. |
WM_SRA | real(kind=R8P) | parameter | Reynolds analogy factor of the inverse model (Griffin et al. 2023, after Zhang et al. 2014). |
WM_SHOTS | integer(kind=I4P) | parameter | Shots of the inverse model, secant on ln(tau) after the first. |
WM_SUBITERATIONS | integer(kind=I4P) | parameter | Corrections of each step of the inverse model. |
Subroutines
sample_cells
The cells of a wall-model sample: from the matching height hwm (0: the 3rd cell), the cell m counted from the wall and the weight w of cell m + 1, both within the n cells of the block, and the height of the sample actually taken.
Attributes: pure
fortran
subroutine sample_cells(hwm, dx, n, m, w, h)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
hwm | real(kind=R8P) | in | Matching height, spacing along the normal. | |
dx | real(kind=R8P) | in | Matching height, spacing along the normal. | |
n | integer(kind=I4P) | in | Cells of the block along the normal. | |
m | integer(kind=I4P) | out | Cell counted from the wall. | |
w | real(kind=R8P) | out | Weight of cell m + 1. | |
h | real(kind=R8P) | out | Height of the sample. |
Call graph
wall_model_solve
Return the wall shear stress tau and the heat flux q (k dT/dy at the wall, positive when the gas is hotter than the wall) of an isothermal wall.
Attributes: pure
fortran
subroutine wall_model_solve(h, us, ts, ps, tw, R, cp, pr, mu0, tref, suth, omega_mu, tau, q, semilocal)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
h | real(kind=R8P) | in | Height, parallel speed, temperature and pressure of the sample. | |
us | real(kind=R8P) | in | Height, parallel speed, temperature and pressure of the sample. | |
ts | real(kind=R8P) | in | Height, parallel speed, temperature and pressure of the sample. | |
ps | real(kind=R8P) | in | Height, parallel speed, temperature and pressure of the sample. | |
tw | real(kind=R8P) | in | Wall temperature. | |
R | real(kind=R8P) | in | Gas constant, specific heat, Prandtl number. | |
cp | real(kind=R8P) | in | Gas constant, specific heat, Prandtl number. | |
pr | real(kind=R8P) | in | Gas constant, specific heat, Prandtl number. | |
mu0 | real(kind=R8P) | in | Viscosity law, as compute_dissipative_flux. | |
tref | real(kind=R8P) | in | Viscosity law, as compute_dissipative_flux. | |
suth | real(kind=R8P) | in | Viscosity law, as compute_dissipative_flux. | |
omega_mu | real(kind=R8P) | in | Viscosity law, as compute_dissipative_flux. | |
tau | real(kind=R8P) | out | Wall shear stress, wall heat flux. | |
q | real(kind=R8P) | out | Wall shear stress, wall heat flux. | |
semilocal | logical | in | optional | Semi-local damping, y* = y sqrt(rho tau) / mu with the local rho, mu (else wall units). |
Call graph
wall_model_solve_inverse
Return the wall shear stress tau and the heat flux q (k dT/dy at the wall, positive when the gas is hotter than the wall) of an isothermal wall by the model of Griffin, Fu & Moin (2023, JFM 970 A36): the strain of the constant-property layer at the same semi-local height, S_t = 1 / (1 + kappa y* D^2), D = 1 - exp(-y* / A+), y* = y sqrt(rho tau) / mu, mapped to the compressible one by the inverse total-stress-based transformation (their Eq. 2.2), with the temperature from the matching-anchored Reynolds analogy (Eq. 2.5) T = Tw + s Pr (Tr - Tw) (U / Ue) (1 - U / Us) + (U / Us)^2 (Ts - Tw), Tr = Te + Pr^(1/3) Ue^2 / (2 cp), s 1.14; so q = s cp tau (Tr - Tw) / Ue. Ue, Te: the state at the edge of the layer (the channel centre), given.
Eq. 2.2 written for the physical strain g = dU/dy, its property gradients through T(U): with E = (1 / S_t - 1) mu_w / mu, F = sqrt(rho / rho_w), K = tau F / mu, beta = (dT/dU) (1/2 + d ln mu / d ln T) / T (ideal gas at uniform pressure; the slope is omega_mu, less T / (T + S) under Sutherland), F beta y g^2 - (E + F + K beta y) g + K = 0; its positive root when beta < 0 (the other is negative), else the one nearer K / (E + F), the strain without the gradients (the exact tau / mu of the laminar layer, where the equation also holds the spurious root 1 / (beta y) of dy*/dy = 0). The layer is integrated from the wall on the stretched grid of wall_model_solve, each interval exact for 1 / g linear in y (the viscous and the log layer), corrected WM_SUBITERATIONS times, then shot on ln(tau) to the sample speed.
Attributes: pure
fortran
subroutine wall_model_solve_inverse(h, us, ts, ps, tw, ue, te, R, cp, pr, mu0, tref, suth, omega_mu, tau, q)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
h | real(kind=R8P) | in | Height, parallel speed, temperature and pressure of the sample. | |
us | real(kind=R8P) | in | Height, parallel speed, temperature and pressure of the sample. | |
ts | real(kind=R8P) | in | Height, parallel speed, temperature and pressure of the sample. | |
ps | real(kind=R8P) | in | Height, parallel speed, temperature and pressure of the sample. | |
tw | real(kind=R8P) | in | Wall temperature. | |
ue | real(kind=R8P) | in | Speed and temperature at the edge of the layer. | |
te | real(kind=R8P) | in | Speed and temperature at the edge of the layer. | |
R | real(kind=R8P) | in | Gas constant, specific heat, Prandtl number. | |
cp | real(kind=R8P) | in | Gas constant, specific heat, Prandtl number. | |
pr | real(kind=R8P) | in | Gas constant, specific heat, Prandtl number. | |
mu0 | real(kind=R8P) | in | Viscosity law, as compute_dissipative_flux. | |
tref | real(kind=R8P) | in | Viscosity law, as compute_dissipative_flux. | |
suth | real(kind=R8P) | in | Viscosity law, as compute_dissipative_flux. | |
omega_mu | real(kind=R8P) | in | Viscosity law, as compute_dissipative_flux. | |
tau | real(kind=R8P) | out | Wall shear stress, wall heat flux. | |
q | real(kind=R8P) | out | Wall shear stress, wall heat flux. |
Call graph
Functions
wall_eddy_viscosity
The eddy viscosity of the layer, kappa y sqrt(rho tau_w) D^2, D = 1 - exp(-y+ / A+) with y+ = y sqrt(tau_w rho_w) / mu_w (wall units) or, semilocal, y* = y sqrt(rho tau_w) / mu (local density and viscosity): the mu_t of wall_model_solve, at the height y of a cell below the matching height with that cell's density and viscosity (issue #119, wall_model_eddy_viscosity).
Attributes: pure
Returns: real(kind=R8P)
fortran
function wall_eddy_viscosity(y, rho, mu, tau, rhow, muw, semilocal) result(mt)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
y | real(kind=R8P) | in | Height, density and viscosity of the cell. | |
rho | real(kind=R8P) | in | Height, density and viscosity of the cell. | |
mu | real(kind=R8P) | in | Height, density and viscosity of the cell. | |
tau | real(kind=R8P) | in | Wall shear stress. | |
rhow | real(kind=R8P) | in | Density and viscosity at the wall. | |
muw | real(kind=R8P) | in | Density and viscosity at the wall. | |
semilocal | logical | in | Semi-local damping. |
Call graph
inverse_layer_speed
The speed at the height h of the layer of wall stress tau of the inverse model (wall_model_solve_inverse).
Attributes: pure
Returns: real(kind=R8P)
fortran
function inverse_layer_speed(h, tau, us, ts, ps, tw, c1, R, mu0, tref, suth, omega_mu) result(u)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
h | real(kind=R8P) | in | Height, wall stress, sample speed, temperature, pressure, wall temperature. | |
tau | real(kind=R8P) | in | Height, wall stress, sample speed, temperature, pressure, wall temperature. | |
us | real(kind=R8P) | in | Height, wall stress, sample speed, temperature, pressure, wall temperature. | |
ts | real(kind=R8P) | in | Height, wall stress, sample speed, temperature, pressure, wall temperature. | |
ps | real(kind=R8P) | in | Height, wall stress, sample speed, temperature, pressure, wall temperature. | |
tw | real(kind=R8P) | in | Height, wall stress, sample speed, temperature, pressure, wall temperature. | |
c1 | real(kind=R8P) | in | dT/dU at the wall. | |
R | real(kind=R8P) | in | Gas constant, viscosity law. | |
mu0 | real(kind=R8P) | in | Gas constant, viscosity law. | |
tref | real(kind=R8P) | in | Gas constant, viscosity law. | |
suth | real(kind=R8P) | in | Gas constant, viscosity law. | |
omega_mu | real(kind=R8P) | in | Gas constant, viscosity law. |
Call graph
inverse_strain
The strain dU/dy at the height y and speed u of the layer of wall stress tau of the inverse model (wall_model_solve_inverse).
Attributes: pure
Returns: real(kind=R8P)
fortran
function inverse_strain(y, u, tau, us, ts, ps, tw, c1, R, mu0, tref, suth, omega_mu) result(g)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
y | real(kind=R8P) | in | Height, speed, wall stress, sample speed, temperature, pressure, wall temperature. | |
u | real(kind=R8P) | in | Height, speed, wall stress, sample speed, temperature, pressure, wall temperature. | |
tau | real(kind=R8P) | in | Height, speed, wall stress, sample speed, temperature, pressure, wall temperature. | |
us | real(kind=R8P) | in | Height, speed, wall stress, sample speed, temperature, pressure, wall temperature. | |
ts | real(kind=R8P) | in | Height, speed, wall stress, sample speed, temperature, pressure, wall temperature. | |
ps | real(kind=R8P) | in | Height, speed, wall stress, sample speed, temperature, pressure, wall temperature. | |
tw | real(kind=R8P) | in | Height, speed, wall stress, sample speed, temperature, pressure, wall temperature. | |
c1 | real(kind=R8P) | in | dT/dU at the wall. | |
R | real(kind=R8P) | in | Gas constant, viscosity law. | |
mu0 | real(kind=R8P) | in | Gas constant, viscosity law. | |
tref | real(kind=R8P) | in | Gas constant, viscosity law. | |
suth | real(kind=R8P) | in | Gas constant, viscosity law. | |
omega_mu | real(kind=R8P) | in | Gas constant, viscosity law. |
Call graph
log_mean_inverse
The mean of 1 / c(y) over an interval where c is linear between a and b.
Attributes: pure
Returns: real(kind=R8P)
fortran
function log_mean_inverse(a, b) result(r)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | real(kind=R8P) | in | End values. | |
b | real(kind=R8P) | in | End values. |
Call graph