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.
wind_water_friction.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: Miguel Maso Sotomayor
11 //
12 
13 #ifndef KRATOS_WIND_WATER_FRICTION_H_INCLUDED
14 #define KRATOS_WIND_WATER_FRICTION_H_INCLUDED
15 
16 
17 // System includes
18 
19 
20 // External includes
21 
22 
23 // Project includes
24 #include "friction_law.h"
26 
27 
28 namespace Kratos
29 {
32 
36 
40 
49 {
50 public:
53 
55 
59 
64 
69  const GeometryType& rGeometry,
70  const Properties& rProperty,
71  const ProcessInfo& rProcessInfo);
72 
76  virtual ~WindWaterFriction() {}
77 
81 
85  void Initialize(
86  const GeometryType& rGeometry,
87  const Properties& rProperty,
88  const ProcessInfo& rProcessInfo) override;
89 
95  double CalculateLHS(const array_1d<double,3>& rVelocity) override;
96 
102  array_1d<double,3> CalculateRHS(const array_1d<double,3>& rVelocity) override;
103 
107 
111  std::string Info() const override
112  {
113  std::stringstream buffer;
114  buffer << "WindWaterFriction";
115  return buffer.str();
116  }
117 
119 
120 private:
121 
124 
125  double mAirDensity;
126  double mWaterDensity;
127  array_1d<double,3> mWind;
128 
132 
134  WindWaterFriction& operator=(WindWaterFriction const& rOther)
135  {
136  return *this;
137  }
138 
140  WindWaterFriction(WindWaterFriction const& rOther) {}
141 
143 
144 }; // Class WindWaterFriction
145 
147 
150 
151 
155 
157 inline std::ostream& operator << (std::ostream& rOStream,
158  const WindWaterFriction& rThis)
159 {
160  rThis.PrintInfo(rOStream);
161  rOStream << std::endl;
162  rThis.PrintData(rOStream);
163 
164  return rOStream;
165 }
166 
168 
169 } // namespace Kratos.
170 
171 #endif // KRATOS_WIND_WATER_FRICTION_H_INCLUDED defined
Short class definition.
Definition: friction_law.hpp:52
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: friction_law.hpp:170
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: friction_law.hpp:164
Geometry base class.
Definition: geometry.h:71
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 base class for the bottom and surface friction laws.
Definition: wind_water_friction.h:49
double CalculateLHS(const array_1d< double, 3 > &rVelocity) override
Calculate the LHS coefficient for the given data.
Definition: wind_water_friction.cpp:48
virtual ~WindWaterFriction()
Destructor.
Definition: wind_water_friction.h:76
void Initialize(const GeometryType &rGeometry, const Properties &rProperty, const ProcessInfo &rProcessInfo) override
Initialize the friction law variables.
Definition: wind_water_friction.cpp:34
KRATOS_CLASS_POINTER_DEFINITION(WindWaterFriction)
WindWaterFriction()
Default Constructor.
Definition: wind_water_friction.h:63
array_1d< double, 3 > CalculateRHS(const array_1d< double, 3 > &rVelocity) override
Calculate the RHS coefficient for the given data.
Definition: wind_water_friction.cpp:68
std::string Info() const override
Turn back information as a string.
Definition: wind_water_friction.h:111
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432