|
12 | 12 | //============================================================================== |
13 | 13 |
|
14 | 14 | #include "PoroFracture.h" |
| 15 | +#include "PoroMaterial.h" |
15 | 16 | #include "FractureElasticityVoigt.h" |
16 | 17 | #include "FiniteElement.h" |
17 | 18 | #include "Tensor.h" |
@@ -207,7 +208,11 @@ double PoroFracture::formCrackedPermeabilityTensor (SymmTensor& Kcrack, |
207 | 208 | if (d < 0.0) |
208 | 209 | return d; // Invalid crack phase field |
209 | 210 | else if (d < d_min) |
210 | | - return 0.0; // The crack does not affect the permeability tensor |
| 211 | + { |
| 212 | + // The crack does not affect the permeability tensor at this point |
| 213 | + Kcrack.zero(); |
| 214 | + return 0.0; |
| 215 | + } |
211 | 216 |
|
212 | 217 | double d2 = gradD.length2(); |
213 | 218 | if (d2 <= 0.0) return -1.0; // Should not happen |
@@ -236,3 +241,22 @@ double PoroFracture::formCrackedPermeabilityTensor (SymmTensor& Kcrack, |
236 | 241 | Kcrack *= pow(d,eps)*Kc*w*w*F.det(); |
237 | 242 | return w; |
238 | 243 | } |
| 244 | + |
| 245 | + |
| 246 | +bool PoroFracture::formPermeabilityTensor (SymmTensor& K, |
| 247 | + const Vectors& eV, |
| 248 | + const FiniteElement& fe, |
| 249 | + const Vec3& X) const |
| 250 | +{ |
| 251 | + if (this->formCrackedPermeabilityTensor(K,eV,fe,X) < 0.0) |
| 252 | + return false; |
| 253 | + |
| 254 | + const PoroMaterial* pmat = dynamic_cast<const PoroMaterial*>(material); |
| 255 | + if (!pmat) return false; |
| 256 | + |
| 257 | + Vec3 permeability = pmat->getPermeability(X); |
| 258 | + for (size_t i = 1; i < K.dim(); i++) |
| 259 | + K(i,i) += permeability(i); |
| 260 | + |
| 261 | + return true; |
| 262 | +} |
0 commit comments