LCOV - code coverage report
Current view: top level - src/userobjects - PorousFlowCapillaryPressureBC.C (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 22 28 78.6 %
Date: 2017-11-18 13:30:36 Functions: 7 10 70.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 "PorousFlowCapillaryPressureBC.h"
       9             : #include "PorousFlowBrooksCorey.h"
      10             : 
      11             : template <>
      12             : InputParameters
      13           3 : validParams<PorousFlowCapillaryPressureBC>()
      14             : {
      15           3 :   InputParameters params = validParams<PorousFlowCapillaryPressure>();
      16           9 :   params.addRequiredParam<Real>("lambda", "Brooks-Corey exponent lambda");
      17          12 :   params.addRequiredRangeCheckedParam<Real>(
      18           3 :       "pe", "pe > 0", "Brooks-Corey entry pressure. Must be positive");
      19           6 :   params.addClassDescription("Brooks-Corey capillary pressure");
      20           3 :   return params;
      21             : }
      22             : 
      23           3 : PorousFlowCapillaryPressureBC::PorousFlowCapillaryPressureBC(const InputParameters & parameters)
      24             :   : PorousFlowCapillaryPressure(parameters),
      25           9 :     _lambda(getParam<Real>("lambda")),
      26          15 :     _pe(getParam<Real>("pe"))
      27             : {
      28           3 : }
      29             : 
      30             : Real
      31       17347 : PorousFlowCapillaryPressureBC::capillaryPressureCurve(Real saturation) const
      32             : {
      33       17347 :   Real seff = effectiveSaturationFromSaturation(saturation);
      34       17347 :   return PorousFlowBrooksCorey::capillaryPressure(seff, _pe, _lambda, _pc_max);
      35             : }
      36             : 
      37             : Real
      38       17185 : PorousFlowCapillaryPressureBC::dCapillaryPressureCurve(Real saturation) const
      39             : {
      40       17185 :   Real seff = effectiveSaturationFromSaturation(saturation);
      41       17185 :   return PorousFlowBrooksCorey::dCapillaryPressure(seff, _pe, _lambda, _pc_max) * _dseff_ds;
      42             : }
      43             : 
      44             : Real
      45       12373 : PorousFlowCapillaryPressureBC::d2CapillaryPressureCurve(Real saturation) const
      46             : {
      47       12373 :   Real seff = effectiveSaturationFromSaturation(saturation);
      48       12373 :   return PorousFlowBrooksCorey::d2CapillaryPressure(seff, _pe, _lambda, _pc_max) * _dseff_ds *
      49       12373 :          _dseff_ds;
      50             : }
      51             : 
      52             : Real
      53           0 : PorousFlowCapillaryPressureBC::effectiveSaturation(Real pc) const
      54             : {
      55           0 :   return PorousFlowBrooksCorey::effectiveSaturation(pc, _pe, _lambda);
      56             : }
      57             : 
      58             : Real
      59           0 : PorousFlowCapillaryPressureBC::dEffectiveSaturation(Real pc) const
      60             : {
      61           0 :   return PorousFlowBrooksCorey::dEffectiveSaturation(pc, _pe, _lambda);
      62             : }
      63             : 
      64             : Real
      65           0 : PorousFlowCapillaryPressureBC::d2EffectiveSaturation(Real pc) const
      66             : {
      67           0 :   return PorousFlowBrooksCorey::d2EffectiveSaturation(pc, _pe, _lambda);
      68        2499 : }

Generated by: LCOV version 1.11