50 template <
class IndexType>
55 inline IndexType
NSpecies()
const {
return 0; }
57 inline IndexType
Velocity()
const {
return 1; }
68 inline IndexType
SpeciesDensities()
const {
return std::numeric_limits<IndexType>::max(); }
69 inline IndexType
Temperature_ve()
const {
return std::numeric_limits<IndexType>::max(); }
98 unsigned long npoint,
unsigned long ndim,
unsigned long nvar,
const CConfig *config);
129 return pressure <= 0.0;
137 if (soundspeed2 < 0.0)
return true;
189 Secondary(iPoint,iVar) = val_secondary[iVar];
212 return temperature <= 0.0;
275 for (
unsigned long iDim = 0; iDim <
nDim; iDim++)
286 for (
unsigned long iDim = 0; iDim <
nDim; iDim++) {
297 for (
unsigned long iDim = 0; iDim <
nDim; iDim++)
306 for (
unsigned long iDim = 0; iDim <
nDim; iDim++)
Res_TruncError(iPoint,iDim+1) = 0.0;
315 for (
unsigned long iDim = 0; iDim <
nDim; iDim++)
Solution(iPoint, iDim+1) =
GetDensity(iPoint) * val_vector[iDim];
unsigned long EulerNPrimVarGrad(const CConfig *config, unsigned long ndim)
Returns the number of primitive variables for which to compute gradients.
Definition CEulerVariable.cpp:31
Class for defining the common variables of flow solvers.
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Class for defining the variables of the compressible Euler solver.
Definition CEulerVariable.hpp:46
su2vector< unsigned long > NIterNewtonsolver
Stores number of Newton solver iterations when using data-driven fluid models.
Definition CEulerVariable.hpp:83
void SetVelocity_Old(unsigned long iPoint, const su2double *val_velocity) final
Set the velocity vector from the old solution.
Definition CEulerVariable.hpp:296
su2double * GetSecondary(unsigned long iPoint) final
Get the secondary variables of the problem.
Definition CEulerVariable.hpp:196
bool SetDensity(unsigned long iPoint) final
Set the value of the density for the incompressible flows.
Definition CEulerVariable.hpp:201
bool SetTemperature(unsigned long iPoint, su2double temperature) final
Set the value of the temperature.
Definition CEulerVariable.hpp:210
void SetVel_ResTruncError_Zero(unsigned long iPoint) final
Set the momentum part of the truncation error to zero.
Definition CEulerVariable.hpp:305
su2double GetProjVel(unsigned long iPoint, const su2double *val_vector) const final
Get the projected velocity in a unitary vector direction (compressible solver).
Definition CEulerVariable.hpp:273
static constexpr auto MAX_OUTLIER_MITIGATION
Maximum value that OutlierMitigation can have.
Definition CEulerVariable.hpp:365
const CIndices< unsigned long > indices
Secondary variables (dPdrho_e, dPde_rho, dTdrho_e, dTde_rho, dmudrho_T, dmudT_rho,...
Definition CEulerVariable.hpp:73
void SetDataExtrapolation(unsigned long iPoint, unsigned short extrapolation) final
Set dataset extrapolation instance.
Definition CEulerVariable.hpp:337
static constexpr size_t MAXNVAR
Definition CEulerVariable.hpp:48
void SetSecondaryVar(unsigned long iPoint, CFluidModel *FluidModel) override
A virtual member.
Definition CEulerVariable.cpp:166
su2vector< unsigned short > DatasetExtrapolation
Stores instances of dataset bounds violation when using data-driven fluid models.
Definition CEulerVariable.hpp:82
su2double GetPressure(unsigned long iPoint) const final
Get the flow pressure.
Definition CEulerVariable.hpp:219
void SetNewtonSolverIterations(unsigned long iPoint, unsigned long nIter) final
Set the number of iterations required by a Newton solver used by the fluid model.
Definition CEulerVariable.hpp:353
void SetVelocity(unsigned long iPoint) final
Set the velocity vector from the solution.
Definition CEulerVariable.hpp:284
su2double GetDensity_time_n1(unsigned long iPoint) const final
Get the density at time level n-1 for dual-time stepping.
Definition CEulerVariable.hpp:112
bool SetPrimVar(unsigned long iPoint, CFluidModel *FluidModel) final
Set all the primitive variables for compressible flows.
Definition CEulerVariable.cpp:112
MatrixType WindGust
Definition CEulerVariable.hpp:79
bool SetPressure(unsigned long iPoint, su2double pressure) final
Set the value of the pressure.
Definition CEulerVariable.hpp:127
unsigned short GetDataExtrapolation(unsigned long iPoint) const final
Get dataset extrapolation instance.
Definition CEulerVariable.hpp:346
VectorType FluidEntropy
Stores the fluid entropy value as computed by the data-driven fluid model.
Definition CEulerVariable.hpp:84
const MatrixType & GetSecondary() const
Get all the secondary variables.
Definition CEulerVariable.hpp:163
MatrixType Secondary
Definition CEulerVariable.hpp:77
void SetdPde_rho(unsigned long iPoint, su2double dPde_rho) final
A virtual member.
Definition CEulerVariable.hpp:122
void SetEntropy(unsigned long iPoint, su2double entropy) final
Set fluid entropy.
Definition CEulerVariable.hpp:323
su2double GetSecondary(unsigned long iPoint, unsigned long iVar) const final
Get the secondary variables.
Definition CEulerVariable.hpp:170
void SetSecondary(unsigned long iPoint, unsigned long iVar, su2double val_secondary) final
Set the value of the secondary variables.
Definition CEulerVariable.hpp:178
su2double GetSoundSpeed(unsigned long iPoint) const final
Get the speed of the sound.
Definition CEulerVariable.hpp:225
su2double GetDensity(unsigned long iPoint) const final
Get the density of the flow.
Definition CEulerVariable.hpp:237
CMatrixView< const su2double > GetVelocityGradient(unsigned long iPoint) const final
Get the velocity gradient.
Definition CEulerVariable.hpp:264
su2double GetEnthalpy(unsigned long iPoint) const final
Get the enthalpy of the flow.
Definition CEulerVariable.hpp:231
bool SetSoundSpeed(unsigned long iPoint, su2double soundspeed2) final
Set the value of the speed of the sound.
Definition CEulerVariable.hpp:136
su2double GetTemperature(unsigned long iPoint) const final
Get the temperature of the flow.
Definition CEulerVariable.hpp:249
su2double GetDensity_time_n(unsigned long iPoint) const final
Get the density at time level n for dual-time stepping.
Definition CEulerVariable.hpp:105
void SetdPdrho_e(unsigned long iPoint, su2double dPdrho_e) final
A virtual member.
Definition CEulerVariable.hpp:117
void SetSecondary(unsigned long iPoint, const su2double *val_secondary) final
Set the value of the secondary variables.
Definition CEulerVariable.hpp:187
void SetVelSolutionVector(unsigned long iPoint, const su2double *val_vector) final
Specify a vector to set the velocity components of the solution. Multiplied by density for compressib...
Definition CEulerVariable.hpp:314
void SetEnthalpy(unsigned long iPoint) final
Set the value of the enthalpy.
Definition CEulerVariable.hpp:145
bool DataDrivenFluid
Wind gust value.
Definition CEulerVariable.hpp:81
su2vector< uint8_t > OutlierMitigation
Marks outliers (0 ok, MAX_OUTLIER_MITIGATION maximum mitigation).
Definition CEulerVariable.hpp:370
unsigned long GetNewtonSolverIterations(unsigned long iPoint) const final
Get the number of iterations required by a Newton solver used by the fluid model.
Definition CEulerVariable.hpp:360
su2double GetEntropy(unsigned long iPoint) const final
Get fluid entropy.
Definition CEulerVariable.hpp:330
su2double GetVelocity(unsigned long iPoint, unsigned long iDim) const final
Get the velocity of the flow.
Definition CEulerVariable.hpp:256
su2double GetEnergy(unsigned long iPoint) const final
Get the energy of the flow.
Definition CEulerVariable.hpp:243
Class for defining the common variables of flow solvers.
Definition CFlowVariable.hpp:38
CVectorOfMatrix Gradient_Primitive
Gradient of the primitive variables.
Definition CFlowVariable.hpp:42
MatrixType Primitive
Primitive variables.
Definition CFlowVariable.hpp:41
VectorType Velocity2
Squared norm of velocity.
Definition CFlowVariable.hpp:48
Main class for defining the Thermo-Physical Model.
Definition CFluidModel.hpp:47
Class to represent a matrix (without owning the data, this just wraps a pointer).
Definition container_decorators.hpp:40
MatrixType Solution
Solution of the problem.
Definition CVariable.hpp:55
MatrixType & GetSolution_time_n1()
Definition CVariable.hpp:568
unsigned long nSecondaryVar
Number of secondary variables.
Definition CVariable.hpp:111
unsigned long nVar
Number of variables of the problem.
Definition CVariable.hpp:108
MatrixType Solution_Old
Old solution of the problem R-K.
Definition CVariable.hpp:56
MatrixType & GetSolution_time_n()
Definition CVariable.hpp:560
MatrixType Res_TruncError
Truncation error for multigrid cycle.
Definition CVariable.hpp:91
unsigned long nDim
Number of dimension of the problem.
Definition CVariable.hpp:107
passivedouble su2double
Definition code_config.hpp:181
FORCEINLINE ARRAY_T sqrt(const ARRAY_T &x)
Definition special_vectorization.hpp:116
FORCEINLINE ARRAY_T pow(const ARRAY_T &a, const ARRAY_T &b)
Definition special_vectorization.hpp:179
Definition CEulerVariable.hpp:51
IndexType Temperature_ve() const
Definition CEulerVariable.hpp:69
IndexType LaminarViscosity() const
Definition CEulerVariable.hpp:62
IndexType CpTotal() const
Definition CEulerVariable.hpp:65
IndexType SpeciesDensities() const
Definition CEulerVariable.hpp:68
IndexType Velocity() const
Definition CEulerVariable.hpp:57
IndexType Density() const
Definition CEulerVariable.hpp:59
IndexType Enthalpy() const
Definition CEulerVariable.hpp:60
IndexType SoundSpeed() const
Definition CEulerVariable.hpp:61
const IndexType nDim
Definition CEulerVariable.hpp:52
IndexType Pressure() const
Definition CEulerVariable.hpp:58
IndexType EddyViscosity() const
Definition CEulerVariable.hpp:63
IndexType Temperature() const
Definition CEulerVariable.hpp:56
IndexType NDim() const
Definition CEulerVariable.hpp:54
IndexType NSpecies() const
Definition CEulerVariable.hpp:55
IndexType ThermalConductivity() const
Definition CEulerVariable.hpp:64
CIndices(IndexType ndim, IndexType)
Definition CEulerVariable.hpp:53