Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
4f83045
Add flamelet model.
Nov 16, 2020
b49b101
Fix file modes.
danielmayer Nov 16, 2020
07cad06
danielmayer Jan 6, 2021
1e4e6bd
danielmayer Jan 8, 2021
6abbe55
danielmayer Jan 25, 2021
d3d1b0a
merge branch 'develop' into branch 'feature_flamelet'
danielmayer Jan 25, 2021
58951ce
fix delete for nonreacting
bigfooted Feb 19, 2021
4966f8d
Fix some merge issues; code does not run at this point
danielmayer Feb 22, 2021
8de2e0c
danielmayer Feb 22, 2021
9a6fcb9
fix turbulent scalar
bigfooted Feb 28, 2021
b98db5d
remove vscode file
bigfooted Feb 28, 2021
7a50ac9
update with recent commits
bigfooted Feb 28, 2021
669eca8
update with recent commits
bigfooted Feb 28, 2021
08233b8
Merge commit '5cb9f710ba35f12f32e407537a42ca47fb4d3c0e' into feature_…
bigfooted Feb 28, 2021
90f55b2
Merge commit '99b07fb' into feature_flamelet
bigfooted Mar 1, 2021
f69150c
update with recent commits 3
bigfooted Mar 1, 2021
3035d0a
update with recent commits 4
bigfooted Mar 1, 2021
ad1ebad
update with recent commits 5
bigfooted Mar 1, 2021
6d6b8f0
Merge commit '1f2eb89' into feature_flamelet
bigfooted Mar 1, 2021
7069fec
Merge commit '1892518d36a1279ad7f7da82da098842e57493d6' into feature_…
bigfooted Mar 1, 2021
22ee635
update with recent commits 6
bigfooted Mar 1, 2021
dfeefd0
Merge commit 'defcfe7721ebba5e56e19e43a2c35f43c2eafcf4' into feature_…
bigfooted Mar 1, 2021
90f61d0
update with recent commits 7
bigfooted Mar 1, 2021
d9ca3cc
Merge commit '813ff067f109a874e8336f5e852aaab0f2cdff0b' into feature_…
bigfooted Mar 1, 2021
72bb19a
Merge commit '72f1ff6082d5c197f3759ee6f7e655697d1fde0d' into feature_…
bigfooted Mar 1, 2021
dd9ec9e
Merge commit '30b255448b0664ac6dc9ae2e33766ee48a7c33a6' into feature_…
bigfooted Mar 1, 2021
2b369cd
Merge commit 'ce044585e045f2ec66a03338863f2e8fafa2ad78' into feature_…
bigfooted Mar 1, 2021
711adce
Merge commit '5bad047648d175db86a803b36549350e849288e3' into feature_…
bigfooted Mar 1, 2021
c79f9f6
update with recent commits 9
bigfooted Mar 1, 2021
583efa1
Merge commit 'c008fd4b48247def758c138f819553a06a42a5ba' into feature_…
bigfooted Mar 1, 2021
ec62b42
Merge commit 'dec8abf1e68b1c360c1d850a805c2887cb1a7d05' into feature_…
bigfooted Mar 1, 2021
446656e
Merge commit '407af276f2140725b0c780d1407aaa6239a7db89' into feature_…
bigfooted Mar 1, 2021
fded0eb
update with recent commits 10
bigfooted Mar 2, 2021
c76f487
Merge commit '0674539af81be1c40b9c5abbf27de4529d9693b3' into feature_…
bigfooted Mar 2, 2021
911ee72
Merge commit '19e58e26b062eb1a955125461b4c3db81e97c584' into feature_…
bigfooted Mar 2, 2021
948b3ca
Merge commit '67554857fbfb6b96f93d215e167894ebeb64f914' into feature_…
bigfooted Mar 2, 2021
cff5b31
Merge branch 'develop' into feature_flamelet
bigfooted Mar 2, 2021
42c2e43
danielmayer Mar 2, 2021
b577098
danielmayer Mar 3, 2021
5e6a849
danielmayer Mar 4, 2021
3573426
danielmayer Mar 4, 2021
598d46c
fix energy equation for flamelets
bigfooted Mar 4, 2021
bff31fa
small fix for flamelet energy
bigfooted Mar 4, 2021
7116325
fix for flamelet energy residual
bigfooted Mar 5, 2021
8729d6a
added passive scalar to adjoint output
bigfooted Mar 7, 2021
b8fcdf3
merge with develop
bigfooted Mar 10, 2021
243cae1
merge with develop
bigfooted Mar 10, 2021
a5aea11
merge with develop
bigfooted Mar 10, 2021
a6ad4fe
fix scalar_var_i names
bigfooted Mar 10, 2021
0adb8e3
update scalar_sources
bigfooted Mar 11, 2021
f3f483c
update scalar_convection
bigfooted Mar 11, 2021
560a75f
mighty morphin of cscalar
bigfooted Mar 11, 2021
dfa956d
Power ranger update
bigfooted Mar 11, 2021
07a747b
danielmayer Mar 11, 2021
cc6fa90
Merge remote-tracking branch 'github/feature_flamelet' into feature_f…
danielmayer Mar 11, 2021
fab5935
fix scalar muscl scheme
bigfooted Mar 12, 2021
8cea62e
remove setprimitive
bigfooted Mar 12, 2021
1d79f1f
Merge remote-tracking branch 'github/feature_flamelet' into feature_f…
danielmayer Mar 12, 2021
2c5c10e
fix small things for transported scalar and added turbulent diffusion…
bigfooted Mar 14, 2021
fbed140
Merge remote-tracking branch 'github/feature_flamelet' into feature_f…
danielmayer Mar 17, 2021
bc5881c
danielmayer Apr 21, 2021
b52033b
Marry Flamelet and CHT models.
danielmayer Apr 28, 2021
ced9f51
update CHT + combustion with recent commits
bigfooted May 3, 2021
bb955eb
danielmayer May 11, 2021
eaa39da
Disable geo constraints; add temp objective
danielmayer Jul 28, 2021
edd2d0b
danielmayer Jul 28, 2021
307ea76
danielmayer Jul 29, 2021
678c4aa
danielmayer Jul 29, 2021
ac4a391
danielmayer Jul 30, 2021
43d0c47
danielmayer Aug 2, 2021
f20bde2
danielmayer Aug 3, 2021
df8709b
danielmayer Aug 3, 2021
9db7c20
danielmayer Aug 3, 2021
3a744b5
Fix even more OMP stuff...
danielmayer Aug 3, 2021
938cbae
Create structe to add regression test in own file for feature_flamelet.
TobiKattmann Aug 12, 2021
64fb2fe
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Aug 12, 2021
9a5b04d
One should stage resolved merge conflicts as well ...
TobiKattmann Aug 12, 2021
31e084e
STL writer test fails here because it depends on restart_flow that is…
TobiKattmann Aug 12, 2021
c8467ac
Fix slinc_steady serial_regression case.
TobiKattmann Aug 12, 2021
3e9544f
This hopefully fixes most of the failing python regression tests.
TobiKattmann Aug 12, 2021
2281054
Fix another problem in pyhton scripts.
TobiKattmann Aug 12, 2021
c3fd371
Showcasing my miraculous python problem solving skillz.
TobiKattmann Aug 12, 2021
66c66dc
Create CUSTOM group for CUSTOM ObjFunc to not pollute directdiff outp…
TobiKattmann Aug 12, 2021
96ba7c2
Catch pyhton error due to prior try-catch introduction.
TobiKattmann Aug 12, 2021
a136968
Wrap another python call in try-except block to make regression tests…
TobiKattmann Aug 13, 2021
61a02ca
Give AVG_<species> thier own output group to make regression tests run.
TobiKattmann Aug 13, 2021
e6c339c
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Aug 13, 2021
71845a5
Fix silent merge conflict.
TobiKattmann Aug 13, 2021
69b1e7c
Remove AVG_TEMP which is redundant to SURFACE_STATIC_TEMPERATURE.
TobiKattmann Aug 13, 2021
715a5c9
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Aug 16, 2021
f4e5843
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Aug 17, 2021
c59b368
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Aug 23, 2021
2fd59da
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Aug 25, 2021
06319a7
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Aug 31, 2021
3312934
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Aug 31, 2021
f4c8c2a
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Sep 8, 2021
ecb1154
Fix the solver restarts, especially for turb+scalar combined.
TobiKattmann Sep 8, 2021
ea2ae95
Merge branch 'feature_flamelet' of https://github.com/su2code/SU2 int…
TobiKattmann Sep 8, 2021
989e982
fix density term in scalar solver, fix small things
Sep 9, 2021
19989df
Fix restarts with scalar and turb for the adjoint run.
TobiKattmann Sep 10, 2021
17f56aa
Fix FGMRES failing for Adjont runs
TobiKattmann Sep 10, 2021
05e6bca
Revert "fix density term in scalar solver, fix small things"
TobiKattmann Sep 14, 2021
ea272bd
Merge branch 'feature_flamelet' of https://github.com/su2code/SU2 int…
TobiKattmann Sep 14, 2021
5feb70f
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Sep 15, 2021
f0a8463
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Sep 16, 2021
b195ab8
Fix pseudo time update, conv Jacobians, diff Jacobians.
TobiKattmann Aug 26, 2021
7b09faf
Change missing axisymetric jacobian contribution.
TobiKattmann Aug 30, 2021
49af5be
Update axisymmetric contribution for Species Solver.
TobiKattmann Sep 16, 2021
4c60e92
Fix Jacobian for species axisymetric source.
TobiKattmann Sep 16, 2021
714e0dc
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Sep 21, 2021
cccd793
Rename scalar files to scalarLegacy to avoid files with the same name.
TobiKattmann Sep 23, 2021
e5123cc
Rename AddClippedSolution because #1330 adds a new implemetation.
TobiKattmann Sep 23, 2021
ff0e922
Rename CNumerics ScalarVar(_Grad) by adding Legacy to it.
TobiKattmann Sep 23, 2021
11584a5
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Sep 23, 2021
77e60e1
Remove AddClippedSolutionLegacy.
TobiKattmann Sep 23, 2021
55539da
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Sep 29, 2021
03d81ff
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Oct 2, 2021
f2ed2d9
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Oct 6, 2021
4a1d5ca
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Oct 8, 2021
bde7819
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Oct 13, 2021
7595a35
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Oct 13, 2021
40f1ca2
Merge branch 'develop' into feature_flamelet
TobiKattmann Oct 19, 2021
11d83df
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Oct 19, 2021
1e71192
Merge branch 'feature_flamelet' of https://github.com/su2code/SU2 int…
TobiKattmann Oct 19, 2021
48bdaf1
Merge remote-tracking branch 'origin/develop' into feature_flamelet
TobiKattmann Oct 22, 2021
513262c
adding regression test for laminar premixed flamelet
Oct 25, 2021
3b0622a
fix bug with flamelet initial condition
Oct 25, 2021
dc4dddc
fix bug with axisymmetry that caused flamelet approach to crash, fixe…
Oct 27, 2021
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
6 changes: 4 additions & 2 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ jobs:
strategy:
fail-fast: false
matrix:
testscript: ['tutorials.py', 'parallel_regression.py', 'parallel_regression_AD.py', 'serial_regression.py', 'serial_regression_AD.py', 'hybrid_regression.py', 'hybrid_regression_AD.py']
testscript: ['tutorials.py', 'parallel_regression.py', 'flamelet_regression.py', 'parallel_regression_AD.py', 'serial_regression.py', 'serial_regression_AD.py', 'hybrid_regression.py']
include:
- testscript: 'tutorials.py'
tag: MPI
- testscript: 'parallel_regression.py'
tag: MPI
- testscript: 'flamelet_regression.py'
tag: MPI
- testscript: 'parallel_regression_AD.py'
tag: MPI
- testscript: 'serial_regression.py'
Expand All @@ -90,7 +92,7 @@ jobs:
uses: docker://su2code/test-su2:20200303
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
args: -b ${{github.ref}} -t develop -c feature_flamelet -s ${{matrix.testscript}}
unit_tests:
runs-on: ubuntu-latest
name: Unit Tests
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,10 @@ build/
# ninja binary (build system)
ninja

