KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
cellular_flow_partial_derivatives.h
Go to the documentation of this file.
1 #if !defined(KRATOS_CELLULAR_FLOW_PARTIAL_DERIVATIVES_H)
2 #define KRATOS_CELLULAR_FLOW_PARTIAL_DERIVATIVES_H
3 
4 /* System includes */
5 #include <limits>
6 #include <iostream>
7 #include <iomanip>
8 
9 /* External includes */
10 #ifdef _OPENMP
11 #include <omp.h>
12 #endif
13 
14 /* Project includes */
15 #include "includes/define.h"
16 #include "includes/variables.h"
17 #include "includes/model_part.h"
18 
19 namespace Kratos
20 {
22 {
23 public:
24 
26 
28 
29 CellularFlowPartialDerivatives(): mL(1.0), mU(0.0), mK(2.72), mOmega(Globals::Pi)
30 {
31  mOneOverL = 1.0 / mL;
32  mOmegaUOverL = mOmega * mU / mL;
33 }
34 
35 CellularFlowPartialDerivatives(const double half_wavelength, const double max_flow_speed, const double oscillation_relative_amplitude, const double oscillation_angular_frequency)
36  :mL(half_wavelength), mU(max_flow_speed), mK(oscillation_relative_amplitude), mOmega(oscillation_angular_frequency)
37 {
38  mOneOverL = 1.0 / mL;
39  mOmegaUOverL = mOmega * mU / mL;
40 }
41 
43 
45 
46 
47 //***************************************************************************************************************
48 //***************************************************************************************************************
49 
50 void UpdateCoordinates(const double time, const array_1d<double, 3>& coor);
51 
52 // Values
53 
54 double U0();
55 
56 double U1();
57 
58 double U2();
59 
60 // First-order derivatives
61 
62 double U0DT();
63 double U0D0();
64 double U0D1();
65 double U0D2();
66 
67 double U1DT();
68 double U1D0();
69 double U1D1();
70 double U1D2();
71 
72 double U2DT();
73 double U2D0();
74 double U2D1();
75 double U2D2();
76 
77 // Second-order derivatives
78 
79 double U0DTDT();
80 double U0DTD0();
81 double U0DTD1();
82 double U0DTD2();
83 double U0D0D0();
84 double U0D0D1();
85 double U0D0D2();
86 double U0D1D1();
87 double U0D1D2();
88 double U0D2D2();
89 
90 double U1DTDT();
91 double U1DTD0();
92 double U1DTD1();
93 double U1DTD2();
94 virtual double U1D0D0();
95 virtual double U1D0D1();
96 virtual double U1D0D2();
97 virtual double U1D1D1();
98 virtual double U1D1D2();
99 virtual double U1D2D2();
100 
101 virtual double U2DTDT();
102 virtual double U2DTD0();
103 virtual double U2DTD1();
104 virtual double U2DTD2();
105 virtual double U2D0D0();
106 virtual double U2D0D1();
107 virtual double U2D0D2();
108 virtual double U2D1D1();
109 virtual double U2D1D2();
110 virtual double U2D2D2();
111 
112 //***************************************************************************************************************
113 //***************************************************************************************************************
114 
118 
119 
123 
125 
126 virtual std::string Info() const
127 {
128  return "";
129 }
130 
132 
133 virtual void PrintInfo(std::ostream& rOStream) const
134 {
135 }
136 
138 
139 virtual void PrintData(std::ostream& rOStream) const
140 {
141 }
142 
143 
147 
149 
150 protected:
153 
154 
158 
159 
163 
164 
168 
169 
173 
177 
178 
182 
183 
185 
186 private:
187 
190 
191 
195 double mL;
196 double mU;
197 double mK;
198 double mOneOverL;
199 double mOmegaUOverL;
200 double mOmega;
201 double mSinOmegaT;
202 double mCosOmegaT;
203 double mSinPiX0;
204 double mCosPiX0;
205 double mSinPiX1;
206 double mCosPiX1;
210 
214 
215 
219 
220 
224 
225 
229 
232 
233 
235 
236 }; // Class CellularFlowPartialDerivatives
237 
239 
242 
243 
247 
248 } // namespace Kratos.
249 
250 #endif // KRATOS_CELLULAR_FLOW_PARTIAL_DERIVATIVES_H defined
Definition: cellular_flow_partial_derivatives.h:22
virtual double U1D0D1()
Definition: cellular_flow_partial_derivatives.cpp:146
virtual double U1D1D1()
Definition: cellular_flow_partial_derivatives.cpp:151
double U2D0()
Definition: cellular_flow_partial_derivatives.cpp:69
virtual double U2D0D0()
Definition: cellular_flow_partial_derivatives.cpp:161
double U0DTD0()
Definition: cellular_flow_partial_derivatives.cpp:83
virtual double U2DTDT()
Definition: cellular_flow_partial_derivatives.cpp:157
virtual double U1D2D2()
Definition: cellular_flow_partial_derivatives.cpp:156
virtual double U1D1D2()
Definition: cellular_flow_partial_derivatives.cpp:155
virtual double U2DTD2()
Definition: cellular_flow_partial_derivatives.cpp:160
double U1DTDT()
Definition: cellular_flow_partial_derivatives.cpp:117
double U1DTD0()
Definition: cellular_flow_partial_derivatives.cpp:125
virtual double U2D2D2()
Definition: cellular_flow_partial_derivatives.cpp:166
double U0D0D2()
Definition: cellular_flow_partial_derivatives.cpp:109
virtual double U1D0D2()
Definition: cellular_flow_partial_derivatives.cpp:150
virtual double U2D0D2()
Definition: cellular_flow_partial_derivatives.cpp:163
double U1DT()
Definition: cellular_flow_partial_derivatives.cpp:51
virtual double U2DTD1()
Definition: cellular_flow_partial_derivatives.cpp:159
double U0D1D2()
Definition: cellular_flow_partial_derivatives.cpp:114
double U2()
Definition: cellular_flow_partial_derivatives.cpp:29
void UpdateCoordinates(const double time, const array_1d< double, 3 > &coor)
Definition: cellular_flow_partial_derivatives.cpp:9
KRATOS_CLASS_POINTER_DEFINITION(CellularFlowPartialDerivatives)
double U0DT()
Definition: cellular_flow_partial_derivatives.cpp:33
double U0()
Definition: cellular_flow_partial_derivatives.cpp:21
double U0D2D2()
Definition: cellular_flow_partial_derivatives.cpp:115
virtual double U2D1D1()
Definition: cellular_flow_partial_derivatives.cpp:164
double U0D0()
Definition: cellular_flow_partial_derivatives.cpp:41
double U0D1D1()
Definition: cellular_flow_partial_derivatives.cpp:110
double U1()
Definition: cellular_flow_partial_derivatives.cpp:25
CellularFlowPartialDerivatives()
Default constructor.
Definition: cellular_flow_partial_derivatives.h:29
virtual std::string Info() const
Turn back information as a stemplate<class T, std::size_t dim> tring.
Definition: cellular_flow_partial_derivatives.h:126
double U2D1()
Definition: cellular_flow_partial_derivatives.cpp:70
double U1D1()
Definition: cellular_flow_partial_derivatives.cpp:63
double U1DTD2()
Definition: cellular_flow_partial_derivatives.cpp:141
double U1D0()
Definition: cellular_flow_partial_derivatives.cpp:59
virtual double U1D0D0()
Definition: cellular_flow_partial_derivatives.cpp:142
double U0DTDT()
Definition: cellular_flow_partial_derivatives.cpp:75
double U2D2()
Definition: cellular_flow_partial_derivatives.cpp:71
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: cellular_flow_partial_derivatives.h:139
double U0DTD1()
Definition: cellular_flow_partial_derivatives.cpp:92
virtual double U2DTD0()
Definition: cellular_flow_partial_derivatives.cpp:158
double U0D0D0()
Definition: cellular_flow_partial_derivatives.cpp:101
double U1DTD1()
Definition: cellular_flow_partial_derivatives.cpp:133
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: cellular_flow_partial_derivatives.h:133
double U0D2()
Definition: cellular_flow_partial_derivatives.cpp:49
double U2DT()
Definition: cellular_flow_partial_derivatives.cpp:68
virtual double U2D0D1()
Definition: cellular_flow_partial_derivatives.cpp:162
double U0D0D1()
Definition: cellular_flow_partial_derivatives.cpp:105
virtual ~CellularFlowPartialDerivatives()
Destructor.
Definition: cellular_flow_partial_derivatives.h:44
double U0DTD2()
Definition: cellular_flow_partial_derivatives.cpp:100
double U1D2()
Definition: cellular_flow_partial_derivatives.cpp:67
virtual double U2D1D2()
Definition: cellular_flow_partial_derivatives.cpp:165
double U0D1()
Definition: cellular_flow_partial_derivatives.cpp:45
CellularFlowPartialDerivatives(const double half_wavelength, const double max_flow_speed, const double oscillation_relative_amplitude, const double oscillation_angular_frequency)
Definition: cellular_flow_partial_derivatives.h:35
constexpr double Pi
Definition: global_variables.h:25
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
time
Definition: face_heat.py:85