Skip to content

Commit 9896026

Browse files
authored
Merge branch 'develop' into feature_aero_thermo_elasticity
2 parents a0f0a07 + 870119a commit 9896026

74 files changed

Lines changed: 15535 additions & 452 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,5 @@ Mercurial
8686

8787
# Ignore build folder
8888
./build/
89+
build/
90+
ninja

Common/include/CConfig.hpp

Lines changed: 130 additions & 162 deletions
Large diffs are not rendered by default.

Common/include/linear_algebra/CSysVector.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#include <cmath>
3232
#include <cstdlib>
3333

34-
3534
/*!
3635
* \class CSysVector
3736
* \brief Class for holding and manipulating vectors needed by linear solvers

Common/include/option_structure.hpp

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ const unsigned int INST_0 = 0; /*!< \brief Definition of the first instance per
9595

9696
const su2double STANDARD_GRAVITY = 9.80665; /*!< \brief Acceleration due to gravity at surface of earth. */
9797
const su2double UNIVERSAL_GAS_CONSTANT = 8.3144598; /*!< \brief Universal gas constant in J/(mol*K) */
98+
const su2double BOLTZMANN_CONSTANT = 1.3806503E-23; /*! \brief Boltzmann's constant [J K^-1] */
99+
const su2double AVOGAD_CONSTANT = 6.0221415E26; /*!< \brief Avogardro's constant, number of particles in one kmole. */
98100