<<<<<<< HEAD
# vscode config files
.vscode/*
=======
# Ignore vscode folder
.vscode/
>>>>>>> develop
344 changes: 339 additions & 5 deletions Common/include/CConfig.hpp

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions Common/include/grid_movement/CSurfaceMovement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,15 @@ class CSurfaceMovement : public CGridMovement {
*/
void CheckFFDDimension(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, unsigned short iFFDBox);

/*!
* \brief Check the geometrical constraints of the FFD
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
* \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
* \param[in] iFFDBox - Index of FFD box.
*/
void CheckGeomConstr(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, unsigned short iFFDBox);

/*!
* \brief Set the Parametric coordinates.
* \param[in] geometry - Geometrical definition of the problem.
Expand Down
9 changes: 9 additions & 0 deletions Common/include/linear_algebra/CSysVector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,15 @@ class CSysVector : public VecExpr::CVecExpr<CSysVector<ScalarType>, ScalarType>
for (auto iVar = 0ul; iVar < nVar; iVar++) vec_val[iPoint * nVar + iVar] = 0.0;
}

/*!
* \brief Set the value of one variable to zero for one block.
* \param[in] iPoint - Index of the block being set to zero.
* \param[in] iVar - Index of the variable being set to zero.
*/
inline void SetBlock_Zero(unsigned long iPoint, unsigned long iVar) {
vec_val[iPoint * nVar + iVar] = 0.0;
}

