Description/Structure:
The subroutine bcin_exp sets velocity, density and viscosity at the
inlet, outlet and on the walls in case of explicit time discretization. At the
inlets, bcin2_exp is called. This subroutine sets ,
,
,
density and viscosity values taking from the user defined boundary conditions
and properties subroutines funcbcs and funcprp.
At the outlets, density and viscosity values are copied from the neighbour control volume in vertical direction to the outlet face.
In case of walls, the velocities on the boundaries are taken from the "wall velocities" section of funcbcs. Viscosity is taken from funcprp.
Description/Structure:
The subroutine bpres is called from the subroutines fmg3d, calcdp, inter and restr, and it calls setind which sets indices of actual block.
This subroutine sets boundary pressures by extrapolating pressure from interior points.
In case of "static pressure exit boundary condition", outlet pressure is taken from fpstat psrt of subroutine funcbcs.
In "fluid-structure interaction" problems, subroutine bpresedge is called. bpresedge sets pressures on edges and corners by extrapolating pressures from interior wall points.
Description/Structure:
ONLY USED IN CASE OF FLUID-STRUCTUR INTERATCION!
The subroutine btau sets wall shear stresses. For each wall,
tau_face is called. It calculates wall shear stress and + values
for a given node. For calculating these on edges and corners, btauedge
is called. This subroutine extrapolates the values from interior wall points.
In tau_face, first the angles between global -,
-,
-directions
and the normal vector to the face are calculated. Using these angles, paralel
component of the velocity to the wall is calculated (
,
and
).
Distance between the first cell in vertical direction and the wall (
) is
found. The coefficient
which is used for the calculation of shear
stresses is calculated in terms of viscosity and
. At the end,
is
calculated and the shear stress on the walls are found.
Description/Structure:
funcbcs is the user defined boundary conditions subroutine.
This subroutine includes several functions defining some variables on the boundaries.
These functions defines the inlet velocity at x-, y- and z-directions respectively.
This function defines the convective velocity on the outlet. It is only needed in case of "convective outlet condition".
Turbulent kinetic energy and dissipation of turbulent kinetic energy at the inlet boundary.
These functions are used to define reynolds stresses in xx, yy, zz, xy, yz and zx planes at the inlet boundary.
Defines temperature at the inlet.
Defines mass concentration of the species (icphi) at the inlet
Used to define the value of the phase function at the inlet.
In case of static pressure boundary condition, static pressure at the outlet is defined here.
Wall velocities in x-, y- and z-directions.
.Temperature (K) at the wall in case of temperature bc SOL;
.Heat flux through the wall in case of temperature bc FLX; (+ if flux from outside, - if flux to outside the computation area)
.Heat transfer coefficient on the outside of the computation area for temperature bc HTC;
.Surrounding temperature for heat transfer on the outside of the computation area for temperature bc HTC.
In case of radiation,
.Emisivity coefficient of the radiating wall;
.Transmisivity coefficient of the radiating wall;
.Surrounding temperature for heat transfer on the outside of the computation area for radiation
-Concentration boundary condition in case of:
.walls with temperature
.walls with heat flux
.wall with reactions
-Dependence of the lbc to the:
.concentration on the wall
.flux through the wall
.reaction speed on the wall
It is needed for the radiation bc on free surfaces. ftsurr is the temperature of the illuminated surrounding media. (free surface is radiating to the surrounding media)
Variables for combustion progress.
Single reactive scalar, and its -u, -v and -w correlations at the inlet boundary.
Description/Structure:
The subroutine modc is called from the subroutines calcc and prepstep, and sets the boundary conditions for concentration for the inlet, symmetry and for wall boundaries.
a. Inlet Boundary Calculations for Concentration: The subroutine inlbcc3 serves as follows:
b. Symmetry Boundary Calculations for Concentration: The subroutine symt3 serves as follows:
c. Wall Boundary Calculations for Concentration: The subroutine wallcbc3 expand patch of wall type for concentration and serves as in the above case.
Description/Structure:
This subroutine is called from the calcke.
The treatment of boundary conditions for the
equations differs from the usual approach for scalars. The
differences are detailed and explained below. In the following we
describe the steps to build up the coefficients (
matrix) ("source term"):
Calculate the source term for the wall boundary condition.
Here the 'law of the wall' is used to calculate the source
term which is stored in . Contrary to other boundary
conditions this source term is not an extra source term
but it replaces the generation term in the
equation.
Therefore, you should not add the source term 'suu' to the
already computed value of the source term
(like it is
done for the inflow boundary condition) since it contains
already the generation term due to the main strain rates
and bouyancy effects (stored in
and
). For
control volumes adjacent to the wall the source term 'su'
has to be computed in the following manner wallkbc3
It can be easily verified that this procedure will
overwrite the source terms 'suu' from all other boundary
conditions of the same control volume if they happen
to have a lower patch number than the wall boundary
condition. It is therefore essential that there is first
a loop over all patches to work on all wall boundary
conditions and then a second loop to do the remaining
boundary conditions. Thus it is ensured that the standard
generation terms do not enter the source term in control
volumes adjacent to a wall but other boundary conditions
can still contribute their share to the source term. This
procedure is implemented in this subroutine modke.
However, it should be mentioned that there remains one
unresolved issue: If a control volume is adjacent to more
than one wall, the different source terms will not
add up but the wall with the highest patch number will
determine the value of the source term. It is correct that
the source terms do not add up since they are 'volumetric'
source terms (like the
generation term). But since the
source term is computed from the parallel velocity
and the wall shear stress
it is not clear which of
the different values would be the best one (or which mean
one would have to choose).
Description/Structure:
The subroutine modpr sets the outlet boundary conditions for the static pressure. This subroutine is called from the iprops which provides modifications of fluid properties if these are changing during the solution process (i.e changes due to the temperature dependence of several fluid properties) and calls outbcpstat3 which serves for the calculation of the followings:
Description/Structure:
The subroutine modrsm serves for the calculation of boundary conditions for reynolds stress components and called from the subroutines caledrsm and calsrs. It calls the subroutines walledrsm and inlbcrsm
modrsm does the followings :
walledrsm calculates the followings additional to the above:
inlbcrsm calculates the inflow boundary turbulence:
Description/Structure:
The subroutine modspec calculates the heat conductivity at boundaries between fluid regions and called from the calmef (makes the effective heat conductivity available to the boundary array for w,e,s,n,b,t)
Description/Structure:
The subroutine modsrs calculates the inlet boundary conditions for the single reactive scalar and called from calsrscor and calsrs, and the solution procedure is like in modrsm
Description/Structure:
The subroutine modsrscor calculates the boundary conditions for the single reactive scalar/velocity correlation for the inlet (inlbcsrs), wall (wallsrscor and symmetry (symsrscor) cases.
Description/Structure:
The subroutine modt is for the temperature boundary conditions. This subroutine is called from the calct and restr. The boundary condition variables are introduced here as lb-t-[w,e,n,s,t,b]. They include:
a. Inlets: ifac (= 1 for w, s, b and = -1 for e, n, t) is transfered from calling routine. It is used as sign for the flux and to calculate the "displacement" in array when the flux is calculated; eg. for w the flux in i=1 is used, whereas in e, the flux in i=nim is used.
CAUTION: In all subroutines for the boundary conditions ar1x, ar1y
and ar1z contain the metric normal to the boundary plane.
In the inner field these variables contain the derivatives
(with xi=x,y,z).
b.Symmetry: look from modc
c. Wall boundary conditions: look from the walltbc3
Description/Structure:
The subroutine moduvw_exp is called from the runge-kutta and sets the inlet inlbc3exp, symmetry symuvw3exp and wall wallbc3exp boundary conditions with explicit time discretization.
Description/Structure:
In case of explicit time discretization, in exptimedis, runge_kutta subroutine is called. runge_kutta uses outbc_exp for calculating outlet boundary condition.
For each face, om3 is called. It calculates the outlet velocities and outlet flux. First, start/end indices of patch in local i-j plane is calculated. Then block number, face number, face orientation and auxilliary variables for patch orientation are found. Necessary cv indices on the outlet, adjacent to the boundary node are calculated.
If there is "convective exit boundary condition" then indices for the surrounding cvs are
calculated. Velocities are interpolated to the faces and the convective velocities for
the boundary condition is set (). After that the velocity gradients for
are
calculated and using it, the new velocities are found. At the end the entire mass flux for
the outlet plane is calculated.
If there is zero-gradient exit boundary condition, then the velocities for zero-gradient
bounadry is set ((adjacent)=
(outlet)). After that the entire mass flux for the outlet
plane is calculated.
Description/Structure:
The subroutine outbcmix is called from the fmg3d and it calculates the outlet boundary for combustion progress variables.
Description/Structure:
The subroutine setbv initializes the variables on the boundaries.
a. Initialization of the Inlets:
At the inlet faces, bvin* (* : vel, turb, temp, rsm, srs, srscor,
conc, mix, phf) is/are called depending on the problem and model type. This
subroutine takes the initial variable values from the user defined boundary
condition subroutine funcbcs. For example, in case of a temperature
dependent
turbulent model, bvinvel, bvinturb
and bvintemp are called. bvinvel initializes
,
and
values as
,
and
respectively. bvintemp takes the inlet
temperature as
, and bvinturb initializes the turbulent kinetic
energy (
) and energy dissipation (
) at the inlet as
and
.
Variables
,
,
,
,
and
are defined in funcbcs.
b. Initialization of the Outlets:
At the outlets, bvout* (* : vel, turb, temp, rsm, srs, srscor, conc, mix, phf) is/are called depending on the problem and model type. bvout* type of subroutines are used to correct the variables on the outlet. Control volume indices on the outlet plane (inh) and adjacent to the boundary (inp) are calculated. For the above example, bvoutvel, bvoutturb and bvouttemp are called. These subroutines copy the corresponding variables from the cv adjacent to the boundary, to the cv on the outlet boundary.
c. Initialization of the Symmetric Boundary Planes:
In order to correct the variables on the symmetic boundaries, bvsym* (* : vel, turb, temp, rsm, srs, srscor, conc, mix, phf) is/are called depending on the problem and model type. For correcting temperature, turbulent kinetic energy, energy dissipation and concentration subroutine symscal (symmetry boundary conditions for scalar) is used.
By using the assumption from Peric, the scalar values on the face are changed during the iteration process. This influence the convergence when multigrid is used, because the values are changed during each restriction cycle. In order to overcome this, the best solution would be to find the point where the normal from symmerty plane intersects the area between local NW, NE, SW and SE and then interpolate the right value.
In subroutine symscal, first start and end indices of the boundary patch is
found. After setting the necessary neighbor control volume indices, variable value on
the local east, west, north and south points (according to the cv adjacent to the inlet
plane cv) are found. Grid points are calculated on the boundary. Necessary lenghts are
calculated to find the discretization function. Then the variable value on the boundary
cv is found in terms of variable values in adjacent cv
and its neighbors
(
,
,
and
).
d. Initialization of the Walls:
On the walls, bvwal* (* : vel, turb, rsm, srscor, phf) is/are called depending
on the problem and model type. For the example of a temperature dependent
turbulent model, bvwalvel assigns wall velocities read from funcbcs on
the walls, bvwalturb sets turbulent kinetic energy (
) and energy dissipation
(
) to zero, and bvwaltemp sets the wall temperature defined in funcbcs.
For initialization of the single reactive scalar and combustion variables on the wall, bvsym* subroutines are used.
Description/Structure:
Sets radiation parameters (emisivity, transmissivity and surrounding temperature) on boundary planes. setradw is called. This subroutine assigns values of radiation parameters according to the boundary type of the block.
Inner emisivity = 0.
Outer emisivity = 0.
Transmisivity = 1.
Surrounding temperature = ftsrad (defined surr. temp. in funcbcs)
Inner emisivity = 0.
Outer emisivity = femisk (defined emisivity coeff. of the wall in funcbcs)
Transmisivity = ftransk (defined transmisivity coeff. of the wall in funcbcs)
Surrounding temperature = ftsrad (defined surr. temp. in funcbcs)
Inner emisivity = femisk (defined emisivity coeff. of the wall in funcbcs)
Outer emisivity = 0.
Transmisivity = ftransk (defined transmisivity coeff. of the wall in funcbcs)
Surrounding temperature = ftsrad (defined surr. temp. in funcbcs)
Inner emisivity = femisk (defined emisivity coeff. of the wall in funcbcs)
Outer emisivity = femisk (defined emisivity coeff. of the wall in funcbcs)
Transmisivity = ftransk (defined transmisivity coeff. of the wall in funcbcs)
Surrounding temperature = ftsrad (defined surr. temp. in funcbcs)
Description/Structure:
In case of symmetric boundary condition, symvec is called. It calculates the cartesian components of the parallel velocity on the boundary.
Description/Structure:
This subroutine is called in case of "fluid-structure interaction" problems with "moving grids".
After calwallvel is called (Calculation of wall velocities on a moving or distorted structure), wallfluxbc takes place.
Wall flux at each cell face is calculated in terms of wall velocity (coming from calwallvel) and the fluid density. After that these fluxes are summed up to total flux of the control volume.