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.
qsvms_dem_coupled_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: Joaquin Gonzalez-Usua
11 //
12 
13 #if !defined(KRATOS_QSVMSDEMCOUPLED_DATA_H)
14 #define KRATOS_QSVMSDEMCOUPLED_DATA_H
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
21 #include "geometries/geometry.h"
23 #include "includes/checks.h"
24 
25 // Application includes
29 
30 namespace Kratos {
31 
34 
37 
38 template< size_t TDim, size_t TNumNodes, bool TElementIntegratesInTime = false>
39 class QSVMSDEMCoupledData : public QSVMSData<TDim, TNumNodes, TElementIntegratesInTime>
40 {
41 public:
42 
45 
46 
47 constexpr static unsigned int Dim = TDim;
48 constexpr static unsigned int NumNodes = TNumNodes;
49 constexpr static unsigned int BlockSize = Dim + 2;
50 constexpr static unsigned int DofSize = NumNodes * BlockSize;
51 constexpr static bool ElementIntegratesInTime = TElementIntegratesInTime;
52 
59 
63 
67 
71 
73 
75 
76 double ElementSize;
77 
81 
83  const Element& rElement,
84  const ProcessInfo& rProcessInfo) override
85 {
86  // Base class Initialize manages constitutive law parameters
88  const auto& r_geometry = rElement.GetGeometry();
89  this->FillFromHistoricalNodalData(FluidFraction, FLUID_FRACTION, r_geometry);
90  this->FillFromHistoricalNodalData(FluidFractionRate, FLUID_FRACTION_RATE, r_geometry);
91  this->FillFromHistoricalNodalData(FluidFractionGradient, FLUID_FRACTION_GRADIENT, r_geometry);
92  this->FillFromHistoricalNodalData(Permeability, PERMEABILITY, r_geometry);
93  this->FillFromHistoricalNodalData(MassSource, MASS_SOURCE, r_geometry);
94  this->FillFromHistoricalNodalData(Acceleration, ACCELERATION, r_geometry);
95  this->FillFromHistoricalNodalData(BodyForce,BODY_FORCE,r_geometry);
96 
98 }
99 
101 {
103  ddn_ddx = rDDN_DDX;
104 }
105 
107 };
108 
110 
112 
113 }
114 
115 #endif
Base class for all Elements.
Definition: element.h:60
static double AverageElementSize(const Geometry< Node > &rGeometry)
Average element size based on the geometry.
Base class for data containers used within FluidElement and derived types.
Definition: fluid_element_data.h:37
void FillFromHistoricalNodalData(NodalScalarData &rData, const Variable< double > &rVariable, const Geometry< Node > &rGeometry)
Definition: fluid_element_data.cpp:65
MatrixRow< Matrix > MatrixRowType
Definition: fluid_element_data.h:52
std::array< BoundedMatrix< double, TDim, TDim >, TNumNodes > NodalTensorData
Definition: fluid_element_data.h:46
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
Definition: amatrix_interface.h:41
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Definition: qsvms_dem_coupled_data.h:40
void Initialize(const Element &rElement, const ProcessInfo &rProcessInfo) override
Definition: qsvms_dem_coupled_data.h:82
NodalVectorData BodyForce
Definition: qsvms_dem_coupled_data.h:70
NodalVectorData Acceleration
Definition: qsvms_dem_coupled_data.h:69
constexpr static unsigned int DofSize
Definition: qsvms_dem_coupled_data.h:50
void UpdateSecondDerivativesValues(const ShapeFunctionsSecondDerivativesType &rDDN_DDX)
Definition: qsvms_dem_coupled_data.h:100
constexpr static unsigned int NumNodes
Definition: qsvms_dem_coupled_data.h:48
NodalTensorData Permeability
Definition: qsvms_dem_coupled_data.h:72
ShapeFunctionsSecondDerivativesType DDN_DDX
Definition: qsvms_dem_coupled_data.h:74
NodalScalarData FluidFraction
Definition: qsvms_dem_coupled_data.h:64
constexpr static unsigned int Dim
Definition: qsvms_dem_coupled_data.h:47
NodalVectorData FluidFractionGradient
Definition: qsvms_dem_coupled_data.h:68
NodalScalarData MassSource
Definition: qsvms_dem_coupled_data.h:66
double ElementSize
Definition: qsvms_dem_coupled_data.h:76
NodalScalarData FluidFractionRate
Definition: qsvms_dem_coupled_data.h:65
constexpr static bool ElementIntegratesInTime
Definition: qsvms_dem_coupled_data.h:51
constexpr static unsigned int BlockSize
Definition: qsvms_dem_coupled_data.h:49
Definition: qsvms_data.h:30
void Initialize(const Element &rElement, const ProcessInfo &rProcessInfo) override
Definition: qsvms_data.h:67
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
AMatrix::MatrixRow< TExpressionType > MatrixRow
Definition: amatrix_interface.h:492