15#include <Kokkos_Core.hpp>
30 if constexpr (
N_DIM == 2) {
31 div =
g[0][0] +
g[1][1];
33 div =
g[0][0] +
g[1][1] +
g[2][2];
50 return r > 0.0
_r ? u[1] /
r :
g[1][1];
60 if constexpr (
N_DIM == 2) {
62 return covariance(
c, 0) * d[0] * d[0] + 2.0
_r * covariance(
c, 1) * d[0] * d[1] +
63 covariance(
c, 2) * d[1] * d[1];
128 Kokkos::View<rtype *[N_CONSERVATIVE]>
W;
135 Kokkos::View<rtype *[3]>
sgs;
250 if (
sgs.extent(0) > 0) {
KOKKOS_INLINE_FUNCTION rtype dot(const rtype *a, const rtype *b)
Compute the dot product of two arrays.
Definition common_math.h:32
float rtype
Definition common_typedef.h:39
#define N_DIM
Definition common_typedef.h:28
#define FOR_I_CONSERVATIVE
Definition common_typedef.h:33
#define N_CONSERVATIVE
Definition common_typedef.h:29
#define FOR_I_DIM
Definition common_typedef.h:32
Physics model declaration.
Device-copyable boundary condition.
Definition boundary.h:97
Device-side lookup from faces to boundary conditions.
Definition boundary.h:229
Kokkos::View< int32_t * > face_bc
Definition boundary.h:230
Kokkos::View< BoundaryCondition * > bcs
Definition boundary.h:249
Kokkos::View< int32_t * > face_image_face
Definition boundary.h:232
Calorically perfect gas, inviscid (Euler) or viscous and heat conducting (Navier-Stokes,...
Definition physics.h:54
KOKKOS_INLINE_FUNCTION rtype conductivity(const rtype mu) const
Thermal conductivity for dynamic viscosity mu.
Definition physics.h:108
rtype R
Definition physics.h:56
KOKKOS_INLINE_FUNCTION rtype viscosity(const rtype T) const
Dynamic viscosity at temperature T.
Definition physics.h:91
Integrates the viscous stress and heat flux over every face (one-point rule) and adds them to face_fl...
Definition viscous_flux.h:120
Kokkos::View< rtype *[N_CONSERVATIVE]> W
Definition viscous_flux.h:128
bool sgs_only
Definition viscous_flux.h:136
Kokkos::View< rtype *[N_CONSERVATIVE][N_DIM]> gradients
Definition viscous_flux.h:129
Kokkos::View< rtype *[3]> covariance
Definition viscous_flux.h:134
Kokkos::View< rtype *[3]> sgs
Definition viscous_flux.h:135
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,...
Definition viscous_flux.h:146
Kokkos::View< rtype *[N_DIM]> face_coords
Definition viscous_flux.h:123
Kokkos::View< rtype *[N_DIM]> cell_coords
Definition viscous_flux.h:124
Kokkos::View< rtype *[N_DIM]> shifts
Definition viscous_flux.h:126
Kokkos::View< rtype *[N_CONSERVATIVE]> face_flux
Definition viscous_flux.h:131
KOKKOS_INLINE_FUNCTION void operator()(const uint32_t i_face) const
Definition viscous_flux.h:194
bool axisymmetric
Definition viscous_flux.h:133
Kokkos::View< rtype *[N_DIM]> normals
Definition viscous_flux.h:121
Kokkos::View< int32_t *[2]> cells_of_face
Definition viscous_flux.h:125
Kokkos::View< rtype * > face_area
Definition viscous_flux.h:122
Euler physics
Definition viscous_flux.h:132
Kokkos::View< uint8_t * > face_shift
Definition viscous_flux.h:127
BoundaryData boundaries
Definition viscous_flux.h:130
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.
Definition viscous_flux.h:160
static constexpr uint8_t NQ
Definition viscous_flux.h:138
CellSetup< ExecSpace > c
Definition teno_setup.cpp:1810
uint8_t r
Definition teno_setup.cpp:687
Geometry< Space > g
Definition teno_setup.cpp:678
SlotArray< double, Space > A
Definition teno_setup.cpp:478
V< rtype *[N_DIM]> cell_coords
Definition teno_setup.cpp:388
V< rtype *[N_DIM]> face_coords
Definition teno_setup.cpp:399
KOKKOS_INLINE_FUNCTION rtype mean_offset(const rtype *g0, const rtype *g1, const rtype *d, const rtype dvar)
Part of the jump of two cell averages that comes from the cells' different spreads (variance jump dva...
Definition viscous_flux.h:82
KOKKOS_INLINE_FUNCTION rtype variance_jump(const Kokkos::View< rtype *[3]> &covariance, const int32_t c0, const int32_t c1, const rtype *d)
Axisymmetric meshes: jump from cell c0 to c1 of the cells' r-weighted variance along d (Mesh::cell_co...
Definition viscous_flux.h:58
KOKKOS_INLINE_FUNCTION void viscous_traction(const rtype mu, const rtype g[][N_DIM], const rtype *n, rtype *tau_n, const rtype hoop_divergence=0.0_r)
Viscous traction tau . n of a Newtonian fluid under Stokes' hypothesis, tau = mu (grad u + grad u^T -...
Definition viscous_flux.h:27
KOKKOS_INLINE_FUNCTION rtype hoop_divergence(const rtype r, const rtype *u, const rtype g[][N_DIM])
u_r / r at radius r for velocity u and gradient g (g[k][i] = d u_k / d x_i), with r = y: its limit d ...
Definition viscous_flux.h:49
KOKKOS_INLINE_FUNCTION rtype face_fraction(const Kokkos::View< rtype *[N_DIM]> &face_coords, const Kokkos::View< rtype *[N_DIM]> &cell_coords, const uint32_t f, const int32_t c0, const rtype *d)
Fraction along d (from the center of cell c0 to that of its neighbor) of the projection of face f's c...
Definition viscous_flux.h:93