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 : // This post processor returns the effective saturation of a region. 11 : // 12 : #include "RichardsSeffPrimeAux.h" 13 : 14 : registerMooseObject("RichardsApp", RichardsSeffPrimeAux); 15 : 16 : InputParameters 17 54 : RichardsSeffPrimeAux::validParams() 18 : { 19 54 : InputParameters params = AuxKernel::validParams(); 20 108 : params.addRequiredCoupledVar("pressure_vars", "List of variables that represent the pressure"); 21 108 : params.addRequiredParam<int>( 22 : "wrtnum", 23 : "This aux kernel will return d(seff)/dP_wrtnum. 0<=wrtnum<number_of_pressure_vars."); 24 108 : params.addRequiredParam<UserObjectName>("seff_UO", 25 : "Name of user object that defines effective saturation."); 26 54 : params.addClassDescription("auxillary variable which is effective saturation"); 27 54 : return params; 28 0 : } 29 : 30 19 : RichardsSeffPrimeAux::RichardsSeffPrimeAux(const InputParameters & parameters) 31 : : AuxKernel(parameters), 32 19 : _seff_UO(getUserObject<RichardsSeff>("seff_UO")), 33 38 : _wrt1(getParam<int>("wrtnum")), 34 57 : _pressure_vals(coupledValues("pressure_vars")) 35 : { 36 19 : int n = coupledComponents("pressure_vars"); 37 19 : if (_wrt1 < 0 || _wrt1 >= n) 38 1 : mooseError("Your wrtnum is ", _wrt1, " but it must obey 0 <= wrtnum < ", n, "."); 39 : 40 18 : _mat.resize(n); 41 18 : } 42 : 43 : Real 44 4848 : RichardsSeffPrimeAux::computeValue() 45 : { 46 4848 : _seff_UO.dseff(_pressure_vals, _qp, _mat); 47 4848 : return _mat[_wrt1]; 48 : }