LCOV - code coverage report
Current view: top level - src/materials - PorousFlowConstantThermalExpansionCoefficient.C (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 32 32 100.0 %
Date: 2017-11-20 14:50:56 Functions: 6 6 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /****************************************************************/
       2             : /* MOOSE - Multiphysics Object Oriented Simulation Environment  */
       3             : /*                                                              */
       4             : /*          All contents are licensed under LGPL V2.1           */
       5             : /*             See LICENSE for full restrictions                */
       6             : /****************************************************************/
       7             : 
       8             : #include "PorousFlowConstantThermalExpansionCoefficient.h"
       9             : 
      10             : template <>
      11             : InputParameters
      12           4 : validParams<PorousFlowConstantThermalExpansionCoefficient>()
      13             : {
      14           4 :   InputParameters params = validParams<PorousFlowMaterialVectorBase>();
      15          16 :   params.addRangeCheckedParam<Real>(
      16           4 :       "biot_coefficient", 1.0, "biot_coefficient>=0 & biot_coefficient<=1", "Biot coefficient");
      17          16 :   params.addRangeCheckedParam<Real>("fluid_coefficient",
      18             :                                     2.1E-4,
      19             :                                     "fluid_coefficient>=0",
      20           4 :                                     "Volumetric coefficient of thermal expansion for the fluid");
      21          16 :   params.addRequiredRangeCheckedParam<Real>(
      22             :       "drained_coefficient",
      23             :       "drained_coefficient>=0.0",
      24             :       "Volumetric coefficient of thermal expansion of the drained porous skeleton (ie the porous "
      25           4 :       "rock without flulid, or with a fluid that is free to move in and out of the rock)");
      26           8 :   params.addClassDescription("Computes the effective thermal expansion coefficient, (biot_coeff - "
      27           4 :                              "porosity) * drained_coefficient + porosity * fluid_coefficient.");
      28           4 :   return params;
      29             : }
      30             : 
      31          12 : PorousFlowConstantThermalExpansionCoefficient::PorousFlowConstantThermalExpansionCoefficient(
      32          12 :     const InputParameters & parameters)
      33             :   : PorousFlowMaterialVectorBase(parameters),
      34          36 :     _biot_coefficient(getParam<Real>("biot_coefficient")),
      35          36 :     _fluid_coefficient(getParam<Real>("fluid_coefficient")),
      36          36 :     _drained_coefficient(getParam<Real>("drained_coefficient")),
      37          36 :     _porosity(_nodal_material ? getMaterialProperty<Real>("PorousFlow_porosity_nodal")
      38          36 :                               : getMaterialProperty<Real>("PorousFlow_porosity_qp")),
      39          12 :     _coeff(_nodal_material
      40          36 :                ? declareProperty<Real>("PorousFlow_constant_thermal_expansion_coefficient_nodal")
      41          36 :                : declareProperty<Real>("PorousFlow_constant_thermal_expansion_coefficient_qp")),
      42          24 :     _coeff_old(_nodal_material ? getMaterialPropertyOld<Real>(
      43          12 :                                      "PorousFlow_constant_thermal_expansion_coefficient_nodal")
      44             :                                : getMaterialPropertyOld<Real>(
      45         108 :                                      "PorousFlow_constant_thermal_expansion_coefficient_qp"))
      46             : {
      47          12 : }
      48             : 
      49             : void
      50       21076 : PorousFlowConstantThermalExpansionCoefficient::initQpStatefulProperties()
      51             : {
      52       84304 :   _coeff[_qp] = (_biot_coefficient - _porosity[_qp]) * _drained_coefficient +
      53       21076 :                 _porosity[_qp] * _fluid_coefficient;
      54       21076 : }
      55             : 
      56             : void
      57      116220 : PorousFlowConstantThermalExpansionCoefficient::computeQpProperties()
      58             : {
      59      348660 :   _coeff[_qp] = _coeff_old[_qp];
      60      118719 : }

Generated by: LCOV version 1.11