Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 989
Composition-dependent density model for variable density incompressible flow #1620
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
Merged
Merged
Changes from all commits
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
8a21ffc
13-04-2022 adding FUID_MIXTURE
114d616
update thursday 14-04-2022
7b07934
21-04-2022 CFluiscalar based on IncIdealGas
5c42c60
21-04-2022 adding viscosity and thermal conductivity
cf9e8f5
22-04-2022 compiles and run for more than one species, but still not …
8ad117d
mixing density working 26-04-22
9fb5a44
29-04-2022 cleaning up and compiling
c970543
29-04-22
e8d75bc
Merge branch 'develop' into feature_mixturedensity
bigfooted 5932361
Update Common/src/CConfig.cpp
Cristopher-Morales 5bd4b96
Update Common/include/CConfig.hpp
Cristopher-Morales 8e8a71d
10-05-2022 fix comments
095c649
Merge branch 'feature_mixturedensity' of https://github.com/su2code/S…
750fe43
Merge branch 'develop' into feature_mixturedensity
69ba724
10-05-2022 removingSchmidth files
f49c522
10-05-2022 checking density model
cc1b1bd
Update Common/include/CConfig.hpp
Cristopher-Morales b44f2a1
Update Common/include/option_structure.hpp
Cristopher-Morales 37ee38b
Update Common/src/CConfig.cpp
Cristopher-Morales 9b77e36
Update Common/src/CConfig.cpp
Cristopher-Morales 9b776bb
Update SU2_CFD/include/fluid/CDiffusivityModel.hpp
Cristopher-Morales 494aa70
Update SU2_CFD/src/solvers/CIncNSSolver.cpp
Cristopher-Morales 9975371
Update SU2_CFD/src/solvers/CIncNSSolver.cpp
Cristopher-Morales f168611
Update SU2_CFD/src/variables/CIncNSVariable.cpp
Cristopher-Morales 67a8f29
Update SU2_CFD/src/variables/CIncNSVariable.cpp
Cristopher-Morales ee67187
13-05-2022 cleaning
ce36ac6
13-05-2022 Cleaning
779069d
Update SU2_CFD/include/fluid/CDiffusivityModel.hpp
Cristopher-Morales 790293f
Update SU2_CFD/include/fluid/CDiffusivityModel.hpp
Cristopher-Morales b6969ab
Update SU2_CFD/include/fluid/CFluidScalar.hpp
Cristopher-Morales bbf8d9c
Update SU2_CFD/include/fluid/CFluidModel.hpp
Cristopher-Morales 0ee2f69
Update SU2_CFD/include/fluid/CFluidModel.hpp
Cristopher-Morales e29304c
Update SU2_CFD/include/fluid/CFluidModel.hpp
Cristopher-Morales 91044a7
Update SU2_CFD/include/fluid/CFluidModel.hpp
Cristopher-Morales 231aff8
Update SU2_CFD/src/fluid/CFluidScalar.cpp
Cristopher-Morales bc89e4b
Update SU2_CFD/include/fluid/CFluidScalar.hpp
Cristopher-Morales 38796a8
Update SU2_CFD/include/fluid/CFluidScalar.hpp
Cristopher-Morales af85f27
Update SU2_CFD/include/fluid/CFluidScalar.hpp
Cristopher-Morales 7be74f1
Update SU2_CFD/include/fluid/CFluidModel.hpp
Cristopher-Morales aaac72a
23-05-22 removing include not needed
87fd098
Update SU2_CFD/src/fluid/CFluidScalar.cpp
Cristopher-Morales 056374c
24-05-2022 adding parallel_regression test
8e7aef6
removing comment
5012abd
Merge branch 'develop' into feature_mixturedensity
Cristopher-Morales 441071d
merge with develop
961f2f1
removing unnecesary variables
0bf3bab
Update SU2_CFD/src/fluid/CFluidScalar.cpp
Cristopher-Morales fb71656
Update Common/src/CConfig.cpp
Cristopher-Morales e475757
Update Common/src/CConfig.cpp
Cristopher-Morales f34209c
Update Common/include/CConfig.hpp
Cristopher-Morales a3e369a
Update Common/include/CConfig.hpp
Cristopher-Morales 0661b4c
Update Common/include/CConfig.hpp
Cristopher-Morales 70be9d0
Update Common/include/option_structure.hpp
Cristopher-Morales b5f5d5d
cleaning Csolverfactory
5f1be93
cleaning solver
389cb0a
Update Common/src/CConfig.cpp
Cristopher-Morales fca4b85
Update SU2_CFD/include/fluid/CFluidModel.hpp
Cristopher-Morales 871fcb7
Update SU2_CFD/src/solvers/CIncEulerSolver.cpp
Cristopher-Morales 0d9690e
Update SU2_CFD/src/solvers/CIncEulerSolver.cpp
Cristopher-Morales 2565f85
Update SU2_CFD/include/fluid/CFluidModel.hpp
Cristopher-Morales d3d8844
Update SU2_CFD/src/solvers/CIncEulerSolver.cpp
Cristopher-Morales 9dbc223
Update SU2_CFD/src/fluid/CFluidScalar.cpp
Cristopher-Morales 60ed912
Merge branch 'develop' into feature_mixturedensity
Cristopher-Morales 99a207b
cleaning CfluidScalar .hpp and .cpp
4f4ba9b
fixing clang-format
1809c3c
fixing test case parallel_regression
f024fcb
test case fixed
5573caf
Merge branch 'develop' into feature_mixturedensity
Cristopher-Morales 95ba0b8
clang-formatfluidmodel and fluidscalar
f940292
clang-format fluidmodel and scalar
5258f42
removing bools wilke and davidson
a2f682e
Merge branch 'develop' into feature_mixturedensity
Cristopher-Morales 98c61f0
adding explanaction test and config_template.cfg files
9dd6ea1
Merge branch 'develop' into feature_mixturedensity
Cristopher-Morales 2b048b1
removing CDiffusivityModel.hpp file
83ab514
Update SU2_CFD/include/fluid/CFluidScalar.hpp
Cristopher-Morales 5281887
Update SU2_CFD/src/fluid/CFluidScalar.cpp
Cristopher-Morales 7344cba
Update Common/include/CConfig.hpp
Cristopher-Morales 4776aec
Update Common/include/CConfig.hpp
Cristopher-Morales 0e404e3
clang-format
d593eb3
Update TestCases/parallel_regression.py
Cristopher-Morales 3a73f6d
Update TestCases/species_transport/venturi_primitive_3species/species…
Cristopher-Morales 2c0d6c1
Merge branch 'develop' into feature_mixturedensity
Cristopher-Morales File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| /*! | ||
| * \file CFluidScalar.hpp | ||
| * \brief Defines the multicomponent incompressible Ideal Gas model for mixtures. | ||
| * \author T. Economon, Mark Heimgartner, Cristopher Morales Ubal | ||
| * \version 7.3.1 "Blackbird" | ||
| * | ||
| * SU2 Project Website: https://su2code.github.io | ||
| * | ||
| * The SU2 Project is maintained by the SU2 Foundation | ||
| * (http://su2foundation.org) | ||
| * | ||
| * Copyright 2012-2022, SU2 Contributors (cf. AUTHORS.md) | ||
| * | ||
| * SU2 is free software; you can redistribute it and/or | ||
| * modify it under the terms of the GNU Lesser General Public | ||
| * License as published by the Free Software Foundation; either | ||
| * version 2.1 of the License, or (at your option) any later version. | ||
| * | ||
| * SU2 is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| * Lesser General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Lesser General Public | ||
| * License along with SU2. If not, see <http://www.gnu.org/licenses/>. | ||
| */ | ||
|
|
||
| #pragma once | ||
| #include <memory> | ||
| #include <vector> | ||
|
|
||
| #include "CFluidModel.hpp" | ||
|
|
||
| /*! | ||
| * \class CFluidScalar | ||
| * \brief Child class for defining an incompressible ideal gas model. | ||
| * \author: T. Economon | ||
| */ | ||
| class CFluidScalar final : public CFluidModel { | ||
| private: | ||
| unsigned short n_species_mixture; /*!< \brief Number of species in mixture. */ | ||
| su2double Gas_Constant; /*!< \brief Specific gas constant. */ | ||
| su2double Gamma; /*!< \brief Ratio of specific heats of the gas. */ | ||
| su2double Pressure_Thermodynamic; /*!< \brief Constant pressure thermodynamic. */ | ||
|
|
||
| std::vector<su2double> molarMasses; /*!< \brief Molar masses of all species. */ | ||
|
|
||
| public: | ||
| /*! | ||
| * \brief Constructor of the class. | ||
| */ | ||
| CFluidScalar(su2double val_Cp, su2double val_gas_constant, su2double val_operating_pressure, CConfig* config); | ||
|
|
||
| /*! | ||
| * \brief Set the Dimensionless State using Temperature. | ||
| * \param[in] t - Temperature value at the point. | ||
| */ | ||
| void SetTDState_T(su2double val_temperature, const su2double* val_scalars) override; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| /*! | ||
| * \file CFluidScalar.hpp | ||
| * \brief Defines the multicomponent incompressible Ideal Gas model for mixtures. | ||
| * \author T. Economon, Mark Heimgartner, Cristopher Morales Ubal | ||
| * \version 7.3.1 "Blackbird" | ||
| * | ||
| * SU2 Project Website: https://su2code.github.io | ||
| * | ||
| * The SU2 Project is maintained by the SU2 Foundation | ||
| * (http://su2foundation.org) | ||
| * | ||
| * Copyright 2012-2022, SU2 Contributors (cf. AUTHORS.md) | ||
| * | ||
| * SU2 is free software; you can redistribute it and/or | ||
| * modify it under the terms of the GNU Lesser General Public | ||
| * License as published by the Free Software Foundation; either | ||
| * version 2.1 of the License, or (at your option) any later version. | ||
| * | ||
| * SU2 is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| * Lesser General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Lesser General Public | ||
| * License along with SU2. If not, see <http://www.gnu.org/licenses/>. | ||
| */ | ||
|
|
||
| #include "../../include/fluid/CFluidScalar.hpp" | ||
|
|
||
| #include <math.h> | ||
|
|
||
| #include <cmath> | ||
| #include <iostream> | ||
| #include <numeric> | ||
| #include <vector> | ||
|
|
||
| CFluidScalar::CFluidScalar(su2double val_Cp, su2double val_gas_constant, const su2double value_pressure_operating, | ||
| CConfig* config) | ||
| : CFluidModel() { | ||
| n_species_mixture = config->GetnSpecies() + 1; | ||
|
|
||
| molarMasses.resize(n_species_mixture); | ||
|
|
||
| for (int iVar = 0; iVar < n_species_mixture; iVar++) { | ||
| molarMasses[iVar] = config->GetMolecular_Weight(iVar); | ||
| } | ||
|
|
||
| Pressure_Thermodynamic = value_pressure_operating; | ||
| Gas_Constant = val_gas_constant; | ||
| Gamma = 1.0; | ||
| Cp = val_Cp; | ||
| Cv = Cp; | ||
| SetLaminarViscosityModel(config); | ||
| SetThermalConductivityModel(config); | ||
| } | ||
|
|
||
| void CFluidScalar::SetTDState_T(su2double val_temperature, const su2double* val_scalars) { | ||
| const su2double MeanMolecularWeight = ComputeMeanMolecularWeight(molarMasses, val_scalars); | ||
| Density = Pressure_Thermodynamic / ((val_temperature * UNIVERSAL_GAS_CONSTANT / MeanMolecularWeight)); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
You can’t perform that action at this time.

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
n_species was introduced by @TobiKattmann for the species solver, but we actually use nSpecies already defined by the nemo variables. That's why it was decided to remove n_species and continue using nSpecies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Yeah I guess when I started I didnt want to deal with any possible side-effects in the dev-phase and forgot to remove it afterwards. Thanks for taking care