Nektar++
Public Member Functions | Protected Attributes | List of all members
Nektar::VariableConverter Class Reference

#include <VariableConverter.h>

Public Member Functions

 VariableConverter (const LibUtilities::SessionReaderSharedPtr &pSession, const int spaceDim, const SpatialDomains::MeshGraphSharedPtr &pGraph=0)
 
 ~VariableConverter ()
 Destructor for VariableConverter class. More...
 
void GetDynamicEnergy (const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &energy)
 Compute the dynamic energy \( e = rho*V^2/2 \). More...
 
void GetInternalEnergy (const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &energy)
 Compute the specific internal energy \( e = (E - rho*V^2/2)/rho \). More...
 
template<class T , typename = typename std::enable_if< std::is_floating_point<T>::value || tinysimd::is_vector_floating_point<T>::value>::type>
GetInternalEnergy (T *physfield)
 
void GetEnthalpy (const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &enthalpy)
 Compute the specific enthalpy \( h = e + p/rho \). More...
 
void GetVelocityVector (const Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, NekDouble >> &velocity)
 Compute the velocity field \( \mathbf{v} \) given the momentum \( \rho\mathbf{v} \). More...
 
void GetMach (Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &soundspeed, Array< OneD, NekDouble > &mach)
 Compute the mach number \( M = \| \mathbf{v} \|^2 / c \). More...
 
void GetDynamicViscosity (const Array< OneD, const NekDouble > &temperature, Array< OneD, NekDouble > &mu)
 Compute the dynamic viscosity using the Sutherland's law \( \mu = \mu_star * (T / T_star)^3/2 * (1 + C) / (T/T_star + C) \), C : 110. /Tref Tref : the reference temperature, Tref, should always given in Kelvin, if non-dimensional should be the reference for non-dimensionalizing muref : the dynamic viscosity or the 1/Re corresponding to Tref T_star : m_pInf / (m_rhoInf * m_gasConstant),non-dimensional or dimensional. More...
 
template<class T , typename = typename std::enable_if< std::is_floating_point<T>::value || tinysimd::is_vector_floating_point<T>::value>::type>
GetDynamicViscosity (T &temperature)
 
void GetAbsoluteVelocity (const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &Vtot)
 
void GetTemperature (const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &temperature)
 Compute the temperature using the equation of state. More...
 
template<class T , typename = typename std::enable_if< std::is_floating_point<T>::value || tinysimd::is_vector_floating_point<T>::value>::type>
GetTemperature (T *physfield)
 
void GetPressure (const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &pressure)
 Calculate the pressure using the equation of state. More...
 
template<class T , typename = typename std::enable_if< std::is_floating_point<T>::value || tinysimd::is_vector_floating_point<T>::value>::type>
GetPressure (T *physfield)
 
void GetSoundSpeed (const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &soundspeed)
 Compute the sound speed using the equation of state. More...
 
void GetEntropy (const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &entropy)
 Compute the entropy using the equation of state. More...
 
void GetEFromRhoP (const Array< OneD, NekDouble > &rho, const Array< OneD, NekDouble > &pressure, Array< OneD, NekDouble > &energy)
 Compute \( e(rho,p) \) using the equation of state. More...
 
void GetRhoFromPT (const Array< OneD, NekDouble > &pressure, const Array< OneD, NekDouble > &temperature, Array< OneD, NekDouble > &rho)
 Compute \( rho(p,T) \) using the equation of state. More...
 
void GetDmuDT (const Array< OneD, const NekDouble > &temperature, const Array< OneD, const NekDouble > &mu, Array< OneD, NekDouble > &DmuDT)
 Compute the dynamic viscosity using the Sutherland's law \( \mu = \mu_star * (T / T_star)^3/2 * (T_star + 110) / (T + 110) \),. More...
 
const EquationOfStateSharedPtr Geteos ()
 
void SetAv (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, const Array< OneD, NekDouble >> &consVar, const Array< OneD, NekDouble > &div, const Array< OneD, NekDouble > &curlSquared)
 
Array< OneD, NekDouble > & GetAv ()
 
Array< OneD, NekDouble > & GetAvTrace ()
 
void SetElmtMinHP (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields)
 Compute an estimate of minimum h/p for each element of the expansion. More...
 
Array< OneD, NekDouble > & GetElmtMinHP ()
 
void GetSensor (const MultiRegions::ExpListSharedPtr &field, const Array< OneD, const Array< OneD, NekDouble >> &physarray, Array< OneD, NekDouble > &Sensor, Array< OneD, NekDouble > &SensorKappa, int offset=1)
 
void GetMuAv (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &muAv)
 Calculate the physical artificial viscosity based on modal sensor. More...
 
void GetMuAv (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, const Array< OneD, NekDouble >> &consVar, const Array< OneD, NekDouble > &div, Array< OneD, NekDouble > &muAv)
 Calculate the physical artificial viscosity based on dilatation of velocity vector. More...
 
void ApplyDucros (const Array< OneD, NekDouble > &div, const Array< OneD, NekDouble > &curlSquare, Array< OneD, NekDouble > &muAv)
 Apply Ducros (anti-vorticity) sensor averaged over the element. More...
 
void ApplyC0Smooth (Array< OneD, NekDouble > &field)
 Make field C0. More...
 

Protected Attributes

LibUtilities::SessionReaderSharedPtr m_session
 
EquationOfStateSharedPtr m_eos
 
int m_spacedim
 
NekDouble m_pInf
 
NekDouble m_rhoInf
 
NekDouble m_gasConstant
 
NekDouble m_mu
 
NekDouble m_Skappa
 
NekDouble m_Kappa
 
NekDouble m_oneOverT_star
 
NekDouble m_Tref
 
NekDouble m_TRatioSutherland
 
NekDouble m_mu0
 Shock sensor. More...
 
std::string m_shockCaptureType
 
std::string m_shockSensorType
 
std::string m_ducrosSensor
 
std::string m_smoothing
 
MultiRegions::ContFieldSharedPtr m_C0ProjectExp
 
Array< OneD, NekDoublem_hOverP
 h/p scaling More...
 
Array< OneD, NekDoublem_muAv
 storage More...
 
Array< OneD, NekDoublem_muAvTrace
 

Detailed Description

Definition at line 51 of file VariableConverter.h.

Constructor & Destructor Documentation

◆ VariableConverter()

Nektar::VariableConverter::VariableConverter ( const LibUtilities::SessionReaderSharedPtr pSession,
const int  spaceDim,
const SpatialDomains::MeshGraphSharedPtr pGraph = 0 
)

