Line |
Branch |
Exec |
Source |
1 |
|
|
// ______ ______ _ _ _____ ______ |
2 |
|
|
// | ____| ____| | (_)/ ____| | ____| |
3 |
|
|
// | |__ | |__ | | _| (___ ___| |__ |
4 |
|
|
// | __| | __| | | | |\___ \ / __| __| |
5 |
|
|
// | | | |____| |____| |____) | (__| |____ |
6 |
|
|
// |_| |______|______|_|_____/ \___|______| |
7 |
|
|
// Finite Elements for Life Sciences and Engineering |
8 |
|
|
// |
9 |
|
|
// License: LGL2.1 License |
10 |
|
|
// FELiScE default license: LICENSE in root folder |
11 |
|
|
// |
12 |
|
|
// Main authors: |
13 |
|
|
// |
14 |
|
|
|
15 |
|
|
#ifndef __LINEARPROBLEMPOROELASTICITY_HPP__ |
16 |
|
|
#define __LINEARPROBLEMPOROELASTICITY_HPP__ |
17 |
|
|
|
18 |
|
|
// System includes |
19 |
|
|
|
20 |
|
|
// External includes |
21 |
|
|
|
22 |
|
|
// Project includes |
23 |
|
|
#include "Solver/linearProblem.hpp" |
24 |
|
|
#include "FiniteElement/elementField.hpp" |
25 |
|
|
|
26 |
|
|
// Linear Problem for poroelasticity system. |
27 |
|
|
namespace felisce { |
28 |
|
|
|
29 |
|
|
class LinearProblemPoroElasticity: |
30 |
|
|
public LinearProblem { |
31 |
|
|
public: |
32 |
|
|
LinearProblemPoroElasticity(); |
33 |
|
4 |
~LinearProblemPoroElasticity() override= default;; |
34 |
|
|
virtual void advanceInTime(); |
35 |
|
|
|
36 |
|
18 |
virtual void userPostProcessing(){}; |
37 |
|
2 |
virtual void userInitialize(){}; |
38 |
|
|
void exportInitialFiltrationVelocity(std::vector<IO::Pointer>& io); |
39 |
|
|
void exportFiltrationVelocity(std::vector<IO::Pointer>& io); |
40 |
|
|
|
41 |
|
|
protected: |
42 |
|
|
felInt m_iDisplacement; // Solid displacement |
43 |
|
|
felInt m_iPressure; // Interstitial pressure (fluid pressure) |
44 |
|
|
|
45 |
|
|
void initialize(std::vector<GeometricMeshRegion::Pointer>& mesh, FelisceTransient::Pointer fstransient, MPI_Comm& comm, bool doUseSNES) override; |
46 |
|
|
void initPerElementType(ElementType eltType, FlagMatrixRHS flagMatrixRHS = FlagMatrixRHS::matrix_and_rhs) override; |
47 |
|
|
void computeElementArray(const std::vector<Point*>& elemPoint, const std::vector<felInt>& elemIdPoint, felInt& iel, FlagMatrixRHS flagMatrixRHS = FlagMatrixRHS::matrix_and_rhs) override; |
48 |
|
|
virtual void updateAnisotropicDirection(const std::vector<Point*>& elemPoint); |
49 |
|
|
CurrentFiniteElement* m_feDisp; |
50 |
|
|
CurrentFiniteElement* m_fePre; |
51 |
|
|
|
52 |
|
|
ElementField m_elemFieldPressure, m_elemFieldDisplacement; |
53 |
|
|
/// Material properties |
54 |
|
|
double m_mu,m_lambda,m_M,m_b,m_k0,m_k1; //[M] = [Pascal], [b] = [], [k0]=[k1]=[ m^3 kg^-1 s]=[m^2 Pa^-1 s^-1] |
55 |
|
|
private: |
56 |
|
|
void displayPoroElasticProperties() const; |
57 |
|
|
protected: |
58 |
|
|
std::vector<double> m_anisotropicDir; |
59 |
|
|
double m_deltaT; |
60 |
|
|
|
61 |
|
✗ |
virtual double userEvaluatePorosity(double /*x*/,double /*y*/,double /*z*/) { |
62 |
|
|
// Just a default value! |
63 |
|
✗ |
return 0.1; |
64 |
|
|
}; |
65 |
|
|
double m_pInit; |
66 |
|
|
protected: |
67 |
|
|
// Members and method for Filtration velocity computation |
68 |
|
|
bool m_matricesForFiltrationVelocityBuilt; |
69 |
|
|
void assembleMatricesForFiltrationVelocity(); |
70 |
|
|
|
71 |
|
|
#ifdef FELISCE_WITH_CVGRAPH |
72 |
|
|
void assembleMassBoundaryAndInitKSP( std::size_t iBD = 0 ) override; |
73 |
|
|
|
74 |
|
|
void massMatrixComputer(felInt ielSupportDof); |
75 |
|
|
void initPerETMass(); |
76 |
|
|
void updateFE(const std::vector<Point*>& elemPoint, const std::vector<int>&); |
77 |
|
|
#endif |
78 |
|
|
CurvilinearFiniteElement* m_curvFeDisp; |
79 |
|
|
private: |
80 |
|
|
void computeFiltrationVelocity(); |
81 |
|
|
|
82 |
|
|
PetscMatrix m_mass; |
83 |
|
|
PetscMatrix m_derivative; |
84 |
|
|
protected: |
85 |
|
|
KSPInterface::Pointer m_kspForFiltrationVelocity = felisce::make_shared<KSPInterface>();; |
86 |
|
|
PC m_pcForFiltrationVelocity; |
87 |
|
|
}; |
88 |
|
|
} |
89 |
|
|
#endif |
90 |
|
|
|