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.
swimming_DEM_application.h
Go to the documentation of this file.
1 //
2 // Project Name: Kratos
3 // Last Modified by: $Author: G.Casas$
4 // Date: $Date: $
5 // Revision: $Revision: 1.2 $
6 //
7 //
8 
9 
10 #if !defined(KRATOS_SWIMMING_DEM_APPLICATION_H_INCLUDED )
11 #define KRATOS_SWIMMING_DEM_APPLICATION_H_INCLUDED
12 
13 
14 // System includes
15 #include <string>
16 #include <iostream>
17 
18 
19 // External includes
20 
21 // Project includes
22 #include "includes/define.h"
24 #include "includes/variables.h"
25 #include "includes/dem_variables.h" //TODO: must be removed eventually
26 #include "includes/cfd_variables.h" //TODO: must be removed eventually
40 
44 
45 namespace Kratos
46 {
47 
48  #define SWIMMING_COPY_SECOND_TO_FIRST_3(a, b) a[0] = b[0]; a[1] = b[1]; a[2] = b[2];
49  #define SWIMMING_ADD_SECOND_TO_FIRST(a, b) a[0] += b[0]; a[1] += b[1]; a[2] += b[2];
50  #define SWIMMING_SET_COMPONENTS_TO_ZERO_3(a) a[0] = 0.0; a[1] = 0.0; a[2] = 0.0;
51  #define SWIMMING_SET_COMPONENTS_TO_ZERO_3x3(a) a[0][0] = 0.0; a[0][1] = 0.0; a[0][2] = 0.0; a[1][0] = 0.0; a[1][1] = 0.0; a[1][2] = 0.0; a[2][0] = 0.0; a[2][1] = 0.0; a[2][2] = 0.0;
52  #define SWIMMING_MULTIPLY_BY_SCALAR_3(a, b) a[0] = b * a[0]; a[1] = b * a[1]; a[2] = b * a[2];
53  #define SWIMMING_MODULUS_3(a) std::sqrt(a[0] * a[0] + a[1] * a[1] + a[2] * a[2])
54  #define SWIMMING_INNER_PRODUCT_3(a, b) (a[0] * b[0] + a[1] * b[1] + a[2] * b[2])
55  #define SWIMMING_SET_TO_CROSS_OF_FIRST_TWO_3(a, b, c) c[0] = a[1] * b[2] - a[2] * b[1]; c[1] = a[2] * b[0] - a[0] * b[2]; c[2] = a[0] * b[1] - a[1] * b[0];
56  #define SWIMMING_POW_2(a) (a * a)
57  #define SWIMMING_POW_3(a) (a * a * a)
58  #define SWIMMING_POW_4(a) (a * a * a * a)
59  #define SWIMMING_POW_5(a) (a * a * a * a * a)
60  #define SWIMMING_POW_6(a) (a * a * a * a * a * a)
61  #define SWIMMING_POW_7(a) (a * a * a * a * a * a * a)
62 
63 class KRATOS_API(SWIMMING_DEM_APPLICATION) KratosSwimmingDEMApplication : public KratosApplication
64 {
65 public:
66 
69 
72 
75 
76 
77  void Register() override;
78 
80  std::string Info() const override
81  {
82  return "KratosSwimmingDEMApplication";
83  }
84 
86  void PrintInfo(std::ostream& rOStream) const override
87  {
88  rOStream << Info();
89  PrintData(rOStream);
90  }
91 
93  void PrintData(std::ostream& rOStream) const override
94  {
95  rOStream << "Variables:" << std::endl;
97  rOStream << std::endl;
98  rOStream << "Elements:" << std::endl;
99  KratosComponents<Element>().PrintData(rOStream);
100  rOStream << std::endl;
101  rOStream << "Conditions:" << std::endl;
102  KratosComponents<Condition>().PrintData(rOStream);
103  }
104 
105 protected:
106 
107 private:
111  const MonolithicDEMCoupled<2> mMonolithicDEMCoupled2D;
113  const MonolithicDEMCoupled<3> mMonolithicDEMCoupled3D;
114 
116  const MonolithicDEMCoupledWeak<2> mMonolithicDEMCoupledWeak2D;
118  const MonolithicDEMCoupledWeak<3> mMonolithicDEMCoupledWeak3D;
119 
120  const ComputeLaplacianSimplex<2> mComputeLaplacianSimplex2D;
121  const ComputeLaplacianSimplex<3> mComputeLaplacianSimplex3D;
122 
123  const ComputeMaterialDerivativeSimplex<2> mComputeMaterialDerivativeSimplex2D;
124  const ComputeMaterialDerivativeSimplex<3> mComputeMaterialDerivativeSimplex3D;
125 
126  const ComputeComponentGradientSimplex<2> mComputeComponentGradientSimplex2D;
127  const ComputeComponentGradientSimplex<3> mComputeComponentGradientSimplex3D;
128 
129  const ComputeGradientPouliot2012Edge<2> mComputeGradientPouliot20122DEdge;
130  const ComputeGradientPouliot2012Edge<3> mComputeGradientPouliot20123DEdge;
131 
132  const ComputeGradientPouliot2012<2> mComputeGradientPouliot20122D;
133  const ComputeGradientPouliot2012<3> mComputeGradientPouliot20123D;
134 
135  const ComputeVelocityLaplacianComponentSimplex<2> mComputeVelocityLaplacianComponentSimplex2D;
136  const ComputeVelocityLaplacianComponentSimplex<3> mComputeVelocityLaplacianComponentSimplex3D;
137 
138  const ComputeVelocityLaplacianSimplex<2> mComputeVelocityLaplacianSimplex2D;
139  const ComputeVelocityLaplacianSimplex<3> mComputeVelocityLaplacianSimplex3D;
140 
141  const MonolithicDEMCoupledWallCondition<2,2> mMonolithicDEMCoupledWallCondition2D;
142  const MonolithicDEMCoupledWallCondition<3,3> mMonolithicDEMCoupledWallCondition3D;
143 
144  const ComputeLaplacianSimplexCondition<2,2> mComputeLaplacianSimplexCondition2D;
145  const ComputeLaplacianSimplexCondition<3,3> mComputeLaplacianSimplexCondition3D;
146 
147  const ShellRigid mRigidShellElement;
148 
149  const SwimmingParticle<SphericParticle> mSphericSwimmingParticle3D;
150  const SwimmingParticle<NanoParticle> mSwimmingNanoParticle3D;
151  const SwimmingParticle<AnalyticSphericParticle> mSwimmingAnalyticParticle3D;
154 
157 
158 }; // Class KratosSwimmingDEMApplication
159 
160 } // namespace Kratos.
161 
162 #endif // KRATOS_SWIMMING_DEM_APPLICATION_H_INCLUDED defined
163 
164 
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
This class defines the interface with kernel for all applications in Kratos.
Definition: kratos_application.h:91
Definition: kratos_components.h:253
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: kratos_components.h:403
Definition: swimming_DEM_application.h:64
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: swimming_DEM_application.h:86
KRATOS_CLASS_POINTER_DEFINITION(KratosSwimmingDEMApplication)
Pointer definition of KratosSwimmingDEMApplication.
std::string Info() const override
Turn back information as a string.
Definition: swimming_DEM_application.h:80
virtual ~KratosSwimmingDEMApplication()
Destructor.
Definition: swimming_DEM_application.h:74
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: swimming_DEM_application.h:93
Short class definition.
Definition: shell_rigid.h:94
Definition: swimming_particle.h:28
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KRATOS_API_EXTERN template class KratosComponents< Condition >
Definition: condition.h:1191
KRATOS_API_EXTERN template class KratosComponents< Element >
Definition: element.h:1240