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.
hydrodynamic_interaction_law.h
Go to the documentation of this file.
1 #ifndef KRATOS_SDEM_HYDRODYNAMIC_INTERACTION_LAW_H
2 #define KRATOS_SDEM_HYDRODYNAMIC_INTERACTION_LAW_H
3 
4 #include "includes/define.h"
5 #include "includes/serializer.h"
6 #include "includes/model_part.h"
7 #include "containers/flags.h"
8 
10 #include "drag_laws/drag_law.h"
16 #include "../DEMApplication/custom_elements/spheric_particle.h"
17 
18 namespace Kratos {
19 
20 class KRATOS_API(SWIMMING_DEM_APPLICATION) HydrodynamicInteractionLaw : public Flags {
21 
22 public:
23  typedef Node NodeType;
24 
25  // Pointer types for HydrodynamicInteractionLaw
28  HydrodynamicInteractionLaw(Properties::Pointer pProp, Parameters& r_hydrodynamic_parameters);
29  HydrodynamicInteractionLaw(const HydrodynamicInteractionLaw &rHydrodynamicInteractionLaw);
30 
31  void SetBuoyancyLaw(const BuoyancyLaw& r_law){mpBuoyancyLaw = r_law.Clone();}
32  void SetDragLaw(const DragLaw& r_law){mpDragLaw = r_law.Clone();}
33  void SetInviscidForceLaw(const InviscidForceLaw& r_law){mpInviscidForceLaw = r_law.Clone();}
34  void SetHistoryForceLaw(const HistoryForceLaw& r_law){mpHistoryForceLaw = r_law.Clone();}
35  void SetVorticityInducedLiftLaw(const VorticityInducedLiftLaw& r_law){mpVorticityInducedLiftLaw = r_law.Clone();}
36  void SetRotationInducedLiftLaw(const RotationInducedLiftLaw& r_law){mpRotationInducedLiftLaw = r_law.Clone();}
37  void SetSteadyViscousTorqueLaw(const SteadyViscousTorqueLaw& r_law){mpSteadyViscousTorqueLaw = r_law.Clone();}
38 
39  virtual void Initialize(const ProcessInfo& r_process_info);
40 
41  virtual void SetHydrodynamicInteractionLawInProperties(Properties::Pointer pProp, bool verbose = true) const;
42 
43  virtual std::string GetTypeOfLaw();
44 
46 
47  virtual ~HydrodynamicInteractionLaw();
48 
49  HydrodynamicInteractionLaw::Pointer Clone() const;
50 
51  virtual BuoyancyLaw::Pointer CloneBuoyancyLaw() const;
52  virtual DragLaw::Pointer CloneDragLaw() const;
53  virtual InviscidForceLaw::Pointer CloneInviscidForceLaw() const;
54  virtual HistoryForceLaw::Pointer CloneHistoryForceLaw() const;
55  virtual VorticityInducedLiftLaw::Pointer CloneVorticityInducedLiftLaw() const;
56  virtual RotationInducedLiftLaw::Pointer CloneRotationInducedLiftLaw() const;
57  virtual SteadyViscousTorqueLaw::Pointer CloneSteadyViscousTorqueLaw() const;
58 
59  double ComputeParticleReynoldsNumber(const double particle_radius,
60  const double fluid_kinematic_viscosity,
61  const double modulus_of_minus_slip_velocity);
62 
63  virtual void ComputeBuoyancyForce(Geometry<Node >& r_geometry,
64  const double fluid_density,
65  const double displaced_volume,
67  array_1d<double, 3>& buoyancy,
68  const ProcessInfo& r_current_process_info);
69 
70  void ComputeDragForce(SphericParticle* p_particle,
71  double particle_radius,
72  double fluid_density,
73  double fluid_kinematic_viscosity,
74  array_1d<double, 3>& minus_slip_velocity,
75  array_1d<double, 3>& drag_force,
76  const ProcessInfo& r_current_process_info);
77 
78  virtual void ComputeInviscidForce(Geometry<Node >& r_geometry,
79  const double fluid_density,
80  const double displaced_volume,
81  array_1d<double, 3>& virtual_mass_plus_undisturbed_flow_force,
82  const ProcessInfo& r_current_process_info);
83 
84  virtual double GetInviscidAddedMass(Geometry<Node >& r_geometry,
85  double fluid_density,
86  const ProcessInfo& r_current_process_info);
87 
88  virtual void ComputeHistoryForce(Geometry<Node >& r_geometry,
89  double particle_radius,
90  double fluid_density,
91  double fluid_kinematic_viscosity,
92  array_1d<double, 3>& minus_slip_velocity,
93  array_1d<double, 3>& drag_force,
94  const ProcessInfo& r_current_process_info);
95 
96  virtual double GetHistoryForceAddedMass(Geometry<Node >& r_geometry,
97  const ProcessInfo& r_current_process_info);
98 
99  virtual void ComputeVorticityInducedLift(Geometry<Node >& r_geometry,
100  double particle_radius,
101  double fluid_density,
102  double fluid_kinematic_viscosity,
103  array_1d<double, 3>& minus_slip_velocity,
104  array_1d<double, 3>& vorticity_induced_lift,
105  const ProcessInfo& r_current_process_info);
106 
107  virtual void ComputeRotationInducedLift(Geometry<Node >& r_geometry,
108  double particle_radius,
109  double fluid_density,
110  double fluid_kinematic_viscosity,
111  array_1d<double, 3>& minus_slip_velocity,
112  array_1d<double, 3>& rotation_induced_lift,
113  const ProcessInfo& r_current_process_info);
114 
115  virtual void ComputeSteadyViscousTorque(Geometry<Node >& r_geometry,
116  double particle_radius,
117  double fluid_density,
118  double fluid_kinematic_viscosity,
119  array_1d<double, 3>& minus_slip_velocity,
120  array_1d<double, 3>& steady_viscous_torque,
121  const ProcessInfo& r_current_process_info);
122 
123 protected:
124  BuoyancyLaw::Pointer mpBuoyancyLaw;
125  DragLaw::Pointer mpDragLaw;
126  InviscidForceLaw::Pointer mpInviscidForceLaw;
127  HistoryForceLaw::Pointer mpHistoryForceLaw;
128  VorticityInducedLiftLaw::Pointer mpVorticityInducedLiftLaw;
129  RotationInducedLiftLaw::Pointer mpRotationInducedLiftLaw;
130  SteadyViscousTorqueLaw::Pointer mpSteadyViscousTorqueLaw;
131 
132 private:
133 
134  friend class Serializer;
135 
136  virtual void save(Serializer& rSerializer) const override {
138 
139  }
140 
141  virtual void load(Serializer& rSerializer) override {
143  }
144 
145 }; // Class HydrodynamicInteractionLaw : public MainCL
146 
147 KRATOS_DEFINE_APPLICATION_VARIABLE(SWIMMING_DEM_APPLICATION, HydrodynamicInteractionLaw::Pointer, SDEM_HYDRODYNAMIC_INTERACTION_LAW_POINTER)
148 
149 
150 } // Namespace Kratos
151 
152 #endif // KRATOS_SDEM_HYDRODYNAMIC_INTERACTION_LAW_H
Definition: buoyancy_law.h:16
virtual BuoyancyLaw::Pointer Clone() const
Definition: buoyancy_law.cpp:19
Definition: drag_law.h:17
virtual DragLaw::Pointer Clone() const
Definition: drag_law.cpp:29
Definition: flags.h:58
Geometry base class.
Definition: geometry.h:71
Definition: history_force_law.h:16
virtual HistoryForceLaw::Pointer Clone() const
Definition: history_force_law.cpp:19
Definition: hydrodynamic_interaction_law.h:20
BuoyancyLaw::Pointer mpBuoyancyLaw
Definition: hydrodynamic_interaction_law.h:124
void SetDragLaw(const DragLaw &r_law)
Definition: hydrodynamic_interaction_law.h:32
InviscidForceLaw::Pointer mpInviscidForceLaw
Definition: hydrodynamic_interaction_law.h:126
void SetVorticityInducedLiftLaw(const VorticityInducedLiftLaw &r_law)
Definition: hydrodynamic_interaction_law.h:35
HistoryForceLaw::Pointer mpHistoryForceLaw
Definition: hydrodynamic_interaction_law.h:127
void SetHistoryForceLaw(const HistoryForceLaw &r_law)
Definition: hydrodynamic_interaction_law.h:34
void SetBuoyancyLaw(const BuoyancyLaw &r_law)
Definition: hydrodynamic_interaction_law.h:31
void SetInviscidForceLaw(const InviscidForceLaw &r_law)
Definition: hydrodynamic_interaction_law.h:33
void SetRotationInducedLiftLaw(const RotationInducedLiftLaw &r_law)
Definition: hydrodynamic_interaction_law.h:36
SteadyViscousTorqueLaw::Pointer mpSteadyViscousTorqueLaw
Definition: hydrodynamic_interaction_law.h:130
RotationInducedLiftLaw::Pointer mpRotationInducedLiftLaw
Definition: hydrodynamic_interaction_law.h:129
DragLaw::Pointer mpDragLaw
Definition: hydrodynamic_interaction_law.h:125
HydrodynamicInteractionLaw()
Definition: hydrodynamic_interaction_law.h:27
VorticityInducedLiftLaw::Pointer mpVorticityInducedLiftLaw
Definition: hydrodynamic_interaction_law.h:128
Node NodeType
Definition: hydrodynamic_interaction_law.h:23
KRATOS_CLASS_POINTER_DEFINITION(HydrodynamicInteractionLaw)
void SetSteadyViscousTorqueLaw(const SteadyViscousTorqueLaw &r_law)
Definition: hydrodynamic_interaction_law.h:37
Definition: inviscid_force_law.h:16
virtual InviscidForceLaw::Pointer Clone() const
Definition: inviscid_force_law.cpp:19
This class defines the node.
Definition: node.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Definition: rotation_induced_lift_law.h:16
virtual RotationInducedLiftLaw::Pointer Clone() const
Definition: rotation_induced_lift_law.cpp:19
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Definition: spheric_particle.h:31
Definition: steady_viscous_torque_law.h:16
virtual SteadyViscousTorqueLaw::Pointer Clone() const
Definition: steady_viscous_torque_law.cpp:19
Definition: vorticity_induced_lift_law.h:16
virtual VorticityInducedLiftLaw::Pointer Clone() const
Definition: vorticity_induced_lift_law.cpp:18
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KRATOS_DEFINE_APPLICATION_VARIABLE(CHIMERA_APPLICATION, double, CHIMERA_DISTANCE)
def load(f)
Definition: ode_solve.py:307
body_force
Definition: script_ELASTIC.py:102