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 density of a region. 11 : // 12 : #include "RichardsDensityAux.h" 13 : 14 : registerMooseObject("RichardsApp", RichardsDensityAux); 15 : 16 : InputParameters 17 27 : RichardsDensityAux::validParams() 18 : { 19 27 : InputParameters params = AuxKernel::validParams(); 20 54 : params.addRequiredCoupledVar("pressure_var", "The variable that represents the pressure"); 21 54 : params.addRequiredParam<UserObjectName>("density_UO", 22 : "Name of user object that defines the density."); 23 27 : params.addClassDescription("auxillary variable which is fluid density"); 24 27 : return params; 25 0 : } 26 : 27 11 : RichardsDensityAux::RichardsDensityAux(const InputParameters & parameters) 28 : : AuxKernel(parameters), 29 11 : _pressure_var(coupledValue("pressure_var")), 30 22 : _density_UO(getUserObject<RichardsDensity>("density_UO")) 31 : { 32 11 : } 33 : 34 : Real 35 3030 : RichardsDensityAux::computeValue() 36 : { 37 3030 : return _density_UO.density(_pressure_var[_qp]); 38 : }