atl_bc_header_module Module

Boundary conditions.

For each boundary label found in the mesh, there needs to be a definition of the boundary condition to apply at the corresponding faces. What kind of boundary conditions are available depends on the equation system, but each boundary condition needs to be identified by a label, that matches the one defined in the mesh.

If there are values that are to be extrapolated (Neumann boundary condition), you can set enforce_zero_grad to true, to use an extrapolation of a polynomial with zero gradient at the boundary. This is achieved by computing the last mode to fulfill this condition. If you set neumann_mode_fraction to a smaller value than 1, then only this fraction of lower modes will be used in the enforce_zero_grad procedure and higher modes will be set to 0.

Simple example with two different boundary conditions, one without further options (slipwall) and one with further settings (inflow):

 boundary condition = {
    { -- SLIPWALL
      --   Velocity in normal direction 0, other values extrapolated.
      label = 'cylinder',
      kind  = 'slipwall', -- or 'wall'
      enforce_zero_grad = true,
      neumann_mode_fraction = 1.0
    },
    { -- INFLOW
      --   Prescribe density and velocity, extrapolate pressure.
      label = 'outside',
      kind = 'conservatives',
      density = 1.23,
      velocityX = 0.2,
      velocityY = 0.3,
      velocityZ = 0.4
      enforce_zero_grad = true,
      neumann_mode_fraction = 1.0
    }
  }

If there is a boundary in the mesh, for which no boundary condition is defined the application will stop. Boundary conditions that are defined, but for which there is no label in the mesh, will be ignored.


Uses

Used by

  • module~~atl_bc_header_module~~UsedByGraph module~atl_bc_header_module atl_bc_header_module module~atl_boundary_module atl_boundary_module module~atl_boundary_module->module~atl_bc_header_module module~atl_covolume_boundary_module atl_covolume_boundary_module module~atl_covolume_boundary_module->module~atl_bc_header_module module~atl_covolume_boundary_module->module~atl_boundary_module module~atl_modg_1d_bnd_module atl_modg_1d_bnd_module module~atl_covolume_boundary_module->module~atl_modg_1d_bnd_module module~atl_modg_2d_bnd_module atl_modg_2d_bnd_module module~atl_covolume_boundary_module->module~atl_modg_2d_bnd_module module~atl_modg_bnd_module atl_modg_bnd_module module~atl_covolume_boundary_module->module~atl_modg_bnd_module module~atl_cube_container_module atl_cube_container_module module~atl_cube_container_module->module~atl_bc_header_module module~atl_cube_container_module->module~atl_boundary_module module~atl_imexrk_module atl_imexrk_module module~atl_imexrk_module->module~atl_bc_header_module module~atl_imexrk_module->module~atl_boundary_module module~atl_imexrk_module->module~atl_cube_container_module module~atl_stabilize_module atl_stabilize_module module~atl_imexrk_module->module~atl_stabilize_module module~atl_initialize_module atl_initialize_module module~atl_initialize_module->module~atl_bc_header_module module~atl_initialize_module->module~atl_boundary_module module~atl_modg_1d_bnd_module->module~atl_bc_header_module module~atl_modg_1d_bnd_module->module~atl_boundary_module module~atl_modg_2d_bnd_module->module~atl_bc_header_module module~atl_modg_2d_bnd_module->module~atl_boundary_module module~atl_modg_bnd_module->module~atl_bc_header_module module~atl_modg_bnd_module->module~atl_boundary_module module~atl_predcor_cerk4_module atl_predcor_cerk4_module module~atl_predcor_cerk4_module->module~atl_bc_header_module module~atl_predcor_cerk4_module->module~atl_boundary_module module~atl_predcor_cerk4_module->module~atl_cube_container_module module~atl_rk4_module atl_rk4_module module~atl_rk4_module->module~atl_bc_header_module module~atl_rk4_module->module~atl_boundary_module module~atl_rk4_module->module~atl_cube_container_module module~atl_rk4_module->module~atl_stabilize_module module~atl_rktaylor_module atl_rktaylor_module module~atl_rktaylor_module->module~atl_bc_header_module module~atl_rktaylor_module->module~atl_boundary_module module~atl_rktaylor_module->module~atl_cube_container_module module~atl_rktaylor_module->module~atl_stabilize_module module~atl_ssprk2_module atl_ssprk2_module module~atl_ssprk2_module->module~atl_bc_header_module module~atl_ssprk2_module->module~atl_boundary_module module~atl_ssprk2_module->module~atl_cube_container_module module~atl_ssprk2_module->module~atl_stabilize_module module~atl_stabilize_module->module~atl_bc_header_module module~atl_stabilize_module->module~atl_boundary_module module~atl_stabilize_module->module~atl_covolume_boundary_module proc~preprocess_rhs_cubes preprocess_rhs_cubes proc~preprocess_rhs_cubes->module~atl_bc_header_module proc~preprocess_rhs_cubes->module~atl_boundary_module proc~preprocess_rhs_cubes->module~atl_modg_1d_bnd_module proc~preprocess_rhs_cubes->module~atl_modg_2d_bnd_module proc~preprocess_rhs_cubes->module~atl_modg_bnd_module module~atl_compute_local_module atl_compute_local_module module~atl_compute_local_module->module~atl_boundary_module module~atl_container_module atl_container_module module~atl_container_module->module~atl_cube_container_module module~atl_facedata_module atl_facedata_module module~atl_facedata_module->module~atl_boundary_module module~atl_fwdeuler_module atl_fwdEuler_module module~atl_fwdeuler_module->module~atl_cube_container_module module~atl_fwdeuler_module->module~atl_stabilize_module module~atl_global_time_integration_module atl_global_time_integration_module module~atl_global_time_integration_module->module~atl_imexrk_module module~atl_global_time_integration_module->module~atl_predcor_cerk4_module module~atl_global_time_integration_module->module~atl_rk4_module module~atl_global_time_integration_module->module~atl_rktaylor_module module~atl_global_time_integration_module->module~atl_ssprk2_module module~atl_initial_condition_module atl_initial_condition_module module~atl_initial_condition_module->module~atl_cube_container_module module~atl_load_project_module atl_load_project_module module~atl_load_project_module->module~atl_boundary_module module~atl_materialini_module atl_materialIni_module module~atl_materialini_module->module~atl_boundary_module module~atl_materialprp_module atl_materialPrp_module module~atl_materialprp_module->module~atl_boundary_module module~atl_modg_1d_kernel_module atl_modg_1d_kernel_module module~atl_modg_1d_kernel_module->module~atl_boundary_module module~atl_modg_2d_kernel_module atl_modg_2d_kernel_module module~atl_modg_2d_kernel_module->module~atl_boundary_module module~atl_modg_kernel_module atl_modg_kernel_module module~atl_modg_kernel_module->module~atl_boundary_module module~atl_parallel_module atl_parallel_module module~atl_parallel_module->module~atl_boundary_module module~atl_program_module atl_program_module module~atl_program_module->module~atl_initialize_module module~atl_restart_module atl_restart_module module~atl_restart_module->module~atl_cube_container_module module~atl_time_integration_module atl_time_integration_module module~atl_time_integration_module->module~atl_cube_container_module program~atl_harvesting atl_harvesting program~atl_harvesting->module~atl_initialize_module program~atl_harvesting->module~atl_stabilize_module

