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.
steady_state_Pw_piping_element.hpp
Go to the documentation of this file.
1 // KRATOS___
2 // // ) )
3 // // ___ ___
4 // // ____ //___) ) // ) )
5 // // / / // // / /
6 // ((____/ / ((____ ((___/ / MECHANICS
7 //
8 // License: geo_mechanics_application/license.txt
9 //
10 // Main authors: Aron Noordam
11 //
12 
13 #if !defined(KRATOS_GEO_STEADY_STATE_PW_PIPING_ELEMENT_H_INCLUDED)
14 #define KRATOS_GEO_STEADY_STATE_PW_PIPING_ELEMENT_H_INCLUDED
15 
16 // Project includes
17 #include "includes/serializer.h"
18 
19 // Application includes
21 #include "custom_utilities/interface_element_utilities.hpp"
23 
24 namespace Kratos
25 {
26 
27 template <unsigned int TDim, unsigned int TNumNodes>
28 class KRATOS_API(GEO_MECHANICS_APPLICATION) SteadyStatePwPipingElement
29  : public SteadyStatePwInterfaceElement<TDim, TNumNodes>
30 {
31 public:
33 
35 
36  using IndexType = std::size_t;
38  using NodeType = Node;
41  using VectorType = Vector;
42  using MatrixType = Matrix;
43 
46 
48  using SizeType = std::size_t;
49 
50  using BaseType::CalculateRetentionResponse;
51  using BaseType::mRetentionLawVector;
52  using BaseType::mThisIntegrationMethod;
53 
54  using InterfaceElementVariables = typename BaseType::InterfaceElementVariables;
55  using SFGradAuxVariables = typename BaseType::SFGradAuxVariables;
56 
58 
61  : SteadyStatePwInterfaceElement<TDim, TNumNodes>(NewId)
62  {
63  }
64 
67  : SteadyStatePwInterfaceElement<TDim, TNumNodes>(NewId, ThisNodes)
68  {
69  }
70 
72  SteadyStatePwPipingElement(IndexType NewId, GeometryType::Pointer pGeometry)
73  : SteadyStatePwInterfaceElement<TDim, TNumNodes>(NewId, pGeometry)
74  {
75  }
76 
78  SteadyStatePwPipingElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
79  : SteadyStatePwInterfaceElement<TDim, TNumNodes>(NewId, pGeometry, pProperties)
80  {
81  }
82 
85 
87 
88  Element::Pointer Create(IndexType NewId,
89  NodesArrayType const& ThisNodes,
90  PropertiesType::Pointer pProperties) const override;
91 
92  Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override;
93 
94  void Initialize(const ProcessInfo& rCurrentProcessInfo) override;
95 
96  int Check(const ProcessInfo& rCurrentProcessInfo) const override;
97 
98  bool InEquilibrium(const PropertiesType& Prop, const GeometryType& Geom);
99 
100  double CalculateHeadGradient(const PropertiesType& Prop, const GeometryType& Geom, double pipe_length);
101 
102  double CalculateEquilibriumPipeHeight(const PropertiesType& Prop, const GeometryType& Geom, double dx);
103 
104  void CalculateLength(const GeometryType& Geom);
105 
106 protected:
107  void CalculateAll(MatrixType& rLeftHandSideMatrix,
108  VectorType& rRightHandSideVector,
109  const ProcessInfo& CurrentProcessInfo,
110  const bool CalculateStiffnessMatrixFlag,
111  const bool CalculateResidualVectorFlag) override;
112 
114  void CalculateOnIntegrationPoints(const Variable<bool>& rVariable,
115  std::vector<bool>& rValues,
116  const ProcessInfo& rCurrentProcessInfo) override;
117 
118  void CalculateOnIntegrationPoints(const Variable<double>& rVariable,
119  std::vector<double>& rValues,
120  const ProcessInfo& rCurrentProcessInfo) override;
121 
122  double CalculateParticleDiameter(const PropertiesType& Prop);
123 
124  double pipe_initialised = false;
125 
127 
128 private:
130 
132 
135 
138 
140 
141  friend class Serializer;
142 
143  void save(Serializer& rSerializer) const override
144  {
146  }
147 
148  void load(Serializer& rSerializer) override
149  {
151  }
152 
153 }; // Class SteadyStatePwInterfaceElement
154 
155 } // namespace Kratos
156 
157 #endif // KRATOS_GEO_STEADY_STATE_PW_PIPING_ELEMENT_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Base class for all Elements.
Definition: element.h:60
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
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
PointerVector< TPointType > PointsArrayType
Definition: geometry.h:118
This class defines the node.
Definition: node.h:65
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.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
Definition: steady_state_Pw_interface_element.hpp:30
typename BaseType::InterfaceElementVariables InterfaceElementVariables
Definition: steady_state_Pw_interface_element.hpp:54
typename BaseType::SFGradAuxVariables SFGradAuxVariables
Definition: steady_state_Pw_interface_element.hpp:55
Definition: steady_state_Pw_piping_element.hpp:30
SteadyStatePwPipingElement(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using Geometry.
Definition: steady_state_Pw_piping_element.hpp:72
~SteadyStatePwPipingElement() override
Destructor.
Definition: steady_state_Pw_piping_element.hpp:84
double CalculateHeadGradient(const PropertiesType &Prop, const GeometryType &Geom, double pipe_length)
void CalculateLength(const GeometryType &Geom)
SteadyStatePwPipingElement(IndexType NewId=0)
Default Constructor.
Definition: steady_state_Pw_piping_element.hpp:60
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(SteadyStatePwPipingElement)
SteadyStatePwPipingElement(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: steady_state_Pw_piping_element.hpp:66
SteadyStatePwPipingElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using Properties.
Definition: steady_state_Pw_piping_element.hpp:78
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
pybind11::list CalculateOnIntegrationPoints(TObject &dummy, const Variable< TDataType > &rVariable, const ProcessInfo &rProcessInfo)
Definition: add_mesh_to_python.cpp:142
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
Internals::Matrix< double, AMatrix::dynamic, 1 > Vector
Definition: amatrix_interface.h:472
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
def load(f)
Definition: ode_solve.py:307