Appearance
adam_flume_inflow_rr_object
ADAM, FLUME recycling-rescaling turbulent inflow of a boundary layer (issue #121, S5).
One realm face of kind inflow-recycling feeds a turbulent boundary layer with the mean profile of a table (the digital filter's, adam_flume_inflow_df_object) plus the fluctuations of the layer itself, taken from a plane downstream and rescaled, in the variant of the STREAmS solver (Pirozzoli, Bernardini & Grasso; STREAmS-2, recyc_prepare and bcrecyc) of the method of Lund, Wu & Squires (1998):
- Plane. The
ngccell layers ending at the stationrr_xdownstream of the face, a pure translation of the ghost layers byL = nint(rr_x / dx) dx(ghost layer g, g cells beyond the face, takes the cell L downstream of it): every rank writes the cells it owns into one global plane [6, ngc, ny, nz] (the 6th slot counts the writes) and an allreduce sums it, so the plane is the same on every rank and independent of the decomposition (every entry is written once). - Fluctuations. Per layer and wall-normal row, the spanwise Favre mean
u~ = sum(rho u) / sum(rho)and the mean density; the fluctuationsu'' = u - u~(three components) andrho' = rho - rho_mean. - Rescaling. A ghost at height y above the wall takes the fluctuations at
beta y(inner, the viscous length grows bybeta = delta_v(x_r) / delta_v(0)) and atdelta_ratio y(outer,delta_ratio = delta(x_r) / delta(0)), linear in the plane, blended byW(eta) = (1 + tanh(4 (eta - 0.2) / (0.2 + 0.6 eta)) / tanh(4)) / 2,eta = y / delta, damped by(1 - tanh(4 (eta - 2))) / 2; the velocity fluctuations are scaled bybeta(the friction velocity ratio), the density one clipped to [-0.75, 4] times the mean. A source above the plane's last row centre gives no fluctuation; below its first row the first row's (STREAmS zeroes the first cell, a DNS cell at y+ < 1; here the first cell is the wall model's log layer). - Span shift. The plane is read
rr_shiftof the span away (default half), which breaks the streamwise locking of the recycled structures; a shift needs a periodic span. - State. Mean (the table) plus fluctuations, the free-stream pressure:
rho = rho_mean + rho',u = U + u'', and the energy of the pressurep_inf.
beta and delta_ratio are input keys: the case generator takes them from a correlation (make_tbl.py, the momentum integral with the van Driest II skin friction), as STREAmS takes them from its mean-profile model, never from the run.
Face keys: type = inflow-recycling, r, u, p (the free stream), rr_profile (the 7-column table of the digital filter), rr_delta (the layer thickness at the face), rr_wall_axis (x, y or z, the wall on its minimum side), rr_spacing (the cell spacing of the plane, the cells at the face and at the station must have it), rr_x (the station, distance from the face), rr_delta_ratio, rr_beta, rr_shift (fraction of the span, default 0.5). Only [physics] physical_model = euler, one such face per realm.
Ghosts. Once per step, before the first stage, from the committed state (build_rows): the backends write them after the face pass of the boundary fill, as the digital filter's; rows beyond the face and another realm face (edges, corners) are extrapolated. No state of its own: a restart continues bit for bit.
Source: src/app/flume/common/adam_flume_inflow_rr_object.F90
Dependencies
Contents
Derived Types
flume_inflow_rr_object
Recycling-rescaling inflow.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
is_active | logical | A face of this kind exists. | |
face | integer(kind=I4P) | The face (1 to 6). | |
axis_n | integer(kind=I4P) | Streamwise axis (the face normal). | |
axis_w | integer(kind=I4P) | Wall-normal axis. | |
axis_s | integer(kind=I4P) | Spanwise axis. | |
sgn | real(kind=R8P) | Sign of the inward normal along axis_n. | |
r_inf | real(kind=R8P) | Free-stream density. | |
u_inf | real(kind=R8P) | Free-stream speed. | |
p_inf | real(kind=R8P) | Free-stream pressure. | |
gamma | real(kind=R8P) | Specific heats ratio. | |
delta | real(kind=R8P) | Layer thickness at the face. | |
spacing | real(kind=R8P) | Cell spacing of the plane. | |
x_r | real(kind=R8P) | Station, distance from the face (as requested). | |
delta_ratio | real(kind=R8P) | delta(x_r) / delta(0). | |
beta | real(kind=R8P) | delta_v(x_r) / delta_v(0). | |
shift | real(kind=R8P) | Span shift, fraction of the span. | |
profile_file | character(len=999) | Profile table file. | |
prof | real(kind=R8P) | allocatable | Profile table [7, rows]. |
face_x | real(kind=R8P) | Face coordinate along axis_n. | |
y0 | real(kind=R8P) | Plane origin (the domain minimum along the wall-normal and spanwise axes). | |
z0 | real(kind=R8P) | Plane origin (the domain minimum along the wall-normal and spanwise axes). | |
ny | integer(kind=I4P) | Plane cells along the wall-normal and spanwise axes. | |
nz | integer(kind=I4P) | Plane cells along the wall-normal and spanwise axes. | |
ng | integer(kind=I4P) | Plane layers (the ghost cells). | |
nr | integer(kind=I4P) | Translation in cells, L = nr spacing. | |
nshift | integer(kind=I4P) | Span shift in cells. | |
has_plane | logical | The plane has been built (the ghost rows can be listed). | |
fluct | real(kind=R8P) | allocatable | Plane fluctuations rho', u'', v'', w'' (x, y, z) [4, ng, ny, nz]. |
nrec | integer(kind=I4P) | Recycle cells on this rank. | |
rec_cells | integer(kind=I4P) | allocatable | Their cell and block (i, j, k, b) [4, nrec]. |
rec_idx | integer(kind=I4P) | allocatable | Their plane layer and cell (g, jy, kz) [3, nrec]. |
nrows | integer(kind=I4P) | Ghost rows of the face on this rank. | |
rows | integer(kind=I4P) | allocatable | Their block and cell [4, nrows]. |
q_rows | real(kind=R8P) | allocatable | Their conservative states [5, nrows]. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
load | pass(self) | Load the face keys. |
setup | pass(self) | Size the plane. |
list_recycle_cells | pass(self) | List this rank's cells of the plane. |
build_plane | pass(self) | Sum the plane over the ranks and take its fluctuations. |
build_rows | pass(self) | List the ghost rows of the face and their states. |
ghost_state | pass(self) | Conservative state of a ghost. |
Subroutines
load
Load the keys of the face face (section section).
fortran
subroutine load(self, file_parameters, section, face, model, gamma)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_inflow_rr_object) | inout | Inflow. | |
file_parameters | type(file_ini) | in | Parameters file. | |
section | character(len=*) | in | Face section. | |
face | integer(kind=I4P) | in | Face (1 to 6). | |
model | integer(kind=I4P) | in | Physical model. | |
gamma | real(kind=R8P) | in | Specific heats ratio. |
Call graph
setup
Size the plane over the domain [emin, emax]: cells of rr_spacing along the wall-normal and spanwise axes, ngc layers, the translation and the span shift in cells.
fortran
subroutine setup(self, emin, emax, periodic, ngc)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_inflow_rr_object) | inout | Inflow. | |
emin | real(kind=R8P) | in | Domain minimum. | |
emax | real(kind=R8P) | in | Domain maximum. | |
periodic | logical | in | Periodic axes. | |
ngc | integer(kind=I4P) | in | Ghost cells. |
Call graph
list_recycle_cells
List this rank's cells of the plane: the interior cells whose centre is a plane layer's, ngc layers ending at the station, their plane layer and cell; fatal on a cell of the layers at another spacing than the plane's.
fortran
subroutine list_recycle_cells(self, nb, nc, ngc, x_cell, y_cell, z_cell, dxyz)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_inflow_rr_object) | inout | Inflow. | |
nb | integer(kind=I4P) | in | Blocks in use. | |
nc | integer(kind=I4P) | in | Interior cells per block (ni, nj, nk). | |
ngc | integer(kind=I4P) | in | Ghost cells (the offset of the cell arrays). | |
x_cell | real(kind=R8P) | in | X cell centres [1-ngc:ni+ngc, nb] (passed 1-based). | |
y_cell | real(kind=R8P) | in | Y cell centres. | |
z_cell | real(kind=R8P) | in | Z cell centres. | |
dxyz | real(kind=R8P) | in | Cell spacing [3, nb]. |
Call graph
build_plane
Sum this rank's plane cells q_rec (the conservative state of rec_cells) over the ranks into the global plane and take its fluctuations: per layer and wall-normal row the spanwise Favre mean velocity and the mean density.
fortran
subroutine build_plane(self, q_rec)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_inflow_rr_object) | inout | Inflow. | |
q_rec | real(kind=R8P) | in | Conservative state of this rank's plane cells [5, nrec]. |
Call graph
build_rows
List the crown rows beyond the face only (block > 0) and their states (ghost_state, from the plane of build_plane).
fortran
subroutine build_rows(self, crown_map, x_cell, y_cell, z_cell)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_inflow_rr_object) | inout | Inflow. | |
crown_map | integer(kind=I8P) | in | BC crown map [rows, 9, ngc]. | |
x_cell | real(kind=R8P) | in | X cell centres [1-ngc:ni+ngc, nb] (passed 1-based). | |
y_cell | real(kind=R8P) | in | Y cell centres. | |
z_cell | real(kind=R8P) | in | Z cell centres. |
Call graph
Functions
ghost_state
Conservative state of a ghost of layer g, height y above the wall, reading the plane's span cell kz (shifted).
Attributes: pure
Returns: real(kind=R8P)
fortran
function ghost_state(self, g, y, kz) result(q)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_inflow_rr_object) | in | Inflow. | |
g | integer(kind=I4P) | in | Plane layer. | |
y | real(kind=R8P) | in | Height above the wall. | |
kz | integer(kind=I4P) | in | Plane span cell (shifted). |
Call graph
rr_blend
The blend of the inner and outer fluctuations, W(eta) = (1 + tanh(4 (eta - 0.2) / (0.2 + 0.6 eta)) / tanh(4)) / 2 (STREAmS-2 recyc_prepare, alfa 4, beta 0.2): 0 at the wall, 1/2 at eta = 0.2, 1 at eta = 1.
Attributes: pure
Returns: real(kind=R8P)
fortran
function rr_blend(eta) result(w)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
eta | real(kind=R8P) | in | y / delta. |
Call graph
rr_damping
The damping of the fluctuations beyond the layer, (1 - tanh(4 (eta - 2))) / 2 (STREAmS-2 bcrecyc).
Attributes: pure
Returns: real(kind=R8P)
fortran
function rr_damping(eta) result(d)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
eta | real(kind=R8P) | in | y / delta. |
Call graph