Memosa-FVM  0.2
esbgkbase/COMETBC.h
Go to the documentation of this file.
1 // This file os part of FVM
2 // Copyright (c) 2012 FVM Authors
3 // See LICENSE file for terms.
4 
5 #ifndef _COMETBC_H_
6 #define _COMETBC_H_
7 
8 #include "misc.h"
9 #include "FloatVarDict.h"
10 #include "AMG.h"
11 
12 template<class T>
13 struct COMETBC : public FloatVarDict<T>
14 {
16  {
17  this->defineVar("specifiedXVelocity",T(0.00));
18  this->defineVar("specifiedYVelocity",T(0.0));
19  this->defineVar("specifiedZVelocity",T(0.0));
20  this->defineVar("specifiedPressure",T(1.0));
21  this->defineVar("specifiedDensity",T(1.0));
22  this->defineVar("specifiedTemperature",T(1.0));
23  this->defineVar("accommodationCoefficient",T(1.0));
24  this->defineVar("specifiedMassFlowRate",T(1.0));
25  this->defineVar("specifiedTauxx",T(1.0));
26  this->defineVar("specifiedTauyy",T(1.0));
27  this->defineVar("specifiedTauzz",T(1.0));
28  this->defineVar("specifiedTauxy",T(0.0));
29  this->defineVar("specifiedTauyz",T(0.0));
30  this->defineVar("specifiedTauzx",T(0.0));
31  }
32  string bcType;
33 };
34 
35 template<class T>
36 struct COMETVC : public FloatVarDict<T>
37 {
39  {
40  this->defineVar("viscosity",T(1e-3));
41  this->defineVar("density",T(1.0));
42  }
43  string vcType;
44 };
45 
46 
47 template<class T>
48 struct COMETModelOptions : public FloatVarDict<T>
49 {
51  {
52  this->defineVar("initialXVelocity",T(0.0));
53  this->defineVar("initialYVelocity",T(0.0));
54  this->defineVar("initialZVelocity",T(0.0));
55  this->defineVar("initialPressure",T(0.0));
56  this->defineVar("momentumURF",T(0.7));
57  this->defineVar("velocityURF",T(1.0));
58  this->defineVar("pressureURF",T(0.3));
59  this->defineVar("timeStep",T(1E-3));
60 
61  this->defineVar("rho_init",T(9.28E-6));
62  this->defineVar("T_init",T(273.15));
63  this->defineVar("nonDimLt",T(1.0));
64  this->defineVar("nonDimLx",T(1.0));
65  this->defineVar("nonDimLy",T(1.0));
66  this->defineVar("nonDimLz",T(1.0));
67 
68 
69  this->defineVar("operatingPressure",T(101325.0));
70  this->defineVar("operatingTemperature",T(300.0));
71 
72  this->defineVar("molecularWeight",T(40.0));
73  this ->defineVar("Tmuref",T(273.15));
74  this ->defineVar("muref",T(2.117e-5));
75  this ->defineVar("mu_w",T(0.81));
76  this->Prandtl=2.0/3.0;
77  this->SpHeatRatio=5.0/3.0;
78  // Argon 2.117e-5,0.81
79  // Helium 1.865e-5,0.66
80  // Air 1.7116e-5, 0.74
81  // Nitrogen 1.781e-5,
82 
83  // Argon, Helium Pr=2/3, gamma=5/3
84  // Air, Nitrogen Pr=3/4, gamma=7/5
85 
86  this->Tolerance=1e-4;
87  this->printNormalizedResiduals = true;
88  this->transient = false;
89 
90  this->fgamma=2;
91 
92 
94  this->conOrder=1;
95  this->showResidual=5;
96  this->maxLevels=2;
97  this->AgglomerationMethod="FaceArea";
98  this->preSweeps=0;
99  this->postSweeps=2;
100  this->preCoarsestSweeps=1;
101  this->postCoarsestSweeps=1;
102  this->method=1;
103  this->relaxDistribution=0;
104  this->underRelaxation=1.0;
105  this->minCells=1;
106  this->CentralDifference=false;
107  this->KineticLinearSolver = 0;
108 
109  this-> printCellNumber=0;
110  this->defineVar("printDirectionNumber",545);
111 
112  this->NewtonsMethod_ktrial=50;
113  this->relativeTolerance=1e-14;
114  this->absoluteTolerance=1e-22;
115 
116  this->BoltzmannConstant=1.38e-23;
117  this->Planck=6.26068E-34;
118  this->epsilon_ES=1e-50;
119  this->pi=acos(-1.0);//3.14159;
120 
121  this->Knq_direction=0;
122  //used in Newton's Method for Equilibrium distribution function
123  this->defineVar("ToleranceX",T(1e-8));
124  this->defineVar("ToleranceF",T(1e-16));
125  }
126 
128  double Tolerance;
129  bool transient;
130 
132  double Planck;
133 
136 
137  double epsilon_ES;
138  double pi;
139 
142  int conOrder;
143  double absTolerance;
144  double relTolerance;
153  int method;
155  int minCells;
157 
160  int fgamma;
162  double Prandtl;
163  double SpHeatRatio;
164 
165 #ifndef SWIG
167  {
168  if (this->KineticLinearSolver == 0)
169  {
170  LinearSolver* ls(new AMG());
171  ls->relativeTolerance = 1e-15;
172  ls->nMaxIterations = 100;
173  ls->verbosity=0;
174  this->KineticLinearSolver = ls;
175  }
176  return *this->KineticLinearSolver ;
177  }
178 #endif
179 
180 };
181 
182 #endif
string vcType
LinearSolver * KineticLinearSolver
Definition: AMG.h:27
void defineVar(const string varName, const T defaultValue)
Definition: FloatVarDict.h:94
string bcType
int nMaxIterations
Definition: LinearSolver.h:31
double relativeTolerance
Definition: LinearSolver.h:33
LinearSolver & getKineticLinearSolver()