LCOV - code coverage report
Current view: top level - src/materials - PorousFlowConstantThermalExpansionCoefficient.C (source / functions) Hit Total Coverage
Test: idaholab/moose porous_flow: #32971 (54bef8) with base c6cf66 Lines: 31 32 96.9 %
Date: 2026-05-29 20:38:56 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          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 "PorousFlowConstantThermalExpansionCoefficient.h"
      11             : 
      12             : registerMooseObject("PorousFlowApp", PorousFlowConstantThermalExpansionCoefficient);
      13             : 
      14             : InputParameters
      15         292 : PorousFlowConstantThermalExpansionCoefficient::validParams()
      16             : {
      17         292 :   InputParameters params = PorousFlowMaterialVectorBase::validParams();
      18         876 :   params.addRangeCheckedParam<Real>(
      19         584 :       "biot_coefficient", 1.0, "biot_coefficient>=0 & biot_coefficient<=1", "Biot coefficient");
      20         876 :   params.addRangeCheckedParam<Real>("fluid_coefficient",
      21         584 :                                     2.1E-4,
      22             :                                     "fluid_coefficient>=0",
      23             :                                     "Volumetric coefficient of thermal expansion for the fluid");
      24         584 :   params.addRequiredRangeCheckedParam<Real>(
      25             :       "drained_coefficient",
      26             :       "drained_coefficient>=0.0",
      27             :       "Volumetric coefficient of thermal expansion of the drained porous skeleton (ie the porous "
      28             :       "rock without fluid, or with a fluid that is free to move in and out of the rock)");
      29         584 :   params.addPrivateParam<std::string>("pf_material_type", "thermal_expansion");
      30         292 :   params.addClassDescription("Computes the effective thermal expansion coefficient, (biot_coeff - "
      31             :                              "porosity) * drained_coefficient + porosity * fluid_coefficient.");
      32         292 :   return params;
      33           0 : }
      34             : 
      35         225 : PorousFlowConstantThermalExpansionCoefficient::PorousFlowConstantThermalExpansionCoefficient(
      36         225 :     const InputParameters & parameters)
      37             :   : PorousFlowMaterialVectorBase(parameters),
      38         225 :     _biot_coefficient(getParam<Real>("biot_coefficient")),
      39         450 :     _fluid_coefficient(getParam<Real>("fluid_coefficient")),
      40         450 :     _drained_coefficient(getParam<Real>("drained_coefficient")),
      41         225 :     _porosity(_nodal_material ? getMaterialProperty<Real>("PorousFlow_porosity_nodal")
      42         675 :                               : getMaterialProperty<Real>("PorousFlow_porosity_qp")),
      43         450 :     _coeff(_nodal_material
      44         225 :                ? declareProperty<Real>("PorousFlow_constant_thermal_expansion_coefficient_nodal")
      45         450 :                : declareProperty<Real>("PorousFlow_constant_thermal_expansion_coefficient_qp")),
      46         225 :     _coeff_old(_nodal_material ? getMaterialPropertyOld<Real>(
      47             :                                      "PorousFlow_constant_thermal_expansion_coefficient_nodal")
      48         675 :                                : getMaterialPropertyOld<Real>(
      49         225 :                                      "PorousFlow_constant_thermal_expansion_coefficient_qp"))
      50             : {
      51         225 : }
      52             : 
      53             : void
      54      159396 : PorousFlowConstantThermalExpansionCoefficient::initQpStatefulProperties()
      55             : {
      56      159396 :   _coeff[_qp] = (_biot_coefficient - _porosity[_qp]) * _drained_coefficient +
      57      159396 :                 _porosity[_qp] * _fluid_coefficient;
      58      159396 : }
      59             : 
      60             : void
      61     1323448 : PorousFlowConstantThermalExpansionCoefficient::computeQpProperties()
      62             : {
      63     1323448 :   _coeff[_qp] = _coeff_old[_qp];
      64     1323448 : }

Generated by: LCOV version 1.14