Memosa-FVM  0.2
StructureBC.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 "misc.h"
6 #include "FloatVarDict.h"
7 #include "TractionVal.h"
8 #include "AMG.h"
9 
10 template<class T>
11 struct StructureBC : public FloatVarDict<T>
12 {
14  {
15  this->defineVar("specifiedXDeformation",T(0.0));
16  this->defineVar("specifiedYDeformation",T(0.0));
17  this->defineVar("specifiedZDeformation",T(0.0));
18  this->defineVar("specifiedXXTraction",T(0.0));
19  this->defineVar("specifiedXYTraction",T(0.0));
20  this->defineVar("specifiedXZTraction",T(0.0));
21  this->defineVar("specifiedYXTraction",T(0.0));
22  this->defineVar("specifiedYYTraction",T(0.0));
23  this->defineVar("specifiedYZTraction",T(0.0));
24  this->defineVar("specifiedZXTraction",T(0.0));
25  this->defineVar("specifiedZYTraction",T(0.0));
26  this->defineVar("specifiedZZTraction",T(0.0));
27  this->defineVar("specifiedXForce",T(0.0));
28  this->defineVar("specifiedYForce",T(0.0));
29  this->defineVar("specifiedZForce",T(0.0));
30  this->defineVar("specifiedXDistForce",T(0.0));
31  this->defineVar("specifiedYDistForce",T(0.0));
32  this->defineVar("specifiedZDistForce",T(0.0));
33  }
34  string bcType;
35 };
36 
37 template<class T>
38 struct StructureVC : public FloatVarDict<T>
39 {
41  {
42  this->defineVar("eta",T(1.0));
43  this->defineVar("eta1",T(1.0));
44  this->defineVar("density",T(1.0));
45  this->defineVar("alpha",T(1.0));
46  }
47  string vcType;
48 };
49 
50 
51 template<class T>
53 {
55  {
56  this->defineVar("initialXDeformation",T(0.0));
57  this->defineVar("initialYDeformation",T(0.0));
58  this->defineVar("initialZDeformation",T(0.0));
59  this->defineVar("deformationURF",T(0.7));
60  this->defineVar("timeStep",T(0.1));
61  this->defineVar("operatingTemperature",T(300.0));
62  this->defineVar("residualXXStress",T(0.));
63  this->defineVar("residualYYStress",T(0.));
64  this->defineVar("residualZZStress",T(0.));
65 
66  this->deformationTolerance=1e-4;
67  this->printNormalizedResiduals = true;
68  this->transient = false;
70  this->variableTimeStep = false;
71  this->timeStepN1=0.1;
72  this->timeStepN2=0.1;
73  this->thermo = false;
74  this->residualStress = false;
75  this->deformationLinearSolver = 0;
76  this->coupledLinearSolver = 0;
77  this->creep = false;
78  this->creepModel=1;
79  this->A = 0.03/3600.;
80  this->B = 1.8e8;
81  this->m = 2.0;
82  this->n = 2.0;
83  this->Sy0 = 1.0e9;
84 
85  this->incompressible = true;
86  }
87 
90  bool transient;
93  double timeStepN1;
94  double timeStepN2;
95  bool thermo;
99  bool creep;
101  double A;
102  double B;
103  double m;
104  double n;
105  double Sy0;
106 
108 #ifndef SWIG
110  {
111  if (this->deformationLinearSolver == 0)
112  {
113  LinearSolver* ls(new AMG());
114  ls->relativeTolerance = 1e-1;
115  ls->nMaxIterations = 20;
116  ls->verbosity=0;
117  this->deformationLinearSolver = ls;
118  }
119  return *this->deformationLinearSolver ;
120  }
121 #endif
122 };
123 
LinearSolver * deformationLinearSolver
Definition: StructureBC.h:97
Definition: AMG.h:27
void defineVar(const string varName, const T defaultValue)
Definition: FloatVarDict.h:94
int nMaxIterations
Definition: LinearSolver.h:31
string bcType
Definition: StructureBC.h:34
double relativeTolerance
Definition: LinearSolver.h:33
LinearSolver * coupledLinearSolver
Definition: StructureBC.h:98
string vcType
Definition: StructureBC.h:47
LinearSolver & getDeformationLinearSolver()
Definition: StructureBC.h:109