Skip to content

Commit f4a64c3

Browse files
Cristopher-MoralesbigfootedpcarruscagTobiKattmann
authored
Composition-dependent density model for variable density incompressible flow (#1620)
* 13-04-2022 adding FUID_MIXTURE * update thursday 14-04-2022 * 21-04-2022 CFluiscalar based on IncIdealGas * 21-04-2022 adding viscosity and thermal conductivity * 22-04-2022 compiles and run for more than one species, but still not converge * mixing density working 26-04-22 * 29-04-2022 cleaning up and compiling * 29-04-22 * Update Common/src/CConfig.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update Common/include/CConfig.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * 10-05-2022 fix comments * 10-05-2022 removingSchmidth files * 10-05-2022 checking density model * Update Common/include/CConfig.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update Common/include/option_structure.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update Common/src/CConfig.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update Common/src/CConfig.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/include/fluid/CDiffusivityModel.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/src/solvers/CIncNSSolver.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/src/solvers/CIncNSSolver.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/src/variables/CIncNSVariable.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/src/variables/CIncNSVariable.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * 13-05-2022 cleaning * 13-05-2022 Cleaning * Update SU2_CFD/include/fluid/CDiffusivityModel.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/include/fluid/CDiffusivityModel.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/include/fluid/CFluidScalar.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/include/fluid/CFluidModel.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/include/fluid/CFluidModel.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/include/fluid/CFluidModel.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/include/fluid/CFluidModel.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/src/fluid/CFluidScalar.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/include/fluid/CFluidScalar.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/include/fluid/CFluidScalar.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/include/fluid/CFluidScalar.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update SU2_CFD/include/fluid/CFluidModel.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * 23-05-22 removing include not needed * Update SU2_CFD/src/fluid/CFluidScalar.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * 24-05-2022 adding parallel_regression test * removing comment * Update SU2_CFD/src/fluid/CFluidScalar.cpp Co-authored-by: Nijso <nijso@hotmail.com> * Update Common/src/CConfig.cpp Co-authored-by: Nijso <nijso@hotmail.com> * Update Common/src/CConfig.cpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> * Update Common/include/CConfig.hpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * Update Common/include/CConfig.hpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * Update Common/include/CConfig.hpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * Update Common/include/option_structure.hpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * cleaning Csolverfactory * Update Common/src/CConfig.cpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * Update SU2_CFD/include/fluid/CFluidModel.hpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * Update SU2_CFD/src/solvers/CIncEulerSolver.cpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * Update SU2_CFD/src/solvers/CIncEulerSolver.cpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * Update SU2_CFD/include/fluid/CFluidModel.hpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * Update SU2_CFD/src/solvers/CIncEulerSolver.cpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * Update SU2_CFD/src/fluid/CFluidScalar.cpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * cleaning CfluidScalar .hpp and .cpp * fixing clang-format * fixing test case parallel_regression * test case fixed * clang-formatfluidmodel and fluidscalar * clang-format fluidmodel and scalar * removing bools wilke and davidson * adding explanaction test and config_template.cfg files * removing CDiffusivityModel.hpp file * Update SU2_CFD/include/fluid/CFluidScalar.hpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * Update SU2_CFD/src/fluid/CFluidScalar.cpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * Update Common/include/CConfig.hpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * Update Common/include/CConfig.hpp Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * clang-format * Update TestCases/parallel_regression.py Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> * Update TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel.cfg Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> Co-authored-by: Nijso <nijso@hotmail.com> Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com>
1 parent db8ea45 commit f4a64c3

21 files changed

Lines changed: 415 additions & 41 deletions

Common/include/CConfig.hpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -802,8 +802,9 @@ class CConfig {
802802
Beta_Factor, /*!< \brief Value of the epsilon^2 multiplier for Beta for the incompressible preconditioner. */
803803
Gas_Constant, /*!< \brief Specific gas constant. */
804804
Gas_ConstantND, /*!< \brief Non-dimensional specific gas constant. */
805-
Molecular_Weight, /*!< \brief Molecular weight of an incompressible ideal gas (g/mol). */
806-
Specific_Heat_Cp, /*!< \brief Specific heat at constant pressure. */
805+
*Molecular_Weight; /*!< \brief Molecular weight of an incompressible ideal gas (g/mol). */
806+
unsigned short nMolecular_Weight; /*!< \brief Number of species molecular weights. */
807+
su2double Specific_Heat_Cp, /*!< \brief Specific heat at constant pressure. */
807808
Specific_Heat_CpND, /*!< \brief Non-dimensional specific heat at constant pressure. */
808809
Specific_Heat_Cv, /*!< \brief Specific heat at constant volume. */
809810
Specific_Heat_CvND, /*!< \brief Non-dimensional specific heat at constant volume. */
@@ -1164,8 +1165,9 @@ class CConfig {
11641165
unsigned short maxBasisDim, /*!< \brief Maximum number of POD basis dimensions. */
11651166
rom_save_freq; /*!< \brief Frequency of unsteady time steps to save. */
11661167

1168+
unsigned short nSpecies, /*!< \brief Number of transported species equations (for NEMO and species transport)*/
1169+
11671170
/* other NEMO configure options*/
1168-
unsigned short nSpecies, /*!< \brief No of species present in flow */
11691171
iWall_Catalytic,
11701172
nWall_Catalytic; /*!< \brief No of catalytic walls */
11711173
su2double *Gas_Composition, /*!< \brief Initial mass fractions of flow [dimensionless] */
@@ -1186,7 +1188,6 @@ class CConfig {
11861188
bool Species_StrongBC; /*!< \brief Boolean whether strong BC's are used for in- outlet of the species solver. */
11871189
su2double* Species_Init; /*!< \brief Initial uniform value for scalar transport. */
11881190
unsigned short nSpecies_Init; /*!< \brief Number of entries of SPECIES_INIT */
1189-
unsigned short n_species; /*!< \brief Number of species equations! Not species itself which would be 1 more. */
11901191

11911192
/*!
11921193
* \brief Set the default values of config options not set in the config file using another config object.
@@ -1608,7 +1609,7 @@ class CConfig {
16081609
* \brief Get the value of the molecular weight for an incompressible ideal gas (g/mol).
16091610
* \return Value of the molecular weight for an incompressible ideal gas (g/mol).
16101611
*/
1611-
su2double GetMolecular_Weight(void) const { return Molecular_Weight; }
1612+
su2double GetMolecular_Weight(unsigned short val_index = 0) const { return Molecular_Weight[val_index]; }
16121613

16131614
/*!
16141615
* \brief Get the value of specific heat at constant pressure.

Common/include/option_structure.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,8 @@ enum ENUM_FLUIDMODEL {
567567
INC_IDEAL_GAS = 5, /*!< \brief Incompressible ideal gas model. */
568568
INC_IDEAL_GAS_POLY = 6, /*!< \brief Inc. ideal gas, polynomial gas model. */
569569
MUTATIONPP = 7, /*!< \brief Mutation++ gas model for nonequilibrium flow. */
570-
SU2_NONEQ = 8 /*!< \brief User defined gas model for nonequilibrium flow. */
570+
SU2_NONEQ = 8, /*!< \brief User defined gas model for nonequilibrium flow. */
571+
FLUID_MIXTURE = 9, /*!< \brief Species mixture model. */
571572
};
572573
static const MapType<std::string, ENUM_FLUIDMODEL> FluidModel_Map = {
573574
MakePair("STANDARD_AIR", STANDARD_AIR)
@@ -579,6 +580,7 @@ static const MapType<std::string, ENUM_FLUIDMODEL> FluidModel_Map = {
579580
MakePair("INC_IDEAL_GAS_POLY", INC_IDEAL_GAS_POLY)
580581
MakePair("MUTATIONPP", MUTATIONPP)
581582
MakePair("SU2_NONEQ", SU2_NONEQ)
583+
MakePair("FLUID_MIXTURE", FLUID_MIXTURE)
582584
};
583585

584586
/*!

Common/src/CConfig.cpp

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,15 +1050,14 @@ void CConfig::SetPointersNull(void) {
10501050

10511051
Time_Ref = 1.0;
10521052

1053-
Delta_UnstTime = 0.0;
1053+
Delta_UnstTime = 0.0;
10541054
Delta_UnstTimeND = 0.0;
1055-
Total_UnstTime = 0.0;
1055+
Total_UnstTime = 0.0;
10561056
Total_UnstTimeND = 0.0;
10571057

10581058
Kind_TimeNumScheme = EULER_IMPLICIT;
10591059

10601060
Gas_Composition = nullptr;
1061-
10621061
}
10631062

10641063
void CConfig::SetConfig_Options() {
@@ -1168,7 +1167,7 @@ void CConfig::SetConfig_Options() {
11681167
/*!\brief THERMAL_EXPANSION_COEFF \n DESCRIPTION: Thermal expansion coefficient (0.00347 K^-1 (air), used for Boussinesq approximation for liquids/non-ideal gases) \ingroup Config*/
11691168
addDoubleOption("THERMAL_EXPANSION_COEFF", Thermal_Expansion_Coeff, 0.00347);
11701169
/*!\brief MOLECULAR_WEIGHT \n DESCRIPTION: Molecular weight for an incompressible ideal gas (28.96 g/mol (air) default) \ingroup Config*/
1171-
addDoubleOption("MOLECULAR_WEIGHT", Molecular_Weight, 28.96);
1170+
addDoubleListOption("MOLECULAR_WEIGHT", nMolecular_Weight, Molecular_Weight);
11721171

11731172
///* DESCRIPTION: Specify if Mutation++ library is used */
11741173
/*--- Reading gas model as string or integer depending on TC library used. ---*/
@@ -3308,6 +3307,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
33083307
bool ideal_gas = ((Kind_FluidModel == STANDARD_AIR) ||
33093308
(Kind_FluidModel == IDEAL_GAS) ||
33103309
(Kind_FluidModel == INC_IDEAL_GAS) ||
3310+
(Kind_FluidModel == FLUID_MIXTURE) ||
33113311
(Kind_FluidModel == INC_IDEAL_GAS_POLY) ||
33123312
(Kind_FluidModel == CONSTANT_DENSITY));
33133313
bool noneq_gas = ((Kind_FluidModel == MUTATIONPP) ||
@@ -3741,6 +3741,35 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
37413741
}
37423742
}
37433743

3744+
/*--- Set default values for various fluid properties. ---*/
3745+
3746+
const su2double Molecular_Weight_Default = 28.96;
3747+
3748+
if (Molecular_Weight == nullptr) {
3749+
Molecular_Weight = new su2double[1];
3750+
Molecular_Weight[0] = Molecular_Weight_Default;
3751+
nMolecular_Weight = 1;
3752+
}
3753+
3754+
/*--- Check whether inputs for FLUID_MIXTURE are correctly specified. ---*/
3755+
3756+
if (Kind_FluidModel == FLUID_MIXTURE) {
3757+
/*--- Check whether the number of entries of each specified fluid property equals the number of transported scalar
3758+
equations solved + 1. nMolecular_Weight is used because it is required for the fluid mixing models. --- */
3759+
if (nMolecular_Weight != nSpecies_Init + 1) {
3760+
SU2_MPI::Error(
3761+
"The use of FLUID_MIXTURE requires the number of entries for MOLECULAR_WEIGHT\n"
3762+
"to be equal to the number of entries of SCALAR_INIT + 1",
3763+
CURRENT_FUNCTION);
3764+
}
3765+
/*--- Check whether the density model used is correct, in the case of FLUID_MIXTURE the density model must be
3766+
VARIABLE. Otherwise, if the density model is CONSTANT, the scalars will not have influence the mixture density and
3767+
it will remain constant through the complete domain. --- */
3768+
if (Kind_DensityModel != INC_DENSITYMODEL::VARIABLE) {
3769+
SU2_MPI::Error("The use of FLUID_MIXTURE requires the INC_DENSITY_MODEL option to be VARIABLE", CURRENT_FUNCTION);
3770+
}
3771+
}
3772+
37443773
/*--- Overrule the default values for viscosity if the US measurement system is used. ---*/
37453774

37463775
if (SystemMeasurements == US) {
@@ -4725,7 +4754,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
47254754
}
47264755

47274756
if (Kind_DensityModel == INC_DENSITYMODEL::VARIABLE) {
4728-
if (Kind_FluidModel != INC_IDEAL_GAS && Kind_FluidModel != INC_IDEAL_GAS_POLY) {
4757+
if (Kind_FluidModel != INC_IDEAL_GAS && Kind_FluidModel != INC_IDEAL_GAS_POLY && Kind_FluidModel != FLUID_MIXTURE) {
47294758
SU2_MPI::Error("Variable density incompressible solver limited to ideal gases.\n Check the fluid model options (use INC_IDEAL_GAS, INC_IDEAL_GAS_POLY).", CURRENT_FUNCTION);
47304759
}
47314760
}
@@ -4738,7 +4767,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
47384767

47394768
if (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES || Kind_Solver == MAIN_SOLVER::INC_RANS) {
47404769
if (Kind_ViscosityModel == VISCOSITYMODEL::SUTHERLAND) {
4741-
if ((Kind_FluidModel != INC_IDEAL_GAS) && (Kind_FluidModel != INC_IDEAL_GAS_POLY)) {
4770+
if ((Kind_FluidModel != INC_IDEAL_GAS) && (Kind_FluidModel != INC_IDEAL_GAS_POLY) && (Kind_FluidModel != FLUID_MIXTURE)) {
47424771
SU2_MPI::Error("Sutherland's law only valid for ideal gases in incompressible flows.\n Must use VISCOSITY_MODEL=CONSTANT_VISCOSITY and set viscosity with\n MU_CONSTANT, or use DENSITY_MODEL= VARIABLE with FLUID_MODEL= INC_IDEAL_GAS or INC_IDEAL_GAS_POLY for VISCOSITY_MODEL=SUTHERLAND.\n NOTE: FREESTREAM_VISCOSITY is no longer used for incompressible flows!", CURRENT_FUNCTION);
47434772
}
47444773
}

SU2_CFD/include/fluid/CConstantDensity.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class CConstantDensity final : public CFluidModel {
4949
* \brief Set the Dimensionless State using Temperature.
5050
* \param[in] t - Temperature value at the point.
5151
*/
52-
void SetTDState_T(su2double t) override {
52+
void SetTDState_T(su2double t, const su2double *val_scalars = nullptr) override {
5353
/* Density is constant and thermodynamic pressure is
5454
not required for incompressible, constant density flows,
5555
but the energy equation can still be computed as a

SU2_CFD/include/fluid/CFluidModel.hpp

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,26 @@ class CFluidModel {
119119
*/
120120
su2double GetCv() const { return Cv; }
121121

122+
/*!
123+
* \brief Compute and return fluid mean molecular weight in kg/mol.
124+
*/
125+
template <class Vector_t>
126+
static su2double ComputeMeanMolecularWeight(const Vector_t& molar_masses, const su2double* val_scalars) {
127+
su2double OneOverMeanMolecularWeight = 0.0;
128+
su2double val_scalars_sum = 0.0;
129+
130+
for (size_t i_scalar = 0; i_scalar < molar_masses.size() - 1; i_scalar++) {
131+
OneOverMeanMolecularWeight += val_scalars[i_scalar] / (molar_masses[i_scalar] / 1000);
132+
val_scalars_sum += val_scalars[i_scalar];
133+
}
134+
OneOverMeanMolecularWeight += (1 - val_scalars_sum) / (molar_masses[molar_masses.size() - 1] / 1000);
135+
return 1 / OneOverMeanMolecularWeight;
136+
}
137+
122138
/*!
123139
* \brief Get fluid dynamic viscosity.
124140
*/
125-
su2double GetLaminarViscosity() {
141+
inline su2double GetLaminarViscosity() {
126142
LaminarViscosity->SetViscosity(Temperature, Density);
127143
Mu = LaminarViscosity->GetViscosity();
128144
LaminarViscosity->SetDerViscosity(Temperature, Density);
@@ -135,7 +151,7 @@ class CFluidModel {
135151
* \brief Get fluid thermal conductivity.
136152
*/
137153

138-
su2double GetThermalConductivity() {
154+
inline su2double GetThermalConductivity() {
139155
ThermalConductivity->SetConductivity(Temperature, Density, Mu, Mu_Turb, Cp);
140156
Kt = ThermalConductivity->GetConductivity();
141157
ThermalConductivity->SetDerConductivity(Temperature, Density, dmudrho_T, dmudT_rho, Cp);
@@ -291,11 +307,10 @@ class CFluidModel {
291307
* \brief Virtual member.
292308
* \param[in] T - Temperature value at the point.
293309
*/
294-
virtual void SetTDState_T(su2double val_Temperature) {}
310+
virtual void SetTDState_T(su2double val_Temperature, const su2double* val_scalars = nullptr) {}
295311

296312
/*!
297313
* \brief Set fluid eddy viscosity provided by a turbulence model needed for computing effective thermal conductivity.
298314
*/
299315
void SetEddyViscosity(su2double val_Mu_Turb) { Mu_Turb = val_Mu_Turb; }
300-
301316
};
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*!
2+
* \file CFluidScalar.hpp
3+
* \brief Defines the multicomponent incompressible Ideal Gas model for mixtures.
4+
* \author T. Economon, Mark Heimgartner, Cristopher Morales Ubal
5+
* \version 7.3.1 "Blackbird"
6+
*
7+
* SU2 Project Website: https://su2code.github.io
8+
*
9+
* The SU2 Project is maintained by the SU2 Foundation
10+
* (http://su2foundation.org)
11+
*
12+
* Copyright 2012-2022, SU2 Contributors (cf. AUTHORS.md)
13+
*
14+
* SU2 is free software; you can redistribute it and/or
15+
* modify it under the terms of the GNU Lesser General Public
16+
* License as published by the Free Software Foundation; either
17+
* version 2.1 of the License, or (at your option) any later version.
18+
*
19+
* SU2 is distributed in the hope that it will be useful,
20+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22+
* Lesser General Public License for more details.
23+
*
24+
* You should have received a copy of the GNU Lesser General Public
25+
* License along with SU2. If not, see <http://www.gnu.org/licenses/>.
26+
*/
27+
28+
#pragma once
29+
#include <memory>
30+
#include <vector>
31+
32+
#include "CFluidModel.hpp"
33+
34+
/*!
35+
* \class CFluidScalar
36+
* \brief Child class for defining an incompressible ideal gas model.
37+
* \author: T. Economon
38+
*/
39+
class CFluidScalar final : public CFluidModel {
40+
private:
41+
unsigned short n_species_mixture; /*!< \brief Number of species in mixture. */
42+
su2double Gas_Constant; /*!< \brief Specific gas constant. */
43+
su2double Gamma; /*!< \brief Ratio of specific heats of the gas. */
44+
su2double Pressure_Thermodynamic; /*!< \brief Constant pressure thermodynamic. */
45+
46+
std::vector<su2double> molarMasses; /*!< \brief Molar masses of all species. */
47+
48+
public:
49+
/*!
50+
* \brief Constructor of the class.
51+
*/
52+
CFluidScalar(su2double val_Cp, su2double val_gas_constant, su2double val_operating_pressure, CConfig* config);
53+
54+
/*!
55+
* \brief Set the Dimensionless State using Temperature.
56+
* \param[in] t - Temperature value at the point.
57+
*/
58+
void SetTDState_T(su2double val_temperature, const su2double* val_scalars) override;
59+
};

SU2_CFD/include/fluid/CIncIdealGas.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class CIncIdealGas final : public CFluidModel {
5454
* \brief Set the Dimensionless State using Temperature.
5555
* \param[in] t - Temperature value at the point.
5656
*/
57-
void SetTDState_T(su2double t) override {
57+
void SetTDState_T(su2double t, const su2double *val_scalars = nullptr) override {
5858
/*--- The EoS only depends upon temperature. ---*/
5959
Temperature = t;
6060
Density = Pressure / (Temperature * Gas_Constant);

SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class CIncIdealGasPolynomial final : public CFluidModel {
6767
* \brief Set the Dimensionless State using Temperature.
6868
* \param[in] t - Temperature value at the point.
6969
*/
70-
void SetTDState_T(su2double t) override {
70+
void SetTDState_T(su2double t, const su2double *val_scalars = nullptr) override {
7171
/* The EoS only depends upon temperature. */
7272
Temperature = t;
7373
Density = Pressure / (Temperature * Gas_Constant);

SU2_CFD/include/variables/CIncNSVariable.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class CIncNSVariable final : public CIncEulerVariable {
104104
/*!
105105
* \brief Set all the primitive variables for incompressible flows
106106
*/
107-
bool SetPrimVar(unsigned long iPoint, su2double eddy_visc, su2double turb_ke, CFluidModel *FluidModel) override;
107+
bool SetPrimVar(unsigned long iPoint, su2double eddy_visc, su2double turb_ke, CFluidModel *FluidModel, const su2double *scalar = nullptr);
108108
using CVariable::SetPrimVar;
109109

110110
/*!

SU2_CFD/obj/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ endif
5151
libSU2Core_sources = ../src/definition_structure.cpp \
5252
../src/fluid/CFluidModel.cpp \
5353
../src/fluid/CIdealGas.cpp \
54+
../src/fluid/CFluidScalar.cpp \
5455
../src/fluid/CPengRobinson.cpp \
5556
../src/fluid/CVanDerWaalsGas.cpp \
5657
../src/fluid/CNEMOGas.cpp \

0 commit comments

Comments
 (0)