Definition at line 47 of file VariableConverter.cpp.

50  : m_session(pSession), m_spacedim(spaceDim)
51 {
52  // Create equation of state object
53  std::string eosType;
54  m_session->LoadSolverInfo("EquationOfState", eosType, "IdealGas");
56 
57  // Parameters for dynamic viscosity
58  m_session->LoadParameter("pInf", m_pInf, 101325);
59  m_session->LoadParameter("rhoInf", m_rhoInf, 1.225);
60  m_session->LoadParameter("GasConstant", m_gasConstant, 287.058);
61  m_session->LoadParameter("mu", m_mu, 1.78e-05);
63 
64  // Parameters for sensor
65  m_session->LoadParameter("Skappa", m_Skappa, -1.0);
66  m_session->LoadParameter("Kappa", m_Kappa, 0.25);
67 
69 
70  // Shock sensor
71  m_session->LoadSolverInfo("ShockCaptureType", m_shockCaptureType, "Off");
72  if (m_shockCaptureType == "Physical")
73  {
74  // Artificial viscosity scaling constant
75  m_session->LoadParameter("mu0", m_mu0, 1.0);
76 
79 
80  // Check for Modal/Dilatation sensor
81  m_session->LoadSolverInfo("ShockSensorType", m_shockSensorType,
82  "Dilatation");
83 
84  // Check for Ducros sensor
85  m_session->LoadSolverInfo("DucrosSensor", m_ducrosSensor, "Off");
86  }
87  // Load smoothing tipe
88  m_session->LoadSolverInfo("Smoothing", m_smoothing, "Off");
89  if (m_smoothing == "C0")
90  {
93  m_session, pGraph, m_session->GetVariable(0));
94  }
95 
96  std::string viscosityType;
97  m_session->LoadSolverInfo("ViscosityType", viscosityType, "Constant");
98  if ("Variable" == viscosityType)
99  {
100  WARNINGL0(
101  m_session->DefinesParameter("Tref"),
102  "The Tref should be given in Kelvin for using the Sutherland's law "
103  "of dynamic viscosity. The default is 288.15. Note the mu or "
104  "Reynolds number should coorespond to this temperature.");
105  m_session->LoadParameter("Tref", m_Tref, 288.15);
106  m_TRatioSutherland = 110.0 / m_Tref;
107  }
108 }
#define WARNINGL0(condition, msg)
Definition: ErrorUtil.hpp:222
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:144
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
EquationOfStateSharedPtr m_eos
Array< OneD, NekDouble > m_hOverP
h/p scaling
Array< OneD, NekDouble > m_muAvTrace
MultiRegions::ContFieldSharedPtr m_C0ProjectExp
LibUtilities::SessionReaderSharedPtr m_session
NekDouble m_mu0
Shock sensor.
Array< OneD, NekDouble > m_muAv
storage
EquationOfStateFactory & GetEquationOfStateFactory()
Declaration of the equation of state factory singleton.
static Array< OneD, NekDouble > NullNekDouble1DArray

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), Nektar::GetEquationOfStateFactory(), m_C0ProjectExp, m_ducrosSensor, m_eos, m_gasConstant, m_hOverP, m_Kappa, m_mu, m_mu0, m_muAv, m_muAvTrace, m_oneOverT_star, m_pInf, m_rhoInf, m_session, m_shockCaptureType, m_shockSensorType, m_Skappa, m_smoothing, m_TRatioSutherland, m_Tref, Nektar::NullNekDouble1DArray, and WARNINGL0.

◆ ~VariableConverter()

Nektar::VariableConverter::~VariableConverter ( )

Destructor for VariableConverter class.

Definition at line 113 of file VariableConverter.cpp.

114 {
115 }

Member Function Documentation

◆ ApplyC0Smooth()

void Nektar::VariableConverter::ApplyC0Smooth ( Array< OneD, NekDouble > &  field)

Make field C0.

Parameters
fieldInput Field

Definition at line 771 of file VariableConverter.cpp.

