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

Removing unnecessary variables for CFluidScalar constructor #2357

Merged
merged 3 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading