Skip to content

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 ​

Variables ​

NameTypeAttributesDescription
WM_POINTSinteger(kind=I4P)parameterIntervals of the layer; tau within 1 % up to h+ = 1e5, 5.5 % off at 1e6.
WM_ITERATIONSinteger(kind=I4P)parameterIterations, Aitken every second one.
WM_STRETCHreal(kind=R8P)parameterRatio of consecutive intervals.
WM_KAPPAreal(kind=R8P)parametervon Karman constant.
WM_APLUSreal(kind=R8P)parameterDamping constant.
WM_PRTreal(kind=R8P)parameterTurbulent Prandtl number.
WM_SRAreal(kind=R8P)parameterReynolds analogy factor of the inverse model (Griffin et al. 2023, after Zhang et al. 2014).
WM_SHOTSinteger(kind=I4P)parameterShots of the inverse model, secant on ln(tau) after the first.
WM_SUBITERATIONSinteger(kind=I4P)parameterCorrections 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

NameTypeIntentAttributesDescription
hwmreal(kind=R8P)inMatching height, spacing along the normal.
dxreal(kind=R8P)inMatching height, spacing along the normal.
ninteger(kind=I4P)inCells of the block along the normal.
minteger(kind=I4P)outCell counted from the wall.
wreal(kind=R8P)outWeight of cell m + 1.
hreal(kind=R8P)outHeight 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

NameTypeIntentAttributesDescription
hreal(kind=R8P)inHeight, parallel speed, temperature and pressure of the sample.
usreal(kind=R8P)inHeight, parallel speed, temperature and pressure of the sample.
tsreal(kind=R8P)inHeight, parallel speed, temperature and pressure of the sample.
psreal(kind=R8P)inHeight, parallel speed, temperature and pressure of the sample.
twreal(kind=R8P)inWall temperature.
Rreal(kind=R8P)inGas constant, specific heat, Prandtl number.
cpreal(kind=R8P)inGas constant, specific heat, Prandtl number.
prreal(kind=R8P)inGas constant, specific heat, Prandtl number.
mu0real(kind=R8P)inViscosity law, as compute_dissipative_flux.
trefreal(kind=R8P)inViscosity law, as compute_dissipative_flux.
suthreal(kind=R8P)inViscosity law, as compute_dissipative_flux.
omega_mureal(kind=R8P)inViscosity law, as compute_dissipative_flux.
taureal(kind=R8P)outWall shear stress, wall heat flux.
qreal(kind=R8P)outWall shear stress, wall heat flux.
semilocallogicalinoptionalSemi-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

NameTypeIntentAttributesDescription
hreal(kind=R8P)inHeight, parallel speed, temperature and pressure of the sample.
usreal(kind=R8P)inHeight, parallel speed, temperature and pressure of the sample.
tsreal(kind=R8P)inHeight, parallel speed, temperature and pressure of the sample.
psreal(kind=R8P)inHeight, parallel speed, temperature and pressure of the sample.
twreal(kind=R8P)inWall temperature.
uereal(kind=R8P)inSpeed and temperature at the edge of the layer.
tereal(kind=R8P)inSpeed and temperature at the edge of the layer.
Rreal(kind=R8P)inGas constant, specific heat, Prandtl number.
cpreal(kind=R8P)inGas constant, specific heat, Prandtl number.
prreal(kind=R8P)inGas constant, specific heat, Prandtl number.
mu0real(kind=R8P)inViscosity law, as compute_dissipative_flux.
trefreal(kind=R8P)inViscosity law, as compute_dissipative_flux.
suthreal(kind=R8P)inViscosity law, as compute_dissipative_flux.
omega_mureal(kind=R8P)inViscosity law, as compute_dissipative_flux.
taureal(kind=R8P)outWall shear stress, wall heat flux.
qreal(kind=R8P)outWall 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

NameTypeIntentAttributesDescription
yreal(kind=R8P)inHeight, density and viscosity of the cell.
rhoreal(kind=R8P)inHeight, density and viscosity of the cell.
mureal(kind=R8P)inHeight, density and viscosity of the cell.
taureal(kind=R8P)inWall shear stress.
rhowreal(kind=R8P)inDensity and viscosity at the wall.
muwreal(kind=R8P)inDensity and viscosity at the wall.
semilocallogicalinSemi-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

NameTypeIntentAttributesDescription
hreal(kind=R8P)inHeight, wall stress, sample speed, temperature, pressure, wall temperature.
taureal(kind=R8P)inHeight, wall stress, sample speed, temperature, pressure, wall temperature.
usreal(kind=R8P)inHeight, wall stress, sample speed, temperature, pressure, wall temperature.
tsreal(kind=R8P)inHeight, wall stress, sample speed, temperature, pressure, wall temperature.
psreal(kind=R8P)inHeight, wall stress, sample speed, temperature, pressure, wall temperature.
twreal(kind=R8P)inHeight, wall stress, sample speed, temperature, pressure, wall temperature.
c1real(kind=R8P)indT/dU at the wall.
Rreal(kind=R8P)inGas constant, viscosity law.
mu0real(kind=R8P)inGas constant, viscosity law.
trefreal(kind=R8P)inGas constant, viscosity law.
suthreal(kind=R8P)inGas constant, viscosity law.
omega_mureal(kind=R8P)inGas 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

NameTypeIntentAttributesDescription
yreal(kind=R8P)inHeight, speed, wall stress, sample speed, temperature, pressure, wall temperature.
ureal(kind=R8P)inHeight, speed, wall stress, sample speed, temperature, pressure, wall temperature.
taureal(kind=R8P)inHeight, speed, wall stress, sample speed, temperature, pressure, wall temperature.
usreal(kind=R8P)inHeight, speed, wall stress, sample speed, temperature, pressure, wall temperature.
tsreal(kind=R8P)inHeight, speed, wall stress, sample speed, temperature, pressure, wall temperature.
psreal(kind=R8P)inHeight, speed, wall stress, sample speed, temperature, pressure, wall temperature.
twreal(kind=R8P)inHeight, speed, wall stress, sample speed, temperature, pressure, wall temperature.
c1real(kind=R8P)indT/dU at the wall.
Rreal(kind=R8P)inGas constant, viscosity law.
mu0real(kind=R8P)inGas constant, viscosity law.
trefreal(kind=R8P)inGas constant, viscosity law.
suthreal(kind=R8P)inGas constant, viscosity law.
omega_mureal(kind=R8P)inGas 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

NameTypeIntentAttributesDescription
areal(kind=R8P)inEnd values.
breal(kind=R8P)inEnd values.

Call graph