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.
terminal_velocity_scheme.h
Go to the documentation of this file.
1 //
2 // Author: Guillermo Casas gcasas@cimne.upc.edu
3 //
4 
5 #if !defined(KRATOS_TERMINAL_VELOCITY_SCHEME_H_INCLUDED )
6 #define KRATOS_TERMINAL_VELOCITY_SCHEME_H_INCLUDED
7 
8 // System includes
9 #include <string>
10 #include <iostream>
11 #include <cfloat>
12 
13 // Project includes
15 #include "includes/define.h"
16 #include "utilities/openmp_utils.h"
17 #include "includes/model_part.h"
19 #include "utilities/quaternion.h"
20 
21 namespace Kratos {
22 
23  class KRATOS_API(SWIMMING_DEM_APPLICATION) TerminalVelocityScheme : public HybridBashforthScheme {
24  public:
25 
27 
30 
33 
36 
37  DEMIntegrationScheme* CloneRaw() const override {
38  DEMIntegrationScheme* cloned_scheme(new TerminalVelocityScheme(*this));
39  return cloned_scheme;
40  }
41 
42  DEMIntegrationScheme::Pointer CloneShared() const override {
43  DEMIntegrationScheme::Pointer cloned_scheme(new TerminalVelocityScheme(*this));
44  return cloned_scheme;
45  }
46 
47  void UpdateTranslationalVariables(
48  int StepFlag,
49  Node& i,
51  array_1d<double, 3 >& displ,
52  array_1d<double, 3 >& delta_displ,
54  const array_1d<double, 3 >& initial_coor,
55  const array_1d<double, 3 >& force,
56  const double force_reduction_factor,
57  const double mass,
58  const double delta_t,
59  const bool Fix_vel[3]) override;
60 
61  void UpdateRotationalVariables(
62  int StepFlag,
63  Node& i,
64  array_1d<double, 3 >& rotated_angle,
65  array_1d<double, 3 >& delta_rotation,
66  array_1d<double, 3 >& angular_velocity,
67  array_1d<double, 3 >& angular_acceleration,
68  const double delta_t,
69  const bool Fix_Ang_vel[3]) override;
70 
71  void CalculateLocalAngularAcceleration(
72  const double moment_of_inertia,
73  const array_1d<double, 3 >& torque,
74  const double moment_reduction_factor,
75  array_1d<double, 3 >& angular_acceleration) override;
76 
77  void CalculateLocalAngularAccelerationByEulerEquations(
78  const array_1d<double, 3 >& local_angular_velocity,
79  const array_1d<double, 3 >& moments_of_inertia,
80  const array_1d<double, 3 >& local_torque,
81  const double moment_reduction_factor,
82  array_1d<double, 3 >& local_angular_acceleration) override;
83 
85 
86  virtual std::string Info() const override {
87  std::stringstream buffer;
88  buffer << "SymplecticEulerScheme";
89  return buffer.str();
90  }
91 
93 
94  virtual void PrintInfo(std::ostream& rOStream) const override {
95  rOStream << "TerminalVelocityScheme";
96  }
97 
99 
100  virtual void PrintData(std::ostream& rOStream) const override {
101  }
102 
103 
104  protected:
105 
106 
107  private:
108 
110 
112  return *this;
113  }
114 
116 
117  TerminalVelocityScheme(TerminalVelocityScheme const& rOther) {
118  *this = rOther;
119  }
120 
122 
123  }; // Class TerminalVelocityScheme
124 
125  inline std::istream& operator>>(std::istream& rIStream,
126  TerminalVelocityScheme& rThis) {
127  return rIStream;
128  }
129 
130  inline std::ostream& operator<<(std::ostream& rOStream,
131  const TerminalVelocityScheme& rThis) {
132  rThis.PrintInfo(rOStream);
133  rOStream << std::endl;
134  rThis.PrintData(rOStream);
135 
136  return rOStream;
137  }
138 
139 } // namespace Kratos.
140 
141 #endif // KRATOS_TERMINAL_VELOCITY_SCHEME_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: dem_integration_scheme.h:24
Definition: hybrid_bashforth_scheme.h:23
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
This class defines the node.
Definition: node.h:65
Definition: terminal_velocity_scheme.h:23
virtual ~TerminalVelocityScheme()
Destructor.
Definition: terminal_velocity_scheme.h:35
ModelPart::NodesContainerType NodesArrayType
Definition: terminal_velocity_scheme.h:26
DEMIntegrationScheme::Pointer CloneShared() const override
Definition: terminal_velocity_scheme.h:42
KRATOS_CLASS_POINTER_DEFINITION(TerminalVelocityScheme)
Pointer definition of TerminalVelocityScheme.
DEMIntegrationScheme * CloneRaw() const override
Definition: terminal_velocity_scheme.h:37
TerminalVelocityScheme()
Default constructor.
Definition: terminal_velocity_scheme.h:32
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: terminal_velocity_scheme.h:94
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: terminal_velocity_scheme.h:100
virtual std::string Info() const override
Turn back information as a string.
Definition: terminal_velocity_scheme.h:86
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
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
vel
Definition: pure_conduction.py:76
float delta_t
Definition: rotatingcone_PureConvectionBenchmarking.py:129
integer i
Definition: TensorModule.f:17