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.
axisymmetric_navier_stokes.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main author: Ruben Zorrilla
11 //
12 
13 #pragma once
14 
15 // System includes
16 
17 
18 // External indludes
19 
20 
21 // Project includes
22 #include "geometries/geometry.h"
23 #include "includes/cfd_variables.h"
24 #include "includes/define.h"
25 #include "includes/element.h"
26 #include "includes/serializer.h"
27 
28 // Application includes
32 
33 namespace Kratos
34 {
35 
38 
41 
45 
49 
53 
57 
58 template< class TElementData >
59 class AxisymmetricNavierStokes : public FluidElement<TElementData>
60 {
61 public:
64 
67 
70 
72  using NodeType = typename BaseType::NodeType;
73 
76 
79 
81  using VectorType = typename BaseType::VectorType;
82 
84  using MatrixType = typename BaseType::MatrixType;
85 
86  using IndexType = typename BaseType::IndexType;
87 
88  using SizeType = typename BaseType::SizeType;
89 
91 
93 
95 
98 
101 
104 
105  constexpr static SizeType Dim = BaseType::Dim;
109  constexpr static SizeType StrainSize = (Dim-1)*3;
110 
114 
115  //Constructors.
116 
118 
122 
124 
129  IndexType NewId,
130  const NodesArrayType& ThisNodes);
131 
133 
138  IndexType NewId,
139  typename GeometryType::Pointer pGeometry);
140 
142 
148  IndexType NewId,
149  typename GeometryType::Pointer pGeometry,
150  Properties::Pointer pProperties);
151 
153  virtual ~AxisymmetricNavierStokes();
154 
157 
161 
164 
168 
169  Element::Pointer Create(
170  IndexType NewId,
171  NodesArrayType const& ThisNodes,
172  Properties::Pointer pProperties) const override;
173 
174  Element::Pointer Create(
175  IndexType NewId,
176  typename GeometryType::Pointer pGeometry,
177  Properties::Pointer pProperties) const override;
178 
179  void Initialize(const ProcessInfo &rCurrentProcessInfo) override;
180 
184 
185  int Check(const ProcessInfo &rCurrentProcessInfo) const override;
186 
190 
191  const Parameters GetSpecifications() const override;
192 
194  std::string Info() const override;
195 
196 
198  void PrintInfo(std::ostream& rOStream) const override;
199 
201 protected:
204 
205 
209 
210 
214 
215  void CalculateMaterialResponse(TElementData &rData) const override;
216 
218  TElementData& rData,
219  MatrixType& rLHS,
220  VectorType& rRHS) override;
221 
223  TElementData& rData,
224  MatrixType& rLHS) override;
225 
227  TElementData& rData,
228  VectorType& rRHS) override;
229 
230  void AddBoundaryTraction(
231  TElementData& rData,
232  const Vector& rUnitNormal,
233  MatrixType& rLHS,
234  VectorType& rRHS) override;
235 
237  TElementData& rData,
238  MatrixType& rLHS);
239 
241  TElementData& rData,
242  VectorType& rRHS);
243 
247 
248 
252 
253 
257 
258 
260 private:
263 
267 
271 
272  friend class Serializer;
273 
274  void save(Serializer& rSerializer) const override;
275 
276  void load(Serializer& rSerializer) override;
277 
281 
282 
286 
287  double CalculateGaussPointRadius(const TElementData& rData) const;
288 
292 
293 
297 
298 
302 
303 
305 }; // Class AxisymmetricNavierStokes
306 
308 
311 
312 
316 
318 template< class TElementData >
319 inline std::istream& operator >>(
320  std::istream& rIStream,
322 {
323  return rIStream;
324 }
325 
327 template< class TElementData >
328 inline std::ostream& operator <<(
329  std::ostream& rOStream,
331 {
332  rThis.PrintInfo(rOStream);
333  rOStream << std::endl;
334  rThis.PrintData(rOStream);
335 
336  return rOStream;
337 }
338 
341 
342 } // namespace Kratos.
Definition: axisymmetric_navier_stokes.h:60
void AddTimeIntegratedRHS(TElementData &rData, VectorType &rRHS) override
Definition: axisymmetric_navier_stokes.cpp:209
const Parameters GetSpecifications() const override
This method provides the specifications/requirements of the element.
Definition: axisymmetric_navier_stokes.cpp:136
typename BaseType::ShapeFunctionsType ShapeFunctionsType
Type for shape function values container.
Definition: axisymmetric_navier_stokes.h:97
AxisymmetricNavierStokes(AxisymmetricNavierStokes const &rOther)=delete
Copy constructor.
constexpr static SizeType Dim
Definition: axisymmetric_navier_stokes.h:105
typename BaseType::ShapeFunctionDerivativesType ShapeFunctionDerivativesType
Type for a matrix containing the shape function gradients.
Definition: axisymmetric_navier_stokes.h:100
virtual ~AxisymmetricNavierStokes()
Destructor.
Definition: axisymmetric_navier_stokes.cpp:56
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, Properties::Pointer pProperties) const override
Definition: axisymmetric_navier_stokes.cpp:62
typename BaseType::ShapeFunctionDerivativesType ShapeFunctionDerivativesArrayType
Type for an array of shape function gradient matrices.
Definition: axisymmetric_navier_stokes.h:103
constexpr static SizeType StrainSize
Definition: axisymmetric_navier_stokes.h:109
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: axisymmetric_navier_stokes.cpp:176
constexpr static SizeType NumNodes
Definition: axisymmetric_navier_stokes.h:106
void AddBoundaryTraction(TElementData &rData, const Vector &rUnitNormal, MatrixType &rLHS, VectorType &rRHS) override
Adds the boundary traction component along a cut plane for embedded formulations. This method adds th...
Definition: axisymmetric_navier_stokes.cpp:217
constexpr static SizeType BlockSize
Definition: axisymmetric_navier_stokes.h:107
void ComputeGaussPointLHSContribution(TElementData &rData, MatrixType &rLHS)
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(AxisymmetricNavierStokes)
Pointer definition of AxisymmetricNavierStokes.
void ComputeGaussPointRHSContribution(TElementData &rData, VectorType &rRHS)
void CalculateMaterialResponse(TElementData &rData) const override
Definition: axisymmetric_navier_stokes.cpp:185
void AddTimeIntegratedLHS(TElementData &rData, MatrixType &rLHS) override
Definition: axisymmetric_navier_stokes.cpp:201
AxisymmetricNavierStokes & operator=(AxisymmetricNavierStokes const &rOther)=delete
Assignment operator.
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Definition: axisymmetric_navier_stokes.cpp:97
constexpr static SizeType LocalSize
Definition: axisymmetric_navier_stokes.h:108
std::string Info() const override
Turn back information as a string.
Definition: axisymmetric_navier_stokes.cpp:168
AxisymmetricNavierStokes(IndexType NewId=0)
Default constuctor.
Definition: axisymmetric_navier_stokes.cpp:33
void AddTimeIntegratedSystem(TElementData &rData, MatrixType &rLHS, VectorType &rRHS) override
Definition: axisymmetric_navier_stokes.cpp:191
void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Definition: axisymmetric_navier_stokes.cpp:81
std::size_t SizeType
Definition: element.h:94
std::vector< DofType::Pointer > DofsVectorType
Definition: element.h:100
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
std::size_t IndexType
Definition: flags.h:74
Large Displacement Lagrangian Element for 3D and 2D geometries. (base class)
Definition: fluid_element.h:61
Vector VectorType
Vector type for local contributions to the linear system.
Definition: fluid_element.h:79
std::size_t SizeType
Definition: fluid_element.h:86
static constexpr unsigned int Dim
Definition: fluid_element.h:105
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: fluid_element.h:90
static constexpr unsigned int NumNodes
Definition: fluid_element.h:107
MatrixRow< Matrix > ShapeFunctionsType
Type for shape function values container.
Definition: fluid_element.h:95
Matrix MatrixType
Matrix type for local contributions to the linear system.
Definition: fluid_element.h:82
Kratos::Matrix ShapeFunctionDerivativesType
Type for a matrix containing the shape function gradients.
Definition: fluid_element.h:98
static constexpr unsigned int LocalSize
Definition: fluid_element.h:111
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: fluid_element.h:92
static constexpr unsigned int BlockSize
Definition: fluid_element.h:109
Geometry< NodeType >::PointsArrayType NodesArrayType
Definition of nodes container type, redefined from GeometryType.
Definition: fluid_element.h:76
std::vector< std::size_t > EquationIdVectorType
Definition: fluid_element.h:88
Geometry< NodeType > GeometryType
Geometry type (using with given NodeType)
Definition: fluid_element.h:73
std::size_t IndexType
Definition: fluid_element.h:84
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: fluid_element.hpp:584
Node NodeType
Node type (default is: Node)
Definition: fluid_element.h:70
This defines the geometrical object, base definition of the element and condition entities.
Definition: geometrical_object.h:58
Geometry base class.
Definition: geometry.h:71
This class defines the node.
Definition: node.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
def load(f)
Definition: ode_solve.py:307