99101
const su2double EPS = 1.0E-16; /*!< \brief Error scale. */
100102
const su2double TURB_EPS = 1.0E-16; /*!< \brief Turbulent Error scale. */
@@ -196,7 +198,9 @@ enum ENUM_MAIN_SOLVER {
196198
FEM_NAVIER_STOKES = 27, /*!< \brief Definition of the finite element Navier-Stokes' solver. */
197199
FEM_RANS = 28, /*!< \brief Definition of the finite element Reynolds-averaged Navier-Stokes' (RANS) solver. */
198200
FEM_LES = 29, /*!< \brief Definition of the finite element Large Eddy Simulation Navier-Stokes' (LES) solver. */
199-
MULTIPHYSICS = 30
201+
MULTIPHYSICS = 30,
202+
NEMO_EULER = 41, /*!< \brief Definition of the NEMO Euler solver. */
203+
NEMO_NAVIER_STOKES = 42 /*!< \brief Definition of the NEMO NS solver. */
200204
};
201205
static const MapType<string, ENUM_MAIN_SOLVER> Solver_Map = {
202206
MakePair("NONE", NO_SOLVER)
@@ -210,6 +214,8 @@ static const MapType<string, ENUM_MAIN_SOLVER> Solver_Map = {
210214
MakePair("FEM_NAVIER_STOKES", FEM_NAVIER_STOKES)
211215
MakePair("FEM_RANS", FEM_RANS)
212216
MakePair("FEM_LES", FEM_LES)
217+
MakePair("NEMO_EULER",NEMO_EULER)
218+
MakePair("NEMO_NAVIER_STOKES",NEMO_NAVIER_STOKES)
213219
MakePair("ADJ_EULER", ADJ_EULER)
214220
MakePair("ADJ_NAVIER_STOKES", ADJ_NAVIER_STOKES)
215221
MakePair("ADJ_RANS", ADJ_RANS )
@@ -535,7 +541,9 @@ enum ENUM_FLUIDMODEL {
535541
PR_GAS = 3, /*!< \brief Perfect Real gas model. */
536542
CONSTANT_DENSITY = 4, /*!< \brief Constant density gas model. */
537543
INC_IDEAL_GAS = 5, /*!< \brief Incompressible ideal gas model. */
538-
INC_IDEAL_GAS_POLY = 6 /*!< \brief Inc. ideal gas, polynomial gas model. */
544+
INC_IDEAL_GAS_POLY = 6, /*!< \brief Inc. ideal gas, polynomial gas model. */
545+
MUTATIONPP = 7, /*!< \brief Mutation++ gas model for nonequilibrium flow. */
546+
USER_DEFINED_NONEQ = 8 /*!< \brief User defined gas model for nonequilibrium flow. */
539547
};
540548
static const MapType<string, ENUM_FLUIDMODEL> FluidModel_Map = {
541549
MakePair("STANDARD_AIR", STANDARD_AIR)
@@ -545,6 +553,46 @@ static const MapType<string, ENUM_FLUIDMODEL> FluidModel_Map = {
545553
MakePair("CONSTANT_DENSITY", CONSTANT_DENSITY)
546554
MakePair("INC_IDEAL_GAS", INC_IDEAL_GAS)
547555
MakePair("INC_IDEAL_GAS_POLY", INC_IDEAL_GAS_POLY)
556+
MakePair("MUTATIONPP", MUTATIONPP)
557+
MakePair("USER_DEFINED_NONEQ", USER_DEFINED_NONEQ)
558+
};
559+
560+
/*!
561+
* \brief types of gas models
562+
*/
563+
enum ENUM_GASMODEL {
564+
NO_MODEL = 0,
565+
ARGON = 1,
566+
AIR7 = 2,
567+
AIR21 = 3,
568+
O2 = 4,
569+
N2 = 5,
570+
AIR5 = 6,
571+
ARGON_SID = 7,
572+
ONESPECIES = 8
573+
};
574+
static const MapType<string, ENUM_GASMODEL> GasModel_Map = {
575+
MakePair("NONE", NO_MODEL)
576+
MakePair("ARGON", ARGON)
577+
MakePair("AIR-7", AIR7)
578+
MakePair("AIR-21", AIR21)
579+
MakePair("O2", O2)
580+
MakePair("N2", N2)
581+
MakePair("AIR-5", AIR5)
582+
MakePair("ARGON-SID",ARGON_SID)
583+
MakePair("ONESPECIES", ONESPECIES)
584+
};
585+
586+
/*!
587+
* \brief types of coefficient transport model
588+
*/
589+
enum ENUM_TRANSCOEFFMODEL {
590+
WILKE = 0,
591+
GUPTAYOS = 1
592+
};
593+
static const MapType<string, ENUM_TRANSCOEFFMODEL> TransCoeffModel_Map = {
594+
MakePair("WILKE", WILKE)
595+
MakePair("GUPTA-YOS", GUPTAYOS)
548596
};
549597

550598
/*!
@@ -738,7 +786,8 @@ enum ENUM_UPWIND {
738786
FDS = 14, /*!< \brief Flux difference splitting upwind method (incompressible flows). */
739787
LAX_FRIEDRICH = 15, /*!< \brief Lax-Friedrich numerical method. */
740788
AUSMPLUSUP = 16, /*!< \brief AUSM+ -up numerical method (All Speed) */
741-
AUSMPLUSUP2 = 17 /*!< \brief AUSM+ -up2 numerical method (All Speed) */
789+
AUSMPLUSUP2 = 17, /*!< \brief AUSM+ -up2 numerical method (All Speed) */
790+
AUSMPWPLUS = 18 /*!< \brief AUSMplus numerical method. (MAYBE for TNE2 ONLY)*/
742791
};
743792
static const MapType<string, ENUM_UPWIND> Upwind_Map = {
744793
MakePair("NONE", NO_UPWIND)
@@ -747,6 +796,7 @@ static const MapType<string, ENUM_UPWIND> Upwind_Map = {
747796
MakePair("AUSM", AUSM)
748797
MakePair("AUSMPLUSUP", AUSMPLUSUP)
749798
MakePair("AUSMPLUSUP2", AUSMPLUSUP2)
799+
MakePair("AUSMPWPLUS", AUSMPWPLUS)
750800
MakePair("SLAU", SLAU)
751801
MakePair("HLLC", HLLC)
752802
MakePair("SW", SW)
@@ -1096,6 +1146,7 @@ enum BC_TYPE {
10961146
DISP_DIR_BOUNDARY = 40, /*!< \brief Boundary displacement definition. */
10971147
DAMPER_BOUNDARY = 41, /*!< \brief Damper. */
10981148
CHT_WALL_INTERFACE = 50, /*!< \brief Domain interface definition. */
1149+
SMOLUCHOWSKI_MAXWELL = 55, /*!< \brief Smoluchoski/Maxwell wall boundary condition. */
10991150
SEND_RECEIVE = 99, /*!< \brief Boundary send-receive definition. */
11001151
};
11011152

@@ -2127,7 +2178,8 @@ enum MPI_QUANTITIES {
21272178
SOLUTION_FEA_OLD = 26, /*!< \brief FEA solution old communication. */
21282179
MESH_DISPLACEMENTS = 27, /*!< \brief Mesh displacements at the interface. */
21292180
SOLUTION_TIME_N = 28, /*!< \brief Solution at time n. */
2130-
SOLUTION_TIME_N1 = 29 /*!< \brief Solution at time n-1. */
2181+
SOLUTION_TIME_N1 = 29, /*!< \brief Solution at time n-1. */
2182+
PRIMITIVE = 30 /*!< \brief Primitive solution communication. */
21312183
};
21322184

21332185
/*!

Common/include/toolboxes/C2DContainer.hpp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,3 +595,36 @@ struct C3DDummyMiddleView
595595
return data(i,k);
596596
}
597597
};
598+
599+
/*!
600+
* \class C3DContainerDecorator
601+
* \brief Decorate a vector type (Storage) with 3 dimensions. *
602+
*/
603+
template<class Storage>
604+
struct C3DContainerDecorator {
605+
using Scalar = typename Storage::Scalar;
606+
using Index = typename Storage::Index;
607+
608+
Storage storage;
609+
Index M, N;
610+
611+
C3DContainerDecorator() = default;
612+
613+
C3DContainerDecorator(Index length, Index rows, Index cols, Scalar value = 0) {
614+
resize(length, rows, cols, value);
615+
}
616+
617+
void resize(Index length, Index rows, Index cols, Scalar value = 0) {
618+
M = rows;
619+
N = cols;
620+
storage.resize(length*rows*cols) = value;
621+
}
622+
623+
Scalar& operator() (Index i, Index j, Index k) { return storage(i*M*N + j*N + k); }
624+
const Scalar& operator() (Index i, Index j, Index k) const { return storage(i*M*N + j*N + k); }
625+
};
626+
627+
/* Define an alias for a 3D int matrix, we use su2vector to store the integers contiguously
628+
* and the container decorator to create the access semantics we want. */
629+
using C3DIntMatrix = C3DContainerDecorator<su2vector<int> >;
630+
using C3DDoubleMatrix = C3DContainerDecorator<su2vector<double> >;

0 commit comments

Comments
 (0)