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

Integrates the viscous stress and heat flux over every face (one-point rule) and adds them to face_flux (see ConvectiveFluxFunctor). More...

#include <viscous_flux.h>

Public Member Functions

KOKKOS_INLINE_FUNCTION void cell_state (const int32_t c, rtype *q, rtype g[NQ][N_DIM]) const
 Velocity and temperature q = [u, T] of cell c, and their gradients g[k][i] = d q_k / d x_i, from W = [rho, u, p] and its gradient.
 
KOKKOS_INLINE_FUNCTION void interior_face (const uint32_t i_face, rtype *q_f, rtype g_f[NQ][N_DIM]) const
 Values and gradients q_f, g_f on interior face i_face.
 
KOKKOS_INLINE_FUNCTION void operator() (const uint32_t i_face) const
 

Public Attributes

Kokkos::View< rtype *[N_DIM]> normals
 
Kokkos::View< rtype * > face_area
 
Kokkos::View< rtype *[N_DIM]> face_coords
 
Kokkos::View< rtype *[N_DIM]> cell_coords
 
Kokkos::View< int32_t *[2]> cells_of_face
 
Kokkos::View< rtype *[N_DIM]> shifts
 
Kokkos::View< uint8_t * > face_shift
 
Kokkos::View< rtype *[N_CONSERVATIVE]> W
 
Kokkos::View< rtype *[N_CONSERVATIVE][N_DIM]> gradients
 
BoundaryData boundaries
 
Kokkos::View< rtype *[N_CONSERVATIVE]> face_flux
 
Euler physics
 
bool axisymmetric = false
 
Kokkos::View< rtype *[3]> covariance
 
Kokkos::View< rtype *[3]> sgs
 
bool sgs_only = false
 

Static Public Attributes

static constexpr uint8_t NQ = N_DIM + 1
 

Detailed Description

Integrates the viscous stress and heat flux over every face (one-point rule) and adds them to face_flux (see ConvectiveFluxFunctor).

Face gradients of velocity and temperature average the two cell gradients and correct them along the face normal so that their component along the line between the cell centroids equals the direct difference, which suppresses odd-even decoupling and stays accurate on non-orthogonal (e.g. triangular) meshes where that line is not aligned with the normal. Walls use a one-sided difference between the cell centroid and the wall with the wall velocity and, for isothermal walls, the wall temperature; adiabatic walls carry no heat flux and heat-flux walls carry the prescribed one. Symmetry faces carry no shear stress and no heat flux. Transmissive faces take the values and gradients of their image face (see BoundaryData::exterior_W), which is what an interior face sees for a flow that does not vary normal to the boundary; using the boundary cell's own gradient instead is off by O(h) on triangles, whose centroids are offset along the face. Transmissive faces without an image and outflow faces use zero normal derivatives.

Member Function Documentation

◆ cell_state()

KOKKOS_INLINE_FUNCTION void ViscousFluxFunctor::cell_state ( const int32_t  c,
rtype *  q,
rtype  g[NQ][N_DIM] 
) const
inline

Velocity and temperature q = [u, T] of cell c, and their gradients g[k][i] = d q_k / d x_i, from W = [rho, u, p] and its gradient.

◆ interior_face()

KOKKOS_INLINE_FUNCTION void ViscousFluxFunctor::interior_face ( const uint32_t  i_face,
rtype *  q_f,
rtype  g_f[NQ][N_DIM] 
) const
inline

Values and gradients q_f, g_f on interior face i_face.

◆ operator()()

KOKKOS_INLINE_FUNCTION void ViscousFluxFunctor::operator() ( const uint32_t  i_face) const
inline

Member Data Documentation

◆ axisymmetric

bool ViscousFluxFunctor::axisymmetric = false

◆ boundaries

BoundaryData ViscousFluxFunctor::boundaries

◆ cell_coords

Kokkos::View<rtype *[N_DIM]> ViscousFluxFunctor::cell_coords

◆ cells_of_face

Kokkos::View<int32_t *[2]> ViscousFluxFunctor::cells_of_face

◆ covariance

Kokkos::View<rtype *[3]> ViscousFluxFunctor::covariance

◆ face_area

Kokkos::View<rtype *> ViscousFluxFunctor::face_area

◆ face_coords

Kokkos::View<rtype *[N_DIM]> ViscousFluxFunctor::face_coords

◆ face_flux

Kokkos::View<rtype *[N_CONSERVATIVE]> ViscousFluxFunctor::face_flux

◆ face_shift

Kokkos::View<uint8_t *> ViscousFluxFunctor::face_shift

◆ gradients

Kokkos::View<rtype *[N_CONSERVATIVE][N_DIM]> ViscousFluxFunctor::gradients

◆ normals

Kokkos::View<rtype *[N_DIM]> ViscousFluxFunctor::normals

◆ NQ

constexpr uint8_t ViscousFluxFunctor::NQ = N_DIM + 1
staticconstexpr

◆ physics

Euler ViscousFluxFunctor::physics

◆ sgs

Kokkos::View<rtype *[3]> ViscousFluxFunctor::sgs

◆ sgs_only

bool ViscousFluxFunctor::sgs_only = false

◆ shifts

Kokkos::View<rtype *[N_DIM]> ViscousFluxFunctor::shifts

◆ W

Kokkos::View<rtype *[N_CONSERVATIVE]> ViscousFluxFunctor::W

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