Memosa-FVM  0.2
KeBC.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 #include "FloatVarDict.h"
6 #include "AMG.h"
7 
8 template<class T>
9 struct KeBC : public FloatVarDict<T>
10 {
11  KeBC()
12  {
13  this->defineVar("Specifiedk",T(1.0));
14  this->defineVar("specifiede",T(1.0));
15 
16  }
17  string bcType;
18 };
19 
20 template<class T>
21 struct KeVC : public FloatVarDict<T>
22 {
23  KeVC()
24  {
25  this->defineVar("InitialEnergy",T(1.0));
26  this->defineVar("InitialDissipation",T(1.0));
27  this->defineVar("c1",T(1e-5));
28  this->defineVar("c2",T(7.69e-06));
29 
30 
31  }
32  string vcType;
33 };
34 
35 template<class T>
36 struct KeModelOptions : public FloatVarDict<T>
37 {
39  {
40  this->defineVar("timeStep",T(0.1));
41  this->relativeTolerance=1e-7;
42  this->absoluteTolerance=1e-7;
43  this->defineVar("energyURF",T(0.8));
44  this->defineVar("dissipationURF",T(0.8));
45  this->linearSolver = 0;
46  this->useCentralDifference=false;
47  this->transient = false;
49  this-> cmu=0.09;
50  this-> c2mu=1.92;
51  this-> c1mu=1.44;
52  this-> vk=0.4187;
53  this-> emp=9.793;
54  this-> sigmak =1.0;
55  this-> sigmae =1.3;
56  this->printNormalizedResiduals = true;
57 
58  }
59 
61  bool transient;
65  double cmu;
66  double c2mu;
67  double c1mu;
68  double vk;
69  double emp;
70  double sigmak;
71  double sigmae;
74 
75 #ifndef SWIG
77  {
78  if (this->linearSolver == 0)
79  {
80  LinearSolver* ls(new AMG());
81  ls->relativeTolerance = 1e-1;
82  ls->nMaxIterations = 20;
83  ls->verbosity=0;
84  this->linearSolver = ls;
85  }
86  return *this->linearSolver ;
87  }
88 #endif
89 };
90 
bool useCentralDifference
Definition: KeBC.h:72
double sigmak
Definition: KeBC.h:70
bool printNormalizedResiduals
Definition: KeBC.h:60
double absoluteTolerance
Definition: KeBC.h:64
Definition: KeBC.h:9
int timeDiscretizationOrder
Definition: KeBC.h:62
string bcType
Definition: KeBC.h:17
LinearSolver * linearSolver
Definition: KeBC.h:73
KeBC()
Definition: KeBC.h:11
Definition: AMG.h:27
double vk
Definition: KeBC.h:68
void defineVar(const string varName, const T defaultValue)
Definition: FloatVarDict.h:94
int nMaxIterations
Definition: LinearSolver.h:31
double relativeTolerance
Definition: LinearSolver.h:33
double emp
Definition: KeBC.h:69
double c2mu
Definition: KeBC.h:66
Definition: KeBC.h:21
double c1mu
Definition: KeBC.h:67
double relativeTolerance
Definition: KeBC.h:63
string vcType
Definition: KeBC.h:32
LinearSolver & getLinearSolver()
Definition: KeBC.h:76
double cmu
Definition: KeBC.h:65
KeModelOptions()
Definition: KeBC.h:38
double sigmae
Definition: KeBC.h:71
KeVC()
Definition: KeBC.h:23