This module contains general boundary routines
like initializing boundary, setting boundary at every time step for each field and other general boundary routines
Call the functions associated with each boundary condition
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_field_type), | intent(inout) | :: | field(:) |
fluid parameters and properties |
||
type(pdf_data_type), | intent(inout) | :: |
contains global state vector |
|||
type(tem_levelDesc_type), | intent(in) | :: | levelDesc |
global type contains iLevel descriptor |
||
type(treelmesh_type), | intent(in) | :: | tree |
global treelm mesh |
||
integer, | intent(in) | :: | iLevel |
the iLevel on which this boundary was invoked |
||
integer, | intent(in) | :: | nBCs |
number of BC |
||
type(mus_param_type), | intent(in) | :: | params |
global parameters |
||
type(mus_scheme_layout_type), | intent(in) | :: | layout |
stencil layout information |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
scheme variable system |
||
type(mus_derVarPos_type), | intent(in) | :: | derVarPos(:) |
position of derived quantities in varsys |
||
type(glob_boundary_type), | intent(in) | :: | globBC(:) |
scheme global boundary type |
||
type(mus_mixture_type), | intent(in) | :: | mixture |
mixture info |
||
type(mus_physics_type), | intent(in) | :: | physics |
scheme global boundary type |
||
real(kind=rk), | intent(inout) | :: | state(:,:) |
state arrays fo current iLevel both now and next |
Check prerequisite for multi-species boundary conditions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_field_type), | intent(inout) | :: | field(:) |
fluid parameters and properties |
||
type(pdf_data_type), | intent(inout) | :: | pdf(tree%global%minLevel:tree%global%maxLevel) |
contains global state vector |
||
type(treelmesh_type), | intent(in) | :: | tree |
global treelm mesh |
||
type(tem_levelDesc_type), | intent(in) | :: | levelDesc(tree%global%minLevel:tree%global%maxLevel) |
Level Descriptor |
||
type(mus_scheme_layout_type), | intent(in) | :: | layout |
scheme layout type |
||
type(mus_scheme_header_type), | intent(in) | :: | schemeHeader |
scheme header info |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
scheme variable system |
||
type(mus_derVarPos_type), | intent(in) | :: | derVarPos(:) |
position of derived quantities in varsys |
||
type(glob_boundary_type), | intent(inout) | :: | globBC(:) |
scheme global boundary type |
||
type(tem_BC_prop_type) | :: | bc_prop |
boundary property type |
|||
type(array2D_type), | intent(inout) | :: | state(tree%global%minLevel:tree%global%maxLevel) |
state array |
||
type(mus_auxFieldVar_type), | intent(in) | :: | auxField(tree%global%minLevel:tree%global%maxLevel) |
AuxField array |
Get Surface points on boundary elements. For boundary state variable which are evaluated linkwise, extract surface points for each link and for non-link based variables project barycenter on the boundary surface. Return real coordinates on boundary surface and offset bit which encodes direction.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(boundary_type), | intent(in) | :: | bc |
Field boundary type |
||
type(glob_boundary_type), | intent(in) | :: | globBC |
for number of elements in boundary and position in buffer |
||
type(treelmesh_type), | intent(in) | :: | tree |
global treelm mesh |
||
type(tem_stencilHeader_type), | intent(in) | :: | stencil |
for directions |
||
integer(kind=long_k), | intent(in) | :: | total(:) |
global pdf type |
||
integer, | intent(in) | :: | iLevel |
Current level |
||
integer, | intent(out) | :: | nPoints |
Number of points |
||
real(kind=rk), | intent(out), | allocatable | :: | points(:,:) |
3-d real coordinates on which boundary variables are evaluated |
|
character(len=1), | intent(out), | allocatable | :: | offset_bit(:) |
Offset bit encodes direction of boundary. used by apesmate to translate space coordinate in the offset direction to determine the treeID in remote domain |
This subroutine sets the right boundary conditions for the different boundaries.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(boundary_type) | :: | bc(:) |
global array boundary type |
|||
type(pdf_data_type), | intent(in) | :: | pdf(tree%global%minLevel:tree%global%maxLevel) |
contains global state vector |
||
type(treelmesh_type), | intent(in) | :: | tree |
global treelm mesh |
||
type(tem_levelDesc_type), | intent(in) | :: | levelDesc(tree%global%minLevel:tree%global%maxLevel) |
global pdf type |
||
type(mus_scheme_layout_type), | intent(in) | :: | layout |
scheme layout type |
||
type(mus_scheme_header_type), | intent(in) | :: | schemeHeader |
scheme header info |
||
integer, | intent(in) | :: | varPos(:) |
varPos of current field variable |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
scheme variable system |
||
type(mus_derVarPos_type), | intent(in) | :: | derVarPos |
position of derived quantities in varsys |
||
type(glob_boundary_type), | intent(inout) | :: | globBC(:) |
scheme global boundary type |
||
type(tem_BC_prop_type), | intent(in) | :: | bc_prop |
boundary property type |
||
type(array2D_type), | intent(in) | :: | state(tree%global%minLevel:tree%global%maxLevel) |
contains global state vector |
||
type(mus_auxFieldVar_type), | intent(in) | :: | auxField(tree%global%minLevel:tree%global%maxLevel) |
AuxField array |
||
type(mus_field_prop_type), | intent(in) | :: | fieldProp |
fluid parameters and properties |
Check prerequisite for some boundary conditions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_field_type), | intent(inout) | :: | field(:) |
fluid parameters and properties |
||
integer, | intent(in) | :: | nBCs |
Number of boundary types |
Initialize the values required for the moments BC
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(boundary_type), | intent(inout) | :: | bc |
global array boundary type |
||
type(tem_levelDesc_type), | intent(in) | :: | levelDesc(minLevel:maxLevel) |
Level descriptor |
||
type(mus_scheme_layout_type), | intent(in) | :: | layout |
Layout |
||
type(glob_boundary_type), | intent(inout) | :: | globBC |
scheme global boundary type |
||
integer, | intent(in) | :: | minLevel |
Level range |
||
integer, | intent(in) | :: | maxLevel |
Level range |
assign qVal to corresponding BC and level-wise if qVal not provided by seeder. qVal from seeder are assigned in assignBCList in mus_construction_module, So set qVal from config only when it is not provided by seeder.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | refQVal | |||
type(mus_scheme_layout_type), | intent(in) | :: | layout | |||
type(glob_boundary_type), | intent(inout) | :: | globBC | |||
integer, | intent(in) | :: | minLevel | |||
integer, | intent(in) | :: | maxLevel |
Initialize the values required for the characteristic boundary conditions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(boundary_type) | :: | bc |
global array boundary type |
|||
real(kind=rk), | intent(in) | :: | state(:) |
State array |
||
integer, | intent(in) | :: | nSize |
nSize |
||
integer, | intent(in) | :: | neigh(:) |
neighbor array |
||
type(mus_scheme_layout_type), | intent(in) | :: | layout |
fluid parameters |
||
integer, | intent(in) | :: | level |
level |
||
integer, | intent(in) | :: | nScalars |
number of scalars in global system |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
scheme variable system |
||
type(mus_derVarPos_type), | intent(in) | :: | derVarPos |
position of derived quantities in varsys |
||
integer, | intent(in) | :: | elemPos(:) |
BC elements positions in total list |
||
integer, | intent(in) | :: | nElems |
number of BC elements |
This routine allocates turbulent viscosity and friction velocity on boundary elements. It also initialize friction velocity from stream-wise velocity component on first neighbor in normal direction.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(boundary_type), | intent(inout) | :: | bc |
Field bc which contains turbwallFunc type and neighbor info |
||
type(glob_boundary_type), | intent(inout) | :: | globBC |
global bc of current boundary with elemPos and normal info |
||
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField array |
||
type(mus_viscosity_type) | :: | viscKine |
Kinematic viscosity |
|||
type(mus_derVarPos_type), | intent(in) | :: | derVarPos |
position of derived quantities in varsys |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
scheme variable system |
||
type(tem_stencilHeader_type), | intent(in) | :: | stencil |
stencil info |
||
integer, | intent(in) | :: | iLevel |
current level |
Transfer pre- and post-collision PDF of neighbors of boundary elements into neighBufferPre and neighBufferPost. Access to state array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | prevstate(:) |
Previous state vector of iLevel |
||
real(kind=rk), | intent(in) | :: | currstate(:) |
Current state vector of iLevel |
||
integer, | intent(in) | :: | neigh(:) |
connectivity array corresponding to state vector |
||
type(glob_boundary_type), | intent(in) | :: | globBC(:) |
scheme global boundary type |
||
integer, | intent(in) | :: | nBCs |
number of total BC |
||
type(mus_field_type), | intent(inout) | :: | field(:) |
fluid parameters and properties |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
scheme variable system |
||
integer, | intent(in) | :: |
number of total links |
|||
integer, | intent(in) | :: | nSize |
number of elements in state vector |
||
integer, | intent(in) | :: | iLevel |
the iLevel on which this boundary was invoked |
Transfer pdf of boundary elements into bcBuffer which is used by all boundary routines.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(out) | :: | bcBuffer(:) |
state values of all boundary elements |
||
real(kind=rk), | intent(in) | :: | currState(:) |
Current state vector |
||
integer, | intent(in) | :: | neigh(:) |
connectivity array corresponding to state vector |
||
integer, | intent(in) | :: | nSize |
nSize |
||
integer, | intent(in) | :: | nElems_bc |
number of boundary elements |
||
integer, | intent(in) | :: | posInTotal(nElems_bc) |
positions in total list of boundary elements |
||
integer, | intent(in) | :: | nFields |
Number of fields |
||
integer, | intent(in) | :: |
number of total links |
|||
type(tem_varSys_type), | intent(in) | :: | varSys |
scheme variable system |
This routine setup indices for boundary variables in bc_State_type pntIndex for the points on which boundaries are treated.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(boundary_type), | intent(inout), | target | :: | bc |
Field boundary type |
|
type(glob_boundary_type), | intent(in) | :: | globBC |
for number of elements in boundary and position in buffer |
||
type(treelmesh_type), | intent(in) | :: | tree |
global treelm mesh |
||
type(tem_stencilHeader_type), | intent(in) | :: | stencil |
for directions |
||
type(tem_levelDesc_type), | intent(in) | :: | levelDesc(minLevel:maxLevel) |
global pdf type |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
Global variable system |
||
integer, | intent(in) | :: | minLevel |
Min and Max level in mesh |
||
integer, | intent(in) | :: | maxLevel |
Min and Max level in mesh |