Memosa-FVM  0.2
ThermalBC.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 ThermalBC : public FloatVarDict<T>
10 {
12  {
13  this->defineVar("specifiedTemperature",T(300.0));
14  this->defineVar("specifiedHeatFlux",T(0.0));
15  this->defineVar("convectiveCoefficient", T(0.0));
16  this->defineVar("farFieldTemperature", T(300.0));
17  this->defineVar("surfaceEmissivity",T(1.0));
18  }
19  string bcType;
20 };
21 
22 template<class T>
23 struct ThermalVC : public FloatVarDict<T>
24 {
26  {
27  this->defineVar("thermalConductivity",T(1.0));
28  this->defineVar("density", T(1.0));
29  this->defineVar("specificHeat", T(1.0));
30 
31  }
32  string vcType;
33 };
34 
35 template<class T>
37 {
39  {
40  this->defineVar("initialTemperature",T(300.0));
41  this->defineVar("timeStep", T(1e-7));
42  this->relativeTolerance=1e-8;
43  this->absoluteTolerance=1e-16;
44  this->linearSolver = 0;
45  this->useCentralDifference=false;
46  this->transient=false;
47  this->timeDiscretizationOrder = 1;
48  }
53  bool transient;
55 #ifndef SWIG
57  {
58  if (this->linearSolver == 0)
59  {
60  LinearSolver* ls(new AMG());
61  ls->relativeTolerance = 1e-1;
62  ls->nMaxIterations = 20;
63  ls->verbosity=0;
64  this->linearSolver = ls;
65  }
66  return *this->linearSolver ;
67  }
68 #endif
69 };
70 
ThermalBC()
Definition: ThermalBC.h:11
string vcType
Definition: ThermalBC.h:32
Definition: AMG.h:27
void defineVar(const string varName, const T defaultValue)
Definition: FloatVarDict.h:94
LinearSolver * linearSolver
Definition: ThermalBC.h:52
int nMaxIterations
Definition: LinearSolver.h:31
double relativeTolerance
Definition: LinearSolver.h:33
double relativeTolerance
Definition: ThermalBC.h:49
LinearSolver & getLinearSolver()
Definition: ThermalBC.h:56
string bcType
Definition: ThermalBC.h:19
int timeDiscretizationOrder
Definition: ThermalBC.h:54
double absoluteTolerance
Definition: ThermalBC.h:50
ThermalVC()
Definition: ThermalBC.h:25
bool useCentralDifference
Definition: ThermalBC.h:51