Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding thermodynamics pressure as a user value for FLUID_MIXTURE model #1839

Merged
merged 9 commits into from
Dec 8, 2022
2 changes: 2 additions & 0 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,8 @@ void CConfig::SetConfig_Options() {
addDoubleOption("GAS_CONSTANT", Gas_Constant, 287.058);
/*!\brief GAMMA_VALUE \n DESCRIPTION: Ratio of specific heats (1.4 (air), only for compressible flows) \ingroup Config*/
addDoubleOption("GAMMA_VALUE", Gamma, 1.4);
/*!\brief THERMODYNAMIC_PRESSURE \n DESCRIPTION: Thermodynamics(operating) Pressure (101325 Pa), only for incompressible flows) \ingroup Config*/
addDoubleOption("THERMODYNAMIC_PRESSURE", Pressure_Thermodynamic, 101325.0);
Cristopher-Morales marked this conversation as resolved.
Show resolved Hide resolved
/*!\brief CP_VALUE \n DESCRIPTION: Specific heat at constant pressure, Cp (1004.703 J/kg*K (air), constant density incompressible fluids only) \ingroup Config*/
addDoubleListOption("SPECIFIC_HEAT_CP", nSpecific_Heat_Cp, Specific_Heat_Cp);
/*!\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*/
Expand Down
3 changes: 1 addition & 2 deletions SU2_CFD/src/solvers/CIncEulerSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,9 @@ void CIncEulerSolver::SetNondimensionalization(CConfig *config, unsigned short i
case FLUID_MIXTURE:

config->SetGas_Constant(UNIVERSAL_GAS_CONSTANT / (config->GetMolecular_Weight() / 1000.0));
Pressure_Thermodynamic = Density_FreeStream * Temperature_FreeStream * config->GetGas_Constant();
Pressure_Thermodynamic = config->GetPressure_Thermodynamic();
auxFluidModel = new CFluidScalar(config->GetSpecific_Heat_Cp(), config->GetGas_Constant(), Pressure_Thermodynamic, config);
auxFluidModel->SetTDState_T(Temperature_FreeStream, config->GetSpecies_Init());
config->SetPressure_Thermodynamic(Pressure_Thermodynamic);
break;

default:
Expand Down
12 changes: 6 additions & 6 deletions TestCases/parallel_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,7 @@ def main():
species2_primitiveVenturi_mixingmodel.cfg_dir = "species_transport/venturi_primitive_3species"
species2_primitiveVenturi_mixingmodel.cfg_file = "species2_primitiveVenturi_mixingmodel.cfg"
species2_primitiveVenturi_mixingmodel.test_iter = 50
species2_primitiveVenturi_mixingmodel.test_vals = [-5.477173, -4.589710, -4.582462, -5.690334, -0.069005, -5.631182, 5.000000, -1.668297, 5.000000, -4.866834, 5.000000, -1.168385, 0.000425, 0.000404, 0.000021, 0.000000]
species2_primitiveVenturi_mixingmodel.test_vals = [-5.477236, -4.589782, -4.582531, -5.690416, -0.068943, -5.631254, 5.000000, -1.668303, 5.000000, -4.866978, 5.000000, -1.168368, 0.000425, 0.000404, 0.000021, 0.000000]
species2_primitiveVenturi_mixingmodel.new_output = True
test_list.append(species2_primitiveVenturi_mixingmodel)

Expand All @@ -1347,7 +1347,7 @@ def main():
species2_primitiveVenturi_mixingmodel_boundedscalar.cfg_dir = "species_transport/venturi_primitive_3species"
species2_primitiveVenturi_mixingmodel_boundedscalar.cfg_file = "species2_primitiveVenturi_mixingmodel_boundedscalar.cfg"
species2_primitiveVenturi_mixingmodel_boundedscalar.test_iter = 50
species2_primitiveVenturi_mixingmodel_boundedscalar.test_vals = [-5.419758, -4.490843, -4.496264, -5.724852, -0.120393, -5.693152, 5.000000, -1.766881, 5.000000, -4.958352, 5.000000, -2.150266, 0.000300, 0.000300, 0.000000, 0.000000]
species2_primitiveVenturi_mixingmodel_boundedscalar.test_vals = [-5.419823, -4.490921, -4.496340, -5.724950, -0.120331, -5.693224, 5.000000, -1.766882, 5.000000, -4.958487, 5.000000, -2.150247, 0.000300, 0.000300, 0.000000, 0.000000]
species2_primitiveVenturi_mixingmodel_boundedscalar.new_output = True
test_list.append(species2_primitiveVenturi_mixingmodel_boundedscalar)

Expand All @@ -1356,7 +1356,7 @@ def main():
species2_primitiveVenturi_mixingmodel_viscosity.cfg_dir = "species_transport/venturi_primitive_3species"
species2_primitiveVenturi_mixingmodel_viscosity.cfg_file = "species2_primitiveVenturi_mixingmodel_viscosity.cfg"
species2_primitiveVenturi_mixingmodel_viscosity.test_iter = 50
species2_primitiveVenturi_mixingmodel_viscosity.test_vals = [-4.415103, -4.019010, -4.341952, -5.471507, 0.437029, -4.685683, 5.000000, -1.814481, 5.000000, -5.282862, 5.000000, -1.717346, 2.280789, 0.971585, 0.607256, 0.701947]
species2_primitiveVenturi_mixingmodel_viscosity.test_vals = [-4.738778, -4.325766, -4.610914, -5.834431, 0.521730, -4.934375, 5.000000, -1.887191, 5.000000, -5.499917, 5.000000, -1.770845, 2.292904, 0.971941, 0.608500, 0.712464]
species2_primitiveVenturi_mixingmodel_viscosity.new_output = True
test_list.append(species2_primitiveVenturi_mixingmodel_viscosity)

Expand All @@ -1365,7 +1365,7 @@ def main():
species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg_dir = "species_transport/venturi_primitive_3species"
species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg_file = "species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg"
species2_primitiveVenturi_mixingmodel_heatcapacity_H2.test_iter = 50
species2_primitiveVenturi_mixingmodel_heatcapacity_H2.test_vals = [-6.119300, -4.997334, -4.886952, -7.382047, 2.439615, -5.627780, 30.000000, -5.723010, 12.000000, -8.145296, 9.000000, -8.075817, 2.084563, 1.000000, 0.600000, 0.484563]
species2_primitiveVenturi_mixingmodel_heatcapacity_H2.test_vals = [-6.105905, -4.979417, -4.870704, -7.338344, 2.435662, -5.621107, 30.000000, -5.737172, 12.000000, -8.148164, 9.000000, -8.040415, 2.084589, 1.000000, 0.600000, 0.484589]
species2_primitiveVenturi_mixingmodel_heatcapacity_H2.su2_exec = "mpirun -n 2 SU2_CFD"
species2_primitiveVenturi_mixingmodel_heatcapacity_H2.timeout = 1600
species2_primitiveVenturi_mixingmodel_heatcapacity_H2.new_output = True
Expand All @@ -1377,7 +1377,7 @@ def main():
species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg_dir = "species_transport/venturi_primitive_3species"
species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg_file = "species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg"
species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.test_iter = 50
species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.test_vals = [-5.725157, -5.302154, -5.191782, -8.385791, 2.134792, -5.233618, 30.000000, -5.722966, 12.000000, -8.145150, 9.000000, -8.075867, 2.084565, 1.000000, 0.600000, 0.484565]
species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.test_vals = [-5.711760, -5.284237, -5.175532, -8.342082, 2.130839, -5.226944, 30.000000, -5.737157, 12.000000, -8.148020, 9.000000, -8.040460, 2.084591, 1.000000, 0.600000, 0.484591]
species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.su2_exec = "mpirun -n 2 SU2_CFD"
species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.timeout = 1600
species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.new_output = True
Expand Down Expand Up @@ -1427,7 +1427,7 @@ def main():
species3_multizone_restart.cfg_dir = "species_transport/multizone"
species3_multizone_restart.cfg_file = "configMaster.cfg"
species3_multizone_restart.test_iter = 5
species3_multizone_restart.test_vals = [-4.773393, -4.254100]
species3_multizone_restart.test_vals = [-7.169637, -6.381576]
species3_multizone_restart.new_output = True
species3_multizone_restart.multizone = True
test_list.append(species3_multizone_restart)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ INC_NONDIM= DIMENSIONAL
%
FLUID_MODEL= FLUID_MIXTURE
%
THERMODYNAMIC_PRESSURE= 101325.0
%
MOLECULAR_WEIGHT= 28.96, 16.043
%
SPECIFIC_HEAT_CP = 1009.39, 1009.39
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ INC_NONDIM= DIMENSIONAL
%
FLUID_MODEL= FLUID_MIXTURE
%
THERMODYNAMIC_PRESSURE= 101325.0
%
MOLECULAR_WEIGHT= 28.96, 16.043
%
SPECIFIC_HEAT_CP = 1009.39, 1009.39
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ INC_NONDIM= DIMENSIONAL
%
FLUID_MODEL= FLUID_MIXTURE
%
THERMODYNAMIC_PRESSURE= 101325.0
%
MOLECULAR_WEIGHT= 2.01588, 28.960
%
SPECIFIC_HEAT_CP = 14310, 1009.39
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ INC_NONDIM= INITIAL_VALUES
%
FLUID_MODEL= FLUID_MIXTURE
%
THERMODYNAMIC_PRESSURE= 101325.0
%
MOLECULAR_WEIGHT= 2.01588, 28.960
%
SPECIFIC_HEAT_CP = 14310, 1009.39
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ INC_NONDIM= DIMENSIONAL
%
FLUID_MODEL= FLUID_MIXTURE
%
THERMODYNAMIC_PRESSURE= 101325.0
%
MOLECULAR_WEIGHT= 16.043, 28.960
%
SPECIFIC_HEAT_CP = 2224.43, 1009.39
Expand Down
3 changes: 3 additions & 0 deletions config_template.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ CRITICAL_PRESSURE= 3588550.0
% Acentri factor (0.035 (air))
ACENTRIC_FACTOR= 0.035
%
% Thermodynamics(operating) Pressure (101325 Pa default value, only for incompressible flow and FLUID_MIXTURE)
THERMODYNAMIC_PRESSURE= 101325.0
%
% Specific heat at constant pressure, Cp (1004.703 J/kg*K (air)).
% Incompressible fluids with energy eqn. (CONSTANT_DENSITY, INC_IDEAL_GAS) and the heat equation.
SPECIFIC_HEAT_CP= 1004.703
Expand Down