-
Notifications
You must be signed in to change notification settings - Fork 969
Expand file tree
/
Copy pathoption_structure.hpp
More file actions
2901 lines (2690 loc) · 132 KB
/
option_structure.hpp
File metadata and controls
2901 lines (2690 loc) · 132 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*!
* \file option_structure.hpp
* \brief Defines classes for referencing options for easy input in CConfig
* \author J. Hicken, B. Tracey
* \version 8.4.0 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2026, 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 "./parallelization/mpi_structure.hpp"
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <array>
#include <map>
#include <cstdlib>
#include <algorithm>
#include <cassert>
/*!
* \class CEmptyMap
* \brief We use this dummy class instead of std::map when
* we only need the enum definition and not the string to
* enum maps, this makes compilation much faster.
*/
template <typename T, typename U>
struct CEmptyMap {
CEmptyMap(std::initializer_list<std::pair<const T, U> >) {}
};
#ifdef ENABLE_MAPS
template<class T, class U>
using MapType = std::map<T,U>;
#define MakePair(a,b) {a,b},
#else
template<class T, class U>
using MapType = CEmptyMap<T,U>;
#define MakePair(a,b)
#endif
/*!
* \brief Different software components of SU2
*/
enum class SU2_COMPONENT {
SU2_CFD, /*!< \brief Running the SU2_CFD software. */
SU2_DEF, /*!< \brief Running the SU2_DEF software. */
SU2_DOT, /*!< \brief Running the SU2_DOT software. */
SU2_GEO, /*!< \brief Running the SU2_GEO software. */
SU2_SOL /*!< \brief Running the SU2_SOL software. */
};
const unsigned int EXIT_DIVERGENCE = 2; /*!< \brief Exit code (divergence). */
const unsigned int MAX_PARAMETERS = 10; /*!< \brief Maximum number of parameters for a design variable definition. */
const unsigned int MAX_NUMBER_PERIODIC = 10; /*!< \brief Maximum number of periodic boundary conditions. */
const unsigned int MAX_STRING_SIZE = 400; /*!< \brief Maximum size of a generic string. */
const unsigned int MAX_NUMBER_FFD = 15; /*!< \brief Maximum number of FFDBoxes for the FFD. */
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 = 7; /*!< \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 = 7; /*!< \brief Maximum number of Finite Elements. */
const unsigned int NO_RK_ITER = 0; /*!< \brief No Runge-Kutta iteration. */
const unsigned int OVERHEAD = 4; /*!< \brief Overhead space above nMarker when allocating space for boundary elems (MPI + periodic). */
const unsigned int MESH_0 = 0; /*!< \brief Definition of the finest grid level. */
const unsigned int MESH_1 = 1; /*!< \brief Definition of the finest grid level. */
const unsigned int ZONE_0 = 0; /*!< \brief Definition of the first grid domain. */
const unsigned int ZONE_1 = 1; /*!< \brief Definition of the second grid domain. */
const unsigned int INST_0 = 0; /*!< \brief Definition of the first instance per grid level. */
constexpr passivedouble STANDARD_GRAVITY = 9.80665; /*!< \brief Acceleration due to gravity at surface of earth. */
constexpr passivedouble UNIVERSAL_GAS_CONSTANT = 8.3144598; /*!< \brief Universal gas constant in J/(mol*K) */
constexpr passivedouble BOLTZMANN_CONSTANT = 1.3806503E-23; /*!< \brief Boltzmann's constant [J K^-1] */
constexpr passivedouble AVOGAD_CONSTANT = 6.0221415E26; /*!< \brief Avogadro's constant, number of particles in one kmole. */
constexpr passivedouble FUND_ELEC_CHARGE_CGS = 4.8032047E-10; /*!< \brief Fundamental electric charge in CGS units, cm^(3/2) g^(1/2) s^(-1). */
constexpr passivedouble STD_REF_TEMP = 298.15; /*!< \brief Standard reference temperature for enthalpy in Kelvin. */
constexpr passivedouble EPS = 1.0E-16; /*!< \brief Error scale. */
constexpr passivedouble TURB_EPS = 1.0E-16; /*!< \brief Turbulent Error scale. */
constexpr passivedouble ONE2 = 0.5; /*!< \brief One divided by two. */
constexpr passivedouble ONE3 = 1.0 / 3.0; /*!< \brief One divided by three. */
constexpr passivedouble TWO3 = 2.0 / 3.0; /*!< \brief Two divided by three. */
constexpr passivedouble FOUR3 = 4.0 / 3.0; /*!< \brief Four divided by three. */
constexpr passivedouble PI_NUMBER = 3.14159265358979323846; /*!< \brief Pi number (not using M_PI to avoid Windows issues). */
constexpr passivedouble STEFAN_BOLTZMANN = 5.670367E-08; /*!< \brief Stefan-Boltzmann constant in W/(m^2*K^4). */
const int MASTER_NODE = 0; /*!< \brief Master node for MPI parallelization. */
const int SINGLE_NODE = 1; /*!< \brief There is only a node in the MPI parallelization. */
const int SINGLE_ZONE = 1; /*!< \brief There is only a zone. */
const unsigned short COMM_TYPE_UNSIGNED_LONG = 1; /*!< \brief Communication type for unsigned long. */
const unsigned short COMM_TYPE_LONG = 2; /*!< \brief Communication type for long. */
const unsigned short COMM_TYPE_UNSIGNED_SHORT = 3; /*!< \brief Communication type for unsigned short. */
const unsigned short COMM_TYPE_DOUBLE = 4; /*!< \brief Communication type for double. */
const unsigned short COMM_TYPE_CHAR = 5; /*!< \brief Communication type for char. */
const unsigned short COMM_TYPE_SHORT = 6; /*!< \brief Communication type for short. */
const unsigned short COMM_TYPE_INT = 7; /*!< \brief Communication type for int. */
/*!
* \brief Types of geometric entities based on VTK nomenclature
*/
enum GEO_TYPE {
VERTEX = 1, /*!< \brief VTK nomenclature for defining a vertex element. */
LINE = 3, /*!< \brief VTK nomenclature for defining a line element. */
TRIANGLE = 5, /*!< \brief VTK nomenclature for defining a triangle element. */
QUADRILATERAL = 9, /*!< \brief VTK nomenclature for defining a quadrilateral element. */
TETRAHEDRON = 10, /*!< \brief VTK nomenclature for defining a tetrahedron element. */
HEXAHEDRON = 12, /*!< \brief VTK nomenclature for defining a hexahedron element. */
PRISM = 13, /*!< \brief VTK nomenclature for defining a prism element. */
PYRAMID = 14 /*!< \brief VTK nomenclature for defining a pyramid element. */
};
constexpr unsigned short N_ELEM_TYPES = 7; /*!< \brief General output & CGNS defines. */
constexpr unsigned short N_POINTS_LINE = 2; /*!< \brief General output & CGNS defines. */
constexpr unsigned short N_POINTS_TRIANGLE = 3; /*!< \brief General output & CGNS defines. */
constexpr unsigned short N_POINTS_QUADRILATERAL = 4; /*!< \brief General output & CGNS defines. */
constexpr unsigned short N_POINTS_TETRAHEDRON = 4; /*!< \brief General output & CGNS defines. */
constexpr unsigned short N_POINTS_HEXAHEDRON = 8; /*!< \brief General output & CGNS defines. */
constexpr unsigned short N_POINTS_PYRAMID = 5; /*!< \brief General output & CGNS defines. */
constexpr unsigned short N_POINTS_PRISM = 6; /*!< \brief General output & CGNS defines. */
constexpr unsigned short N_POINTS_MAXIMUM = 8; /*!< \brief Max. out of the above, used for static arrays, keep it up to date. */
constexpr unsigned short N_FACES_LINE = 1; /*!< \brief General output & CGNS defines. */
constexpr unsigned short N_FACES_TRIANGLE = 3; /*!< \brief General output & CGNS defines. */
constexpr unsigned short N_FACES_QUADRILATERAL = 4; /*!< \brief General output & CGNS defines. */
constexpr unsigned short N_FACES_TETRAHEDRON = 4; /*!< \brief General output & CGNS defines. */
constexpr unsigned short N_FACES_PYRAMID = 5; /*!< \brief General output & CGNS defines. */
constexpr unsigned short N_FACES_PRISM = 5; /*!< \brief General output & CGNS defines. */
constexpr unsigned short N_FACES_HEXAHEDRON = 6; /*!< \brief General output & CGNS defines. */
constexpr unsigned short N_FACES_MAXIMUM = 6; /*!< \brief Max. out of the above, used for static arrays, keep it up to date. */
/*!
* \brief Get the number of faces of the element.
* \param[in] elementType - element type
* \return number of faces
*/
inline unsigned short nFacesOfElementType(unsigned short elementType) {
switch (elementType) {
case LINE: return N_FACES_LINE;
case TRIANGLE: return N_FACES_TRIANGLE;
case QUADRILATERAL: return N_FACES_QUADRILATERAL;
case TETRAHEDRON: return N_FACES_TETRAHEDRON;
case HEXAHEDRON: return N_FACES_HEXAHEDRON;
case PYRAMID: return N_FACES_PYRAMID;
case PRISM: return N_FACES_PRISM;
default: assert(false && "Invalid element type."); return 0;
}
}
/*!
* \brief Get the number of points of the element.
* \param[in] elementType - element type
* \return number of points
*/
inline unsigned short nPointsOfElementType(unsigned short elementType) {
switch (elementType) {
case LINE: return N_POINTS_LINE;
case TRIANGLE: return N_POINTS_TRIANGLE;
case QUADRILATERAL: return N_POINTS_QUADRILATERAL;
case TETRAHEDRON: return N_POINTS_TETRAHEDRON;
case HEXAHEDRON: return N_POINTS_HEXAHEDRON;
case PYRAMID: return N_POINTS_PYRAMID;
case PRISM: return N_POINTS_PRISM;
default: assert(false && "Invalid element type."); return 0;
}
}
const int CGNS_STRING_SIZE = 33; /*!< \brief Length of strings used in the CGNS format. */
const int SU2_CONN_SIZE = 10; /*!< \brief Size of the connectivity array that is allocated for each element
that we read from a mesh file in the format [[globalID vtkType n0 n1 n2 n3 n4 n5 n6 n7 n8]. */
const int SU2_CONN_SKIP = 2; /*!< \brief Offset to skip the globalID and VTK type at the start of the element connectivity list for each CGNS element. */
constexpr passivedouble COLORING_EFF_THRESH = 0.875; /*!< \brief Below this value fallback strategies are used instead. */
/*--- All temperature polynomial fits for the fluid models currently
assume a quartic form (5 coefficients). For example,
Cp(T) = b0 + b1*T + b2*T^2 + b3*T^3 + b4*T^4. By default, all coeffs
are set to zero and will be properly non-dim. in the solver. ---*/
constexpr int N_POLY_COEFFS = 5; /*!< \brief Number of coefficients in temperature polynomial fits for fluid models. */
/*!
* \brief Boolean answers
*/
enum ANSWER {
NONE = 0,
NO = 0, /*!< \brief Boolean definition of no. */
YES = 1 /*!< \brief Boolean definition of yes. */
};
/*!
* \brief Average method for marker analyze
*/
enum AVERAGE_TYPE {
AVERAGE_AREA = 1, /*!< \brief Area-weighted average. */
AVERAGE_MASSFLUX = 2 /*!< \brief Mass-flux weighted average. */
};
static const MapType<std::string, AVERAGE_TYPE> Average_Map = {
MakePair("AREA", AVERAGE_AREA)
MakePair("MASSFLUX", AVERAGE_MASSFLUX)
};
/*!
* \brief different solver types for the CFD component
*/
enum class MAIN_SOLVER {
NONE, /*!< \brief Definition of no solver. */
EULER, /*!< \brief Definition of the Euler's solver. */
NAVIER_STOKES, /*!< \brief Definition of the Navier-Stokes' solver. */
RANS, /*!< \brief Definition of the Reynolds-averaged Navier-Stokes' (RANS) solver. */
INC_EULER, /*!< \brief Definition of the incompressible Euler's solver. */
INC_NAVIER_STOKES, /*!< \brief Definition of the incompressible Navier-Stokes' solver. */
INC_RANS, /*!< \brief Definition of the incompressible Reynolds-averaged Navier-Stokes' (RANS) solver. */
HEAT_EQUATION, /*!< \brief Definition of the finite volume heat solver. */
FEM_ELASTICITY, /*!< \brief Definition of a FEM solver. */
ADJ_EULER, /*!< \brief Definition of the continuous adjoint Euler's solver. */
ADJ_NAVIER_STOKES, /*!< \brief Definition of the continuous adjoint Navier-Stokes' solver. */
ADJ_RANS, /*!< \brief Definition of the continuous adjoint Reynolds-averaged Navier-Stokes' (RANS) solver. */
TEMPLATE_SOLVER, /*!< \brief Definition of template solver. */
DISC_ADJ_EULER, /*!< \brief Definition of the discrete adjoint Euler solver. */
DISC_ADJ_RANS, /*!< \brief Definition of the discrete adjoint Reynolds-averaged Navier-Stokes' (RANS) solver. */
DISC_ADJ_NAVIER_STOKES, /*!< \brief Definition of the discrete adjoint Navier-Stokes' solver. */
DISC_ADJ_INC_EULER, /*!< \brief Definition of the discrete adjoint incompressible Euler solver. */
DISC_ADJ_INC_RANS, /*!< \brief Definition of the discrete adjoint incompressible Reynolds-averaged Navier-Stokes' (RANS) solver. */
DISC_ADJ_INC_NAVIER_STOKES, /*!< \brief Definition of the discrete adjoint incompressible Navier-Stokes'. */
DISC_ADJ_HEAT, /*!< \brief Definition of the discrete adjoint heat solver. */
DISC_ADJ_FEM_EULER, /*!< \brief Definition of the discrete adjoint FEM Euler solver. */
DISC_ADJ_FEM_RANS, /*!< \brief Definition of the discrete adjoint FEM Reynolds-averaged Navier-Stokes' (RANS) solver. */
DISC_ADJ_FEM_NS, /*!< \brief Definition of the discrete adjoint FEM Navier-Stokes' solver. */
DISC_ADJ_FEM, /*!< \brief Definition of the discrete adjoint FEM solver. */
FEM_EULER, /*!< \brief Definition of the finite element Euler's solver. */
FEM_NAVIER_STOKES, /*!< \brief Definition of the finite element Navier-Stokes' solver. */
FEM_RANS, /*!< \brief Definition of the finite element Reynolds-averaged Navier-Stokes' (RANS) solver. */
FEM_LES, /*!< \brief Definition of the finite element Large Eddy Simulation Navier-Stokes' (LES) solver. */
MULTIPHYSICS,
NEMO_EULER, /*!< \brief Definition of the NEMO Euler solver. */
NEMO_NAVIER_STOKES, /*!< \brief Definition of the NEMO NS solver. */
};
static const MapType<std::string, MAIN_SOLVER> Solver_Map = {
MakePair("NONE", MAIN_SOLVER::NONE)
MakePair("EULER", MAIN_SOLVER::EULER)
MakePair("NAVIER_STOKES", MAIN_SOLVER::NAVIER_STOKES)
MakePair("RANS", MAIN_SOLVER::RANS)
MakePair("INC_EULER", MAIN_SOLVER::INC_EULER)
MakePair("INC_NAVIER_STOKES", MAIN_SOLVER::INC_NAVIER_STOKES)
MakePair("INC_RANS", MAIN_SOLVER::INC_RANS)
MakePair("FEM_EULER", MAIN_SOLVER::FEM_EULER)
MakePair("FEM_NAVIER_STOKES", MAIN_SOLVER::FEM_NAVIER_STOKES)
MakePair("FEM_RANS", MAIN_SOLVER::FEM_RANS)
MakePair("FEM_LES", MAIN_SOLVER::FEM_LES)
MakePair("NEMO_EULER",MAIN_SOLVER::NEMO_EULER)
MakePair("NEMO_NAVIER_STOKES",MAIN_SOLVER::NEMO_NAVIER_STOKES)
MakePair("HEAT_EQUATION", MAIN_SOLVER::HEAT_EQUATION)
MakePair("ELASTICITY", MAIN_SOLVER::FEM_ELASTICITY)
MakePair("TEMPLATE_SOLVER", MAIN_SOLVER::TEMPLATE_SOLVER)
MakePair("MULTIPHYSICS", MAIN_SOLVER::MULTIPHYSICS)
};
/*!
* \brief Different solver types for multizone problems
*/
enum class ENUM_MULTIZONE {
MZ_BLOCK_GAUSS_SEIDEL, /*!< \brief Definition of a Block-Gauss-Seidel multizone solver. */
MZ_BLOCK_JACOBI, /*!< \brief Definition of a Block-Jacobi solver. */
};
static const MapType<std::string, ENUM_MULTIZONE> Multizone_Map = {
MakePair("BLOCK_GAUSS_SEIDEL", ENUM_MULTIZONE::MZ_BLOCK_GAUSS_SEIDEL)
MakePair("BLOCK_JACOBI", ENUM_MULTIZONE::MZ_BLOCK_JACOBI)
};
/*!
* \brief Material geometric conditions
*/
enum class STRUCT_DEFORMATION {
SMALL, /*!< \brief Definition of linear elastic material. */
LARGE, /*!< \brief Definition of Neo-Hookean material. */
};
static const MapType<std::string, STRUCT_DEFORMATION> Struct_Map = {
MakePair("SMALL_DEFORMATIONS", STRUCT_DEFORMATION::SMALL)
MakePair("LARGE_DEFORMATIONS", STRUCT_DEFORMATION::LARGE)
};
/*!
* \brief Material model
*/
enum class STRUCT_MODEL {
LINEAR_ELASTIC, /*!< \brief Definition of linear elastic material. */
NEO_HOOKEAN, /*!< \brief Definition of Neo-Hookean material. */
KNOWLES, /*!< \brief Definition of Knowles stored-energy potential */
IDEAL_DE, /*!< \brief Definition of ideal Dielectric Elastomer */
};
static const MapType<std::string, STRUCT_MODEL> Material_Map = {
MakePair("LINEAR_ELASTIC", STRUCT_MODEL::LINEAR_ELASTIC)
MakePair("NEO_HOOKEAN", STRUCT_MODEL::NEO_HOOKEAN)
MakePair("KNOWLES", STRUCT_MODEL::KNOWLES)
MakePair("IDEAL_DE", STRUCT_MODEL::IDEAL_DE)
};
/*!
* \brief Material compressibility
*/
enum class STRUCT_COMPRESS {
COMPRESSIBLE, /*!< \brief Definition of compressible material. */
NEARLY_INCOMP, /*!< \brief Definition of nearly incompressible material. */
};
static const MapType<std::string, STRUCT_COMPRESS> MatComp_Map = {
MakePair("COMPRESSIBLE", STRUCT_COMPRESS::COMPRESSIBLE)
MakePair("NEARLY_INCOMPRESSIBLE", STRUCT_COMPRESS::NEARLY_INCOMP)
};
/*!
* \brief Types of interpolators
*/
enum class INTERFACE_INTERPOLATOR {
NEAREST_NEIGHBOR, /*!< \brief Nearest Neigbhor interpolation */
ISOPARAMETRIC, /*!< \brief Isoparametric interpolation, use CONSERVATIVE_INTERPOLATION=YES for conservative interpolation (S.A. Brown 1997).*/
WEIGHTED_AVERAGE, /*!< \brief Sliding Mesh Approach E. Rinaldi 2015 */
RADIAL_BASIS_FUNCTION, /*!< \brief Radial basis function interpolation. */
};
static const MapType<std::string, INTERFACE_INTERPOLATOR> Interpolator_Map = {
MakePair("NEAREST_NEIGHBOR", INTERFACE_INTERPOLATOR::NEAREST_NEIGHBOR)
MakePair("ISOPARAMETRIC", INTERFACE_INTERPOLATOR::ISOPARAMETRIC)
MakePair("WEIGHTED_AVERAGE", INTERFACE_INTERPOLATOR::WEIGHTED_AVERAGE)
MakePair("RADIAL_BASIS_FUNCTION", INTERFACE_INTERPOLATOR::RADIAL_BASIS_FUNCTION)
};
/*!
* \brief Types of radial basis functions
*/
enum class RADIAL_BASIS {
WENDLAND_C2, /*!< \brief Wendland C2 radial basis function. */
INV_MULTI_QUADRIC, /*!< \brief Inversed multi quartic biharmonic spline. */
GAUSSIAN, /*!< \brief Gaussian basis function. */
THIN_PLATE_SPLINE, /*!< \brief Thin plate spline. */
MULTI_QUADRIC, /*!< \brief Multi quartic biharmonic spline. */
};
static const MapType<std::string, RADIAL_BASIS> RadialBasisFunction_Map = {
MakePair("WENDLAND_C2", RADIAL_BASIS::WENDLAND_C2)
MakePair("INV_MULTI_QUADRIC", RADIAL_BASIS::INV_MULTI_QUADRIC)
MakePair("GAUSSIAN", RADIAL_BASIS::GAUSSIAN)
MakePair("THIN_PLATE_SPLINE", RADIAL_BASIS::THIN_PLATE_SPLINE)
MakePair("MULTI_QUADRIC", RADIAL_BASIS::MULTI_QUADRIC)
};
/*!
* \brief type of radial spanwise interpolation function for the inlet face
*/
enum class INLET_SPANWISE_INTERP {
NONE,
LINEAR_1D,
AKIMA_1D,
CUBIC_1D,
};
static const MapType<std::string, INLET_SPANWISE_INTERP> Inlet_SpanwiseInterpolation_Map = {
MakePair("NONE", INLET_SPANWISE_INTERP::NONE)
MakePair("LINEAR_1D", INLET_SPANWISE_INTERP::LINEAR_1D)
MakePair("AKIMA_1D", INLET_SPANWISE_INTERP::AKIMA_1D)
MakePair("CUBIC_1D", INLET_SPANWISE_INTERP::CUBIC_1D)
};
/*!
* \brief type of radial spanwise interpolation data type for the inlet face
*/
enum class INLET_INTERP_TYPE {
VR_VTHETA,
ALPHA_PHI,
};
static const MapType<std::string, INLET_INTERP_TYPE> Inlet_SpanwiseInterpolationType_Map = {
MakePair("VR_VTHETA", INLET_INTERP_TYPE::VR_VTHETA)
MakePair("ALPHA_PHI", INLET_INTERP_TYPE::ALPHA_PHI)
};
/*!
* \brief types of (coupling) transfers between distinct physical zones
*/
enum ENUM_TRANSFER {
ZONES_ARE_EQUAL = 0, /*!< \brief Zones are equal - no transfer. */
NO_COMMON_INTERFACE = 1, /*!< \brief No common interface between the zones (geometrical). */
NO_TRANSFER = 2, /*!< \brief Zones may share a boundary, but still no coupling desired. */
FLOW_TRACTION = 10, /*!< \brief Flow traction coupling (between fluids and solids). */
BOUNDARY_DISPLACEMENTS = 21, /*!< \brief Boundary displacements (between fluids and solids) */
SLIDING_INTERFACE = 13, /*!< \brief Sliding interface (between fluids). */
CONSERVATIVE_VARIABLES = 14, /*!< \brief General coupling that simply transfers the conservative variables (between same solvers). */
MIXING_PLANE = 15, /*!< \brief Mixing plane between fluids. */
CONJUGATE_HEAT_FS = 16, /*!< \brief Conjugate heat transfer (between compressible fluids and solids). */
CONJUGATE_HEAT_WEAKLY_FS = 17, /*!< \brief Conjugate heat transfer (between incompressible fluids and solids). */
CONJUGATE_HEAT_SF = 18, /*!< \brief Conjugate heat transfer (between solids and compressible fluids). */
CONJUGATE_HEAT_WEAKLY_SF = 19, /*!< \brief Conjugate heat transfer (between solids and incompressible fluids). */
CONJUGATE_HEAT_SS = 20, /*!< \brief Conjugate heat transfer (between two solids). */
};
/*!
* \brief different regime modes
*/
enum class ENUM_REGIME {
COMPRESSIBLE = 0, /*!< \brief Definition of compressible solver. */
INCOMPRESSIBLE = 1, /*!< \brief Definition of incompressible solver. */
NO_FLOW = 2
};
/*!
* \brief different non-dimensional modes
*/
enum ENUM_KIND_NONDIM {
DIMENSIONAL = 0, /*!< \brief Dimensional simulation (compressible or incompressible). */
FREESTREAM_PRESS_EQ_ONE = 1, /*!< \brief Non-dimensional compressible simulation with freestream pressure equal to 1.0. */
FREESTREAM_VEL_EQ_MACH = 2, /*!< \brief Non-dimensional compressible simulation with freestream velocity equal to Mach number. */
FREESTREAM_VEL_EQ_ONE = 3, /*!< \brief Non-dimensional compressible simulation with freestream pressure equal to 1.0. */
INITIAL_VALUES = 4, /*!< \brief Non-dimensional incompressible simulation based on intial values for external flow. */
REFERENCE_VALUES = 5 /*!< \brief Non-dimensional incompressible simulation based on custom reference values. */
};
static const MapType<std::string, ENUM_KIND_NONDIM> NonDim_Map = {
MakePair("DIMENSIONAL", DIMENSIONAL)
MakePair("FREESTREAM_PRESS_EQ_ONE", FREESTREAM_PRESS_EQ_ONE)
MakePair("FREESTREAM_VEL_EQ_MACH", FREESTREAM_VEL_EQ_MACH)
MakePair("FREESTREAM_VEL_EQ_ONE", FREESTREAM_VEL_EQ_ONE)
MakePair("INITIAL_VALUES", INITIAL_VALUES)
MakePair("REFERENCE_VALUES", REFERENCE_VALUES)
};
/*!
* \brief different system of measurements
*/
enum ENUM_MEASUREMENTS {
SI = 0, /*!< \brief Definition of compressible solver. */
US = 1 /*!< \brief Definition of incompressible solver. */
};
static const MapType<std::string, ENUM_MEASUREMENTS> Measurements_Map = {
MakePair("SI", SI)
MakePair("US", US)
};
/*!
* \brief different types of systems
*/
enum RUNTIME_TYPE {
RUNTIME_FLOW_SYS = 2, /*!< \brief One-physics case, the code is solving the flow equations(Euler and Navier-Stokes). */
RUNTIME_TURB_SYS = 3, /*!< \brief One-physics case, the code is solving the turbulence model. */
RUNTIME_ADJFLOW_SYS = 6, /*!< \brief One-physics case, the code is solving the adjoint equations is being solved (Euler and Navier-Stokes). */
RUNTIME_ADJTURB_SYS = 7, /*!< \brief One-physics case, the code is solving the adjoint turbulence model. */
RUNTIME_MULTIGRID_SYS = 14, /*!< \brief Full Approximation Storage Multigrid system of equations. */
RUNTIME_FEA_SYS = 20, /*!< \brief One-physics case, the code is solving the FEA equation. */
RUNTIME_ADJFEA_SYS = 30, /*!< \brief One-physics case, the code is solving the adjoint FEA equation. */
RUNTIME_HEAT_SYS = 21, /*!< \brief One-physics case, the code is solving the heat equation. */
RUNTIME_ADJHEAT_SYS = 31, /*!< \brief One-physics case, the code is solving the adjoint heat equation. */
RUNTIME_TRANS_SYS = 22, /*!< \brief One-physics case, the code is solving the transition 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_SPECIES_SYS = 25, /*!< \brief One-physics case, the code is solving the species model. */
RUNTIME_ADJSPECIES_SYS = 26,/*!< \brief One-physics case, the code is solving the adjoint species model. */
};
enum SOLVER_TYPE : const int {
FLOW_SOL=0, /*!< \brief Position of the mean flow solution in the solver container array. */
ADJFLOW_SOL=1, /*!< \brief Position of the continuous adjoint flow solution in the solver container array. */
TURB_SOL=2, /*!< \brief Position of the turbulence model solution in the solver container array. */
ADJTURB_SOL=3, /*!< \brief Position of the continuous adjoint turbulence solution in the solver container array. */
TRANS_SOL=4, /*!< \brief Position of the transition model solution in the solver container array. */
HEAT_SOL=5, /*!< \brief Position of the heat equation in the solution solver array. */
ADJHEAT_SOL=6, /*!< \brief Position of the adjoint heat equation in the solution solver array. */
RAD_SOL=7, /*!< \brief Position of the radiation equation in the solution solver array. */
ADJRAD_SOL=8, /*!< \brief Position of the continuous adjoint turbulence solution in the solver container array. */
MESH_SOL=9, /*!< \brief Position of the mesh solver. */
ADJMESH_SOL=10, /*!< \brief Position of the adjoint of the mesh solver. */
SPECIES_SOL=11, /*!< \brief Position of the species solver. */
ADJSPECIES_SOL=12, /*!< \brief Position of the adjoint of the species solver. */
FEA_SOL=0, /*!< \brief Position of the Finite Element flow solution in the solver container array. */
ADJFEA_SOL=1, /*!< \brief Position of the continuous adjoint Finite Element flow solution in the solver container array. */
TEMPLATE_SOL=0, /*!< \brief Position of the template solution. */
};
const int CONV_TERM = 0; /*!< \brief Position of the convective terms in the numerics container array. */
const int VISC_TERM = 1; /*!< \brief Position of the viscous terms in the numerics container array. */
const int SOURCE_FIRST_TERM = 2; /*!< \brief Position of the first source term in the numerics container array. */
const int SOURCE_SECOND_TERM = 3; /*!< \brief Position of the second source term in the numerics container array. */
const int CONV_BOUND_TERM = 4; /*!< \brief Position of the convective boundary terms in the numerics container array. */
const int VISC_BOUND_TERM = 5; /*!< \brief Position of the viscous boundary terms in the numerics container array. */
const int GRAD_TERM = 6; /*!< \brief Position of the gradient smoothing terms in the numerics container array. */
const int FEA_TERM = 0; /*!< \brief Position of the finite element analysis terms in the numerics container array. */
const int DE_TERM = 1; /*!< \brief Position of the dielectric terms in the numerics container array. */
const int MAT_NHCOMP = 2; /*!< \brief Position of the Neo-Hookean compressible material model. */
const int MAT_IDEALDE = 3; /*!< \brief Position of the Ideal-DE material model. */
const int MAT_KNOWLES = 4; /*!< \brief Position of the Knowles material model. */
/*!
* \brief Types of finite elements (in 1D or 2D or 3D)
*/
const int EL_LINE = 6; /*!< \brief Elements of two nodes, with second order gauss quadrature (1D). */
const int EL_TRIA = 0; /*!< \brief Elements of three nodes (2D). */
const int EL_QUAD = 1; /*!< \brief Elements of four nodes (2D). */
const int EL_TRIA2 = 2; /*!< \brief Elements of three nodes (2D), with second order gauss quadrature. */
const int EL_TETRA = 0; /*!< \brief Elements of four nodes (3D). */
const int EL_HEXA = 1; /*!< \brief Elements of eight nodes (3D). */
const int EL_PYRAM = 2; /*!< \brief Elements of five nodes (3D). */
const int EL_PRISM = 3; /*!< \brief Elements of six nodes (3D). */
const int EL_TETRA2 = 4; /*!< \brief Elements of four nodes, with second order gauss quadrature (3D). */
const int EL_PYRAM2 = 5; /*!< \brief Elements of five nodes, with third order gauss quadrature (3D). */
/*!
* \brief Types of spatial discretizations
*/
enum ENUM_SPACE {
NO_CONVECTIVE = 0, /*!< \brief No convective scheme is used. */
SPACE_CENTERED = 1, /*!< \brief Space centered convective numerical method. */
SPACE_UPWIND = 2, /*!< \brief Upwind convective numerical method. */
FINITE_ELEMENT = 3 /*!< \brief Finite element convective numerical method. */
};
/*!
* \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. */
FLUID_MIXTURE = 9, /*!< \brief Species mixture model. */
COOLPROP = 10, /*!< \brief Thermodynamics library. */
FLUID_FLAMELET = 11, /*!< \brief lookup table (LUT) method for premixed flamelets. */
DATADRIVEN_FLUID = 12, /*!< \brief multi-layer perceptron driven fluid model. */
};
static const MapType<std::string, ENUM_FLUIDMODEL> FluidModel_Map = {
MakePair("STANDARD_AIR", STANDARD_AIR)
MakePair("IDEAL_GAS", IDEAL_GAS)
MakePair("VW_GAS", VW_GAS)
MakePair("PR_GAS", PR_GAS)
MakePair("CONSTANT_DENSITY", CONSTANT_DENSITY)
MakePair("INC_IDEAL_GAS", INC_IDEAL_GAS)
MakePair("INC_IDEAL_GAS_POLY", INC_IDEAL_GAS_POLY)
MakePair("MUTATIONPP", MUTATIONPP)
MakePair("SU2_NONEQ", SU2_NONEQ)
MakePair("FLUID_MIXTURE", FLUID_MIXTURE)
MakePair("COOLPROP", COOLPROP)
MakePair("DATADRIVEN_FLUID", DATADRIVEN_FLUID)
MakePair("FLUID_FLAMELET", FLUID_FLAMELET)
};
/*!
* \brief types of gas models
*/
enum ENUM_GASMODEL {
NO_MODEL = 0,
ARGON = 1,
AIR7 = 2,
AIR21 = 3,
O2 = 4,
N2 = 5,
AIR5 = 6,
ARGON_SID = 7,
ONESPECIES = 8
};
static const MapType<std::string, ENUM_GASMODEL> GasModel_Map = {
MakePair("NONE", NO_MODEL)
MakePair("ARGON", ARGON)
MakePair("AIR-7", AIR7)
MakePair("AIR-21", AIR21)
MakePair("O2", O2)
MakePair("N2", N2)
MakePair("AIR-5", AIR5)
MakePair("ARGON-SID",ARGON_SID)
MakePair("ONESPECIES", ONESPECIES)
};
/*!
* \brief Types of interpolation methods for data-driven fluid models.
*/
enum class ENUM_DATADRIVEN_METHOD {
LUT = 0,
MLP = 1
};
static const MapType<std::string, ENUM_DATADRIVEN_METHOD> DataDrivenMethod_Map = {
MakePair("LUT", ENUM_DATADRIVEN_METHOD::LUT)
MakePair("MLP", ENUM_DATADRIVEN_METHOD::MLP)
};
/*!
* \brief types of coefficient transport model
*/
enum class TRANSCOEFFMODEL {
SUTHERLAND,
WILKE,
GUPTAYOS,
CHAPMANN_ENSKOG
};
static const MapType<std::string, TRANSCOEFFMODEL> TransCoeffModel_Map = {
MakePair("SUTHERLAND", TRANSCOEFFMODEL::SUTHERLAND)
MakePair("WILKE", TRANSCOEFFMODEL::WILKE)
MakePair("GUPTA-YOS", TRANSCOEFFMODEL::GUPTAYOS)
MakePair("CHAPMANN-ENSKOG", TRANSCOEFFMODEL::CHAPMANN_ENSKOG)
};
/*!
* \brief Types of density models
*/
enum class INC_DENSITYMODEL {
CONSTANT, /*!< \brief Constant density. */
BOUSSINESQ, /*!< \brief Boussinesq density model. */
VARIABLE, /*!< \brief Variable density model. */
FLAMELET, /*!< \brief Density according to flamelet manifold. */
};
static const MapType<std::string, INC_DENSITYMODEL> DensityModel_Map = {
MakePair("CONSTANT", INC_DENSITYMODEL::CONSTANT)
MakePair("BOUSSINESQ", INC_DENSITYMODEL::BOUSSINESQ)
MakePair("VARIABLE", INC_DENSITYMODEL::VARIABLE)
MakePair("FLAMELET", INC_DENSITYMODEL::FLAMELET)
};
/*!
* \brief Types of initialization option
*/
enum ENUM_INIT_OPTION {
REYNOLDS = 0, /*!< \brief Reynold's number initalization. */
TD_CONDITIONS = 1 /*!< \brief Total conditions initalization. */
};
static const MapType<std::string, ENUM_INIT_OPTION> InitOption_Map = {
MakePair("REYNOLDS", REYNOLDS)
MakePair("TD_CONDITIONS", TD_CONDITIONS)
};
/*!
* \brief Types of freestream specification
*/
enum class FREESTREAM_OPTION {
TEMPERATURE_FS, /*!< \brief Temperature initialization. */
DENSITY_FS, /*!< \brief Density initalization. */
};
static const MapType<std::string, FREESTREAM_OPTION> FreeStreamOption_Map = {
MakePair("TEMPERATURE_FS", FREESTREAM_OPTION::TEMPERATURE_FS)
MakePair("DENSITY_FS", FREESTREAM_OPTION::DENSITY_FS)
};
/*!
* \brief Types of viscosity model
*/
enum class VISCOSITYMODEL {
CONSTANT, /*!< \brief Constant viscosity. */
SUTHERLAND, /*!< \brief Sutherlands Law viscosity. */
POLYNOMIAL, /*!< \brief Polynomial viscosity. */
FLAMELET, /*!< \brief LUT method for flamelets */
COOLPROP, /*!< \brief CoolProp viscosity. */
};
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)
MakePair("COOLPROP", VISCOSITYMODEL::COOLPROP)
};
/*!
* \brief Types of Mixing viscosity model
*/
enum class MIXINGVISCOSITYMODEL {
WILKE, /*!< \brief Wilke mixing viscosity model. */
DAVIDSON, /*!< \brief Davidson mixing viscosity model. */
};
static const MapType<std::string, MIXINGVISCOSITYMODEL> MixingViscosityModel_Map = {
MakePair("WILKE", MIXINGVISCOSITYMODEL::WILKE)
MakePair("DAVIDSON", MIXINGVISCOSITYMODEL::DAVIDSON)
};
/*!
* \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 LUT method for flamelets */
COOLPROP, /*!< \brief COOLPROP thermal conductivity. */
};
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)
MakePair("COOLPROP", CONDUCTIVITYMODEL::COOLPROP)
};
/*!
* \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. */
};
static const MapType<std::string, CONDUCTIVITYMODEL_TURB> TurbConductivityModel_Map = {
MakePair("NONE", CONDUCTIVITYMODEL_TURB::NONE)
MakePair("CONSTANT_PRANDTL_TURB", CONDUCTIVITYMODEL_TURB::CONSTANT_PRANDTL)
};
/*!
* \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. */
UNITY_LEWIS, /*!< \brief Unity Lewis model for mass diffusion in scalar transport. */
CONSTANT_LEWIS, /*!< \brief Different Lewis number model for mass diffusion in scalar transport. */
FLAMELET, /*!< \brief flamelet model for tabulated chemistry, diffusivity from lookup table */
};
static const MapType<std::string, DIFFUSIVITYMODEL> Diffusivity_Model_Map = {
MakePair("CONSTANT_DIFFUSIVITY", DIFFUSIVITYMODEL::CONSTANT_DIFFUSIVITY)
MakePair("CONSTANT_SCHMIDT", DIFFUSIVITYMODEL::CONSTANT_SCHMIDT)
MakePair("UNITY_LEWIS", DIFFUSIVITYMODEL::UNITY_LEWIS)
MakePair("CONSTANT_LEWIS", DIFFUSIVITYMODEL::CONSTANT_LEWIS)
MakePair("FLAMELET", DIFFUSIVITYMODEL::FLAMELET)
};
/*!
* \brief Types of unsteady mesh motion
*/
enum ENUM_GRIDMOVEMENT {
NO_MOVEMENT = 0, /*!< \brief Simulation on a static mesh. */
RIGID_MOTION = 2, /*!< \brief Simulation with rigid mesh motion (plunging/pitching/rotation). */
ROTATING_FRAME = 8, /*!< \brief Simulation in a rotating frame. */
STEADY_TRANSLATION = 11, /*!< \brief Simulation in a steadily translating frame. */
GUST = 12, /*!< \brief Simulation on a static mesh with a gust. */
};
static const MapType<std::string, ENUM_GRIDMOVEMENT> GridMovement_Map = {
MakePair("NONE", NO_MOVEMENT)
MakePair("RIGID_MOTION", RIGID_MOTION)
MakePair("ROTATING_FRAME", ROTATING_FRAME)
MakePair("STEADY_TRANSLATION", STEADY_TRANSLATION)
MakePair("GUST", GUST)
};
enum ENUM_SURFACEMOVEMENT {
DEFORMING = 1, /*!< \brief Simulation with deformation. */
MOVING_WALL = 2, /*!< \brief Simulation with moving wall. */
AEROELASTIC = 3, /*!< \brief Simulation with aeroelastic motion. */
AEROELASTIC_RIGID_MOTION = 4, /*!< \brief Simulation with rotation and aeroelastic motion. */
EXTERNAL = 6, /*!< \brief Simulation with external motion. */
EXTERNAL_ROTATION = 7, /*!< \brief Simulation with external rotation motion. */
};
static const MapType<std::string, ENUM_SURFACEMOVEMENT> SurfaceMovement_Map = {
MakePair("DEFORMING", DEFORMING)
MakePair("MOVING_WALL", MOVING_WALL)
MakePair("AEROELASTIC_RIGID_MOTION", AEROELASTIC_RIGID_MOTION)
MakePair("AEROELASTIC", AEROELASTIC)
MakePair("EXTERNAL", EXTERNAL)
MakePair("EXTERNAL_ROTATION", EXTERNAL_ROTATION)
};
/*!
* \brief Type of wind gusts
*/
enum ENUM_GUST_TYPE {
NO_GUST = 0, /*!< \brief No gust. */
TOP_HAT = 1, /*!< \brief Top-hat function shaped gust */
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 */
};
static const MapType<std::string, ENUM_GUST_TYPE> Gust_Type_Map = {
MakePair("NONE", NO_GUST)
MakePair("TOP_HAT", TOP_HAT)
MakePair("SINE", SINE)
MakePair("ONE_M_COSINE", ONE_M_COSINE)
MakePair("VORTEX", VORTEX)
MakePair("EOG", EOG)
};
/*!
* \brief Type of wind direction
*/
enum ENUM_GUST_DIR {
X_DIR = 0, /*!< \brief Gust direction-X. */
Y_DIR = 1, /*!< \brief Gust direction-Y. */
Z_DIR = 2 /*!< \brief Gust direction-Z. */
};
static const MapType<std::string, ENUM_GUST_DIR> Gust_Dir_Map = {
MakePair("X_DIR", X_DIR)
MakePair("Y_DIR", Y_DIR)
MakePair("Z_DIR", Z_DIR)
};
// If you add to ENUM_CENTERED, you must also add the option to ENUM_CONVECTIVE
/*!
* \brief Types of centered spatial discretizations
*/
enum class CENTERED {
NONE, /*!< \brief No centered scheme is used. */
JST, /*!< \brief Jameson-Smith-Turkel centered numerical method. */
LAX, /*!< \brief Lax-Friedrich centered numerical method. */
JST_MAT, /*!< \brief JST with matrix dissipation. */
JST_KE /*!< \brief Kinetic Energy preserving Jameson-Smith-Turkel centered numerical method. */
};
static const MapType<std::string, CENTERED> Centered_Map = {
MakePair("NONE", CENTERED::NONE)
MakePair("JST", CENTERED::JST)
MakePair("JST_KE", CENTERED::JST_KE)
MakePair("JST_MAT", CENTERED::JST_MAT)
MakePair("LAX-FRIEDRICH", CENTERED::LAX)
};
// If you add to UPWIND, you must also add the option to ENUM_CONVECTIVE
/*!
* \brief Types of upwind spatial discretizations
*/
enum class UPWIND {
NONE, /*!< \brief No upwind scheme is used. */
ROE, /*!< \brief Roe's upwind numerical method. */
SCALAR_UPWIND, /*!< \brief Scalar upwind numerical method. */
AUSM, /*!< \brief AUSM numerical method. */
HLLC, /*!< \brief HLLC numerical method. */
SW, /*!< \brief Steger-Warming method. */
MSW, /*!< \brief Modified Steger-Warming method. */
TURKEL, /*!< \brief Roe-Turkel's upwind numerical method. */
SLAU, /*!< \brief Simple Low-Dissipation AUSM numerical method. */
CONVECTIVE_TEMPLATE, /*!< \brief Template for new numerical method . */
L2ROE, /*!< \brief L2ROE numerical method . */
LMROE, /*!< \brief Rieper's Low Mach ROE numerical method . */
SLAU2, /*!< \brief Simple Low-Dissipation AUSM 2 numerical method. */
FDS, /*!< \brief Flux difference splitting upwind method (incompressible flows). */
LAX_FRIEDRICH, /*!< \brief Lax-Friedrich numerical method. */
AUSMPLUSUP, /*!< \brief AUSM+ -up numerical method (All Speed) */
AUSMPLUSUP2, /*!< \brief AUSM+ -up2 numerical method (All Speed) */
AUSMPLUSM, /*!< \breif AUSM+M numerical method. (NEMO Only)*/
BOUNDED_SCALAR /*!< \brief Scalar advection numerical method. */
};
static const MapType<std::string, UPWIND> Upwind_Map = {
MakePair("NONE", UPWIND::NONE)
MakePair("ROE", UPWIND::ROE)
MakePair("TURKEL_PREC", UPWIND::TURKEL)
MakePair("AUSM", UPWIND::AUSM)
MakePair("AUSMPLUSUP", UPWIND::AUSMPLUSUP)
MakePair("AUSMPLUSUP2", UPWIND::AUSMPLUSUP2)
MakePair("AUSMPLUSM", UPWIND::AUSMPLUSM)
MakePair("SLAU", UPWIND::SLAU)
MakePair("HLLC", UPWIND::HLLC)
MakePair("SW", UPWIND::SW)
MakePair("MSW", UPWIND::MSW)
MakePair("SCALAR_UPWIND", UPWIND::SCALAR_UPWIND)
MakePair("BOUNDED_SCALAR", UPWIND::BOUNDED_SCALAR)
MakePair("CONVECTIVE_TEMPLATE", UPWIND::CONVECTIVE_TEMPLATE)
MakePair("L2ROE", UPWIND::L2ROE)
MakePair("LMROE", UPWIND::LMROE)
MakePair("SLAU2", UPWIND::SLAU2)
MakePair("FDS", UPWIND::FDS)
MakePair("LAX-FRIEDRICH", UPWIND::LAX_FRIEDRICH)
};
/*!
* \brief Types of FEM spatial discretizations
*/
enum ENUM_FEM {
NO_FEM = 0, /*!< \brief No finite element scheme is used. */
DG = 1 /*!< \brief Discontinuous Galerkin numerical method. */
};
static const MapType<std::string, ENUM_FEM> FEM_Map = {
MakePair("NONE", NO_FEM)
MakePair("DG", DG)
};
/*!
* \brief Types of shock capturing method in Discontinuous Galerkin numerical method.
*/
enum class FEM_SHOCK_CAPTURING_DG {
NONE, /*!< \brief Shock capturing is not used. */
PERSSON /*!< \brief Per-Olof Persson's sub-cell shock capturing method. */
};
static const MapType<std::string, FEM_SHOCK_CAPTURING_DG> ShockCapturingDG_Map = {
MakePair("NONE", FEM_SHOCK_CAPTURING_DG::NONE)
MakePair("PERSSON", FEM_SHOCK_CAPTURING_DG::PERSSON)
};
/*!
* \brief Types of matrix coloring to compute a sparse Jacobian matrix.
*/
enum ENUM_MATRIX_COLORING {
GREEDY_COLORING = 0, /*!< \brief Greedy type of algorithm for the coloring. */
NATURAL_COLORING = 1 /*!< \brief One color for every DOF, very slow. Only to be used for debugging. */
};
static const MapType<std::string, ENUM_MATRIX_COLORING> MatrixColoring_Map = {
MakePair("GREEDY_COLORING", GREEDY_COLORING)
MakePair("NATURAL_COLORING", NATURAL_COLORING)
};
/*!
* \brief Types of slope limiters
*/
enum class LIMITER {
NONE , /*!< \brief No limiter. */
VENKATAKRISHNAN , /*!< \brief Slope limiter using Venkatakrisnan method (stencil formulation). */
NISHIKAWA_R3 , /*!< \brief Slope limiter using Nishikawa's R3 method (stencil formulation). */
NISHIKAWA_R4 , /*!< \brief Slope limiter using Nishikawa's R4 method (stencil formulation). */
NISHIKAWA_R5 , /*!< \brief Slope limiter using Nishikawa's R5 method (stencil formulation). */
VENKATAKRISHNAN_WANG , /*!< \brief Slope limiter using Venkatakrisnan method, eps based on solution (stencil formulation). */
BARTH_JESPERSEN , /*!< \brief Slope limiter using Barth-Jespersen method (stencil formulation). */
VAN_ALBADA_EDGE , /*!< \brief Slope limiter using Van Albada method (edge formulation). */
SHARP_EDGES , /*!< \brief Slope limiter using sharp edges. */
WALL_DISTANCE /*!< \brief Slope limiter using wall distance. */
};
static const MapType<std::string, LIMITER> Limiter_Map = {
MakePair("NONE", LIMITER::NONE)
MakePair("VENKATAKRISHNAN", LIMITER::VENKATAKRISHNAN)
MakePair("NISHIKAWA_R3", LIMITER::NISHIKAWA_R3)
MakePair("NISHIKAWA_R4", LIMITER::NISHIKAWA_R4)
MakePair("NISHIKAWA_R5", LIMITER::NISHIKAWA_R5)
MakePair("VENKATAKRISHNAN_WANG", LIMITER::VENKATAKRISHNAN_WANG)
MakePair("BARTH_JESPERSEN", LIMITER::BARTH_JESPERSEN)
MakePair("VAN_ALBADA_EDGE", LIMITER::VAN_ALBADA_EDGE)
MakePair("SHARP_EDGES", LIMITER::SHARP_EDGES)
MakePair("WALL_DISTANCE", LIMITER::WALL_DISTANCE)
};
/*!
* \brief Types of turbulent models
*/
enum class TURB_MODEL {
NONE, /*!< \brief No turbulence model. */
SA, /*!< \brief Kind of Turbulent model (Spalart-Allmaras). */
SST, /*!< \brief Kind of Turbulence model (Menter SST). */
};
static const MapType<std::string, TURB_MODEL> Turb_Model_Map = {
MakePair("NONE", TURB_MODEL::NONE)
MakePair("SA", TURB_MODEL::SA)
MakePair("SST", TURB_MODEL::SST)
};
/*!
* \brief Families of turbulence models
*/
enum class TURB_FAMILY {
NONE, /*!< \brief No turbulence model. */
SA, /*!< \brief Spalart-Allmaras variants. */
KW, /*!< \brief k-w models. */
};
/*!
* \brief Associate turb models with their family
*/
inline TURB_FAMILY TurbModelFamily(TURB_MODEL model) {
switch (model) {
case TURB_MODEL::NONE:
return TURB_FAMILY::NONE;
case TURB_MODEL::SA:
return TURB_FAMILY::SA;
case TURB_MODEL::SST:
return TURB_FAMILY::KW;
}
return TURB_FAMILY::NONE;
}
/*!
* \brief SST Options
*/
enum class SST_OPTIONS {
NONE, /*!< \brief No SST Turb model. */
V1994, /*!< \brief 1994 Menter k-w SST model. */
V2003, /*!< \brief 2003 Menter k-w SST model. */
V1994m, /*!< \brief 1994m Menter k-w SST model. */
V2003m, /*!< \brief 2003m Menter k-w SST model. */
SUST, /*!< \brief Menter k-w SST model with sustaining terms. */
V, /*!< \brief Menter k-w SST model with vorticity production terms. */
KL, /*!< \brief Menter k-w SST model with Kato-Launder production terms. */
UQ, /*!< \brief Menter k-w SST model with uncertainty quantification modifications. */
COMP_Wilcox, /*!< \brief Menter k-w SST model with Compressibility correction of Wilcox. */
COMP_Sarkar, /*!< \brief Menter k-w SST model with Compressibility correction of Sarkar. */
DLL, /*!< \brief Menter k-w SST model with dimensionless lower limit clipping of turbulence variables. */
};
static const MapType<std::string, SST_OPTIONS> SST_Options_Map = {
MakePair("NONE", SST_OPTIONS::NONE)