Skip to content

Commit 2514914

Browse files
Adding thermodynamics pressure as a user value for FLUID_MIXTURE model (#1839)
* adding thermodynamics pressure option * updating residuals * updating residual species mixingmodel_viscosity * updating restart test case * updating residuals restart * addressing comments * updating config template and test cases
1 parent 64c188d commit 2514914

9 files changed

Lines changed: 22 additions & 8 deletions

Common/src/CConfig.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,8 @@ void CConfig::SetConfig_Options() {
11611161
addDoubleOption("GAS_CONSTANT", Gas_Constant, 287.058);
11621162
/*!\brief GAMMA_VALUE \n DESCRIPTION: Ratio of specific heats (1.4 (air), only for compressible flows) \ingroup Config*/
11631163
addDoubleOption("GAMMA_VALUE", Gamma, 1.4);
1164+
/*!\brief THERMODYNAMIC_PRESSURE \n DESCRIPTION: Thermodynamics(operating) Pressure (101325 Pa), only for incompressible flows) \ingroup Config*/
1165+
addDoubleOption("THERMODYNAMIC_PRESSURE", Pressure_Thermodynamic, 101325.0);
11641166
/*!\brief CP_VALUE \n DESCRIPTION: Specific heat at constant pressure, Cp (1004.703 J/kg*K (air), constant density incompressible fluids only) \ingroup Config*/
11651167
addDoubleListOption("SPECIFIC_HEAT_CP", nSpecific_Heat_Cp, Specific_Heat_Cp);
11661168
/*!\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*/

SU2_CFD/src/solvers/CIncEulerSolver.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,9 @@ void CIncEulerSolver::SetNondimensionalization(CConfig *config, unsigned short i
328328
case FLUID_MIXTURE:
329329

330330
config->SetGas_Constant(UNIVERSAL_GAS_CONSTANT / (config->GetMolecular_Weight() / 1000.0));
331-
Pressure_Thermodynamic = Density_FreeStream * Temperature_FreeStream * config->GetGas_Constant();
331+
Pressure_Thermodynamic = config->GetPressure_Thermodynamic();
332332
auxFluidModel = new CFluidScalar(config->GetSpecific_Heat_Cp(), config->GetGas_Constant(), Pressure_Thermodynamic, config);
333333
auxFluidModel->SetTDState_T(Temperature_FreeStream, config->GetSpecies_Init());
334-
config->SetPressure_Thermodynamic(Pressure_Thermodynamic);
335334
break;
336335

337336
default:

TestCases/parallel_regression.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,7 @@ def main():
13381338
species2_primitiveVenturi_mixingmodel.cfg_dir = "species_transport/venturi_primitive_3species"
13391339
species2_primitiveVenturi_mixingmodel.cfg_file = "species2_primitiveVenturi_mixingmodel.cfg"
13401340
species2_primitiveVenturi_mixingmodel.test_iter = 50
1341-
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]
1341+
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]
13421342
species2_primitiveVenturi_mixingmodel.new_output = True
13431343
test_list.append(species2_primitiveVenturi_mixingmodel)
13441344

@@ -1347,7 +1347,7 @@ def main():
13471347
species2_primitiveVenturi_mixingmodel_boundedscalar.cfg_dir = "species_transport/venturi_primitive_3species"
13481348
species2_primitiveVenturi_mixingmodel_boundedscalar.cfg_file = "species2_primitiveVenturi_mixingmodel_boundedscalar.cfg"
13491349
species2_primitiveVenturi_mixingmodel_boundedscalar.test_iter = 50
1350-
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]
1350+
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]
13511351
species2_primitiveVenturi_mixingmodel_boundedscalar.new_output = True
13521352
test_list.append(species2_primitiveVenturi_mixingmodel_boundedscalar)
13531353

@@ -1356,7 +1356,7 @@ def main():
13561356
species2_primitiveVenturi_mixingmodel_viscosity.cfg_dir = "species_transport/venturi_primitive_3species"
13571357
species2_primitiveVenturi_mixingmodel_viscosity.cfg_file = "species2_primitiveVenturi_mixingmodel_viscosity.cfg"
13581358
species2_primitiveVenturi_mixingmodel_viscosity.test_iter = 50
1359-
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]
1359+
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]
13601360
species2_primitiveVenturi_mixingmodel_viscosity.new_output = True
13611361
test_list.append(species2_primitiveVenturi_mixingmodel_viscosity)
13621362

