LCOV - code coverage report
Current view: top level - src/materials - PorousFlowDiffusivityMillingtonQuirk.C (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 24 24 100.0 %
Date: 2017-11-21 14:47:27 Functions: 5 5 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 "PorousFlowDiffusivityMillingtonQuirk.h"
       9             : 
      10             : template <>
      11             : InputParameters
      12           1 : validParams<PorousFlowDiffusivityMillingtonQuirk>()
      13             : {
      14           1 :   InputParameters params = validParams<PorousFlowDiffusivityBase>();
      15           2 :   params.addClassDescription(
      16           1 :       "This Material provides saturation-dependent diffusivity using the Millington-Quirk model");
      17           1 :   return params;
      18             : }
      19             : 
      20           3 : PorousFlowDiffusivityMillingtonQuirk::PorousFlowDiffusivityMillingtonQuirk(
      21           3 :     const InputParameters & parameters)
      22             :   : PorousFlowDiffusivityBase(parameters),
      23           6 :     _porosity_qp(getMaterialProperty<Real>("PorousFlow_porosity_qp")),
      24           6 :     _dporosity_qp_dvar(getMaterialProperty<std::vector<Real>>("dPorousFlow_porosity_qp_dvar")),
      25           6 :     _saturation_qp(getMaterialProperty<std::vector<Real>>("PorousFlow_saturation_qp")),
      26             :     _dsaturation_qp_dvar(
      27          18 :         getMaterialProperty<std::vector<std::vector<Real>>>("dPorousFlow_saturation_qp_dvar"))
      28             : {
      29           3 : }
      30             : 
      31             : void
      32         696 : PorousFlowDiffusivityMillingtonQuirk::computeQpProperties()
      33             : {
      34         696 :   PorousFlowDiffusivityBase::computeQpProperties();
      35             : 
      36        1392 :   _tortuosity[_qp].resize(_num_phases);
      37        3480 :   for (unsigned int ph = 0; ph < _num_phases; ++ph)
      38             :   {
      39        2784 :     _tortuosity[_qp][ph] =
      40        4176 :         std::cbrt(_porosity_qp[_qp]) * std::pow(_saturation_qp[_qp][ph], 10.0 / 3.0);
      41        6960 :     for (unsigned int var = 0; var < _num_var; ++var)
      42        5568 :       _dtortuosity_dvar[_qp][ph][var] =
      43       11136 :           1.0 / 3.0 * std::cbrt(_porosity_qp[_qp]) * std::pow(_saturation_qp[_qp][ph], 7.0 / 3.0) *
      44       13920 :           (_saturation_qp[_qp][ph] / _porosity_qp[_qp] * _dporosity_qp_dvar[_qp][var] +
      45        5568 :            10.0 * _dsaturation_qp_dvar[_qp][ph][var]);
      46             :   }
      47        3195 : }

Generated by: LCOV version 1.11