ODT
Loading...
Searching...
No Matches
param.h
Go to the documentation of this file.
1
6#pragma once
7
8#include "inputoutput.h"
9#include <string>
10#include <cstdlib>
11
12class domain;
13
14using namespace std;
15
17
23class param {
24
25 public:
26
28
31
32 int seed;
33 double tEnd;
34 double domainLength;
35 int ngrd0;
36 double rho0;
37 double kvisc0;
38 double sdiff0;
39 double dPdx;
40 double pres;
41 string chemMechFile;
42 string probType;
43
44 double Z_param;
45 double A_param;
46 double C_param;
47 string LES_type;
48 double Z_LES;
49 double diffCFL;
50 double cvode_atol;
51 double cvode_rtol;
52 double x0virtual;
53
54 bool LdoDL;
55 bool Lrad;
56 bool Lbuoyant;
57 bool LPeEddy;
59 double g;
60 string Lsolver;
61 bool Lperiodic;
62 bool Lspatial;
63 bool LTMA;
65 bool Lignition;
66
67 string bcType;
68 int cCoord;
70
71 double gDens;
72 double dxmin;
73 double dxmax;
74
75 double Pmax;
76 double Pav;
77 double dtfac;
80 double DAtimeFac;
81 double tdfac;
82 int sLastDA;
83 double Lp;
84 double Lmax;
85 double Lmin;
86
87 int modDump;
88 int modDisp;
89 bool Ltecplot;
90
92 double eSurfTens;
93
94 double uBClo;
95 double uBChi;
96 double vBClo;
97 double vBChi;
98 double wBClo;
99 double wBChi;
100 double sBClo;
101 double sBChi;
102 string hWallBCtype;
103 double TBClo;
104 double TBChi;
105
106 bool Lrestart;
107 string rstType;
108 double trst;
109
111
112 //----------------- Radiation variables
113
115 string radCoefType;
116 int npsi;
118
120
121 private:
122
123 template <class T>
124 T errMsg(const string param) {
125 *io->ostrm << endl << "ERROR: missing parameter: " + param << endl;
126 exit(0);
127 T dummy = static_cast<T> (0);
128 return dummy;
129 }
130
132
133 public:
134
135 param(inputoutput *p_io);
136 void init(domain *p_domn);
138
139};
140
141
143
144
ostream * ostrm
Runtime: points to cout or to a file.
Definition inputoutput.h:33
Definition param.h:23
string probType
problem type: CHANNEL, CHANNEL_SCALAR, JETMIXL_RXN, COUETTE
Definition param.h:42
double DAtimeFac
time until catch-up adaption is DAtimeFac * dtCUmax
Definition param.h:80
int seed
random number generator seed (negative to randomize it)
Definition param.h:32
int nDtSmeanWait
number of eddy samples before increase dtSmean
Definition param.h:78
int cCoord
1 = planar, 2 = cylindrical, 3 = spherical
Definition param.h:68
bool LPeEddy
flag to turn on potential energy for eddies (vertical domain)
Definition param.h:57
int ntheta
Definition param.h:117
bool LTMA
true for the triplet map TMA: 3 = vol segments; false for TMB: 3 equal length segments
Definition param.h:63
bool LmultiPhase
true if domain has more than one phase (particles don't count)
Definition param.h:91
double diffCFL
multiplies min diffusion timestep
Definition param.h:49
~param()
Definition param.h:137
double dxmin
min grid spacing: = dxmin / domain length
Definition param.h:72
double vBChi
Dirichlet velocity boundary condition.
Definition param.h:97
string radCoefType
PLANCKMEAN, WSGG, RCSLW.
Definition param.h:115
double g
gravity (default -9.81)
Definition param.h:59
inputoutput * io
pointer to io object (has the input file)
Definition param.h:30
bool LplanarExpCent0
flag: for planar cases (C=1) set the expansion center at 0 for outflow cases (normally expand about t...
Definition param.h:58
double uBChi
Dirichlet velocity boundary condition.
Definition param.h:95
double sBChi
Dirichlet scalar boundary condition.
Definition param.h:101
double cvode_atol
absolute tolerace atol for cvode
Definition param.h:50
double sdiff0
initial uniform scalar diffusivity (m^2/s)
Definition param.h:38
int eddyMinCells
eddy must overlap at least this many cells
Definition param.h:79
double TBChi
Required if hWallBCtype = ISOTHERMAL.
Definition param.h:104
double domainLength
length of domain (m)
Definition param.h:34
bool Lspatial
spatial formulation if true
Definition param.h:62
bool Lperiodic
periodic if true
Definition param.h:61
double vBClo
Dirichlet velocity boundary condition.
Definition param.h:96
double trst
restart time (from restart file), default is 0.0;
Definition param.h:108
int modDump
accepted eddies before output file
Definition param.h:87
bool Ltecplot
set TRUE for tecplot friendly output
Definition param.h:89
bool Lignition
true if starting with unreacted mixing profile to allow ignition
Definition param.h:65
int ngrd0
initial grid points
Definition param.h:35
double Lp
Most probable eddy size frac of domainLength.
Definition param.h:83
double Z_param
Viscous penalty parameter.
Definition param.h:44
double dPdx
initial pressure gradient (Pa/m)
Definition param.h:39
double Pmax
maximum eddy acceptance probability
Definition param.h:75
double gDens
grid density for mesher
Definition param.h:71
string LES_type
NONE, THIRDS, ELAPSEDTIME, FRACDOMAIN, INTEGRALSCALE.
Definition param.h:47
double xDomainCenter
position of the center of the domain
Definition param.h:69
double TBClo
Required if hWallBCtype = ISOTHERMAL.
Definition param.h:103
double Lmax
Max eddy size frac of domainLength.
Definition param.h:84
string hWallBCtype
ADIABATIC or ISOTHERMAL.
Definition param.h:102
double C_param
Eddy frequency parameter.
Definition param.h:46
double sBClo
Dirichlet scalar boundary condition.
Definition param.h:100
double eSurfTens
surface tension, J/m2 for liquid phases
Definition param.h:92
int modDisp
frequency to display results (# eddies)
Definition param.h:88
double dtfac
maximum factor to increase dtSmean
Definition param.h:77
bool Lrestart
true to restart from file, else false
Definition param.h:106
double Z_LES
large eddy suppression (nonpositive prevents les test)
Definition param.h:48
string rstType
"single" or "multiple"
Definition param.h:107
string radSolveType
OPTHIN, TWOFLUX, FVDOM.
Definition param.h:114
double x0virtual
LES virtual origin.
Definition param.h:52
double rho0
initial uniform density (kg/m^3)
Definition param.h:36
double uBClo
Dirichlet velocity boundary condition.
Definition param.h:94
double A_param
Energy Distribution parameter alpha.
Definition param.h:45
string Lsolver
EXPLICIT, SEMI-IMPLICIT, or STRANG.
Definition param.h:60
bool LdoDL
flag to do the DL energy from the DL instability
Definition param.h:54
double pres
initial pressure (Pa)
Definition param.h:40
double dxmax
max grid spacing = dxmax / domain length
Definition param.h:73
param(inputoutput *p_io)
Definition param.cc:24
double Pav
Average acceptance probability.
Definition param.h:76
bool Lbuoyant
flag to turn on bouyancy (horizontal domain)
Definition param.h:56
bool LplanarTau
true for computing cylindrical/spherical tau_eddy using a planar formulation. If accepted,...
Definition param.h:64
double kvisc0
initial uniform kinematic viscosity (m^2/s)
Definition param.h:37
string bcType
OUTFLOW, PERIODIC, WALL, WALL_OUT.
Definition param.h:67
double tdfac
factor between dtCUmax and dtCFL for temporal flows; DEFAULT = 1.0
Definition param.h:81
int sLastDA
size of the lastDA vector for timing adaptmesh after diff
Definition param.h:82
domain * domn
pointer to domain object
Definition param.h:29
double tEnd
ending time of realization
Definition param.h:33
double umin_spatial
min u for spatial flows; used when kernels pull velocity
Definition param.h:110
void init(domain *p_domn)
Definition param.cc:14
string chemMechFile
name of chemical mechanism file
Definition param.h:41
double wBClo
Dirichlet velocity boundary condition.
Definition param.h:98
T errMsg(const string param)
Definition param.h:124
bool Lrad
radiation flag
Definition param.h:55
double Lmin
Min eddy size frac of domainLength.
Definition param.h:85
int npsi
Definition param.h:116
double cvode_rtol
relative tolerace rtol for cvode
Definition param.h:51
double wBChi
Dirichlet velocity boundary condition.
Definition param.h:99
Header file for class inputoutput.