Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #include "PoroFullSatMaterial.h" 11 : 12 : registerMooseObject("RichardsApp", PoroFullSatMaterial); 13 : 14 : InputParameters 15 0 : PoroFullSatMaterial::validParams() 16 : { 17 0 : InputParameters params = Material::validParams(); 18 : 19 0 : params.addRequiredParam<Real>( 20 : "porosity0", 21 : "The porosity of the material when porepressure and volumetric strain are zero. Eg, 0.1"); 22 0 : params.addRequiredRangeCheckedParam<Real>("biot_coefficient", 23 : "biot_coefficient>=0 & biot_coefficient<=1", 24 : "The Biot coefficient. Eg, 0.9"); 25 0 : params.addRequiredRangeCheckedParam<Real>( 26 : "solid_bulk_compliance", 27 : "solid_bulk_compliance>=0", 28 : "The solid bulk compliance (the reciprocal of the solid bulk modulus)"); 29 0 : params.addRequiredRangeCheckedParam<Real>( 30 : "fluid_bulk_compliance", 31 : "fluid_bulk_compliance>=0", 32 : "The fluid bulk compliance (the reciprocal of the fluid bulk modulus)"); 33 0 : params.addRequiredCoupledVar("porepressure", "The porepressure"); 34 0 : params.addRequiredCoupledVar( 35 : "displacements", 36 : "The displacements appropriate for the simulation geometry and coordinate system"); 37 0 : params.addParam<bool>("constant_porosity", false, "Set the porosity equal to porosity0 always"); 38 0 : params.addClassDescription("This Material is designed to calculate and store all the quantities " 39 : "needed for the fluid-flow part of poromechanics, assuming a " 40 : "fully-saturated, single-phase fluid with constant bulk modulus"); 41 0 : return params; 42 0 : } 43 : 44 0 : PoroFullSatMaterial::PoroFullSatMaterial(const InputParameters & parameters) 45 : : DerivativeMaterialInterface<Material>(parameters), 46 : 47 0 : _phi0(getParam<Real>("porosity0")), 48 0 : _alpha(getParam<Real>("biot_coefficient")), 49 0 : _one_over_K(getParam<Real>("solid_bulk_compliance")), 50 0 : _one_over_Kf(getParam<Real>("fluid_bulk_compliance")), 51 0 : _constant_porosity(getParam<bool>("constant_porosity")), 52 : 53 0 : _porepressure(coupledValue("porepressure")), 54 0 : _porepressure_name(coupledName("porepressure", 0)), 55 : 56 0 : _ndisp(coupledComponents("displacements")), 57 0 : _grad_disp(_ndisp), 58 : 59 0 : _vol_strain(declareProperty<Real>("volumetric_strain")), 60 : 61 0 : _biot_coefficient(declareProperty<Real>("biot_coefficient")), 62 : 63 0 : _porosity(declareProperty<Real>("porosity")), 64 0 : _dporosity_dP(declarePropertyDerivative<Real>("porosity", _porepressure_name)), 65 0 : _dporosity_dep(declarePropertyDerivative<Real>("porosity", "volumetric_strain")), 66 : 67 0 : _one_over_biot_modulus(declareProperty<Real>("one_over_biot_modulus")), 68 0 : _done_over_biot_modulus_dP( 69 0 : declarePropertyDerivative<Real>("one_over_biot_modulus", _porepressure_name)), 70 0 : _done_over_biot_modulus_dep( 71 0 : declarePropertyDerivative<Real>("one_over_biot_modulus", "volumetric_strain")) 72 : { 73 0 : for (unsigned int i = 0; i < _ndisp; ++i) 74 0 : _grad_disp[i] = &coupledGradient("displacements", i); 75 0 : } 76 : 77 : void 78 0 : PoroFullSatMaterial::initQpStatefulProperties() 79 : { 80 0 : _vol_strain[_qp] = 0.0; 81 0 : } 82 : 83 : void 84 0 : PoroFullSatMaterial::computeQpProperties() 85 : { 86 0 : _biot_coefficient[_qp] = _alpha; 87 : 88 0 : _vol_strain[_qp] = 0; 89 0 : for (unsigned i = 0; i < _ndisp; ++i) 90 0 : _vol_strain[_qp] += (*_grad_disp[i])[_qp](i); // cartesian coordinates? 91 : 92 0 : if (_constant_porosity) 93 : { 94 0 : _porosity[_qp] = _phi0; 95 0 : _dporosity_dP[_qp] = 0; 96 0 : _dporosity_dep[_qp] = 0; 97 : 98 0 : _one_over_biot_modulus[_qp] = 99 0 : (1 - _alpha) * (_alpha - _porosity[_qp]) * _one_over_K + _porosity[_qp] * _one_over_Kf; 100 0 : _done_over_biot_modulus_dP[_qp] = 0; 101 0 : _done_over_biot_modulus_dep[_qp] = 0; 102 : } 103 : else 104 : { 105 0 : _porosity[_qp] = 106 0 : _alpha + (_phi0 - _alpha) * 107 0 : std::exp(-(1 - _alpha) * _one_over_K * _porepressure[_qp] - _vol_strain[_qp]); 108 0 : _dporosity_dP[_qp] = 109 0 : (_phi0 - _alpha) * (_alpha - 1) * _one_over_K * 110 0 : std::exp(-(1 - _alpha) * _one_over_K * _porepressure[_qp] - _vol_strain[_qp]); 111 0 : _dporosity_dep[_qp] = 112 0 : -(_phi0 - _alpha) * 113 0 : std::exp(-(1 - _alpha) * _one_over_K * _porepressure[_qp] - _vol_strain[_qp]); 114 : 115 0 : _one_over_biot_modulus[_qp] = 116 0 : (1 - _alpha) * (_alpha - _porosity[_qp]) * _one_over_K + _porosity[_qp] * _one_over_Kf; 117 0 : _done_over_biot_modulus_dP[_qp] = 118 0 : -(1 - _alpha) * _dporosity_dP[_qp] * _one_over_K + _dporosity_dP[_qp] * _one_over_Kf; 119 0 : _done_over_biot_modulus_dep[_qp] = 120 0 : -(1 - _alpha) * _dporosity_dep[_qp] * _one_over_K + _dporosity_dep[_qp] * _one_over_Kf; 121 : } 122 0 : }