Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
BoundaryCondition Struct Reference

Device-copyable boundary condition. More...

#include <boundary.h>

Public Types

enum  Relax : uint8_t {
  ACOUSTIC = 0 , TEMPERATURE , TANGENTIAL , BETA ,
  T_TARGET , N_RELAX
}
 Entries of relax: relaxation rates over the sound speed are sigma / L (1/length). More...
 

Public Member Functions

KOKKOS_INLINE_FUNCTION bool is_wall () const
 
KOKKOS_INLINE_FUNCTION bool is_characteristic () const
 
KOKKOS_INLINE_FUNCTION bool is_transmissive () const
 Whether the exterior state is transmissive away from the Riemann solver (image faces).
 
KOKKOS_INLINE_FUNCTION void ghost_W (const rtype *W_i, const rtype *n, const rtype gamma, const rtype R, const bool viscous, rtype *W_g) const
 Ghost state W_g = [rho, u, p] given the interior state W_i.
 

Static Public Member Functions

static BoundaryCondition from_input (const toml::value &input, const Euler &physics)
 Parse a [[boundaries]] table entry.
 

Public Attributes

BoundaryType type = BoundaryType::EXTRAPOLATION
 
rtype data [N_DIM+2] = {}
 
rtype relax [N_RELAX] = {}
 

Detailed Description

Device-copyable boundary condition.

Every boundary condition is imposed weakly through a ghost state that is passed to the Riemann solver (and used for gradient reconstruction). The meaning of data depends on type:

  • UPT: data = W = [rho, u, p] of the inflow state
  • FARFIELD: data = W = [rho, u, p] of the free stream
  • PARTITION: faces towards cells of other ranks, at the edge of the halo. The interior state is copied; nothing an owned cell uses depends on it.
  • P_OUT: data[N_DIM + 1] = back pressure
  • P_OUT_AVERAGE: data[N_DIM + 1] = target area-averaged pressure; data[0] = current pressure shift (target minus the average of the adjacent cells), updated every stage
  • walls: data[1..N_DIM] = wall velocity; WALL_ISOTHERMAL: data[0] = wall temperature; WALL_HEAT_FLUX: data[N_DIM + 1] = heat flux into the fluid
  • DIRICHLET: unused; the exterior state is set per face (BoundaryData::face_state)
  • NSCBC_OUTLET: data[N_DIM + 1] = target pressure
  • NSCBC_INLET: data = [rho, -, p] of the target state; the target velocity is per face (BoundaryData::char_target)

Characteristic conditions (NSCBC_*) also use relax, indexed by Relax. Their exterior state for the Riemann solver is BoundaryData::characteristic_W; ghosts elsewhere are EXTRAPOLATION's (docs/design/nscbc.md).

Member Enumeration Documentation

◆ Relax

Entries of relax: relaxation rates over the sound speed are sigma / L (1/length).

Enumerator
ACOUSTIC 
TEMPERATURE 
TANGENTIAL 
BETA 
T_TARGET 
N_RELAX 

Member Function Documentation

◆ from_input()

BoundaryCondition BoundaryCondition::from_input ( const toml::value &  input,
const Euler &  physics 
)
static

Parse a [[boundaries]] table entry.

◆ ghost_W()

KOKKOS_INLINE_FUNCTION void BoundaryCondition::ghost_W ( const rtype *  W_i,
const rtype *  n,
const rtype  gamma,
const rtype  R,
const bool  viscous,
rtype *  W_g 
) const
inline

Ghost state W_g = [rho, u, p] given the interior state W_i.

Parameters
W_iInterior state.
nUnit normal pointing out of the domain.
gammaRatio of specific heats.
RGas constant.
viscousWhether walls enforce no-slip (else slip) and wall temperature.
W_gGhost state (output).

◆ is_characteristic()

KOKKOS_INLINE_FUNCTION bool BoundaryCondition::is_characteristic ( ) const
inline

◆ is_transmissive()

KOKKOS_INLINE_FUNCTION bool BoundaryCondition::is_transmissive ( ) const
inline

Whether the exterior state is transmissive away from the Riemann solver (image faces).

◆ is_wall()

KOKKOS_INLINE_FUNCTION bool BoundaryCondition::is_wall ( ) const
inline

Member Data Documentation

◆ data

rtype BoundaryCondition::data[N_DIM+2] = {}

◆ relax

rtype BoundaryCondition::relax[N_RELAX] = {}

◆ type

BoundaryType BoundaryCondition::type = BoundaryType::EXTRAPOLATION

The documentation for this struct was generated from the following files: