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.
fic_data.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: Jordi Cotela
11 //
12 
13 
14 #if !defined(KRATOS_FIC_DATA_H)
15 #define KRATOS_FIC_DATA_H
16 
19 
20 namespace Kratos {
21 
24 
27 
28 template< size_t TDim, size_t TNumNodes,bool TElementIntegratesInTime = false >
29 class FICData : public FluidElementData<TDim,TNumNodes, TElementIntegratesInTime>
30 {
31 public:
32 
35 
38 
42 
46 
48 
49 double Density;
50 double DeltaTime; // Time increment
51 double FICBeta; // FIC Beta parameter
52 double DynamicTau; // Time stabilization coefficient for incompressibility stabilization
53 
55 BoundedMatrix<double,TNumNodes*(TDim+1),TNumNodes*(TDim+1)> LHS;
56 
60 
61 void Initialize(const Element& rElement, const ProcessInfo& rProcessInfo) override
62 {
63  // Base class Initialize manages constitutive law parameters
65 
66  const Geometry< Node >& r_geometry = rElement.GetGeometry();
67  const Properties& r_properties = rElement.GetProperties();
68  this->FillFromHistoricalNodalData(Velocity,VELOCITY,r_geometry);
69  this->FillFromHistoricalNodalData(MeshVelocity,MESH_VELOCITY,r_geometry);
70  this->FillFromHistoricalNodalData(BodyForce,BODY_FORCE,r_geometry);
71  this->FillFromHistoricalNodalData(Pressure,PRESSURE,r_geometry);
72  this->FillFromProperties(Density,DENSITY,r_properties);
73  this->FillFromProcessInfo(DeltaTime,DELTA_TIME,rProcessInfo);
74  this->FillFromProcessInfo(FICBeta,FIC_BETA,rProcessInfo);
75  this->FillFromProcessInfo(DynamicTau,DYNAMIC_TAU,rProcessInfo);
76 }
77 
78 static int Check(const Element& rElement, const ProcessInfo& rProcessInfo)
79 {
80  const Geometry< Node >& r_geometry = rElement.GetGeometry();
81 
82  for (unsigned int i = 0; i < TNumNodes; i++)
83  {
84  KRATOS_CHECK_VARIABLE_IN_NODAL_DATA(VELOCITY,r_geometry[i]);
85  KRATOS_CHECK_VARIABLE_IN_NODAL_DATA(MESH_VELOCITY,r_geometry[i]);
86  KRATOS_CHECK_VARIABLE_IN_NODAL_DATA(BODY_FORCE,r_geometry[i]);
87  KRATOS_CHECK_VARIABLE_IN_NODAL_DATA(PRESSURE,r_geometry[i]);
88  }
89 
90  return 0;
91 }
92 
94 
95 };
96 
98 
100 
101 }
102 
103 #endif
Base class for all Elements.
Definition: element.h:60
PropertiesType & GetProperties()
Definition: element.h:1024
Definition: fic_data.h:30
NodalVectorData MeshVelocity
Definition: fic_data.h:44
void Initialize(const Element &rElement, const ProcessInfo &rProcessInfo) override
Definition: fic_data.h:61
typename FluidElementData< TDim, TNumNodes, false >::NodalScalarData NodalScalarData
Definition: fic_data.h:36
NodalVectorData BodyForce
Definition: fic_data.h:45
typename FluidElementData< TDim, TNumNodes, false >::NodalVectorData NodalVectorData
Definition: fic_data.h:37
double FICBeta
Definition: fic_data.h:51
double DynamicTau
Definition: fic_data.h:52
BoundedMatrix< double, TNumNodes *(TDim+1), TNumNodes *(TDim+1)> LHS
Auxiliary container for the local matrix at the integration point (stored to save reallocation at eac...
Definition: fic_data.h:55
static int Check(const Element &rElement, const ProcessInfo &rProcessInfo)
Definition: fic_data.h:78
NodalScalarData Pressure
Definition: fic_data.h:47
NodalVectorData Velocity
Definition: fic_data.h:43
double DeltaTime
Definition: fic_data.h:50
double Density
Definition: fic_data.h:49
Base class for data containers used within FluidElement and derived types.
Definition: fluid_element_data.h:37
void FillFromProperties(double &rData, const Variable< double > &rVariable, const Properties &rProperties)
Definition: fluid_element_data.cpp:192
void FillFromHistoricalNodalData(NodalScalarData &rData, const Variable< double > &rVariable, const Geometry< Node > &rGeometry)
Definition: fluid_element_data.cpp:65
virtual void Initialize(const Element &rElement, const ProcessInfo &rProcessInfo)
Definition: fluid_element_data.cpp:18
void FillFromProcessInfo(double &rData, const Variable< double > &rVariable, const ProcessInfo &rProcessInfo)
Definition: fluid_element_data.cpp:153
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
Geometry base class.
Definition: geometry.h:71
Definition: amatrix_interface.h:41
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
#define KRATOS_CHECK_VARIABLE_IN_NODAL_DATA(TheVariable, TheNode)
Definition: checks.h:171
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
TABLE_NUMBER_ANGULAR_VELOCITY TABLE_NUMBER_MOMENT I33 BEAM_INERTIA_ROT_UNIT_LENGHT_Y KRATOS_DEFINE_APPLICATION_VARIABLE(DEM_APPLICATION, double, BEAM_INERTIA_ROT_UNIT_LENGHT_Z) typedef std double
Definition: DEM_application_variables.h:182
integer i
Definition: TensorModule.f:17