/*!
* \brief Set "block" to the vector.
* \note Template param Overwrite can be set to false to update existing values.
Expand Down
94 changes: 81 additions & 13 deletions Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const unsigned int MAX_PARAMETERS = 10; /*!< \brief Maximum number of para
const unsigned int MAX_NUMBER_PERIODIC = 10; /*!< \brief Maximum number of periodic boundary conditions. */
const unsigned int MAX_STRING_SIZE = 200; /*!< \brief Maximum number of domains. */
const unsigned int MAX_NUMBER_FFD = 15; /*!< \brief Maximum number of FFDBoxes for the FFD. */
enum: unsigned int{MAX_SOLS = 12}; /*!< \brief Maximum number of solutions at the same time (dimension of solution container array). */
enum: unsigned int{MAX_SOLS = 13}; /*!< \brief Maximum number of solutions at the same time (dimension of solution container array). */
const unsigned int MAX_TERMS = 6; /*!< \brief Maximum number of terms in the numerical equations (dimension of solver container array). */
const unsigned int MAX_ZONES = 3; /*!< \brief Maximum number of zones. */
const unsigned int MAX_FE_KINDS = 4; /*!< \brief Maximum number of Finite Elements. */
Expand Down Expand Up @@ -481,6 +481,8 @@ enum RUNTIME_TYPE {
RUNTIME_TRANS_SYS = 22, /*!< \brief One-physics case, the code is solving the turbulence model. */
RUNTIME_RADIATION_SYS = 23, /*!< \brief One-physics case, the code is solving the radiation model. */
RUNTIME_ADJRAD_SYS = 24, /*!< \brief One-physics case, the code is solving the adjoint radiation model. */
RUNTIME_SCALAR_SYS = 25, /*!< \brief One-physics case, the code is solving the scalar model. */
RUNTIME_ADJSCALAR_SYS = 26, /*!< \brief One-physics case, the code is solving the adjoint scalar model. */
};