772 {
773  auto nCoeffs = m_C0ProjectExp->GetNcoeffs();
774  Array<OneD, NekDouble> muFwd(nCoeffs);
775  Array<OneD, NekDouble> weights(nCoeffs, 1.0);
776  // Assemble global expansion coefficients for viscosity
777  m_C0ProjectExp->FwdTransLocalElmt(field, m_C0ProjectExp->UpdateCoeffs());
778  m_C0ProjectExp->Assemble();
779  Vmath::Vcopy(nCoeffs, m_C0ProjectExp->GetCoeffs(), 1, muFwd, 1);
780  // Global coefficients
781  Vmath::Vcopy(nCoeffs, weights, 1, m_C0ProjectExp->UpdateCoeffs(), 1);
782  // This is the sign vector
783  m_C0ProjectExp->GlobalToLocal();
784  // Get weights
785  m_C0ProjectExp->Assemble();
786  // Divide
787  Vmath::Vdiv(nCoeffs, muFwd, 1, m_C0ProjectExp->GetCoeffs(), 1,
788  m_C0ProjectExp->UpdateCoeffs(), 1);
789  // Get local coefficients
790  m_C0ProjectExp->GlobalToLocal();
791  // Get C0 field
792  m_C0ProjectExp->BwdTrans(m_C0ProjectExp->GetCoeffs(), field);
793 }
void Vdiv(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x/y.
Definition: Vmath.cpp:284
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1255

References m_C0ProjectExp, Vmath::Vcopy(), and Vmath::Vdiv().

Referenced by SetAv().

◆ ApplyDucros()

void Nektar::VariableConverter::ApplyDucros ( const Array< OneD, NekDouble > &  div,
const Array< OneD, NekDouble > &  curlSquare,
Array< OneD, NekDouble > &  muAv 
)

Apply Ducros (anti-vorticity) sensor averaged over the element.

Parameters
fieldInput Field

Definition at line 745 of file VariableConverter.cpp.

748 {
749  // machine eps**2
750  NekDouble eps = std::numeric_limits<NekDouble>::epsilon();
751  eps *= eps;
752 
753  // loop over points
754  auto nPts = div.size();
755  for (size_t p = 0; p < nPts; ++p)
756  {
757  NekDouble tmpDiv2 = div[p];
758  tmpDiv2 *= tmpDiv2;
759  NekDouble denDuc = tmpDiv2 + curlSquare[p] + eps;
760  NekDouble Duc = tmpDiv2 / denDuc;
761  // apply
762  muAv[p] *= Duc;
763  }
764 }
double NekDouble

References CellMLToNektar.cellml_metadata::p.

Referenced by SetAv().

◆ GetAbsoluteVelocity()

void Nektar::VariableConverter::GetAbsoluteVelocity ( const Array< OneD, const Array< OneD, NekDouble >> &  physfield,
Array< OneD, NekDouble > &  Vtot 
)

Definition at line 272 of file VariableConverter.cpp.

275 {
276  const int nPts = physfield[0].size();
277 
278  // Getting the velocity vector on the 2D normal space
280 
281  Vmath::Zero(Vtot.size(), Vtot, 1);
282 
283  for (int i = 0; i < m_spacedim; ++i)
284  {
285  velocity[i] = Array<OneD, NekDouble>(nPts);
286  }
287 
288  GetVelocityVector(physfield, velocity);
289 
290  for (int i = 0; i < m_spacedim; ++i)
291  {
292  Vmath::Vvtvp(nPts, velocity[i], 1, velocity[i], 1, Vtot, 1, Vtot, 1);
293  }
294 
295  Vmath::Vsqrt(nPts, Vtot, 1, Vtot, 1);
296 }
void GetVelocityVector(const Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, NekDouble >> &velocity)
Compute the velocity field given the momentum .
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
Definition: Vmath.cpp:534
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
Definition: Vmath.cpp:574
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:492

References GetVelocityVector(), m_spacedim, Vmath::Vsqrt(), Vmath::Vvtvp(), and Vmath::Zero().

Referenced by GetMuAv().

◆ GetAv()

Array< OneD, NekDouble > & Nektar::VariableConverter::GetAv ( )

Definition at line 467 of file VariableConverter.cpp.

468 {
469  ASSERTL1(m_muAv != NullNekDouble1DArray, "m_muAv not set");
470  return m_muAv;
471 }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Definition: ErrorUtil.hpp:249

References ASSERTL1, m_muAv, and Nektar::NullNekDouble1DArray.

◆ GetAvTrace()

Array< OneD, NekDouble > & Nektar::VariableConverter::GetAvTrace ( )

Definition at line 473 of file VariableConverter.cpp.

474 {
475  ASSERTL1(m_muAvTrace != NullNekDouble1DArray, "m_muAvTrace not set");
476  return m_muAvTrace;
477 }

References ASSERTL1, m_muAvTrace, and Nektar::NullNekDouble1DArray.

◆ GetDmuDT()

void Nektar::VariableConverter::GetDmuDT ( const Array< OneD, const NekDouble > &  temperature,
const Array< OneD, const NekDouble > &  mu,
Array< OneD, NekDouble > &  DmuDT 
)

Compute the dynamic viscosity using the Sutherland's law \( \mu = \mu_star * (T / T_star)^3/2 * (T_star + 110) / (T + 110) \),.

Definition at line 255 of file VariableConverter.cpp.

258 {
259  const int nPts = temperature.size();
260  NekDouble tmp = 0.0;
261  NekDouble ratio;
262 
263  for (int i = 0; i < nPts; ++i)
264  {
265  ratio = temperature[i] * m_oneOverT_star;
266  tmp = 0.5 * (ratio + 3.0 * m_TRatioSutherland) /
267  (ratio * (ratio + m_TRatioSutherland));
268  DmuDT[i] = mu[i] * tmp * m_oneOverT_star;
269  }
270 }

References m_oneOverT_star, and m_TRatioSutherland.

◆ GetDynamicEnergy()

void Nektar::VariableConverter::GetDynamicEnergy ( const Array< OneD, const Array< OneD, NekDouble >> &  physfield,
Array< OneD, NekDouble > &  energy 
)

Compute the dynamic energy \( e = rho*V^2/2 \).

Definition at line 121 of file VariableConverter.cpp.

124 {
125  size_t nPts = physfield[m_spacedim + 1].size();
126  Vmath::Zero(nPts, energy, 1);
127 
128  // tmp = (rho * u_i)^2
129  for (int i = 0; i < m_spacedim; ++i)
130  {
131  Vmath::Vvtvp(nPts, physfield[i + 1], 1, physfield[i + 1], 1, energy, 1,
132  energy, 1);
133  }
134  // Divide by rho and multiply by 0.5 --> tmp = 0.5 * rho * u^2
135  Vmath::Vdiv(nPts, energy, 1, physfield[0], 1, energy, 1);
136  Vmath::Smul(nPts, 0.5, energy, 1, energy, 1);
137 }
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
Definition: Vmath.cpp:248

References m_spacedim, Vmath::Smul(), Vmath::Vdiv(), Vmath::Vvtvp(), and Vmath::Zero().

Referenced by GetInternalEnergy().

◆ GetDynamicViscosity() [1/2]

void Nektar::VariableConverter::GetDynamicViscosity ( const Array< OneD, const NekDouble > &  temperature,
Array< OneD, NekDouble > &  mu 
)

Compute the dynamic viscosity using the Sutherland's law \( \mu = \mu_star * (T / T_star)^3/2 * (1 + C) / (T/T_star + C) \), C : 110. /Tref Tref : the reference temperature, Tref, should always given in Kelvin, if non-dimensional should be the reference for non-dimensionalizing muref : the dynamic viscosity or the 1/Re corresponding to Tref T_star : m_pInf / (m_rhoInf * m_gasConstant),non-dimensional or dimensional.

WARNING, if this routine is modified the same must be done in the FieldConvert utility ProcessWSS.cpp (this class should be restructured).

Parameters
temperatureInput temperature.
muThe resulting dynamic viscosity.

Definition at line 240 of file VariableConverter.cpp.

242 {
243  const int nPts = temperature.size();
244 
245  for (int i = 0; i < nPts; ++i)
246  {
247  mu[i] = GetDynamicViscosity(temperature[i]);
248  }
249 }
void GetDynamicViscosity(const Array< OneD, const NekDouble > &temperature, Array< OneD, NekDouble > &mu)
Compute the dynamic viscosity using the Sutherland's law , C : 110. /Tref Tref : the reference temper...

◆ GetDynamicViscosity() [2/2]

template<class T , typename = typename std::enable_if< std::is_floating_point<T>::value || tinysimd::is_vector_floating_point<T>::value>::type>
T Nektar::VariableConverter::GetDynamicViscosity ( T &  temperature)
inline

Definition at line 99 of file VariableConverter.h.

100  {
101  const NekDouble onePlusC = 1.0 + m_TRatioSutherland;
102 
103  NekDouble mu_star = m_mu;
104 
105  T ratio = temperature * m_oneOverT_star;
106  return mu_star * ratio * sqrt(ratio) * onePlusC /
107  (ratio + m_TRatioSutherland);
108  }
scalarT< T > sqrt(scalarT< T > in)
Definition: scalar.hpp:291

References m_mu, m_oneOverT_star, m_TRatioSutherland, and tinysimd::sqrt().

◆ GetEFromRhoP()

void Nektar::VariableConverter::GetEFromRhoP ( const Array< OneD, NekDouble > &  rho,
const Array< OneD, NekDouble > &  pressure,
Array< OneD, NekDouble > &  energy 
)

Compute \( e(rho,p) \) using the equation of state.

Parameters
rhoInput density
pressureInput pressure
energyThe resulting internal energy.

Definition at line 389 of file VariableConverter.cpp.

392 {
393  int nPts = rho.size();
394 
395  for (int i = 0; i < nPts; ++i)
396  {
397  energy[i] = m_eos->GetEFromRhoP(rho[i], pressure[i]);
398  }
399 }

References m_eos, and CG_Iterations::pressure.

◆ GetElmtMinHP()

Array< OneD, NekDouble > & Nektar::VariableConverter::GetElmtMinHP ( )

Definition at line 546 of file VariableConverter.cpp.

547 {
548  ASSERTL1(m_hOverP != NullNekDouble1DArray, "m_hOverP not set");
549  return m_hOverP;
550 }

References ASSERTL1, m_hOverP, and Nektar::NullNekDouble1DArray.

◆ GetEnthalpy()

void Nektar::VariableConverter::GetEnthalpy ( const Array< OneD, const Array< OneD, NekDouble >> &  physfield,
Array< OneD, NekDouble > &  enthalpy 
)

Compute the specific enthalpy \( h = e + p/rho \).

Definition at line 161 of file VariableConverter.cpp.

164 {
165  int nPts = physfield[0].size();
166  Array<OneD, NekDouble> energy(nPts, 0.0);
167  Array<OneD, NekDouble> pressure(nPts, 0.0);
168 
169  GetInternalEnergy(physfield, energy);
170  GetPressure(physfield, pressure);
171 
172  // Calculate p/rho
173  Vmath::Vdiv(nPts, pressure, 1, physfield[0], 1, enthalpy, 1);
174  // Calculate h = e + p/rho
175  Vmath::Vadd(nPts, energy, 1, enthalpy, 1, enthalpy, 1);
176 }
void GetPressure(const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &pressure)
Calculate the pressure using the equation of state.
void GetInternalEnergy(const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &energy)
Compute the specific internal energy .
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Definition: Vmath.cpp:359

References GetInternalEnergy(), GetPressure(), CG_Iterations::pressure, Vmath::Vadd(), and Vmath::Vdiv().

◆ GetEntropy()

void Nektar::VariableConverter::GetEntropy ( const Array< OneD, const Array< OneD, NekDouble >> &  physfield,
Array< OneD, NekDouble > &  entropy 
)

Compute the entropy using the equation of state.

Parameters
physfieldInput physical field
soundspeedThe resulting sound speed \( c \).

Definition at line 367 of file VariableConverter.cpp.

370 {
371  int nPts = physfield[0].size();
372 
373  Array<OneD, NekDouble> energy(nPts);
374  GetInternalEnergy(physfield, energy);
375 
376  for (int i = 0; i < nPts; ++i)
377  {
378  entropy[i] = m_eos->GetEntropy(physfield[0][i], energy[i]);
379  }
380 }

References GetInternalEnergy(), and m_eos.

◆ Geteos()

const EquationOfStateSharedPtr Nektar::VariableConverter::Geteos ( )
inline

Definition at line 153 of file VariableConverter.h.

154  {
155  return m_eos;
156  }

References m_eos.

◆ GetInternalEnergy() [1/2]

void Nektar::VariableConverter::GetInternalEnergy ( const Array< OneD, const Array< OneD, NekDouble >> &  physfield,
Array< OneD, NekDouble > &  energy 
)

Compute the specific internal energy \( e = (E - rho*V^2/2)/rho \).

Definition at line 143 of file VariableConverter.cpp.

146 {
147  int nPts = physfield[0].size();
148  Array<OneD, NekDouble> tmp(nPts);
149 
150  GetDynamicEnergy(physfield, tmp);
151 
152  // Calculate rhoe = E - rho*V^2/2
153  Vmath::Vsub(nPts, physfield[m_spacedim + 1], 1, tmp, 1, energy, 1);
154  // Divide by rho
155  Vmath::Vdiv(nPts, energy, 1, physfield[0], 1, energy, 1);
156 }
void GetDynamicEnergy(const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &energy)
Compute the dynamic energy .
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
Definition: Vmath.cpp:419

References GetDynamicEnergy(), m_spacedim, Vmath::Vdiv(), and Vmath::Vsub().

Referenced by GetEnthalpy(), GetEntropy(), GetPressure(), GetSoundSpeed(), and GetTemperature().

◆ GetInternalEnergy() [2/2]

template<class T , typename = typename std::enable_if< std::is_floating_point<T>::value || tinysimd::is_vector_floating_point<T>::value>::type>
T Nektar::VariableConverter::GetInternalEnergy ( T *  physfield)
inline

Definition at line 70 of file VariableConverter.h.

71  {
72  // get dynamic energy
73  T oneOrho = 1.0 / physfield[0];
74  T dynEne{};
75  for (size_t d = 1; d < m_spacedim + 1; ++d)
76  {
77  T tmp = physfield[d]; // load 1x
78  dynEne += tmp * tmp;
79  }
80  dynEne = 0.5 * dynEne * oneOrho;
81 
82  // Calculate rhoe = E - rho*V^2/2
83  T energy = physfield[m_spacedim + 1] - dynEne;
84  return energy * oneOrho;
85  }

References m_spacedim.

◆ GetMach()

void Nektar::VariableConverter::GetMach ( Array< OneD, Array< OneD, NekDouble >> &  physfield,
Array< OneD, NekDouble > &  soundspeed,
Array< OneD, NekDouble > &  mach 
)

Compute the mach number \( M = \| \mathbf{v} \|^2 / c \).

Parameters
physfieldInput physical field.
soundfieldThe speed of sound corresponding to physfield.
machThe resulting mach number \( M \).

Definition at line 204 of file VariableConverter.cpp.

207 {
208  const int nPts = physfield[0].size();
209 
210  Vmath::Vmul(nPts, physfield[1], 1, physfield[1], 1, mach, 1);
211 
212  for (int i = 1; i < m_spacedim; ++i)
213  {
214  Vmath::Vvtvp(nPts, physfield[1 + i], 1, physfield[1 + i], 1, mach, 1,
215  mach, 1);
216  }
217 
218  Vmath::Vdiv(nPts, mach, 1, physfield[0], 1, mach, 1);
219  Vmath::Vdiv(nPts, mach, 1, physfield[0], 1, mach, 1);
220  Vmath::Vsqrt(nPts, mach, 1, mach, 1);
221 
222  Vmath::Vdiv(nPts, mach, 1, soundspeed, 1, mach, 1);
223 }
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:209

References m_spacedim, Vmath::Vdiv(), Vmath::Vmul(), Vmath::Vsqrt(), and Vmath::Vvtvp().

◆ GetMuAv() [1/2]

void Nektar::VariableConverter::GetMuAv ( const Array< OneD, MultiRegions::ExpListSharedPtr > &  fields,
const Array< OneD, const Array< OneD, NekDouble >> &  consVar,
const Array< OneD, NekDouble > &  div,
Array< OneD, NekDouble > &  muAv 
)

Calculate the physical artificial viscosity based on dilatation of velocity vector.

Parameters

Definition at line 696 of file VariableConverter.cpp.

700 {
701  auto nPts = consVar[0].size();
702 
703  // Get sound speed
704  // theoretically it should be used the critical sound speed, this
705  // matters for large Mach numbers (above 3.0)
706  Array<OneD, NekDouble> soundSpeed(nPts, 0.0);
707  GetSoundSpeed(consVar, soundSpeed);
708 
709  // Get abosolute velocity to compute lambda
710  Array<OneD, NekDouble> absVelocity(nPts, 0.0);
711  GetAbsoluteVelocity(consVar, absVelocity);
712 
713  // Loop over elements
714  auto nElmt = fields[0]->GetExpSize();
715  for (size_t e = 0; e < nElmt; ++e)
716  {
717  auto nElmtPoints = fields[0]->GetExp(e)->GetTotPoints();
718  auto physOffset = fields[0]->GetPhys_Offset(e);
719  auto physEnd = physOffset + nElmtPoints;
720 
721  NekDouble hOpTmp = m_hOverP[e];
722 
723  // Loop over the points
724  for (size_t p = physOffset; p < physEnd; ++p)
725  {
726  // Get non-dimensional sensor based on dilatation
727  NekDouble sSpeedTmp = soundSpeed[p];
728  // (only compression waves)
729  NekDouble divTmp = -div[p];
730  divTmp = std::max(divTmp, 0.0);
731  NekDouble sensor = m_mu0 * hOpTmp * divTmp / sSpeedTmp;
732  // Scale to viscosity scale
733  NekDouble rho = consVar[0][p];
734  NekDouble lambda = sSpeedTmp + absVelocity[p];
735  muAv[p] = sensor * rho * lambda * hOpTmp;
736  }
737  }
738 }
void GetSoundSpeed(const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &soundspeed)
Compute the sound speed using the equation of state.
void GetAbsoluteVelocity(const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &Vtot)

References GetAbsoluteVelocity(), GetSoundSpeed(), m_hOverP, m_mu0, and CellMLToNektar.cellml_metadata::p.

◆ GetMuAv() [2/2]

void Nektar::VariableConverter::GetMuAv ( const Array< OneD, MultiRegions::ExpListSharedPtr > &  fields,
const Array< OneD, const Array< OneD, NekDouble >> &  consVar,
Array< OneD, NekDouble > &  muAv 
)

Calculate the physical artificial viscosity based on modal sensor.

Parameters
consVarInput field.

Definition at line 648 of file VariableConverter.cpp.

652 {
653  auto nPts = consVar[0].size();
654  // Determine the maximum wavespeed
655  Array<OneD, NekDouble> Lambdas(nPts, 0.0);
656  Array<OneD, NekDouble> soundspeed(nPts, 0.0);
657  Array<OneD, NekDouble> absVelocity(nPts, 0.0);
658  GetSoundSpeed(consVar, soundspeed);
659  GetAbsoluteVelocity(consVar, absVelocity);
660  Vmath::Vadd(nPts, absVelocity, 1, soundspeed, 1, Lambdas, 1);
661 
662  // Compute sensor based on rho
663  Array<OneD, NekDouble> Sensor(nPts, 0.0);
664  GetSensor(fields[0], consVar, Sensor, muAv, 1);
665 
667  auto nElmt = fields[0]->GetExpSize();
668  for (size_t e = 0; e < nElmt; ++e)
669  {
670  auto physOffset = fields[0]->GetPhys_Offset(e);
671  auto nElmtPoints = fields[0]->GetExp(e)->GetTotPoints();
672 
673  // Compute the maximum wave speed
674  NekDouble LambdaElmt = 0.0;
675  LambdaElmt = Vmath::Vmax(nElmtPoints, tmp = Lambdas + physOffset, 1);
676 
677  // Compute average bounded density
678  NekDouble rhoAve =
679  Vmath::Vsum(nElmtPoints, tmp = consVar[0] + physOffset, 1);
680  rhoAve = rhoAve / nElmtPoints;
681  rhoAve = Smath::Smax(rhoAve, 1.0e-4, 1.0e+4);
682 
683  // Scale sensor by coeff, h/p, and density
684  LambdaElmt *= m_mu0 * m_hOverP[e] * rhoAve;
685  Vmath::Smul(nElmtPoints, LambdaElmt, tmp = muAv + physOffset, 1,
686  tmp = muAv + physOffset, 1);
687  }
688 }
void GetSensor(const MultiRegions::ExpListSharedPtr &field, const Array< OneD, const Array< OneD, NekDouble >> &physarray, Array< OneD, NekDouble > &Sensor, Array< OneD, NekDouble > &SensorKappa, int offset=1)
T Smax(const T a, const T b, const T k)
Return the soft max of between two scalars.
Definition: Smath.hpp:53
T Vsum(int n, const T *x, const int incx)
Subtract return sum(x)
Definition: Vmath.cpp:895
T Vmax(int n, const T *x, const int incx)
Return the maximum element in x – called vmax to avoid conflict with max.
Definition: Vmath.cpp:945

References GetAbsoluteVelocity(), GetSensor(), GetSoundSpeed(), m_hOverP, m_mu0, Smath::Smax(), Vmath::Smul(), Vmath::Vadd(), Vmath::Vmax(), and Vmath::Vsum().

Referenced by SetAv().

◆ GetPressure() [1/2]

void Nektar::VariableConverter::GetPressure ( const Array< OneD, const Array< OneD, NekDouble >> &  physfield,
Array< OneD, NekDouble > &  pressure 
)

Calculate the pressure using the equation of state.

Parameters
physfieldInput momentum.
pressureComputed pressure field.

Definition at line 304 of file VariableConverter.cpp.

307 {
308  int nPts = physfield[0].size();
309 
310  Array<OneD, NekDouble> energy(nPts);
311  GetInternalEnergy(physfield, energy);
312 
313  for (int i = 0; i < nPts; ++i)
314  {
315  pressure[i] = m_eos->GetPressure(physfield[0][i], energy[i]);
316  }
317 }

References GetInternalEnergy(), m_eos, and CG_Iterations::pressure.

Referenced by GetEnthalpy().

◆ GetPressure() [2/2]

template<class T , typename = typename std::enable_if< std::is_floating_point<T>::value || tinysimd::is_vector_floating_point<T>::value>::type>
T Nektar::VariableConverter::GetPressure ( T *  physfield)
inline

Definition at line 132 of file VariableConverter.h.

133  {
134  T energy = GetInternalEnergy(physfield);
135  return m_eos->GetPressure(physfield[0], energy);
136  }

References GetInternalEnergy(), and m_eos.

◆ GetRhoFromPT()

void Nektar::VariableConverter::GetRhoFromPT ( const Array< OneD, NekDouble > &  pressure,
const Array< OneD, NekDouble > &  temperature,
Array< OneD, NekDouble > &  rho 
)

Compute \( rho(p,T) \) using the equation of state.

Parameters
pressureInput pressure
temperatureInput temperature
rhoThe resulting density

Definition at line 408 of file VariableConverter.cpp.

411 {
412  int nPts = pressure.size();
413 
414  for (int i = 0; i < nPts; ++i)
415  {
416  rho[i] = m_eos->GetRhoFromPT(pressure[i], temperature[i]);
417  }
418 }

References m_eos, and CG_Iterations::pressure.

◆ GetSensor()

void Nektar::VariableConverter::GetSensor ( const MultiRegions::ExpListSharedPtr field,
const Array< OneD, const Array< OneD, NekDouble >> &  physarray,
Array< OneD, NekDouble > &  Sensor,
Array< OneD, NekDouble > &  SensorKappa,
int  offset = 1 
)

Definition at line 552 of file VariableConverter.cpp.

557 {
558  NekDouble Skappa;
559  NekDouble order;
561  Array<OneD, int> expOrderElement = field->EvalBasisNumModesMaxPerExp();
562 
563  for (int e = 0; e < field->GetExpSize(); e++)
564  {
565  int numModesElement = expOrderElement[e];
566  int nElmtPoints = field->GetExp(e)->GetTotPoints();
567  int physOffset = field->GetPhys_Offset(e);
568  int nElmtCoeffs = field->GetExp(e)->GetNcoeffs();
569  int numCutOff = numModesElement - offset;
570 
571  if (numModesElement <= offset)
572  {
573  Vmath::Fill(nElmtPoints, 0.0, tmp = Sensor + physOffset, 1);
574  Vmath::Fill(nElmtPoints, 0.0, tmp = SensorKappa + physOffset, 1);
575  continue;
576  }
577 
578  // create vector to save the solution points per element at P = p;
579  Array<OneD, NekDouble> elmtPhys(nElmtPoints,
580  tmp = physarray[0] + physOffset);
581  // Compute coefficients
582  Array<OneD, NekDouble> elmtCoeffs(nElmtCoeffs, 0.0);
583  field->GetExp(e)->FwdTrans(elmtPhys, elmtCoeffs);
584 
585  // ReduceOrderCoeffs reduces the polynomial order of the solution
586  // that is represented by the coeffs given as an inarray. This is
587  // done by projecting the higher order solution onto the orthogonal
588  // basis and padding the higher order coefficients with zeros.
589  Array<OneD, NekDouble> reducedElmtCoeffs(nElmtCoeffs, 0.0);
590  field->GetExp(e)->ReduceOrderCoeffs(numCutOff, elmtCoeffs,
591  reducedElmtCoeffs);
592 
593  Array<OneD, NekDouble> reducedElmtPhys(nElmtPoints, 0.0);
594  field->GetExp(e)->BwdTrans(reducedElmtCoeffs, reducedElmtPhys);
595 
596  NekDouble numerator = 0.0;
597  NekDouble denominator = 0.0;
598 
599  // Determining the norm of the numerator of the Sensor
600  Array<OneD, NekDouble> difference(nElmtPoints, 0.0);
601  Vmath::Vsub(nElmtPoints, elmtPhys, 1, reducedElmtPhys, 1, difference,
602  1);
603 
604  numerator = Vmath::Dot(nElmtPoints, difference, difference);
605  denominator = Vmath::Dot(nElmtPoints, elmtPhys, elmtPhys);
606 
607  NekDouble elmtSensor = sqrt(numerator / denominator);
608  elmtSensor = log10(max(elmtSensor, NekConstants::kNekSqrtTol));
609 
610  Vmath::Fill(nElmtPoints, elmtSensor, tmp = Sensor + physOffset, 1);
611 
612  // Compute reference value for sensor
613  order = max(numModesElement - 1, 1);
614  if (order > 0)
615  {
616  Skappa = m_Skappa - 4.25 * log10(static_cast<NekDouble>(order));
617  }
618  else
619  {
620  Skappa = 0.0;
621  }
622 
623  // Compute artificial viscosity
624  NekDouble elmtSensorKappa;
625  if (elmtSensor < (Skappa - m_Kappa))
626  {
627  elmtSensorKappa = 0;
628  }
629  else if (elmtSensor > (Skappa + m_Kappa))
630  {
631  elmtSensorKappa = 1.0;
632  }
633  else
634  {
635  elmtSensorKappa =
636  0.5 * (1 + sin(M_PI * (elmtSensor - Skappa) / (2 * m_Kappa)));
637  }
638  Vmath::Fill(nElmtPoints, elmtSensorKappa,
639  tmp = SensorKappa + physOffset, 1);
640  }
641 }
static const NekDouble kNekSqrtTol
T Dot(int n, const T *w, const T *x)
vvtvp (vector times vector times vector): z = w*x*y
Definition: Vmath.cpp:1100
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition: Vmath.cpp:45

References Vmath::Dot(), Vmath::Fill(), Nektar::NekConstants::kNekSqrtTol, m_Kappa, m_Skappa, tinysimd::sqrt(), and Vmath::Vsub().

Referenced by GetMuAv().

◆ GetSoundSpeed()

void Nektar::VariableConverter::GetSoundSpeed ( const Array< OneD, const Array< OneD, NekDouble >> &  physfield,
Array< OneD, NekDouble > &  soundspeed 
)

Compute the sound speed using the equation of state.

Parameters
physfieldInput physical field
soundspeedThe resulting sound speed \( c \).

Definition at line 346 of file VariableConverter.cpp.

349 {
350  int nPts = physfield[0].size();
351 
352  Array<OneD, NekDouble> energy(nPts);
353  GetInternalEnergy(physfield, energy);
354 
355  for (int i = 0; i < nPts; ++i)
356  {
357  soundspeed[i] = m_eos->GetSoundSpeed(physfield[0][i], energy[i]);
358  }
359 }

References GetInternalEnergy(), and m_eos.

Referenced by GetMuAv().

◆ GetTemperature() [1/2]

void Nektar::VariableConverter::GetTemperature ( const Array< OneD, const Array< OneD, NekDouble >> &  physfield,
Array< OneD, NekDouble > &  temperature 
)

Compute the temperature using the equation of state.

Parameters
physfieldInput physical field.
temperatureThe resulting temperature \( T \).

Definition at line 325 of file VariableConverter.cpp.

328 {
329  int nPts = physfield[0].size();
330 
331  Array<OneD, NekDouble> energy(nPts);
332  GetInternalEnergy(physfield, energy);
333 
334  for (int i = 0; i < nPts; ++i)
335  {
336  temperature[i] = m_eos->GetTemperature(physfield[0][i], energy[i]);
337  }
338 }

References GetInternalEnergy(), and m_eos.

◆ GetTemperature() [2/2]

template<class T , typename = typename std::enable_if< std::is_floating_point<T>::value || tinysimd::is_vector_floating_point<T>::value>::type>
T Nektar::VariableConverter::GetTemperature ( T *  physfield)
inline

Definition at line 121 of file VariableConverter.h.

122  {
123  T energy = GetInternalEnergy(physfield);
124  return m_eos->GetTemperature(physfield[0], energy);
125  }

References GetInternalEnergy(), and m_eos.

◆ GetVelocityVector()

void Nektar::VariableConverter::GetVelocityVector ( const Array< OneD, Array< OneD, NekDouble >> &  physfield,
Array< OneD, Array< OneD, NekDouble >> &  velocity 
)

Compute the velocity field \( \mathbf{v} \) given the momentum \( \rho\mathbf{v} \).

Parameters
physfieldMomentum field.
velocityVelocity field.

Definition at line 185 of file VariableConverter.cpp.

188 {
189  const int nPts = physfield[0].size();
190 
191  for (int i = 0; i < m_spacedim; ++i)
192  {
193  Vmath::Vdiv(nPts, physfield[1 + i], 1, physfield[0], 1, velocity[i], 1);
194  }
195 }

References m_spacedim, and Vmath::Vdiv().

Referenced by GetAbsoluteVelocity().

◆ SetAv()

void Nektar::VariableConverter::SetAv ( const Array< OneD, MultiRegions::ExpListSharedPtr > &  fields,
const Array< OneD, const Array< OneD, NekDouble >> &  consVar,
const Array< OneD, NekDouble > &  div,
const Array< OneD, NekDouble > &  curlSquared 
)

Definition at line 420 of file VariableConverter.cpp.

425 {
426  auto nTracePts = fields[0]->GetTrace()->GetTotPoints();
428  {
429  auto nPts = fields[0]->GetTotPoints();
430  m_muAv = Array<OneD, NekDouble>(nPts, 0.0);
431  m_muAvTrace = Array<OneD, NekDouble>(nTracePts, 0.0);
432  SetElmtMinHP(fields);
433  }
434 
435  if (m_shockSensorType == "Modal")
436  {
437  // Get viscosity based on modal sensor
438  GetMuAv(fields, consVar, m_muAv);
439  }
440  else
441  {
442  // Get viscosity based on dilatation sensor
443  GetMuAv(fields, consVar, div, m_muAv);
444  }
445 
446  // Apply Ducros sensor
447  if (m_ducrosSensor != "Off")
448  {
449  ApplyDucros(div, curlSquared, m_muAv);
450  }
451 
452  // Apply approximate C0 smoothing
453  if (m_smoothing == "C0")
454  {
456  }
457 
458  // Set trace AV
459  Array<OneD, NekDouble> muFwd(nTracePts, 0.0), muBwd(nTracePts, 0.0);
460  fields[0]->GetFwdBwdTracePhys(m_muAv, muFwd, muBwd, false, false, false);
461  for (size_t p = 0; p < nTracePts; ++p)
462  {
463  m_muAvTrace[p] = 0.5 * (muFwd[p] + muBwd[p]);
464  }
465 }
void ApplyC0Smooth(Array< OneD, NekDouble > &field)
Make field C0.
void SetElmtMinHP(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields)
Compute an estimate of minimum h/p for each element of the expansion.
void ApplyDucros(const Array< OneD, NekDouble > &div, const Array< OneD, NekDouble > &curlSquare, Array< OneD, NekDouble > &muAv)
Apply Ducros (anti-vorticity) sensor averaged over the element.
void GetMuAv(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, NekDouble > &muAv)
Calculate the physical artificial viscosity based on modal sensor.

References ApplyC0Smooth(), ApplyDucros(), GetMuAv(), m_ducrosSensor, m_muAv, m_muAvTrace, m_shockSensorType, m_smoothing, Nektar::NullNekDouble1DArray, CellMLToNektar.cellml_metadata::p, and SetElmtMinHP().

◆ SetElmtMinHP()

void Nektar::VariableConverter::SetElmtMinHP ( const Array< OneD, MultiRegions::ExpListSharedPtr > &  fields)

Compute an estimate of minimum h/p for each element of the expansion.

Definition at line 483 of file VariableConverter.cpp.

485 {
486  auto nElements = fields[0]->GetExpSize();
488  {
489  m_hOverP = Array<OneD, NekDouble>(nElements, 1.0);
490  }
491 
492  // Determine h/p scaling
493  Array<OneD, int> pOrderElmt = fields[0]->EvalBasisNumModesMaxPerExp();
494  auto expdim = fields[0]->GetGraph()->GetMeshDimension();
495  for (size_t e = 0; e < nElements; e++)
496  {
497  NekDouble h = 1.0e+10;
498  switch (expdim)
499  {
500  case 3:
501  {
503  exp3D = fields[0]->GetExp(e)->as<LocalRegions::Expansion3D>();
504  for (size_t i = 0; i < exp3D->GetNtraces(); ++i)
505  {
506  h = min(
507  h, exp3D->GetGeom3D()->GetEdge(i)->GetVertex(0)->dist(*(
508  exp3D->GetGeom3D()->GetEdge(i)->GetVertex(1))));
509  }
510  break;
511  }
512 
513  case 2:
514  {
516  exp2D = fields[0]->GetExp(e)->as<LocalRegions::Expansion2D>();
517  for (size_t i = 0; i < exp2D->GetNtraces(); ++i)
518  {
519  h = min(
520  h, exp2D->GetGeom2D()->GetEdge(i)->GetVertex(0)->dist(*(
521  exp2D->GetGeom2D()->GetEdge(i)->GetVertex(1))));
522  }
523  break;
524  }
525  case 1:
526  {
528  exp1D = fields[0]->GetExp(e)->as<LocalRegions::Expansion1D>();
529 
530  h = min(h, exp1D->GetGeom1D()->GetVertex(0)->dist(
531  *(exp1D->GetGeom1D()->GetVertex(1))));
532 
533  break;
534  }
535  default:
536  {
537  ASSERTL0(false, "Dimension out of bound.")
538  }
539  }
540 
541  // Store h/p scaling
542  m_hOverP[e] = h / max(pOrderElmt[e] - 1, 1);
543  }
544 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:215
std::shared_ptr< Expansion2D > Expansion2DSharedPtr
Definition: Expansion1D.h:47
std::shared_ptr< Expansion1D > Expansion1DSharedPtr
Definition: Expansion1D.h:51
std::shared_ptr< Expansion3D > Expansion3DSharedPtr
Definition: Expansion2D.h:50

References ASSERTL0, Nektar::LocalRegions::Expansion1D::GetGeom1D(), m_hOverP, and Nektar::NullNekDouble1DArray.

Referenced by SetAv().

Member Data Documentation

◆ m_C0ProjectExp

MultiRegions::ContFieldSharedPtr Nektar::VariableConverter::m_C0ProjectExp
protected

Definition at line 213 of file VariableConverter.h.

Referenced by ApplyC0Smooth(), and VariableConverter().

◆ m_ducrosSensor

std::string Nektar::VariableConverter::m_ducrosSensor
protected

Definition at line 211 of file VariableConverter.h.

Referenced by SetAv(), and VariableConverter().

◆ m_eos

EquationOfStateSharedPtr Nektar::VariableConverter::m_eos
protected

◆ m_gasConstant

NekDouble Nektar::VariableConverter::m_gasConstant
protected

Definition at line 199 of file VariableConverter.h.

Referenced by VariableConverter().

◆ m_hOverP

Array<OneD, NekDouble> Nektar::VariableConverter::m_hOverP
protected

h/p scaling

Definition at line 216 of file VariableConverter.h.

Referenced by GetElmtMinHP(), GetMuAv(), SetElmtMinHP(), and VariableConverter().

◆ m_Kappa

NekDouble Nektar::VariableConverter::m_Kappa
protected

Definition at line 202 of file VariableConverter.h.

Referenced by GetSensor(), and VariableConverter().

◆ m_mu

NekDouble Nektar::VariableConverter::m_mu
protected

Definition at line 200 of file VariableConverter.h.

Referenced by GetDynamicViscosity(), and VariableConverter().

◆ m_mu0

NekDouble Nektar::VariableConverter::m_mu0
protected

Shock sensor.

Definition at line 208 of file VariableConverter.h.

Referenced by GetMuAv(), and VariableConverter().

◆ m_muAv

Array<OneD, NekDouble> Nektar::VariableConverter::m_muAv
protected

storage

Definition at line 218 of file VariableConverter.h.

Referenced by GetAv(), SetAv(), and VariableConverter().

◆ m_muAvTrace

Array<OneD, NekDouble> Nektar::VariableConverter::m_muAvTrace
protected

Definition at line 219 of file VariableConverter.h.

Referenced by GetAvTrace(), SetAv(), and VariableConverter().

◆ m_oneOverT_star

NekDouble Nektar::VariableConverter::m_oneOverT_star
protected

Definition at line 203 of file VariableConverter.h.

Referenced by GetDmuDT(), GetDynamicViscosity(), and VariableConverter().

◆ m_pInf

NekDouble Nektar::VariableConverter::m_pInf
protected

Definition at line 197 of file VariableConverter.h.

Referenced by VariableConverter().

◆ m_rhoInf

NekDouble Nektar::VariableConverter::m_rhoInf
protected

Definition at line 198 of file VariableConverter.h.

Referenced by VariableConverter().

◆ m_session

LibUtilities::SessionReaderSharedPtr Nektar::VariableConverter::m_session
protected

Definition at line 194 of file VariableConverter.h.

Referenced by VariableConverter().

◆ m_shockCaptureType

std::string Nektar::VariableConverter::m_shockCaptureType
protected

Definition at line 209 of file VariableConverter.h.

Referenced by VariableConverter().

◆ m_shockSensorType

std::string Nektar::VariableConverter::m_shockSensorType
protected

Definition at line 210 of file VariableConverter.h.

Referenced by SetAv(), and VariableConverter().

◆ m_Skappa

NekDouble Nektar::VariableConverter::m_Skappa
protected

Definition at line 201 of file VariableConverter.h.

Referenced by GetSensor(), and VariableConverter().

◆ m_smoothing

std::string Nektar::VariableConverter::m_smoothing
protected

Definition at line 212 of file VariableConverter.h.

Referenced by SetAv(), and VariableConverter().

◆ m_spacedim

int Nektar::VariableConverter::m_spacedim
protected

◆ m_TRatioSutherland

NekDouble Nektar::VariableConverter::m_TRatioSutherland
protected

Definition at line 205 of file VariableConverter.h.

Referenced by GetDmuDT(), GetDynamicViscosity(), and VariableConverter().

◆ m_Tref

NekDouble Nektar::VariableConverter::m_Tref
protected

Definition at line 204 of file VariableConverter.h.

Referenced by VariableConverter().