Nektar++
Loading...
Searching...
No Matches
Static Public Member Functions | Public Attributes | Private Member Functions | List of all members
Nektar::detail::CFEViscosityParams< TData > Struct Template Reference

The viscosity law and the Prandtl number of the compressible Navier-Stokes equations, as every viscous flux of the solver reads them: the reference viscosity, Sutherland's law when SOLVERINFO ViscosityType is Variable, and the Prandtl number, given as such or through the thermal conductivity, not both. More...

#include <CFEViscosityParams.hpp>

Static Public Member Functions

template<typename EqnOfSParams >
static CFEViscosityParams Read (const LibUtilities::SessionReaderSharedPtr &session, const EqnOfSParams &EoS)
 The parameters for the equation of state EoS.
 

Public Attributes

TData muRef = 0.0
 
TData prandtl = 0.0
 
TData oneOverTstar = 0.0
 
TData tRatioSutherland = 0.0
 
bool isMuVariable = false
 

Private Member Functions

template<typename EqnOfSParams >
void Load (const LibUtilities::SessionReaderSharedPtr &session, const EqnOfSParams &EoS)
 

Detailed Description

template<typename TData>
struct Nektar::detail::CFEViscosityParams< TData >

The viscosity law and the Prandtl number of the compressible Navier-Stokes equations, as every viscous flux of the solver reads them: the reference viscosity, Sutherland's law when SOLVERINFO ViscosityType is Variable, and the Prandtl number, given as such or through the thermal conductivity, not both.

Definition at line 54 of file CFEViscosityParams.hpp.

Member Function Documentation

◆ Load()

template<typename TData >
template<typename EqnOfSParams >
void Nektar::detail::CFEViscosityParams< TData >::Load ( const LibUtilities::SessionReaderSharedPtr &  session,
const EqnOfSParams &  EoS 
)
inlineprivate

Definition at line 75 of file CFEViscosityParams.hpp.

77 {
78 TData rhoInf, pInf;
79 session->LoadReferenceValue("viscosity", muRef, 1.78e-05);
80 session->LoadReferenceValue("density", rhoInf, 1.225);
81 session->LoadReferenceValue("pressure", pInf, 101325);
82 oneOverTstar = (rhoInf * EoS.gasConst()) / pInf;
83
84 std::string viscosityType;
85 session->LoadSolverInfo("ViscosityType", viscosityType, "Constant");
86 isMuVariable = StringUtils::IEquals(viscosityType, "Variable");
87 if (isMuVariable)
88 {
89 TData Tref, Tsuth;
90 session->LoadReferenceValue("Temperature", Tref, 288.15);
91 session->LoadReferenceValue("Tsutherland", Tsuth, 110.0);
92 tRatioSutherland = Tsuth / Tref;
93 }
94
95 const TData Cp = EoS.gamma() / (EoS.gamma() - 1.0) * EoS.gasConst();
96 if (session->DefinesReferenceValue("thermalConductivity"))
97 {
98 ASSERTL0(!session->DefinesReferenceValue("Prandtl"),
99 "Cannot define both Prandtl and thermalConductivity.");
100 TData thermalConductivityRef;
101 session->LoadReferenceValue("thermalConductivity",
102 thermalConductivityRef, 1.0);
103 prandtl = Cp * muRef / thermalConductivityRef;
104 }
105 else
106 {
107 session->LoadReferenceValue("Prandtl", prandtl, 0.72);
108 }
109 }
#define ASSERTL0(condition, msg)
LibUtilities::SessionReaderSharedPtr session
detail::IdealGasEoS< double > EoS
bool IEquals(std::string_view a, std::string_view b)

References ASSERTL0, Nektar::StringUtils::IEquals(), Nektar::detail::CFEViscosityParams< TData >::isMuVariable, Nektar::detail::CFEViscosityParams< TData >::muRef, Nektar::detail::CFEViscosityParams< TData >::oneOverTstar, Nektar::detail::CFEViscosityParams< TData >::prandtl, session, and Nektar::detail::CFEViscosityParams< TData >::tRatioSutherland.

◆ Read()

template<typename TData >
template<typename EqnOfSParams >
static CFEViscosityParams Nektar::detail::CFEViscosityParams< TData >::Read ( const LibUtilities::SessionReaderSharedPtr &  session,
const EqnOfSParams &  EoS 
)
inlinestatic

Member Data Documentation

◆ isMuVariable

template<typename TData >
bool Nektar::detail::CFEViscosityParams< TData >::isMuVariable = false

◆ muRef

template<typename TData >
TData Nektar::detail::CFEViscosityParams< TData >::muRef = 0.0

◆ oneOverTstar

template<typename TData >
TData Nektar::detail::CFEViscosityParams< TData >::oneOverTstar = 0.0

◆ prandtl

template<typename TData >
TData Nektar::detail::CFEViscosityParams< TData >::prandtl = 0.0

◆ tRatioSutherland

template<typename TData >
TData Nektar::detail::CFEViscosityParams< TData >::tRatioSutherland = 0.0