@@ -1365,7 +1365,7 @@ def main():
13651365
species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg_dir = "species_transport/venturi_primitive_3species"
13661366
species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg_file = "species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg"
13671367
species2_primitiveVenturi_mixingmodel_heatcapacity_H2.test_iter = 50
1368-
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]
1368+
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]
13691369
species2_primitiveVenturi_mixingmodel_heatcapacity_H2.su2_exec = "mpirun -n 2 SU2_CFD"
13701370
species2_primitiveVenturi_mixingmodel_heatcapacity_H2.timeout = 1600
13711371
species2_primitiveVenturi_mixingmodel_heatcapacity_H2.new_output = True
@@ -1377,7 +1377,7 @@ def main():
13771377
species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg_dir = "species_transport/venturi_primitive_3species"
13781378
species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg_file = "species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg"
13791379
species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.test_iter = 50
1380-
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]
1380+
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]
13811381
species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.su2_exec = "mpirun -n 2 SU2_CFD"
13821382
species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.timeout = 1600
13831383
species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.new_output = True
@@ -1427,7 +1427,7 @@ def main():
14271427
species3_multizone_restart.cfg_dir = "species_transport/multizone"
14281428
species3_multizone_restart.cfg_file = "configMaster.cfg"
14291429
species3_multizone_restart.test_iter = 5
1430-
species3_multizone_restart.test_vals = [-4.773393, -4.254100]
1430+
species3_multizone_restart.test_vals = [-7.169637, -6.381576]
14311431
species3_multizone_restart.new_output = True
14321432
species3_multizone_restart.multizone = True
14331433
test_list.append(species3_multizone_restart)

TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ INC_NONDIM= DIMENSIONAL
3232
%
3333
FLUID_MODEL= FLUID_MIXTURE
3434
%
35+
THERMODYNAMIC_PRESSURE= 101325.0
36+
%
3537
MOLECULAR_WEIGHT= 28.96, 16.043
3638
%
3739
SPECIFIC_HEAT_CP = 1009.39, 1009.39

TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_boundedscalar.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ INC_NONDIM= DIMENSIONAL
3232
%
3333
FLUID_MODEL= FLUID_MIXTURE
3434
%
35+
THERMODYNAMIC_PRESSURE= 101325.0
36+
%
3537
MOLECULAR_WEIGHT= 28.96, 16.043
3638
%
3739
SPECIFIC_HEAT_CP = 1009.39, 1009.39

TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ INC_NONDIM= DIMENSIONAL
3333
%
3434
FLUID_MODEL= FLUID_MIXTURE
3535
%
36+
THERMODYNAMIC_PRESSURE= 101325.0
37+
%
3638
MOLECULAR_WEIGHT= 2.01588, 28.960
3739
%
3840
SPECIFIC_HEAT_CP = 14310, 1009.39

TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ INC_NONDIM= INITIAL_VALUES
3434
%
3535
FLUID_MODEL= FLUID_MIXTURE
3636
%
37+
THERMODYNAMIC_PRESSURE= 101325.0
38+
%
3739
MOLECULAR_WEIGHT= 2.01588, 28.960
3840
%
3941
SPECIFIC_HEAT_CP = 14310, 1009.39

TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_viscosity.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ INC_NONDIM= DIMENSIONAL
3232
%
3333
FLUID_MODEL= FLUID_MIXTURE
3434
%
35+
THERMODYNAMIC_PRESSURE= 101325.0
36+
%
3537
MOLECULAR_WEIGHT= 16.043, 28.960
3638
%
3739
SPECIFIC_HEAT_CP = 2224.43, 1009.39

config_template.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,9 @@ CRITICAL_PRESSURE= 3588550.0
337337
% Acentri factor (0.035 (air))
338338
ACENTRIC_FACTOR= 0.035
339339
%
340+
% Thermodynamics(operating) Pressure (101325 Pa default value, only for incompressible flow and FLUID_MIXTURE)
341+
THERMODYNAMIC_PRESSURE= 101325.0
342+
%
340343
% Specific heat at constant pressure, Cp (1004.703 J/kg*K (air)).
341344
% Incompressible fluids with energy eqn. (CONSTANT_DENSITY, INC_IDEAL_GAS) and the heat equation.
342345
SPECIFIC_HEAT_CP= 1004.703

0 commit comments

Comments
 (0)