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

Device-side lookup from faces to boundary conditions. More...

#include <boundary.h>

Public Types

enum class  GhostEntropy : uint8_t { INTERIOR , EXTERIOR , TARGET }
 Where the entropy of a characteristic ghost state comes from. More...
 

Public Member Functions

template<typename T_W , typename T_F , typename T_FT , typename T_CT >
KOKKOS_INLINE_FUNCTION void exterior_mixture (const uint32_t i_face, const uint8_t i_quad, const uint8_t n_quad, const rtype *W_i, const rtype *th_i, const rtype *n, const T_W &W_cells, const T_F &face_solution, const T_FT &face_thermo, const T_CT &cell_thermo, rtype *W_g, rtype *th_g) const
 Exterior state of a gas mixture on boundary face i_face: W as in exterior_W (with the interior gamma for subsonic checks), and the exterior thermodynamic surrogates [gamma, e0]: the image's for transmissive faces, the prescribed state's for UPT, else the interior's.
 
template<typename T_W , typename T_F >
KOKKOS_INLINE_FUNCTION void exterior_W (const uint32_t i_face, const uint8_t i_quad, const uint8_t n_quad, const rtype *W_i, const rtype *n, const T_W &W_cells, const T_F &face_solution, rtype *W_g) const
 Exterior state seen by the Riemann solver on boundary face i_face.
 
template<typename T_W , typename T_F >
KOKKOS_INLINE_FUNCTION void transmissive_W (const uint32_t i_face, const uint8_t i_quad, const uint8_t n_quad, const rtype *W_i, const rtype *n, const T_W &W_cells, const T_F &face_solution, rtype *W_g) const
 Exterior state of exterior_W before the characteristic treatment.
 
KOKKOS_INLINE_FUNCTION GhostEntropy characteristic_W (const uint32_t i_face, const rtype *W_l, const rtype *W_e, const rtype *n, const rtype gamma_l, rtype *W_g) const
 Characteristic (NSCBC) exterior state of boundary face i_face for the Riemann solver (docs/design/nscbc.md): the outgoing waves of the interior face state W_l, the incoming acoustic wave of the face (from char_state, advanced by the LODI relation each step), and the incoming convective waves of the transmissive state W_e; inlets relax their temperature and tangential velocity toward the target.
 
KOKKOS_INLINE_FUNCTION void ghost_W_at (const uint32_t i_face, const rtype *W_i, const rtype *n, const rtype dist, rtype *W_g) const
 Ghost state for a point a distance dist outside boundary face i_face (the mirror image of an interior point). Under gravity, walls and symmetry planes continue the hydrostatic pressure gradient instead of mirroring the pressure.
 
KOKKOS_INLINE_FUNCTION void ghost_W (const uint32_t i_face, const rtype *W_i, const rtype *n, rtype *W_g) const
 Ghost state for boundary face i_face.
 

Public Attributes

Kokkos::View< int32_t * > face_bc
 
Kokkos::View< int32_t * > face_image
 
Kokkos::View< int32_t * > face_image_face
 
Kokkos::View< uint8_t * > face_image_side
 
Kokkos::View< uint8_t * > face_image_flip
 
Kokkos::View< uint8_t ** > face_image_quad
 
Kokkos::View< int32_t * > face_state_index
 
Kokkos::View< rtype *[N_DIM+2]> face_state
 
Kokkos::View< int32_t * > face_char
 
Kokkos::View< uint32_t * > char_faces
 
Kokkos::View< rtype * > char_depth
 
Kokkos::View< rtype *[3]> char_transverse
 
Kokkos::View< rtype *[2]> char_state
 
Kokkos::View< rtype *[N_DIM]> char_target
 
Kokkos::View< rtype *[N_DIM]> char_target_next
 
Kokkos::View< uint32_t * > char_offsets
 
Kokkos::View< uint32_t * > char_neighbors
 
Kokkos::View< rtype *[N_DIM]> char_neighbor_dx
 
Kokkos::View< uint8_t * > char_edge
 
Kokkos::View< BoundaryCondition * > bcs
 
rtype gamma = 1.4_r
 
rtype R = 1.0
 
bool viscous = false
 
Euler gas
 
rtype gravity [N_DIM] = {}
 
Kokkos::View< rtype **, Kokkos::LayoutRight > bc_Y
 
Kokkos::View< rtype *[2]> bc_thermo
 

Detailed Description

Device-side lookup from faces to boundary conditions.

Member Enumeration Documentation

◆ GhostEntropy

Where the entropy of a characteristic ghost state comes from.

Enumerator
INTERIOR 
EXTERIOR 
TARGET 

Member Function Documentation

◆ characteristic_W()

KOKKOS_INLINE_FUNCTION GhostEntropy BoundaryData::characteristic_W ( const uint32_t  i_face,
const rtype *  W_l,
const rtype *  W_e,
const rtype *  n,
const rtype  gamma_l,
rtype *  W_g 
) const
inline

Characteristic (NSCBC) exterior state of boundary face i_face for the Riemann solver (docs/design/nscbc.md): the outgoing waves of the interior face state W_l, the incoming acoustic wave of the face (from char_state, advanced by the LODI relation each step), and the incoming convective waves of the transmissive state W_e; inlets relax their temperature and tangential velocity toward the target.

Parameters
gamma_lRatio of specific heats of W_l.
Returns
The source of the ghost's entropy (and composition): the interior (outflow), W_e (backflow at outlets) or the target (inflow at inlets).

