Skip to content

Commit 1dae5f4

Browse files
committed
Added: virtual method for computing the total permeability tensor
1 parent 749df59 commit 1dae5f4

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

PoroFracture.C

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
//==============================================================================
1313

1414
#include "PoroFracture.h"
15+
#include "PoroMaterial.h"
1516
#include "FractureElasticityVoigt.h"
1617
#include "FiniteElement.h"
1718
#include "Tensor.h"
@@ -207,7 +208,11 @@ double PoroFracture::formCrackedPermeabilityTensor (SymmTensor& Kcrack,
207208
if (d < 0.0)
208209
return d; // Invalid crack phase field
209210
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+
}
211216

212217
double d2 = gradD.length2();
213218
if (d2 <= 0.0) return -1.0; // Should not happen
@@ -236,3 +241,22 @@ double PoroFracture::formCrackedPermeabilityTensor (SymmTensor& Kcrack,
236241
Kcrack *= pow(d,eps)*Kc*w*w*F.det();
237242
return w;
238243
}
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+
}

PoroFracture.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,16 @@ class PoroFracture : public PoroElasticity
9191
const FiniteElement& fe,
9292
const Vec3& X) const;
9393

94+
//! \brief Evaluates the permeability tensor at a quadrature point.
95+
//! \param[out] K The permeability tensor
96+
//! \param[in] eV Element solution vectors
97+
//! \param[in] fe Finite element data of current integration point
98+
//! \param[in] X Cartesian coordinates of current integration point
99+
virtual bool formPermeabilityTensor(SymmTensor& K,
100+
const Vectors& eV,
101+
const FiniteElement& fe,
102+
const Vec3& X) const;
103+
94104
//! \brief Computes the permeability tensor of the broken material.
95105
//! \param[out] Kcrack Permeability tensor of the broken material
96106
//! \param[in] eV Element solution vectors

0 commit comments

Comments
 (0)