Skip to content

Commit

Permalink
#180 reference temperature and pressure as auxvars
Browse files Browse the repository at this point in the history
Turning off gravity in InterfaceDarcy
  • Loading branch information
pou036 committed Sep 21, 2020
1 parent 27e6bd8 commit 7984d91
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
5 changes: 4 additions & 1 deletion include/materials/RedbackMaterial.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ class RedbackMaterial : public Material
const VariableValue & _dispz_dot;
MaterialProperty<RealVectorValue> & _solid_velocity;

Real _T0_param, _P0_param;
//Real _T0_param, _P0_param;
const VariableValue & _T0;
const VariableValue & _P0;

};

#endif // REDBACKMATERIAL_H
6 changes: 3 additions & 3 deletions src/interfacekernels/InterfaceDarcy.C
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ InterfaceDarcy::InterfaceDarcy(const InputParameters & parameters)
Real
InterfaceDarcy::computeQpResidual(Moose::DGResidualType type)
{
Real grad_interface = (_neighbor_value[_qp] - _u[_qp]) / (_Le_fault[_qp] * _thickness) -
_gravity_term[_qp] * _normals[_qp] / _Le_fault[_qp];
Real grad_interface = (_neighbor_value[_qp] - _u[_qp]) / (_Le_fault[_qp] * _thickness);
// -_gravity_term[_qp] * _normals[_qp] / _Le_fault[_qp];

switch (type)
{
Expand All @@ -61,7 +61,7 @@ InterfaceDarcy::computeQpResidual(Moose::DGResidualType type)
mooseError("InterfaceDarcy type not supported.");
}
// should not reach this line
return 0;
mooseError("Internal error.");
}

Real
Expand Down
23 changes: 12 additions & 11 deletions src/materials/RedbackMaterial.C
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,10 @@ validParams<RedbackMaterial>()
"vector pointing downwards. Eg "
"(0,0,-9.81)");

params.addParam<Real>(
"temperature_reference", 0.0, "Reference temperature used for thermal expansion");
params.addParam<Real>("pressure_reference", 0.0, "Reference pressure used for compressibility");
params.addCoupledVar("temperature_reference", 0.0,
"Reference temperature used for thermal expansion");
params.addCoupledVar("pressure_reference", 0.0,
"Reference pressure used for compressibility");

return params;
}
Expand Down Expand Up @@ -274,8 +275,8 @@ RedbackMaterial::RedbackMaterial(const InputParameters & parameters)
_dispz_dot(isCoupled("disp_z") ? coupledDot("disp_z") : _zero),
_solid_velocity(declareProperty<RealVectorValue>("solid_velocity")),

_T0_param(getParam<Real>("temperature_reference")),
_P0_param(getParam<Real>("pressure_reference"))
_T0(coupledValue("temperature_reference")),
_P0(coupledValue("pressure_reference"))
{
// Find functions to initialise parameters from
unsigned int num_param_names = _init_from_functions__params.size();
Expand Down Expand Up @@ -608,8 +609,8 @@ _ar_F[_qp] * _delta[_qp] * (1 - _total_porosity[_qp]) * (1 - _solid_ratio[_qp])
beta_star_m =
one_minus_phi_beta_star_s + phi_beta_star_f; // normalized compressibility of the mixture
_mixture_compressibility[_qp] = beta_star_m;
if (_mixture_compressibility[_qp] == 0)
mooseError("The mixture compressiblity cannot be zero!");
//if (_mixture_compressibility[_qp] == 0)
// mooseError("The mixture compressiblity cannot be zero!");

// convective terms
if (_are_convective_terms_on)
Expand All @@ -624,11 +625,11 @@ _ar_F[_qp] * _delta[_qp] * (1 - _total_porosity[_qp]) * (1 - _solid_ratio[_qp])
case linear:
// Linear approximation of the EOS (Equation Of State)
solid_density = _solid_density_param *
(1 + _solid_compressibility[_qp] * (_pore_pres[_qp] - _P0_param) -
_solid_thermal_expansion[_qp] * (_T[_qp] - _T0_param));
(1 + _solid_compressibility[_qp] * (_pore_pres[_qp] - _P0[_qp]) -
_solid_thermal_expansion[_qp] * (_T[_qp] - _T0[_qp]));
fluid_density = _fluid_density_param *
(1 + _fluid_compressibility[_qp] * (_pore_pres[_qp] - _P0_param) -
_fluid_thermal_expansion[_qp] * (_T[_qp] - _T0_param));
(1 + _fluid_compressibility[_qp] * (_pore_pres[_qp] - _P0[_qp]) -
_fluid_thermal_expansion[_qp] * (_T[_qp] - _T0[_qp]));
break;
default:
mooseError("density method not implemented yet, use linear");
Expand Down

0 comments on commit 7984d91

Please sign in to comment.