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 "PorousFlowCapillaryPressureBC.h" 11 : #include "PorousFlowBrooksCorey.h" 12 : 13 : registerMooseObject("PorousFlowApp", PorousFlowCapillaryPressureBC); 14 : 15 : InputParameters 16 656 : PorousFlowCapillaryPressureBC::validParams() 17 : { 18 656 : InputParameters params = PorousFlowCapillaryPressure::validParams(); 19 1312 : params.addRequiredParam<Real>("lambda", "Brooks-Corey exponent lambda"); 20 1312 : params.addRequiredRangeCheckedParam<Real>( 21 : "pe", "pe > 0", "Brooks-Corey entry pressure. Must be positive"); 22 656 : params.addClassDescription("Brooks-Corey capillary pressure"); 23 656 : return params; 24 0 : } 25 : 26 352 : PorousFlowCapillaryPressureBC::PorousFlowCapillaryPressureBC(const InputParameters & parameters) 27 : : PorousFlowCapillaryPressure(parameters), 28 352 : _lambda(getParam<Real>("lambda")), 29 1056 : _pe(getParam<Real>("pe")) 30 : { 31 352 : } 32 : 33 : Real 34 728874 : PorousFlowCapillaryPressureBC::capillaryPressureCurve(Real saturation, unsigned /*qp*/) const 35 : { 36 728874 : Real seff = effectiveSaturationFromSaturation(saturation); 37 728874 : return PorousFlowBrooksCorey::capillaryPressure(seff, _pe, _lambda, _pc_max); 38 : } 39 : 40 : Real 41 480892 : PorousFlowCapillaryPressureBC::dCapillaryPressureCurve(Real saturation, unsigned /*qp*/) const 42 : { 43 480892 : Real seff = effectiveSaturationFromSaturation(saturation); 44 480892 : return PorousFlowBrooksCorey::dCapillaryPressure(seff, _pe, _lambda, _pc_max) * _dseff_ds; 45 : } 46 : 47 : Real 48 138434 : PorousFlowCapillaryPressureBC::d2CapillaryPressureCurve(Real saturation, unsigned /*qp*/) const 49 : { 50 138434 : Real seff = effectiveSaturationFromSaturation(saturation); 51 138434 : return PorousFlowBrooksCorey::d2CapillaryPressure(seff, _pe, _lambda, _pc_max) * _dseff_ds * 52 138434 : _dseff_ds; 53 : } 54 : 55 : Real 56 0 : PorousFlowCapillaryPressureBC::effectiveSaturation(Real pc, unsigned /*qp*/) const 57 : { 58 0 : return PorousFlowBrooksCorey::effectiveSaturation(pc, _pe, _lambda); 59 : } 60 : 61 : Real 62 0 : PorousFlowCapillaryPressureBC::dEffectiveSaturation(Real pc, unsigned /*qp*/) const 63 : { 64 0 : return PorousFlowBrooksCorey::dEffectiveSaturation(pc, _pe, _lambda); 65 : } 66 : 67 : Real 68 0 : PorousFlowCapillaryPressureBC::d2EffectiveSaturation(Real pc, unsigned /*qp*/) const 69 : { 70 0 : return PorousFlowBrooksCorey::d2EffectiveSaturation(pc, _pe, _lambda); 71 : }