-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathPoroFracture.h
135 lines (112 loc) · 5.8 KB
/
PoroFracture.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
// $Id$
//==============================================================================
//!
//! \file PoroFracture.h
//!
//! \date Apr 15 2016
//!
//! \author Knut Morten Okstad / SINTEF
//!
//! \brief Integrand implementations for poroelasticity problems with fracture.
//!
//==============================================================================
#ifndef _PORO_FRACTURE_H
#define _PORO_FRACTURE_H
#include "PoroElasticity.h"
class FractureElasticity;
/*!
\brief Class representing the integrand of poroelasticity with fracture.
\details This class inherits PoroElasticity and uses elements from
FractureElasticity in addition through a private member.
*/
class PoroFracture : public PoroElasticity
{
public:
//! \brief The constructor allocates the internal FractureElasticy object.
//! \param[in] n Number of spatial dimensions
//! \param[in] m If \e true, a mixed formulation is used
explicit PoroFracture(unsigned short int n, bool m = false);
//! \brief The destructor deletes the internal FractureElasticy object.
virtual ~PoroFracture();
//! \brief Parses a data section from an XML-element.
virtual bool parse(const tinyxml2::XMLElement* elem);
using PoroElasticity::parseMatProp;
//! \brief Parses material properties from an XML-element.
virtual Material* parseMatProp(const tinyxml2::XMLElement* elem, bool);
//! Defines the material properties.
virtual void setMaterial(Material* mat);
//! \brief Defines the solution mode before the element assembly is started.
//! \param[in] mode The solution mode to use
virtual void setMode(SIM::SolutionMode mode);
//! \brief Initializes the integrand with the number of integration points.
//! \param[in] nGp Total number of interior integration points
//! \param[in] nBp Total number of boundary integration points
virtual void initIntegration(size_t nGp, size_t nBp);
using PoroElasticity::initElement;
//! \brief Initializes current element for numerical integration.
//! \param[in] MNPC Matrix of nodal point correspondance for current element
//! \param elmInt The local integral object for current element
virtual bool initElement(const std::vector<int>& MNPC, LocalIntegral& elmInt);
//! \brief Initializes current element for numerical integration.
//! \param[in] MNPC Matrix of nodal point correspondance for current element
//! \param[in] elem_sizes Size of each basis on the element
//! \param[in] basis_sizes Size of each basis on the patch level
//! \param elmInt The local integral object for current element
virtual bool initElement(const std::vector<int>& MNPC,
const std::vector<size_t>& elem_sizes,
const std::vector<size_t>& basis_sizes,
LocalIntegral& elmInt);
using PoroElasticity::evalSol;
//! \brief Evaluates the secondary solution at a result point.
//! \param[out] s Array of solution field values at current point
//! \param[in] fe Finite element data at current point
//! \param[in] X Cartesian coordinates of current point
//! \param[in] MNPC Nodal point correspondance for the basis function values
virtual bool evalSol(Vector& s, const FiniteElement& fe,
const Vec3& X, const std::vector<int>& MNPC) const;
//! \brief Returns a pointer to the Gauss-point tensile energy array.
virtual const RealArray* getTensileEnergy() const;
//! \brief Returns the number of primary/secondary solution field components.
//! \param[in] fld Which field set to consider (1=primary,2=secondary)
virtual size_t getNoFields(int fld) const;
//! \brief Returns the name of a secondary solution field component.
//! \param[in] i Field component index
//! \param[in] prefix Name prefix for all components
virtual std::string getField2Name(size_t i, const char* prefix) const;
//! \brief Returns the applied pressure in the crack.
RealFunc* getCrackPressure() const;
protected:
//! \brief Computes the elasticity matrices at a quadrature point.
//! \param elMat The element matrix object to receive the contributions
//! \param[in] fe Finite element data of current integration point
//! \param[in] X Cartesian coordinates of current integration point
virtual bool evalElasticityMatrices(ElmMats& elMat, const Matrix&,
const FiniteElement& fe,
const Vec3& X) const;
//! \brief Evaluates the permeability tensor at a quadrature point.
//! \param[out] K The permeability tensor
//! \param[in] eV Element solution vectors
//! \param[in] fe Finite element data of current integration point
//! \param[in] X Cartesian coordinates of current integration point
virtual bool formPermeabilityTensor(SymmTensor& K,
const Vectors& eV,
const FiniteElement& fe,
const Vec3& X) const;
//! \brief Computes the permeability tensor of the broken material.
//! \param[out] Kcrack Permeability tensor of the broken material
//! \param[in] eV Element solution vectors
//! \param[in] fe Finite element data of current integration point
//! \param[in] X Cartesian coordinates of current integration point
//! \return Estimated crack opening
double formCrackedPermeabilityTensor(SymmTensor& Kcrack,
const Vectors& eV,
const FiniteElement& fe,
const Vec3& X) const;
private:
FractureElasticity* fracEl; //!< Integrand for tangent stiffness evaluation
double L_per; //!< Characteristic length of crack-perpendicular line
double d_min; //!< Crack phase field value for incorporating Poiseuille flow
double Kc; //!< Spatial permeability in fracture
double eps; //!< Permeability transition exponent
};
#endif