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.
interface_element_utilities.hpp
Go to the documentation of this file.
1 // KRATOS___
2 // // ) )
3 // // ___ ___
4 // // ____ //___) ) // ) )
5 // // / / // // / /
6 // ((____/ / ((____ ((___/ / MECHANICS
7 //
8 // License: geo_mechanics_application/license.txt
9 //
10 // Main authors: Ignasi de Pouplana,
11 // Vahid Galavi
12 //
13 
14 #if !defined(KRATOS_INTERFACE_ELEMENT_UTILITIES )
15 #define KRATOS_INTERFACE_ELEMENT_UTILITIES
16 
17 // Project includes
18 #include "includes/element.h"
19 
20 namespace Kratos
21 {
22 
24 {
25 
26 public:
27 
28  //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
30  const Matrix& Ncontainer,
31  const unsigned int& GPoint)
32  {
33  //Line_interface_2d_2
34  rNu(0,0) = -Ncontainer(GPoint,0); rNu(0,2) = Ncontainer(GPoint,1);
35  rNu(1,1) = -Ncontainer(GPoint,0); rNu(1,3) = Ncontainer(GPoint,1);
36  }
37 
38  //----------------------------------------------------------------------------------------
40  const Matrix& Ncontainer,
41  const unsigned int& GPoint)
42  {
43  //Quadrilateral_interface_2d_4
44  rNu(0,0) = -Ncontainer(GPoint,0); rNu(0,2) = -Ncontainer(GPoint,1);
45  rNu(1,1) = -Ncontainer(GPoint,0); rNu(1,3) = -Ncontainer(GPoint,1);
46 
47  rNu(0,4) = Ncontainer(GPoint,2); rNu(0,6) = Ncontainer(GPoint,3);
48  rNu(1,5) = Ncontainer(GPoint,2); rNu(1,7) = Ncontainer(GPoint,3);
49  }
50 
51  //----------------------------------------------------------------------------------------
53  const Matrix& Ncontainer,
54  const unsigned int& GPoint)
55  {
56  //Quadrilateral_interface_3d_4
57  rNu(0,0) = -Ncontainer(GPoint,0); rNu(0,3) = -Ncontainer(GPoint,1);
58  rNu(1,1) = -Ncontainer(GPoint,0); rNu(1,4) = -Ncontainer(GPoint,1);
59  rNu(2,2) = -Ncontainer(GPoint,0); rNu(2,5) = -Ncontainer(GPoint,1);
60 
61  rNu(0,6) = Ncontainer(GPoint,2); rNu(0,9) = Ncontainer(GPoint,3);
62  rNu(1,7) = Ncontainer(GPoint,2); rNu(1,10) = Ncontainer(GPoint,3);
63  rNu(2,8) = Ncontainer(GPoint,2); rNu(2,11) = Ncontainer(GPoint,3);
64  }
65 
66  //----------------------------------------------------------------------------------------
68  const Matrix& Ncontainer,
69  const unsigned int& GPoint)
70  {
71  //Prism_interface_3d_6
72  rNu(0,0) = -Ncontainer(GPoint,0); rNu(0,3) = -Ncontainer(GPoint,1); rNu(0,6) = -Ncontainer(GPoint,2);
73  rNu(1,1) = -Ncontainer(GPoint,0); rNu(1,4) = -Ncontainer(GPoint,1); rNu(1,7) = -Ncontainer(GPoint,2);
74  rNu(2,2) = -Ncontainer(GPoint,0); rNu(2,5) = -Ncontainer(GPoint,1); rNu(2,8) = -Ncontainer(GPoint,2);
75 
76  rNu(0,9) = Ncontainer(GPoint,3); rNu(0,12) = Ncontainer(GPoint,4); rNu(0,15) = Ncontainer(GPoint,5);
77  rNu(1,10) = Ncontainer(GPoint,3); rNu(1,13) = Ncontainer(GPoint,4); rNu(1,16) = Ncontainer(GPoint,5);
78  rNu(2,11) = Ncontainer(GPoint,3); rNu(2,14) = Ncontainer(GPoint,4); rNu(2,17) = Ncontainer(GPoint,5);
79  }
80 
81  //----------------------------------------------------------------------------------------
83  const Matrix& Ncontainer,
84  const unsigned int& GPoint)
85  {
86  //Hexahedral_interface_3d_8
87  rNu(0,0) = -Ncontainer(GPoint,0); rNu(0,3) = -Ncontainer(GPoint,1); rNu(0,6) = -Ncontainer(GPoint,2); rNu(0,9) = -Ncontainer(GPoint,3);
88  rNu(1,1) = -Ncontainer(GPoint,0); rNu(1,4) = -Ncontainer(GPoint,1); rNu(1,7) = -Ncontainer(GPoint,2); rNu(1,10) = -Ncontainer(GPoint,3);
89  rNu(2,2) = -Ncontainer(GPoint,0); rNu(2,5) = -Ncontainer(GPoint,1); rNu(2,8) = -Ncontainer(GPoint,2); rNu(2,11) = -Ncontainer(GPoint,3);
90 
91  rNu(0,12) = Ncontainer(GPoint,4); rNu(0,15) = Ncontainer(GPoint,5); rNu(0,18) = Ncontainer(GPoint,6); rNu(0,21) = Ncontainer(GPoint,7);
92  rNu(1,13) = Ncontainer(GPoint,4); rNu(1,16) = Ncontainer(GPoint,5); rNu(1,19) = Ncontainer(GPoint,6); rNu(1,22) = Ncontainer(GPoint,7);
93  rNu(2,14) = Ncontainer(GPoint,4); rNu(2,17) = Ncontainer(GPoint,5); rNu(2,20) = Ncontainer(GPoint,6); rNu(2,23) = Ncontainer(GPoint,7);
94  }
95 
96  //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
98  const Matrix& Ncontainer,
99  const unsigned int& GPoint)
100  {
101  //Quadrilateral_interface_2d_4
102  rNut(0,0) = -Ncontainer(GPoint,0); rNut(0,3) = -Ncontainer(GPoint,1);
103  rNut(1,1) = -Ncontainer(GPoint,0); rNut(1,4) = -Ncontainer(GPoint,1);
104 
105  rNut(0,6) = Ncontainer(GPoint,2); rNut(0,9) = Ncontainer(GPoint,3);
106  rNut(1,7) = Ncontainer(GPoint,2); rNut(1,10) = Ncontainer(GPoint,3);
107  }
108 
109  //----------------------------------------------------------------------------------------
111  const Matrix& Ncontainer,
112  const unsigned int& GPoint)
113  {
114  //Prism_interface_3d_6
115  rNut(0,0) = -Ncontainer(GPoint,0); rNut(0,4) = -Ncontainer(GPoint,1); rNut(0,8) = -Ncontainer(GPoint,2);
116  rNut(1,1) = -Ncontainer(GPoint,0); rNut(1,5) = -Ncontainer(GPoint,1); rNut(1,9) = -Ncontainer(GPoint,2);
117  rNut(2,2) = -Ncontainer(GPoint,0); rNut(2,6) = -Ncontainer(GPoint,1); rNut(2,10) = -Ncontainer(GPoint,2);
118 
119  rNut(0,12) = Ncontainer(GPoint,3); rNut(0,16) = Ncontainer(GPoint,4); rNut(0,20) = Ncontainer(GPoint,5);
120  rNut(1,13) = Ncontainer(GPoint,3); rNut(1,17) = Ncontainer(GPoint,4); rNut(1,21) = Ncontainer(GPoint,5);
121  rNut(2,14) = Ncontainer(GPoint,3); rNut(2,18) = Ncontainer(GPoint,4); rNut(2,22) = Ncontainer(GPoint,5);
122  }
123 
124  //----------------------------------------------------------------------------------------
126  const Matrix& Ncontainer,
127  const unsigned int& GPoint)
128  {
129  //Hexahedral_interface_3d_8
130  rNut(0,0) = -Ncontainer(GPoint,0); rNut(0,4) = -Ncontainer(GPoint,1); rNut(0,8) = -Ncontainer(GPoint,2); rNut(0,12) = -Ncontainer(GPoint,3);
131  rNut(1,1) = -Ncontainer(GPoint,0); rNut(1,5) = -Ncontainer(GPoint,1); rNut(1,9) = -Ncontainer(GPoint,2); rNut(1,13) = -Ncontainer(GPoint,3);
132  rNut(2,2) = -Ncontainer(GPoint,0); rNut(2,6) = -Ncontainer(GPoint,1); rNut(2,10) = -Ncontainer(GPoint,2); rNut(2,14) = -Ncontainer(GPoint,3);
133 
134  rNut(0,16) = Ncontainer(GPoint,4); rNut(0,20) = Ncontainer(GPoint,5); rNut(0,24) = Ncontainer(GPoint,6); rNut(0,28) = Ncontainer(GPoint,7);
135  rNut(1,17) = Ncontainer(GPoint,4); rNut(1,21) = Ncontainer(GPoint,5); rNut(1,25) = Ncontainer(GPoint,6); rNut(1,29) = Ncontainer(GPoint,7);
136  rNut(2,18) = Ncontainer(GPoint,4); rNut(2,22) = Ncontainer(GPoint,5); rNut(2,26) = Ncontainer(GPoint,6); rNut(2,30) = Ncontainer(GPoint,7);
137  }
138 
139  //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
140  static inline void FillPermeabilityMatrix(BoundedMatrix<double,2,2>& rPermeabilityMatrix,
141  const double& JointWidth,
142  const double& Transversal_Permeability)
143  {
144  //Quadrilateral_interface_2d_4
145  rPermeabilityMatrix(0,0) = JointWidth*JointWidth/12.0;
146  rPermeabilityMatrix(1,1) = Transversal_Permeability;
147  }
148 
149  //----------------------------------------------------------------------------------------
150  static inline void FillPermeabilityMatrix(BoundedMatrix<double,3,3>& rPermeabilityMatrix,
151  const double& JointWidth,
152  const double& Transversal_Permeability)
153  {
154  //Prism_interface_3d_6 & Hexahedral_interface_3d_8
155  rPermeabilityMatrix(0,0) = JointWidth*JointWidth/12.0;
156  rPermeabilityMatrix(1,1) = JointWidth*JointWidth/12.0;
157  rPermeabilityMatrix(2,2) = Transversal_Permeability;
158  }
159 
160  //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
161  static inline void CalculateVoigtVector(array_1d<double,2>& rVoigtVector)
162  {
163  //Quadrilateral_interface_2d_4
164  rVoigtVector[0] = 0.0;
165  rVoigtVector[1] = 1.0;
166  }
167 
168  //----------------------------------------------------------------------------------------
169  static inline void CalculateVoigtVector(array_1d<double,3>& rVoigtVector)
170  {
171  //Prism_interface_3d_6 & Hexahedral_interface_3d_8
172  rVoigtVector[0] = 0.0;
173  rVoigtVector[1] = 0.0;
174  rVoigtVector[2] = 1.0;
175  }
176 
177  //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
178  static inline void CalculateLinkPermeabilityMatrix(BoundedMatrix<double,2,2>& rPermeabilityMatrix,
179  const double& JointWidth)
180  {
181  //Quadrilateral_interface_2d_4
182  rPermeabilityMatrix(0,0) = JointWidth*JointWidth/12.0;
183  rPermeabilityMatrix(1,1) = JointWidth*JointWidth/12.0;
184  }
185 
186  //----------------------------------------------------------------------------------------
187  static inline void CalculateLinkPermeabilityMatrix(BoundedMatrix<double,3,3>& rPermeabilityMatrix,
188  const double& JointWidth)
189  {
190  //Prism_interface_3d_6 & Hexahedral_interface_3d_8
191  rPermeabilityMatrix(0,0) = JointWidth*JointWidth/12.0;
192  rPermeabilityMatrix(1,1) = JointWidth*JointWidth/12.0;
193  rPermeabilityMatrix(2,2) = JointWidth*JointWidth/12.0;
194  }
195 
196 }; /* Class InterfaceElementUtilities*/
197 } /* namespace Kratos.*/
198 
199 #endif /* KRATOS_INTERFACE_ELEMENT_UTILITIES defined */
Definition: interface_element_utilities.hpp:24
static void CalculateNuMatrix(BoundedMatrix< double, 3, 24 > &rNu, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: interface_element_utilities.hpp:82
static void CalculateLinkPermeabilityMatrix(BoundedMatrix< double, 3, 3 > &rPermeabilityMatrix, const double &JointWidth)
Definition: interface_element_utilities.hpp:187
static void CalculateNuMatrix(BoundedMatrix< double, 3, 18 > &rNu, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: interface_element_utilities.hpp:67
static void CalculateNuMatrix(BoundedMatrix< double, 2, 8 > &rNu, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: interface_element_utilities.hpp:39
static void CalculateLinkPermeabilityMatrix(BoundedMatrix< double, 2, 2 > &rPermeabilityMatrix, const double &JointWidth)
Definition: interface_element_utilities.hpp:178
static void CalculateNuElementMatrix(BoundedMatrix< double, 3, 12 > &rNut, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: interface_element_utilities.hpp:97
static void FillPermeabilityMatrix(BoundedMatrix< double, 2, 2 > &rPermeabilityMatrix, const double &JointWidth, const double &Transversal_Permeability)
Definition: interface_element_utilities.hpp:140
static void FillPermeabilityMatrix(BoundedMatrix< double, 3, 3 > &rPermeabilityMatrix, const double &JointWidth, const double &Transversal_Permeability)
Definition: interface_element_utilities.hpp:150
static void CalculateNuMatrix(BoundedMatrix< double, 3, 12 > &rNu, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: interface_element_utilities.hpp:52
static void CalculateNuElementMatrix(BoundedMatrix< double, 4, 32 > &rNut, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: interface_element_utilities.hpp:125
static void CalculateNuMatrix(BoundedMatrix< double, 2, 4 > &rNu, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: interface_element_utilities.hpp:29
static void CalculateNuElementMatrix(BoundedMatrix< double, 4, 24 > &rNut, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: interface_element_utilities.hpp:110
static void CalculateVoigtVector(array_1d< double, 3 > &rVoigtVector)
Definition: interface_element_utilities.hpp:169
static void CalculateVoigtVector(array_1d< double, 2 > &rVoigtVector)
Definition: interface_element_utilities.hpp:161
Definition: amatrix_interface.h:41
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21