Derived Types

type, public ::  atl_boundary_type

This type describes a single boundary condition, which is described in the configuration files and attached to elements in the mesh file.

Components

Type Visibility Attributes Name Initial
character(len=LabelLen), public :: label

A label identifying this boundary condition

character(len=LabelLen), public :: BC_kind

The kind of this boundary condition, mainly used to describe predefined boundary conditions with some default settings for some of the variables.

logical, public :: enforce_zero_grad

Method to use for the extrapolation of Neumann boundaries.

Read more…
real(kind=rk), public :: neumann_mode_fraction

Fraction of modes to use for the extrapolation to obtain Neumann BCs.

Read more…
logical, public :: bc_normal_vec

A flag to indicate if vectorial quantities are defined in the boundary normal system.

type(tem_bc_state_type), public, allocatable :: state(:)

Boundary condition description for each of the state variables. The size of this array depends on the equation system and covers all required variables. The variables are expected to occur in the same order as in the equation system. Furthermore, in case of face normal boundary conditions, we assume that the variable normal to the face is occurring first in this array.

type(grw_stringkeyvaluepairarray_type), public :: varDict

Dictionary of boundary state variable with varDict%val()%key is the name of boundary variable and varDict%val()%value is the name of spacetime function variable

type(atl_eqn_var_trafo_type), public :: bc_trafo

Pointer to function for the necessary state variable transformation.

logical, public :: bc_normal_vec_gradient

A flag to indicate if derivatives of vectorial quantities are defined in the boundary normal system.

type(atl_eqn_var_trafo_type), public :: bc_trafo_gradient

Pointer to function for the necessary state gradient variable transformation.

Read more…
type(tem_bc_state_type), public, allocatable :: state_gradient(:)

Boundary condition description for each of higher order terms of the equations.

Read more…
type(grw_stringkeyvaluepairarray_type), public :: varDict_gradient

Dictionary of boundary state gradient variable with varDict%val()%key is the name of boundary variable and varDict%val()%value is the name of spacetime function variable.

Read more…

Subroutines

public subroutine atl_load_bc(bc, bc_header, bc_prop, equation, conf, parent)

Get the boundary configuration.

Arguments

Type IntentOptional Attributes Name
type(atl_boundary_type), intent(out), allocatable :: bc(:)

Array of boundary conditions, will be allocated in this routine and has a length according to the number of boundary conditions in the mesh.

type(tem_bc_header_type), intent(out) :: bc_header

The boundary condition header data as given in the mesh.

type(tem_BC_prop_type), intent(in) :: bc_prop

The boundary property object, describing the given boundaries in the mesh, this has to be provided to allow the matching of boundary settings in the configuration to the boundary set in the mesh.

type(atl_Equations_type), intent(inout) :: equation

Description of the equation system, to read the boundary conditions in dependency on the equation system to solve.

type(flu_State) :: conf

Lua script to obtain the configuration data from.

integer, intent(in), optional :: parent

A parent Lua table, in which the boundary conditions are to be found.

public subroutine atl_store_bcVarPos(bc, varSys)

Routine to store position of user variable defined state and state_gradient boundary variable in bc(iBC)%state(iVar)%varPos and bc(iBC)%state_gradient

Read more…

Arguments

Type IntentOptional Attributes Name
type(atl_boundary_type), intent(inout) :: bc(:)

Array of boundary conditions contains varDict with same size as state variables

type(tem_varSys_type), intent(in) :: varSys

Global variable system