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 "PorousFlowCapillaryPressureBW.h" 11 : #include "PorousFlowBroadbridgeWhite.h" 12 : 13 : registerMooseObject("PorousFlowApp", PorousFlowCapillaryPressureBW); 14 : 15 : InputParameters 16 101 : PorousFlowCapillaryPressureBW::validParams() 17 : { 18 101 : InputParameters params = PorousFlowCapillaryPressure::validParams(); 19 202 : params.addRequiredRangeCheckedParam<Real>( 20 : "Sn", 21 : "Sn >= 0", 22 : "Low saturation. This must be < Ss, and non-negative. This is BW's " 23 : "initial effective saturation, below which effective saturation never goes " 24 : "in their simulations/models. If Kn=0 then Sn is the immobile saturation. " 25 : "This form of effective saturation is only correct for Kn small."); 26 303 : params.addRangeCheckedParam<Real>( 27 : "Ss", 28 202 : 1.0, 29 : "Ss <= 1", 30 : "High saturation. This must be > Sn and <= 1. Effective saturation " 31 : "where porepressure = 0. Effective saturation never exceeds this " 32 : "value in BW's simulations/models."); 33 202 : params.addRequiredRangeCheckedParam<Real>( 34 : "C", "C > 1", "BW's C parameter. Must be > 1. Typical value would be 1.05."); 35 202 : params.addRequiredRangeCheckedParam<Real>( 36 : "las", 37 : "las > 0", 38 : "BW's lambda_s parameter multiplied by (fluid_density * gravity). Must be " 39 : "> 0. Typical value would be 1E5"); 40 101 : params.addClassDescription("Broadbridge and White capillary pressure for negligable Kn"); 41 101 : return params; 42 0 : } 43 : 44 55 : PorousFlowCapillaryPressureBW::PorousFlowCapillaryPressureBW(const InputParameters & parameters) 45 : : PorousFlowCapillaryPressure(parameters), 46 55 : _sn(getParam<Real>("Sn")), 47 110 : _ss(getParam<Real>("Ss")), 48 110 : _c(getParam<Real>("C")), 49 165 : _las(getParam<Real>("las")) 50 : { 51 55 : if (_ss <= _sn) 52 0 : mooseError("In BW effective saturation Sn set to ", 53 0 : _sn, 54 : " and Ss set to ", 55 0 : _ss, 56 : " but these must obey Ss > Sn"); 57 : 58 : // Set _log_ext to false as no capillary pressure curves are implmented in this class 59 55 : _log_ext = false; 60 55 : } 61 : 62 : Real 63 0 : PorousFlowCapillaryPressureBW::capillaryPressureCurve(Real /*saturation*/, unsigned /*qp*/) const 64 : { 65 0 : mooseError("PorousFlowCapillaryPressureBW::capillaryPressure not implemented"); 66 : return 0.0; 67 : } 68 : 69 : Real 70 0 : PorousFlowCapillaryPressureBW::dCapillaryPressureCurve(Real /*saturation*/, unsigned /*qp*/) const 71 : { 72 0 : mooseError("PorousFlowCapillaryPressureBW::dCapillaryPressure not implemented"); 73 : return 0.0; 74 : } 75 : 76 : Real 77 0 : PorousFlowCapillaryPressureBW::d2CapillaryPressureCurve(Real /*saturation*/, unsigned /*qp*/) const 78 : { 79 0 : mooseError("PorousFlowCapillaryPressureBW::d2CapillaryPressure not implemented"); 80 : return 0.0; 81 : } 82 : 83 : Real 84 5524816 : PorousFlowCapillaryPressureBW::effectiveSaturation(Real pc, unsigned /*qp*/) const 85 : { 86 5524816 : return PorousFlowBroadbridgeWhite::effectiveSaturation(pc, _c, _sn, _ss, _las); 87 : } 88 : 89 : Real 90 5482816 : PorousFlowCapillaryPressureBW::dEffectiveSaturation(Real pc, unsigned /*qp*/) const 91 : { 92 5482816 : return PorousFlowBroadbridgeWhite::dEffectiveSaturation(pc, _c, _sn, _ss, _las); 93 : } 94 : 95 : Real 96 2739712 : PorousFlowCapillaryPressureBW::d2EffectiveSaturation(Real pc, unsigned /*qp*/) const 97 : { 98 2739712 : return PorousFlowBroadbridgeWhite::d2EffectiveSaturation(pc, _c, _sn, _ss, _las); 99 : }