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.
monolithic_2fluid_2d_partintegration.h
Go to the documentation of this file.
1 //
2 // Project Name: Kratos
3 // Last modified by: $Author: it's me! $
4 // Date: $Date: 2008-08-08 23:58:38 $
5 // Revision: $Revision: 1.0 $
6 //
7 //
8 
9 #if !defined(KRATOS_MONOLITHIC_PARTINEGRATION_PFEM2_2D_ELEM_H_INCLUDED)
10 #define KRATOS_MONOLITHIC_PARTINEGRATION_PFEM2_2D_ELEM_H_INCLUDED
11 
12 // System includes
13 
14 
15 // External includes
16 #include "boost/smart_ptr.hpp"
17 
18 
19 // Project includes
20 #include "includes/define.h"
21 #include "includes/element.h"
23 
24 
25 namespace Kratos
26 {
27 
29  : public Element
30  {
31  public:
32 
40 
41  //typedef Node NodeType;
52  typedef Vector VectorType;
53  //typedef typename ElementBaseType::MatrixType MatrixType;
54  typedef std::size_t IndexType;
55  typedef std::size_t SizeType;
56  typedef std::vector<std::size_t> EquationIdVectorType;
57  typedef std::vector< Dof<double>::Pointer > DofsVectorType;
59 
61  MonolithicAutoSlipPFEM22D(IndexType NewId, GeometryType::Pointer pGeometry);
62  MonolithicAutoSlipPFEM22D(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
63 
65  virtual ~ MonolithicAutoSlipPFEM22D() override;
66 
67 
68  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
69 
70  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, const ProcessInfo& rCurrentProcessInfo) override;
71 
72  //void CalculateRightHandSide(VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo);
73 
74  void AddExplicitContribution(const ProcessInfo& CurrentProcessInfo) override;
75 
76  void EquationIdVector(EquationIdVectorType& rResult, const ProcessInfo& rCurrentProcessInfo) const override;
77 
78  void GetDofList(DofsVectorType& ElementalDofList,const ProcessInfo& CurrentProcessInfo) const override;
79 
80  void InitializeSolutionStep(const ProcessInfo& CurrentProcessInfo) override;
81 
82 
83 
84  protected:
85 
87  VectorType& rRightHandSideVector,
88  const ProcessInfo& rCurrentProcessInfo);
89 
90  void CalculateLocalPressureSystem(MatrixType& rLeftHandSideMatrix,
91  VectorType& rRightHandSideVector,
92  const ProcessInfo& rCurrentProcessInfo);
93 
94  void CalculateLocalFinalVelocitySystem(MatrixType& rLeftHandSideMatrix,
95  VectorType& rRightHandSideVector,
96  const ProcessInfo& rCurrentProcessInfo);
97 
98  void CalculateLocalThermalSystem(MatrixType& rLeftHandSideMatrix,
99  VectorType& rRightHandSideVector,
100  const ProcessInfo& rCurrentProcessInfo);
101 
102  void CalculateViscousRHS(const ProcessInfo& CurrentProcessInfo);
103 
104  void CalculatePressureProjection(const ProcessInfo& CurrentProcessInfo);
105 
106  void CalculateMassMatrix(const ProcessInfo& CurrentProcessInfo);
107 
109  const ProcessInfo& rCurrentProcessInfo);
110 
112  const ProcessInfo& rCurrentProcessInfo);
113 
115  const ProcessInfo& rCurrentProcessInfo);
116 
118  const ProcessInfo& rCurrentProcessInfo);
119 
120  void GetVelocityDofList(DofsVectorType& rElementalDofList,
121  const ProcessInfo& rCurrentProcessInfo);
122 
124  const ProcessInfo& rCurrentProcessInfo);
125 
126  void GetPressureDofList(DofsVectorType& rElementalDofList,
127  const ProcessInfo& rCurrentProcessInfo);
128 
129  void GetThermalDofList(DofsVectorType& rElementalDofList,
130  const ProcessInfo& rCurrentProcessInfo);
131 
132  void AddViscousTerm(MatrixType& rDampMatrix,
133  const BoundedMatrix<double, 3, 2>& rShapeDeriv,
134  double Viscosity,const double Area);
135 
136 
137 
139  BoundedMatrix<double, (3), 2 >& rShapeDeriv,
140  array_1d<double,3>& distances,
141  std::vector< Matrix >& gauss_gradients,
142  array_1d<double,3>& viscosities,
143  array_1d<double,3>& signs,
144  array_1d<double,3>& volumes ,
145  const unsigned int ndivisions);
146 
147  double CalculateAirDensity(double & temperature_in_celsius);
148 
149  double CalculateAirConductivity(double & temperature_in_celsius);
150 
151 
152  double CalculateAirViscosity(double & temperature_in_celsius);
153 
154 
155  template<class T>
156  bool InvertMatrix(const T& input, T& inverse) ;
157 
158  private:
159  friend class Serializer;
160 
162  {
163  }
164 
165 
166 
167  }; // Class MonolithicAutoSlipPFEM22D
168 } // namespace Kratos.
169 
170 #endif // KRATOS_MONOLITHIC_PARTINEGRATION_PFEM2_3D_ELEM_H_INCLUDED defined
Base class for all Elements.
Definition: element.h:60
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
Geometry base class.
Definition: geometry.h:71
This object defines an indexed object.
Definition: indexed_object.h:54
Definition: monolithic_2fluid_2d_partintegration.h:30
void VelocityEquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo)
void GetVelocityDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo)
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: monolithic_2fluid_2d_partintegration.cpp:45
void CalculateLocalThermalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
void CalculateMassMatrix(const ProcessInfo &CurrentProcessInfo)
Vector VectorType
Definition: monolithic_2fluid_2d_partintegration.h:52
void AddExplicitContribution(const ProcessInfo &CurrentProcessInfo) override
Definition: monolithic_2fluid_2d_partintegration.cpp:58
void ThermalEquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo)
virtual ~ MonolithicAutoSlipPFEM22D() override
Destructor.
std::size_t IndexType
Definition: monolithic_2fluid_2d_partintegration.h:54
bool InvertMatrix(const T &input, T &inverse)
Definition: monolithic_2fluid_2d_partintegration.cpp:1686
std::size_t SizeType
Definition: monolithic_2fluid_2d_partintegration.h:55
void GetPressureDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo)
void FractionalVelocityEquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo)
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: monolithic_2fluid_2d_partintegration.h:58
void PressureEquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo)
void CalculateLocalPressureSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
std::vector< std::size_t > EquationIdVectorType
Definition: monolithic_2fluid_2d_partintegration.h:56
Geometry< NodeType > GeometryType
definition of the geometry type with given NodeType
Definition: monolithic_2fluid_2d_partintegration.h:49
void GetDofList(DofsVectorType &ElementalDofList, const ProcessInfo &CurrentProcessInfo) const override
Definition: monolithic_2fluid_2d_partintegration.cpp:1405
void CalculateLocalFractionalVelocitySystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
void GetFractionalVelocityDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo)
Properties PropertiesType
Definition: monolithic_2fluid_2d_partintegration.h:47
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: monolithic_2fluid_2d_partintegration.h:51
void CalculateViscousRHS(const ProcessInfo &CurrentProcessInfo)
void GetThermalDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo)
double CalculateAirViscosity(double &temperature_in_celsius)
double CalculateAirConductivity(double &temperature_in_celsius)
void CalculateLocalFinalVelocitySystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(MonolithicAutoSlipPFEM22D)
Counted pointer of MonolithicAutoSlipPFEM22D.
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: monolithic_2fluid_2d_partintegration.cpp:90
void CalculatePressureProjection(const ProcessInfo &CurrentProcessInfo)
Definition: monolithic_2fluid_2d_partintegration.cpp:1430
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: monolithic_2fluid_2d_partintegration.h:57
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Definition: monolithic_2fluid_2d_partintegration.cpp:1381
void AddViscousTerm(MatrixType &rDampMatrix, const BoundedMatrix< double, 3, 2 > &rShapeDeriv, double Viscosity, const double Area)
Definition: monolithic_2fluid_2d_partintegration.cpp:1638
double CalculateAirDensity(double &temperature_in_celsius)
void InitializeSolutionStep(const ProcessInfo &CurrentProcessInfo) override
Definition: monolithic_2fluid_2d_partintegration.cpp:1372
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
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
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
output
Definition: generate_frictional_mortar_condition.py:444
input
Definition: generate_frictional_mortar_condition.py:435