48 const size_t nPts,
const size_t compStride,
const unsigned coordDim,
49 const size_t eng,
const EoSParamType EoS,
const TData Twall,
50 const TData *interior, TData *ext,
const unsigned int streamID = 0)
54 Nektar::parallel_for<ExecSpace>(
56 const TData rhoFwd = interior[i];
57 const TData rhoBwd = ext[i];
58 const TData rhoAve = TData(0.5) * (rhoFwd + rhoBwd);
60 TData momSqFwd = TData(0.0);
61 TData momSqBwd = TData(0.0);
62 for (
unsigned d = 1; d <= coordDim; ++d)
64 const size_t od = d * compStride + i;
65 momSqFwd += interior[od] * interior[od];
66 momSqBwd += ext[od] * ext[od];
71 interior[eng * compStride + i] - TData(0.5) * momSqFwd / rhoFwd;
77 const TData eIntBwd = TData(2.0) * rhoAve * eWall - eIntFwd;
79 ext[eng * compStride + i] =
80 eIntBwd + TData(0.5) * momSqBwd / rhoBwd;
static NEK_FORCE_INLINE void ReverseMomentumBlock(const size_t stride, const unsigned coordDim, TData *bndPtr, const unsigned int streamID=0)
Reverse the momentum of a block's seeded interior state, leaving density and energy as they are.
NEK_HOSTDEVICE_INLINE TData GetIntEnergyFromTemperature(const IdealGasEoS< TScalar > &EoS, const TData &rho, const TData &T)
Specific internal energy at a prescribed temperature; the inverse of GetTemperature().
static NEK_FORCE_INLINE void ImposeIsothermalWallEnergyBlock(const size_t nPts, const size_t compStride, const unsigned coordDim, const size_t eng, const EoSParamType EoS, const TData Twall, const TData *interior, TData *ext, const unsigned int streamID=0)
Set the exterior energy on a block so that the trace average of the internal energy sits at the wall ...