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.
water_pressure_utilities.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosSolidMechanicsApplication $
3 // Last modified by: $Author: LMonforte $
4 // Date: $Date: July 2015 $
5 // Revision: $Revision: 0.1 $
6 //
7 //
8 
9 #if !defined(KRATOS_WATER_PRESSURE_UTILITIES)
10 #define KRATOS_WATER_PRESSURE_UTILITIES
11 
12 
13 // System includes
14 
15 // External includes
16 //#include "boost/smart_ptr.hpp"
17 
18 // Project includes
19 #include "includes/define.h"
20 #include "includes/variables.h"
21 #include "utilities/math_utils.h"
22 #include "geometries/geometry.h"
23 #include "includes/properties.h"
24 
25 namespace Kratos
26 {
27 
28 
29  class KRATOS_API(PFEM_SOLID_MECHANICS_APPLICATION) WaterPressureUtilities
30  {
31 
32  public:
33  typedef Matrix MatrixType;
34 
35  typedef Vector VectorType;
36 
37  typedef unsigned int IndexType;
38 
39  typedef unsigned int SizeType;
40 
42 
43  typedef Node NodeType;
45 
46 
48 
49  private:
50  const GeometryType* mpGeometry;
51  const PropertiesType* mpProperties;
52 
53  const MatrixType* mpB;
54  const MatrixType* mpF0;
55  const MatrixType* mpDN_DX;
56  const VectorType* mpN;
57  const VectorType* mpVolumeForce;
58 
59  public:
60  double DeltaTime;
61  double detF0;
62  double CurrentRadius;
64 
65  unsigned int number_of_variables;
66 
68  {
69  mpProperties=NULL;
70  mpGeometry=NULL;
71 
72  mpB = NULL;
73  mpF0 = NULL;
74  mpDN_DX = NULL;
75  mpN = NULL;
76  mpVolumeForce = NULL;
77 
78  number_of_variables = 0;
79  };
80 
81  HydroMechanicalVariables( const GeometryType & rElementGeometry, const PropertiesType & rMaterialProperties) : mpGeometry(&rElementGeometry) , mpProperties(&rMaterialProperties)
82  {
83  mpB = NULL;
84  mpF0 = NULL;
85  mpDN_DX = NULL;
86  mpN = NULL;
87  mpVolumeForce = NULL;
88  number_of_variables = 0;
89  };
90 
91  // set pointers
92  void SetBMatrix (const MatrixType& rBMatrix) {mpB=&rBMatrix;};
93  void SetDeformationGradient (const MatrixType& rF0) {mpF0=&rF0;};
94  void SetShapeFunctionsDerivatives (const MatrixType& rDN_DX) {mpDN_DX=&rDN_DX;};
95  void SetShapeFunctions (const VectorType& rN) {mpN = & rN; };
96  void SetVolumeForce (const VectorType& rVolumeForce){mpVolumeForce = & rVolumeForce; };
97 
98  // get const reference
99  const GeometryType& GetGeometry() {return *mpGeometry; };
100  const PropertiesType& GetProperties() {return *mpProperties; };
101  const MatrixType& GetBMatrix() {return *mpB;};
102  const MatrixType& GetDeformationGradient() {return *mpF0;};
103  const MatrixType& GetShapeFunctionsDerivatives() {return *mpDN_DX;};
104  const VectorType& GetShapeFunctions() {return *mpN; };
105  const VectorType& GetVolumeForce() {return *mpVolumeForce; };
106 
107  };
108 
109  public:
110 
112 
114 
115 
116  VectorType& CalculateAndAddHydromechanicalRHS( HydroMechanicalVariables & rVariables, VectorType & rRightHandSide, const VectorType & rBaseClassRHS, const double & rIntegrationWeight);
117 
118  VectorType & CalculateAndAddStabilization( HydroMechanicalVariables & rVariables, Vector & rRightHandSide, const double & rIntegrationWeight);
119 
120  MatrixType& CalculateAndAddHydromechanicalLHS( HydroMechanicalVariables & rVariables, MatrixType & rLeftHandSide, const MatrixType & rBaseClassLHS, const double & rIntegrationWeight);
121 
122  MatrixType & CalculateAndAddStabilizationLHS( HydroMechanicalVariables & rVariables, Matrix & rLeftHandSide, const double & rIntegrationWeight);
123 
124  void GetPermeabilityTensor( const PropertiesType & rProperties, const Matrix & rTotalF, Matrix & rK, const double & rInitial_porosity, const unsigned int & rDimension, const double & rVolume );
125 
126  protected:
127 
128 
129  // Get Properties
130 
131  void GetScalingConstant( double& rScalingConstant, const PropertiesType& pProperties);
132 
133  void GetPermeabilityTensor( const PropertiesType & rProperties, const Matrix & rTotalF, Matrix & rK , const double & rInitial_porosity, const double & rVolume);
134 
135 
136  virtual void GetVoigtSize( const unsigned int & dimension, unsigned int & voigtsize, unsigned int & principal_dimension);
137 
138  double & CalculateStabilizationFactor( HydroMechanicalVariables & rVariables, double & rAlphaStabilization);
139 
140  virtual double CalculateVolumeChange( const GeometryType & rGeometry, const Vector & rN, const Matrix & rTotalF);
141 
142  // CALCULATE RHS
143  VectorType & CalculateMassBalance_WaterPressurePart( HydroMechanicalVariables & rVariables, VectorType & rLocalRHS, const double & rIntegrationWeight);
144 
145  virtual VectorType& CalculateMassBalance_AddDisplacementPart( HydroMechanicalVariables & rVariables, VectorType & rLocalRHS, const double & rIntegrationWeight);
146 
147  VectorType& CalculateWaterInternalForcesContribution( HydroMechanicalVariables & rVariables, VectorType& rRightHandSideVector, const double & rIntegrationWeight);
148 
149  VectorType & CalculateVolumeForcesContribution( HydroMechanicalVariables & rVariables, VectorType & rRightHandSideVector, const double & rIntegrationWeight);
150 
151  VectorType & CalculateStabilizationRHS( HydroMechanicalVariables & rVariables, VectorType & rRightHandSideVector, const double & rIntegrationWeight);
152 
153  // RESHAPCE RHS
154  VectorType& AddReshapeBaseClassRHS( VectorType & rRightHandSideVector, const VectorType& rBaseClassRHS, const unsigned int & number_of_variables, const unsigned int & number_of_nodes);
155 
156  VectorType& AddReshapeWaterPressureForces( VectorType & rRightHandSide, const VectorType& rPartialRHS, const unsigned int number_of_variables, const unsigned int number_of_points);
157 
158  VectorType& AddReshapeWaterInternalForcesContribution( VectorType & rRightHandSideVector, const VectorType& rPartialRHS, const unsigned int number_of_variables, const unsigned int number_of_nodes, const unsigned int dimension);
159 
160 
161  // CALCULATE LHS
162  MatrixType & ComputeWaterPressureKuug( HydroMechanicalVariables & rVariables, MatrixType & rLocalLHS, const double & rIntegrationWeight);
163 
164  virtual MatrixType & ComputeWaterPressureKUwP( HydroMechanicalVariables & rVariables, MatrixType & rLocalLHS, const double & rIntegrationWeight);
165 
166  MatrixType & ComputeWaterPressureKwPwP( HydroMechanicalVariables & rVariables, MatrixType & rLocalLHS, const double & rIntegrationWeight);
167 
168  virtual MatrixType & ComputeSolidSkeletonDeformationMatrix(HydroMechanicalVariables & rVariables, MatrixType & rLocalLHS, const double & rIntegrationWeight);
169 
170  MatrixType & ComputeDarcyFlowGeometricTerms(HydroMechanicalVariables & rVariables, MatrixType & rLocalLHS, const double & rIntegrationWeight);
171 
172  virtual MatrixType & ComputeDensityChangeTerm( HydroMechanicalVariables & rVariables, MatrixType & rLocalLHS, const double & rIntegrationWeight);
173 
174  MatrixType & CalculateStabilizationLHS( HydroMechanicalVariables & rVariables, MatrixType & rLocalLHS, const double & rIntegrationWeight);
175 
176 
177  // RESHAPE LHS
178  MatrixType & AddReshapeBaseClassLHS( MatrixType & rLeftHandSide, const MatrixType & rBaseClassLHS, const unsigned int dimension, const unsigned int number_of_variables, const unsigned int number_of_nodes);
179 
180  virtual MatrixType & AddReshapeSolidSkeletonDeformationMatrix( MatrixType & rLeftHandSide, const MatrixType & rBaseClassLHS, const unsigned int dimension, const unsigned int number_of_variables, const unsigned int number_of_nodes);
181 
182  MatrixType & AddReshapeKUU( MatrixType & rLeftHandSide, const MatrixType & rBaseClassLHS, const unsigned int dimension, const unsigned int number_of_variables, const unsigned int number_of_nodes);
183 
184  MatrixType & AddReshapeKUwP( MatrixType & rLeftHandSide, const MatrixType & rBaseClassLHS, const unsigned int dimension, const unsigned int number_of_variables, const unsigned int number_of_nodes);
185 
186  MatrixType & AddReshapeKwPwP( MatrixType & rLeftHandSide, const MatrixType & rBaseClassLHS, const unsigned int dimension, const unsigned int number_of_variables, const unsigned int number_of_nodes);
187 
188  MatrixType & AddReshapeKwPU( MatrixType & rLeftHandSide, const MatrixType & rBaseClassLHS, const unsigned int dimension, const unsigned int number_of_variables, const unsigned int number_of_nodes);
189 
190 
191  // VARIABLES
192  // TO CHOOSE THE STABILIZATION
193  bool mPPP;
194 
195  }; // end Class WaterPressureUtilities
196 
197 } // end namespace kratos
198 
199 #endif // KRATOS_WATER_PRESSURE_UTILITIES
Geometry base class.
Definition: geometry.h:71
This class defines the node.
Definition: node.h:65
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
Definition: water_pressure_utilities.hpp:30
Matrix MatrixType
Definition: water_pressure_utilities.hpp:33
Properties PropertiesType
Definition: water_pressure_utilities.hpp:41
Node NodeType
Definition: water_pressure_utilities.hpp:43
virtual ~WaterPressureUtilities()
Definition: water_pressure_utilities.hpp:113
unsigned int SizeType
Definition: water_pressure_utilities.hpp:39
Geometry< NodeType > GeometryType
Definition: water_pressure_utilities.hpp:44
bool mPPP
Definition: water_pressure_utilities.hpp:193
unsigned int IndexType
Definition: water_pressure_utilities.hpp:37
Vector VectorType
Definition: water_pressure_utilities.hpp:35
Matrix MatrixType
Definition: geometrical_transformation_utilities.h:55
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
int dimension
Definition: isotropic_damage_automatic_differentiation.py:123
Definition: water_pressure_utilities.hpp:47
unsigned int number_of_variables
Definition: water_pressure_utilities.hpp:65
const VectorType & GetVolumeForce()
Definition: water_pressure_utilities.hpp:105
const PropertiesType & GetProperties()
Definition: water_pressure_utilities.hpp:100
void SetDeformationGradient(const MatrixType &rF0)
Definition: water_pressure_utilities.hpp:93
double ConstrainedModulus
Definition: water_pressure_utilities.hpp:63
void SetVolumeForce(const VectorType &rVolumeForce)
Definition: water_pressure_utilities.hpp:96
HydroMechanicalVariables(const GeometryType &rElementGeometry, const PropertiesType &rMaterialProperties)
Definition: water_pressure_utilities.hpp:81
const MatrixType & GetShapeFunctionsDerivatives()
Definition: water_pressure_utilities.hpp:103
const MatrixType & GetBMatrix()
Definition: water_pressure_utilities.hpp:101
const VectorType & GetShapeFunctions()
Definition: water_pressure_utilities.hpp:104
const MatrixType & GetDeformationGradient()
Definition: water_pressure_utilities.hpp:102
void SetBMatrix(const MatrixType &rBMatrix)
Definition: water_pressure_utilities.hpp:92
double CurrentRadius
Definition: water_pressure_utilities.hpp:62
void SetShapeFunctionsDerivatives(const MatrixType &rDN_DX)
Definition: water_pressure_utilities.hpp:94
void SetShapeFunctions(const VectorType &rN)
Definition: water_pressure_utilities.hpp:95
double detF0
Definition: water_pressure_utilities.hpp:61
const GeometryType & GetGeometry()
Definition: water_pressure_utilities.hpp:99
HydroMechanicalVariables()
Definition: water_pressure_utilities.hpp:67
double DeltaTime
Definition: water_pressure_utilities.hpp:60