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.
vms_monolithic_k_based_wall_condition.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 authors: Suneth Warnakulasuriya
11 //
12 
13 #if !defined(KRATOS_VMS_MONOLITHIC_K_BASED_WALL_CONDITION_WALL_H_INCLUDED)
14 #define KRATOS_VMS_MONOLITHIC_K_BASED_WALL_CONDITION_WALL_H_INCLUDED
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
21 
22 // Application includes
24 
25 namespace Kratos
26 {
29 
32 
39 template <unsigned int TDim, unsigned int TNumNodes = TDim>
41 {
42 public:
45 
48 
50  using NodeType = Node;
54  using VectorType = Vector;
55  using MatrixType = Matrix;
56  using IndexType = std::size_t;
57 
61 
63 
67  IndexType NewId = 0)
68  : BaseType(NewId)
69  {
70  }
71 
73 
78  IndexType NewId,
79  const NodesArrayType& ThisNodes)
80  : BaseType(NewId, ThisNodes)
81  {
82  }
83 
85 
90  IndexType NewId,
91  GeometryType::Pointer pGeometry)
92  : BaseType(NewId, pGeometry)
93  {
94  }
95 
97 
103  IndexType NewId,
104  GeometryType::Pointer pGeometry,
105  PropertiesType::Pointer pProperties)
106  : BaseType(NewId, pGeometry, pProperties)
107  {
108  }
109 
112  VMSMonolithicKBasedWallCondition const& rOther)
113  : BaseType(rOther)
114  {
115  }
116 
118  ~VMSMonolithicKBasedWallCondition() override = default;
119 
123 
126  VMSMonolithicKBasedWallCondition const& rOther)
127  {
128  Condition::operator=(rOther);
129  return *this;
130  }
131 
135 
137 
142  Condition::Pointer Create(
143  IndexType NewId,
144  NodesArrayType const& ThisNodes,
145  PropertiesType::Pointer pProperties) const override
146  {
147  return Kratos::make_intrusive<VMSMonolithicKBasedWallCondition>(
148  NewId, this->GetGeometry().Create(ThisNodes), pProperties);
149  }
150 
151  Condition::Pointer Create(
152  IndexType NewId,
153  GeometryType::Pointer pGeom,
154  PropertiesType::Pointer pProperties) const override
155  {
156  return Kratos::make_intrusive<VMSMonolithicKBasedWallCondition>(
157  NewId, pGeom, pProperties);
158  }
159 
168  Condition::Pointer Clone(
169  IndexType NewId,
170  NodesArrayType const& rThisNodes) const override
171  {
172  Condition::Pointer p_new_condition = Create(
173  NewId, this->GetGeometry().Create(rThisNodes), this->pGetProperties());
174 
175  p_new_condition->SetData(this->GetData());
176  p_new_condition->SetFlags(this->GetFlags());
177 
178  return p_new_condition;
179  }
180 
181  int Check(const ProcessInfo& rCurrentProcessInfo) const override;
182 
183  void Initialize(const ProcessInfo& rCurrentProcessInfo) override;
184 
188 
190  std::string Info() const override;
191 
193  void PrintInfo(std::ostream& rOStream) const override;
194 
196  void PrintData(std::ostream& rOStream) const override;
197 
199 
200 protected:
203 
219  void ApplyWallLaw(
220  MatrixType& rLocalMatrix,
221  VectorType& rLocalVector,
222  const ProcessInfo& rCurrentProcessInfo) override;
223 
225 
226 private:
229 
230  double mWallHeight;
231 
235 
236  friend class Serializer;
237 
238  void save(Serializer& rSerializer) const override;
239 
240  void load(Serializer& rSerializer) override;
241 
243 
244 }; // Class VMSMonolithicKBasedWallCondition
245 
249 
251 template <unsigned int TDim, unsigned int TNumNodes>
252 inline std::istream& operator>>(
253  std::istream& rIStream,
255 {
256  return rIStream;
257 }
258 
260 template <unsigned int TDim, unsigned int TNumNodes>
261 inline std::ostream& operator<<(
262  std::ostream& rOStream,
264 {
265  rThis.PrintInfo(rOStream);
266  rOStream << std::endl;
267  rThis.PrintData(rOStream);
268 
269  return rOStream;
270 }
271 
273 
275 
276 } // namespace Kratos.
277 
278 #endif // KRATOS_VMS_MONOLITHIC_K_BASED_WALL_CONDITION_WALL_H_INCLUDED
Condition & operator=(Condition const &rOther)
Assignment operator.
Definition: condition.h:181
PropertiesType::Pointer pGetProperties()
returns the pointer to the property of the condition. Does not throw an error, to allow copying of co...
Definition: condition.h:964
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
Flags & GetFlags()
Returns the flags of the object.
Definition: geometrical_object.h:176
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
DataValueContainer & GetData()
Definition: geometrical_object.h:212
Geometry base class.
Definition: geometry.h:71
Implements a wall condition for the monolithic formulation.
Definition: monolithic_wall_condition.h:70
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: vms_monolithic_k_based_wall_condition.h:41
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: vms_monolithic_k_based_wall_condition.cpp:96
~VMSMonolithicKBasedWallCondition() override=default
Destructor.
VMSMonolithicKBasedWallCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using Properties.
Definition: vms_monolithic_k_based_wall_condition.h:102
Condition::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
It creates a new condition pointer.
Definition: vms_monolithic_k_based_wall_condition.h:151
std::string Info() const override
Turn back information as a string.
Definition: vms_monolithic_k_based_wall_condition.cpp:82
VMSMonolithicKBasedWallCondition(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using Geometry.
Definition: vms_monolithic_k_based_wall_condition.h:89
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(VMSMonolithicKBasedWallCondition)
Pointer definition of VMSMonolithicKBasedWallCondition.
Matrix MatrixType
Definition: vms_monolithic_k_based_wall_condition.h:55
void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Definition: vms_monolithic_k_based_wall_condition.cpp:61
VMSMonolithicKBasedWallCondition(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: vms_monolithic_k_based_wall_condition.h:77
Condition::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create a new VMSMonolithicKBasedWallCondition object.
Definition: vms_monolithic_k_based_wall_condition.h:142
Condition::Pointer Clone(IndexType NewId, NodesArrayType const &rThisNodes) const override
Definition: vms_monolithic_k_based_wall_condition.h:168
VMSMonolithicKBasedWallCondition & operator=(VMSMonolithicKBasedWallCondition const &rOther)
Assignment operator.
Definition: vms_monolithic_k_based_wall_condition.h:125
VMSMonolithicKBasedWallCondition(IndexType NewId=0)
Default constructor.
Definition: vms_monolithic_k_based_wall_condition.h:66
VMSMonolithicKBasedWallCondition(VMSMonolithicKBasedWallCondition const &rOther)
Copy constructor.
Definition: vms_monolithic_k_based_wall_condition.h:111
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Definition: vms_monolithic_k_based_wall_condition.cpp:38
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: vms_monolithic_k_based_wall_condition.cpp:90
void ApplyWallLaw(MatrixType &rLocalMatrix, VectorType &rLocalVector, const ProcessInfo &rCurrentProcessInfo) override
Applies rans based wall law.
Definition: vms_monolithic_k_based_wall_condition.cpp:101
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
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