const int FLOW_SOL = 0; /*!< \brief Position of the mean flow solution in the solver container array. */
Expand All @@ -498,6 +500,9 @@ const int ADJRAD_SOL = 8; /*!< \brief Position of the continuous adjoint turbu
const int MESH_SOL = 9; /*!< \brief Position of the mesh solver. */
const int ADJMESH_SOL = 10; /*!< \brief Position of the adjoint of the mesh solver. */

const int SCALAR_SOL = 11; /*!< \brief Position of the scalar transport solution in the solver container array. */
const int ADJSCALAR_SOL = 12; /*!< \brief Position of the adjoint scalar transport solution in the solver container array. */

const int FEA_SOL = 0; /*!< \brief Position of the FEA equation in the solution solver array. */
const int ADJFEA_SOL = 1; /*!< \brief Position of the FEA adjoint equation in the solution solver array. */

Expand Down Expand Up @@ -549,15 +554,16 @@ static const MapType<std::string, ENUM_SPACE> Space_Map = {
* \brief Types of fluid model
*/
enum ENUM_FLUIDMODEL {
STANDARD_AIR = 0, /*!< \brief Standard air gas model. */
IDEAL_GAS = 1, /*!< \brief Ideal gas model. */
VW_GAS = 2, /*!< \brief Van Der Waals gas model. */
PR_GAS = 3, /*!< \brief Perfect Real gas model. */
CONSTANT_DENSITY = 4, /*!< \brief Constant density gas model. */
INC_IDEAL_GAS = 5, /*!< \brief Incompressible ideal gas model. */
INC_IDEAL_GAS_POLY = 6, /*!< \brief Inc. ideal gas, polynomial gas model. */
MUTATIONPP = 7, /*!< \brief Mutation++ gas model for nonequilibrium flow. */
SU2_NONEQ = 8 /*!< \brief User defined gas model for nonequilibrium flow. */
STANDARD_AIR = 0, /*!< \brief Standard air gas model. */
IDEAL_GAS = 1, /*!< \brief Ideal gas model. */
VW_GAS = 2, /*!< \brief Van Der Waals gas model. */
PR_GAS = 3, /*!< \brief Perfect Real gas model. */
CONSTANT_DENSITY = 4, /*!< \brief Constant density gas model. */
INC_IDEAL_GAS = 5, /*!< \brief Incompressible ideal gas model. */
INC_IDEAL_GAS_POLY = 6, /*!< \brief Inc. ideal gas, polynomial gas model. */
MUTATIONPP = 7, /*!< \brief Mutation++ gas model for nonequilibrium flow. */
SU2_NONEQ = 8, /*!< \brief User defined gas model for nonequilibrium flow. */
FLAMELET_FLUID_MODEL = 9, /*!, \brief Flamelet model */
};
static const MapType<std::string, ENUM_FLUIDMODEL> FluidModel_Map = {
MakePair("STANDARD_AIR", STANDARD_AIR)
Expand All @@ -568,6 +574,7 @@ static const MapType<std::string, ENUM_FLUIDMODEL> FluidModel_Map = {
MakePair("INC_IDEAL_GAS", INC_IDEAL_GAS)
MakePair("INC_IDEAL_GAS_POLY", INC_IDEAL_GAS_POLY)
MakePair("MUTATIONPP", MUTATIONPP)
MakePair("FLAMELET_FLUID_MODEL", FLAMELET_FLUID_MODEL)
MakePair("SU2_NONEQ", SU2_NONEQ)
};

Expand Down Expand Up @@ -652,34 +659,43 @@ static const MapType<std::string, FREESTREAM_OPTION> FreeStreamOption_Map = {
/*!
* \brief Types of viscosity model
*/

enum class VISCOSITYMODEL {
CONSTANT, /*!< \brief Constant viscosity. */
SUTHERLAND, /*!< \brief Sutherlands Law viscosity. */
POLYNOMIAL, /*!< \brief Polynomial viscosity. */
FLAMELET, /*!< \brief flamelet combustion model */
};
static const MapType<std::string, VISCOSITYMODEL> ViscosityModel_Map = {
MakePair("CONSTANT_VISCOSITY", VISCOSITYMODEL::CONSTANT)
MakePair("SUTHERLAND", VISCOSITYMODEL::SUTHERLAND)
MakePair("POLYNOMIAL_VISCOSITY", VISCOSITYMODEL::POLYNOMIAL)
MakePair("FLAMELET", VISCOSITYMODEL::FLAMELET)

};

/*!
* \brief Types of thermal conductivity model
*/

enum class CONDUCTIVITYMODEL {
CONSTANT, /*!< \brief Constant thermal conductivity. */
CONSTANT_PRANDTL, /*!< \brief Constant Prandtl number. */
POLYNOMIAL, /*!< \brief Polynomial thermal conductivity. */
FLAMELET, /*!< \brief flamelet combustion model */
};
static const MapType<std::string, CONDUCTIVITYMODEL> ConductivityModel_Map = {
MakePair("CONSTANT_CONDUCTIVITY", CONDUCTIVITYMODEL::CONSTANT)
MakePair("CONSTANT_PRANDTL", CONDUCTIVITYMODEL::CONSTANT_PRANDTL)
MakePair("POLYNOMIAL_CONDUCTIVITY", CONDUCTIVITYMODEL::POLYNOMIAL)
MakePair("FLAMELET", CONDUCTIVITYMODEL::FLAMELET)

};

/*!
* \brief Types of turbulent thermal conductivity model
*/

enum class CONDUCTIVITYMODEL_TURB {
NONE, /*!< \brief No turbulent contribution to the effective thermal conductivity for RANS. */
CONSTANT_PRANDTL, /*!< \brief Include contribution to effective conductivity using constant turbulent Prandtl number for RANS. */
Expand All @@ -690,7 +706,22 @@ static const MapType<std::string, CONDUCTIVITYMODEL_TURB> TurbConductivityModel_
};

/*!
* \brief Types of unsteady mesh motion
* \brief types of mass diffusivity models
*/
enum class DIFFUSIVITYMODEL {
CONSTANT_DIFFUSIVITY, /*!< \brief Constant mass diffusivity for scalar transport. */
CONSTANT_SCHMIDT, /*!< \brief Constant Schmidt number for mass diffusion in scalar transport. */
FLAMELET, /*!< \brief flamelet model */
};

static const MapType<std::string, DIFFUSIVITYMODEL> DiffusivityModel_Map = {
MakePair("CONSTANT_DIFFUSIVITY", DIFFUSIVITYMODEL::CONSTANT_DIFFUSIVITY)
MakePair("CONSTANT_SCHMIDT", DIFFUSIVITYMODEL::CONSTANT_SCHMIDT)
MakePair("FLAMELET", DIFFUSIVITYMODEL::FLAMELET)
};

/*!
* \brief types of unsteady mesh motion
*/
enum ENUM_GRIDMOVEMENT {
NO_MOVEMENT = 0, /*!< \brief Simulation on a static mesh. */
Expand Down Expand Up @@ -737,7 +768,7 @@ enum ENUM_GUST_TYPE {
SINE = 2, /*!< \brief Sine shaped gust */
ONE_M_COSINE = 3, /*!< \brief 1-cosine shaped gust */
VORTEX = 4, /*!< \brief A gust made from vortices */
EOG = 5 /*!< \brief An extreme operating gust */
EOG = 5, /*!< \brief An extreme operating gust */
};
static const MapType<std::string, ENUM_GUST_TYPE> Gust_Type_Map = {
MakePair("NONE", NO_GUST)
Expand Down Expand Up @@ -924,7 +955,23 @@ static const MapType<std::string, ENUM_TRANS_MODEL> Trans_Model_Map = {
};

/*!
* \brief Types of subgrid scale models
* \brief types of scalar transport models
*/
enum ENUM_SCALAR_MODEL {
NO_SCALAR_MODEL = 0, /*!< \brief No scalar transport model. */
PASSIVE_SCALAR = 1, /*!< \brief Passive scalar transport model. */
PROGRESS_VARIABLE = 2, /*!< \brief Progress variable combustion model. */
CUSTOM_SCALAR = 3, /*!< \brief Custom scalar transport model. */
};
static const MapType<std::string, ENUM_SCALAR_MODEL> Scalar_Model_Map = {
MakePair("NONE", NO_SCALAR_MODEL)
MakePair("PASSIVE_SCALAR", PASSIVE_SCALAR)
MakePair("PROGRESS_VARIABLE", PROGRESS_VARIABLE)
MakePair("CUSTOM_SCALAR", CUSTOM_SCALAR)
};

/*!
* \brief types of subgrid scale models
*/
enum ENUM_SGS_MODEL {
NO_SGS_MODEL = 0, /*!< \brief No subgrid scale model. */
Expand Down Expand Up @@ -1523,7 +1570,11 @@ enum ENUM_OBJECTIVE {
TOPOL_DISCRETENESS = 63, /*!< \brief Measure of the discreteness of the current topology. */
TOPOL_COMPLIANCE = 64, /*!< \brief Measure of the discreteness of the current topology. */
STRESS_PENALTY = 65, /*!< \brief Penalty function of VM stresses above a maximum value. */
SURFACE_CO = 80,
SURFACE_NOX = 81,
SURFACE_TEMP = 82,
};

static const MapType<std::string, ENUM_OBJECTIVE> Objective_Map = {
MakePair("DRAG", DRAG_COEFFICIENT)
MakePair("LIFT", LIFT_COEFFICIENT)
Expand Down Expand Up @@ -1575,6 +1626,9 @@ static const MapType<std::string, ENUM_OBJECTIVE> Objective_Map = {
MakePair("TOPOL_DISCRETENESS", TOPOL_DISCRETENESS)
MakePair("TOPOL_COMPLIANCE", TOPOL_COMPLIANCE)
MakePair("STRESS_PENALTY", STRESS_PENALTY)
MakePair("AVG_CO", SURFACE_CO)
MakePair("AVG_NOX", SURFACE_NOX)
MakePair("AVG_TEMP", SURFACE_TEMP)
};

/*!
Expand Down Expand Up @@ -2249,6 +2303,20 @@ static const MapType<std::string, ENUM_VERIFICATION_SOLUTIONS> Verification_Solu
MakePair("USER_DEFINED_SOLUTION", USER_DEFINED_SOLUTION)
};

/* the order matters: */
/* enthalpy and progress variable are the first and second entry in the lookup table */
enum FLAMELET_SCALAR_VARIABLES {
I_PROG_VAR,
I_ENTHALPY,
I_CO,
I_NOX,
};

enum FLAMELET_SCALAR_SOURCES {
I_SRC_TOT_PROG_VAR,
I_SRC_TOT_CO,
I_SRC_TOT_NOX,
};
/*!
* \brief Types of streamwise periodicity.
*/
Expand Down
72 changes: 72 additions & 0 deletions Common/include/option_structure.inl
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,78 @@ public:
}
};

class COptionInletScalar : public COptionBase {
string name; // identifier for the option
unsigned short & size;
string * & marker;
su2double ** & inletscalarval;
Comment on lines +1104 to +1108
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is a completely new type of option please use vector<vector< instead of ** and if the number of columns is constant use an su2activematrix


public:
COptionInletScalar(string option_field_name, unsigned short & nMarker_Inlet_Scalar, string* & Marker_Inlet_Scalar, su2double** & option_field) : size(nMarker_Inlet_Scalar), marker(Marker_Inlet_Scalar), inletscalarval(option_field) {
this->name = option_field_name;
}

~COptionInletScalar() {};

string SetValue(vector<string> option_value) {
COptionBase::SetValue(option_value);
unsigned short option_size = option_value.size();
if ((option_size == 1) && (option_value[0].compare("NONE") == 0)) {
this->size = 0;
this->marker = NULL;
this->inletscalarval = NULL;
return "";
}

// at this point we need to know how many inlets we have. We count the number of strings
// in the list. We assume that the name of the inlet does not start with a number
unsigned short nVals=0;
unsigned short nScalars=0;
for (unsigned long i = 0; i < option_size; i++) {
// get the next entry in the inlet list
if (isalpha(option_value[i][0])) {
nVals++;
} else {
nScalars++;
}

}


nScalars = nScalars/nVals;


// nVals is the number of inlets
this->size = nVals;
this->marker = new string[nVals];
this->inletscalarval = new su2double*[nVals];
for (unsigned long i = 0; i < nVals; i++) {

this->inletscalarval[i] = new su2double[nScalars];
}

for (unsigned long i = 0; i < nVals; i++) {
this->marker[i].assign(option_value[(1+nScalars)*i]);

for (unsigned long j=0;j<nScalars;j++){
istringstream ss_nd(option_value[(1+nScalars)*i + 1+j]);
if (!(ss_nd >> this->inletscalarval[i][j])) {
return badValue(option_value, "inlet", this->name);
}
}

}

return "";
}

void SetDefault() {
this->marker = NULL;
this->inletscalarval = NULL;
this->size = 0; // There is no default value for list
}
};

template <class Tenum>
class COptionRiemann : public COptionBase {

Expand Down
Loading