Skip to content

Commit

Permalink
Removing unnecessary variables for CFluidScalar constructor (#2357)
Browse files Browse the repository at this point in the history
* cleaning constructor fluid mixture

* formatting
  • Loading branch information
Cristopher-Morales authored Sep 23, 2024
1 parent e9d74fc commit d0e98e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions SU2_CFD/include/fluid/CFluidScalar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class CFluidScalar final : public CFluidModel {
private:
const int n_species_mixture; /*!< \brief Number of species in mixture. */
su2double Gas_Constant; /*!< \brief Specific gas constant. */
const su2double Gamma; /*!< \brief Ratio of specific heats of the gas. */
const su2double Pressure_Thermodynamic; /*!< \brief Constant pressure thermodynamic. */
const su2double GasConstant_Ref; /*!< \brief Gas constant reference needed for Nondimensional problems. */
const su2double Prandtl_Number; /*!< \brief Prandlt number.*/
Expand Down Expand Up @@ -106,7 +105,7 @@ class CFluidScalar final : public CFluidModel {
/*!
* \brief Constructor of the class.
*/
CFluidScalar(su2double val_Cp, su2double val_gas_constant, su2double val_operating_pressure, const CConfig* config);
CFluidScalar(su2double val_operating_pressure, const CConfig* config);

/*!
* \brief Set viscosity model.
Expand Down
5 changes: 1 addition & 4 deletions SU2_CFD/src/fluid/CFluidScalar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@
#include "../../include/fluid/CPolynomialViscosity.hpp"
#include "../../include/fluid/CSutherland.hpp"

CFluidScalar::CFluidScalar(su2double val_Cp, su2double val_gas_constant, su2double value_pressure_operating,
const CConfig* config)
CFluidScalar::CFluidScalar(su2double value_pressure_operating, const CConfig* config)
: CFluidModel(),
n_species_mixture(config->GetnSpecies() + 1),
Gas_Constant(val_gas_constant),
Gamma(config->GetGamma()),
Pressure_Thermodynamic(value_pressure_operating),
GasConstant_Ref(config->GetGas_Constant_Ref()),
Prandtl_Number(config->GetPrandtl_Turb()),
Expand Down
4 changes: 2 additions & 2 deletions SU2_CFD/src/solvers/CIncEulerSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ void CIncEulerSolver::SetNondimensionalization(CConfig *config, unsigned short i

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

Expand Down Expand Up @@ -482,7 +482,7 @@ void CIncEulerSolver::SetNondimensionalization(CConfig *config, unsigned short i
break;

case FLUID_MIXTURE:
fluidModel = new CFluidScalar(Specific_Heat_CpND, Gas_ConstantND, Pressure_ThermodynamicND, config);
fluidModel = new CFluidScalar(Pressure_ThermodynamicND, config);
fluidModel->SetTDState_T(Temperature_FreeStreamND, config->GetSpecies_Init());
break;

Expand Down

0 comments on commit d0e98e1

Please sign in to comment.