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_3fluid_2d.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_3FLUID_PFEM2_2D_ELEM_H_INCLUDED)
10 #define KRATOS_MONOLITHIC_3FLUID_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 {
30 public:
31 
39 
40  //typedef Node NodeType;
51  typedef Vector VectorType;
52  //typedef typename ElementBaseType::MatrixType MatrixType;
53  typedef std::size_t IndexType;
54  typedef std::size_t SizeType;
55  typedef std::vector<std::size_t> EquationIdVectorType;
56  typedef std::vector< Dof<double>::Pointer > DofsVectorType;
58 
60  Monolithic3FluidPFEM22D(IndexType NewId, GeometryType::Pointer pGeometry);
61  Monolithic3FluidPFEM22D(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
62 
64  virtual ~ Monolithic3FluidPFEM22D() override;
65 
66 
67  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
68 
69  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, const ProcessInfo& rCurrentProcessInfo) override;
70 
71  //void CalculateRightHandSide(VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo) override;
72 
73  void AddExplicitContribution(const ProcessInfo& CurrentProcessInfo) override;
74 
75  void EquationIdVector(EquationIdVectorType& rResult, const ProcessInfo& rCurrentProcessInfo) const override;
76 
77  void GetDofList(DofsVectorType& ElementalDofList,const ProcessInfo& CurrentProcessInfo) const override;
78 
79  void InitializeSolutionStep(const ProcessInfo& CurrentProcessInfo) override;
80 
81 
82 
83 protected:
84 
85  void CalculateViscousRHS(ProcessInfo& CurrentProcessInfo);
86 
87  void CalculatePressureProjection(ProcessInfo& CurrentProcessInfo);
88 
89  void AddViscousTerm(MatrixType& rDampMatrix,
90  const BoundedMatrix<double, 3, 2>& rShapeDeriv,
91  const double Weight
92  );
93 
95  BoundedMatrix<double, (2+1), 2 >& rShapeDeriv,
96  array_1d<double,3>& distances,
97  std::vector< Matrix >& gauss_gradients,
98  array_1d<double,3>& viscosities,
99  array_1d<double,3>& signs,
100  array_1d<double,3>& volumes,
101  const unsigned int ndivisions
102  );
103 
104  void CalculateInterfaceNormal(BoundedMatrix<double, 3, 2 >& rPoints, array_1d<double,3>& rDistances, array_1d<double,2>& normal, double & interface_area, array_1d<double,3>& Ninterface);
105 
106  void CalculatePosition(const bounded_matrix<double, 3, 3 > & coordinates,
107  const double xc, const double yc, const double zc,
109  );
110 
111  double CalculateVol(const double x0, const double y0,
112  const double x1, const double y1,
113  const double x2, const double y2
114  );
115 
116  template<class T>
117  bool InvertMatrix(const T& input, T& inverse) ;
118 
119 
120 private:
121  friend class Serializer;
122 
124  {
125  }
126 
127 
128 
129 }; // Class PFEM22D
130 } // namespace Kratos.
131 
132 #endif // KRATOS_MONOLITHIC_PFEM2_2D_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_3fluid_2d.h:29
void CalculatePosition(const bounded_matrix< double, 3, 3 > &coordinates, const double xc, const double yc, const double zc, array_1d< double, 3 > &N)
Definition: monolithic_3fluid_2d.cpp:1250
void AddViscousTerm(MatrixType &rDampMatrix, const BoundedMatrix< double, 3, 2 > &rShapeDeriv, const double Weight)
Definition: monolithic_3fluid_2d.cpp:1098
bool InvertMatrix(const T &input, T &inverse)
Definition: monolithic_3fluid_2d.cpp:1154
std::size_t IndexType
Definition: monolithic_3fluid_2d.h:53
void CalculateViscousRHS(ProcessInfo &CurrentProcessInfo)
void InitializeSolutionStep(const ProcessInfo &CurrentProcessInfo) override
Definition: monolithic_3fluid_2d.cpp:836
Geometry< NodeType > GeometryType
definition of the geometry type with given NodeType
Definition: monolithic_3fluid_2d.h:48
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: monolithic_3fluid_2d.h:56
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: monolithic_3fluid_2d.cpp:90
Properties PropertiesType
Definition: monolithic_3fluid_2d.h:46
std::size_t SizeType
Definition: monolithic_3fluid_2d.h:54
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Definition: monolithic_3fluid_2d.cpp:846
std::vector< std::size_t > EquationIdVectorType
Definition: monolithic_3fluid_2d.h:55
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: monolithic_3fluid_2d.h:50
void CalculatePressureProjection(ProcessInfo &CurrentProcessInfo)
Definition: monolithic_3fluid_2d.cpp:897
double CalculateVol(const double x0, const double y0, const double x1, const double y1, const double x2, const double y2)
Definition: monolithic_3fluid_2d.cpp:1286
void CalculateInterfaceNormal(BoundedMatrix< double, 3, 2 > &rPoints, array_1d< double, 3 > &rDistances, array_1d< double, 2 > &normal, double &interface_area, array_1d< double, 3 > &Ninterface)
Definition: monolithic_3fluid_2d.cpp:1178
void GetDofList(DofsVectorType &ElementalDofList, const ProcessInfo &CurrentProcessInfo) const override
Definition: monolithic_3fluid_2d.cpp:871
Vector VectorType
Definition: monolithic_3fluid_2d.h:51
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: monolithic_3fluid_2d.h:57
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: monolithic_3fluid_2d.cpp:45
void AddViscousTerm(BoundedMatrix< double, 13, 13 > &output, BoundedMatrix< double,(2+1), 2 > &rShapeDeriv, array_1d< double, 3 > &distances, std::vector< Matrix > &gauss_gradients, array_1d< double, 3 > &viscosities, array_1d< double, 3 > &signs, array_1d< double, 3 > &volumes, const unsigned int ndivisions)
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(Monolithic3FluidPFEM22D)
Counted pointer of PFEM22D.
virtual ~ Monolithic3FluidPFEM22D() override
Destructor.
void AddExplicitContribution(const ProcessInfo &CurrentProcessInfo) override
Definition: monolithic_3fluid_2d.cpp:58
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
x2
Definition: generate_frictional_mortar_condition.py:122
x1
Definition: generate_frictional_mortar_condition.py:121
float xc
Definition: rotating_cone.py:77
float yc
Definition: rotating_cone.py:78
N
Definition: sensitivityMatrix.py:29