◆ exterior_mixture()

KOKKOS_INLINE_FUNCTION void BoundaryData::exterior_mixture ( const uint32_t  i_face,
const uint8_t  i_quad,
const uint8_t  n_quad,
const rtype *  W_i,
const rtype *  th_i,
const rtype *  n,
const T_W &  W_cells,
const T_F &  face_solution,
const T_FT &  face_thermo,
const T_CT &  cell_thermo,
rtype *  W_g,
rtype *  th_g 
) const
inline

Exterior state of a gas mixture on boundary face i_face: W as in exterior_W (with the interior gamma for subsonic checks), and the exterior thermodynamic surrogates [gamma, e0]: the image's for transmissive faces, the prescribed state's for UPT, else the interior's.

Parameters
th_iInterior [gamma, e0].
face_thermoFace [gamma, e0], indexed (face, quadrature point, side, 0/1).
cell_thermoCell [gamma, e0] by cell, as columns (cell, 0/1).

◆ exterior_W()

template<typename T_W , typename T_F >
KOKKOS_INLINE_FUNCTION void BoundaryData::exterior_W ( const uint32_t  i_face,
const uint8_t  i_quad,
const uint8_t  n_quad,
const rtype *  W_i,
const rtype *  n,
const T_W &  W_cells,
const T_F &  face_solution,
rtype *  W_g 
) const
inline

Exterior state seen by the Riemann solver on boundary face i_face.

Transmissive faces take the reconstructed state on their image face: the face of the interior cell found by translating the exterior neighbor inward along the face normal. This matches what interior faces see for a solution that does not vary normal to the boundary, at any reconstruction order. A zero-gradient copy of the face's own interior state instead feeds the boundary cell back to itself at inflow boundaries; on triangles, whose centroids are offset from the face, that creates an O(1) mass imbalance at moving shocks and wrong shock speeds along the boundary.

◆ ghost_W()

KOKKOS_INLINE_FUNCTION void BoundaryData::ghost_W ( const uint32_t  i_face,
const rtype *  W_i,
const rtype *  n,
rtype *  W_g 
) const
inline

Ghost state for boundary face i_face.

◆ ghost_W_at()

KOKKOS_INLINE_FUNCTION void BoundaryData::ghost_W_at ( const uint32_t  i_face,
const rtype *  W_i,
const rtype *  n,
const rtype  dist,
rtype *  W_g 
) const
inline

Ghost state for a point a distance dist outside boundary face i_face (the mirror image of an interior point). Under gravity, walls and symmetry planes continue the hydrostatic pressure gradient instead of mirroring the pressure.

◆ transmissive_W()

template<typename T_W , typename T_F >
KOKKOS_INLINE_FUNCTION void BoundaryData::transmissive_W ( const uint32_t  i_face,
const uint8_t  i_quad,
const uint8_t  n_quad,
const rtype *  W_i,
const rtype *  n,
const T_W &  W_cells,
const T_F &  face_solution,
rtype *  W_g 
) const
inline

Exterior state of exterior_W before the characteristic treatment.

Member Data Documentation

◆ bc_thermo

Kokkos::View<rtype *[2]> BoundaryData::bc_thermo

◆ bc_Y

Kokkos::View<rtype **, Kokkos::LayoutRight> BoundaryData::bc_Y

◆ bcs

Kokkos::View<BoundaryCondition *> BoundaryData::bcs

◆ char_depth

Kokkos::View<rtype *> BoundaryData::char_depth

◆ char_edge

Kokkos::View<uint8_t *> BoundaryData::char_edge

◆ char_faces

Kokkos::View<uint32_t *> BoundaryData::char_faces

◆ char_neighbor_dx

Kokkos::View<rtype *[N_DIM]> BoundaryData::char_neighbor_dx

◆ char_neighbors

Kokkos::View<uint32_t *> BoundaryData::char_neighbors

◆ char_offsets

Kokkos::View<uint32_t *> BoundaryData::char_offsets

◆ char_state

Kokkos::View<rtype *[2]> BoundaryData::char_state

◆ char_target

Kokkos::View<rtype *[N_DIM]> BoundaryData::char_target

◆ char_target_next

Kokkos::View<rtype *[N_DIM]> BoundaryData::char_target_next

◆ char_transverse

Kokkos::View<rtype *[3]> BoundaryData::char_transverse

◆ face_bc

Kokkos::View<int32_t *> BoundaryData::face_bc

◆ face_char

Kokkos::View<int32_t *> BoundaryData::face_char

◆ face_image

Kokkos::View<int32_t *> BoundaryData::face_image

◆ face_image_face

Kokkos::View<int32_t *> BoundaryData::face_image_face

◆ face_image_flip

Kokkos::View<uint8_t *> BoundaryData::face_image_flip

◆ face_image_quad

Kokkos::View<uint8_t **> BoundaryData::face_image_quad

◆ face_image_side

Kokkos::View<uint8_t *> BoundaryData::face_image_side

◆ face_state

Kokkos::View<rtype *[N_DIM + 2]> BoundaryData::face_state

◆ face_state_index

Kokkos::View<int32_t *> BoundaryData::face_state_index

◆ gamma

rtype BoundaryData::gamma = 1.4_r

◆ gas

Euler BoundaryData::gas

◆ gravity

rtype BoundaryData::gravity[N_DIM] = {}

◆ R

rtype BoundaryData::R = 1.0

◆ viscous

bool BoundaryData::viscous = false

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