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 : // Fluid density ideal gas 11 : // 12 : #include "RichardsDensityIdeal.h" 13 : 14 : registerMooseObject("RichardsApp", RichardsDensityIdeal); 15 : 16 : InputParameters 17 6 : RichardsDensityIdeal::validParams() 18 : { 19 6 : InputParameters params = RichardsDensity::validParams(); 20 12 : params.addRequiredParam<Real>("slope", "Density = slope*(p - p0)"); 21 12 : params.addRequiredParam<Real>("p0", "Density = slope*(p - p0)"); 22 6 : params.addClassDescription("Fluid density of ideal gas. Density = slope*(p - p0)"); 23 6 : return params; 24 0 : } 25 : 26 3 : RichardsDensityIdeal::RichardsDensityIdeal(const InputParameters & parameters) 27 9 : : RichardsDensity(parameters), _slope(getParam<Real>("slope")), _p0(getParam<Real>("p0")) 28 : { 29 3 : } 30 : 31 : Real 32 606 : RichardsDensityIdeal::density(Real p) const 33 : { 34 606 : return _slope * (p - _p0); 35 : } 36 : 37 606 : Real RichardsDensityIdeal::ddensity(Real /*p*/) const { return _slope; } 38 : 39 606 : Real RichardsDensityIdeal::d2density(Real /*p*/) const { return 0.0; }