13#include <Eigen/Geometry>
19template <
int DisplacementDim>
23 std::vector<double>
const& mean_fracture_distances,
24 std::vector<double>
const& threshold_strains,
25 Eigen::Matrix<double, 3, 3>
const fracture_normals,
29 double const jacobian_factor)
30 : _a(mean_fracture_distances),
31 _e0(threshold_strains),
33 _k(intrinsic_permeability),
34 _phi_xy(fracture_rotation_xy),
35 _phi_yz(fracture_rotation_yz),
41template <
int DisplacementDim>
45 if (!std::holds_alternative<Medium*>(scale_))
48 "The property 'OrthotropicEmbeddedFracturePermeability' is "
49 "implemented on the 'media' scale only.");
53template <
int DisplacementDim>
63 double const k = std::get<double>(
fromVector(_k(t, pos)));
64 double const _b0 = std::sqrt(12.0 * k);
66 double const phi_xy = std::get<double>(
fromVector(_phi_xy(t, pos)));
67 double const phi_yz = std::get<double>(
fromVector(_phi_yz(t, pos)));
68 auto const rotMat_xy = Eigen::AngleAxisd(phi_xy, Eigen::Vector3d::UnitZ());
69 auto const rotMat_yz = Eigen::AngleAxisd(phi_yz, Eigen::Vector3d::UnitX());
71 Eigen::Matrix3d result = Eigen::Vector3d::Constant(k).asDiagonal();
73 for (
int i = 0; i < 3; i++)
75 Eigen::Vector3d
const n_i = rotMat_yz * (rotMat_xy * _n.col(i));
76 double const e_n = (eps * n_i).dot(n_i.transpose());
77 double const H_de = (e_n > _e0[i]) ? 1.0 : 0.0;
78 double const b_f = _b0 + H_de * _a[i] * (e_n - _e0[i]);
82 result += H_de * (b_f / _a[i]) * ((b_f * b_f / 12.0) - k) *
83 (Eigen::Matrix3d::Identity() - n_i * n_i.transpose());
86 return result.template topLeftCorner<DisplacementDim, DisplacementDim>()
89template <
int DisplacementDim>
99 "OrthotropicEmbeddedFracturePermeability::dValue is implemented "
100 "for derivatives with respect to strain only.");
106 double const k = std::get<double>(
fromVector(_k(t, pos)));
107 double const _b0 = std::sqrt(12.0 * k);
109 double const phi_xy = std::get<double>(
fromVector(_phi_xy(t, pos)));
110 double const phi_yz = std::get<double>(
fromVector(_phi_yz(t, pos)));
111 auto const rotMat_xy = Eigen::AngleAxisd(phi_xy, Eigen::Vector3d::UnitZ());
112 auto const rotMat_yz = Eigen::AngleAxisd(phi_yz, Eigen::Vector3d::UnitX());
117 for (
int i = 0; i < 3; i++)
119 Eigen::Vector3d
const n_i = rotMat_yz * (rotMat_xy * _n.col(i));
120 Eigen::Matrix3d
const M = n_i * n_i.transpose();
121 double const e_n = (eps * n_i).dot(n_i.transpose());
122 double const H_de = (e_n > _e0[i]) ? 1.0 : 0.0;
123 double const b_f = _b0 + H_de * _a[i] * (e_n - _e0[i]);
125 result += H_de * (b_f * b_f / 4.0 - k) *
127 Eigen::Matrix3d::Identity() - M) *
131 return Eigen::MatrixXd(_jf * result);
Extended Permeability model based on Olivella&Alonso.
void checkScale() const override
OrthotropicEmbeddedFracturePermeability(std::string name, std::vector< double > const &mean_fracture_distances, std::vector< double > const &threshold_strains, Eigen::Matrix< double, 3, 3 > const fracture_normals, ParameterLib::Parameter< double > const &intrinsic_permeability, ParameterLib::Parameter< double > const &fracture_rotation_xy, ParameterLib::Parameter< double > const &fracture_rotation_yz, double const jacobian_factor)
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
virtual PropertyDataType value() const
KelvinVector mechanical_strain
PropertyDataType fromVector(std::vector< double > const &values)
std::variant< double, Eigen::Matrix< double, 2, 1 >, Eigen::Matrix< double, 3, 1 >, Eigen::Matrix< double, 2, 2 >, Eigen::Matrix< double, 3, 3 >, Eigen::Matrix< double, 4, 1 >, Eigen::Matrix< double, 6, 1 >, Eigen::MatrixXd > PropertyDataType
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), 1, Eigen::ColMajor > KelvinVectorType
Eigen::Matrix< double, 3, 3 > kelvinVectorToTensor(Eigen::Matrix< double, 4, 1, Eigen::ColMajor, 4, 1 > const &v)
KelvinVectorType< DisplacementDim > tensorToKelvin(Eigen::Matrix< double, 3, 3 > const &m)
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), kelvin_vector_dimensions(DisplacementDim), Eigen::RowMajor > KelvinMatrixType