www.mooseframework.org
RichardsDensityIdeal.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 // Fluid density ideal gas
9 //
10 #include "RichardsDensityIdeal.h"
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<RichardsDensity>();
17  params.addRequiredParam<Real>("slope", "Density = slope*(p - p0)");
18  params.addRequiredParam<Real>("p0", "Density = slope*(p - p0)");
19  params.addClassDescription("Fluid density of ideal gas. Density = slope*(p - p0)");
20  return params;
21 }
22 
23 RichardsDensityIdeal::RichardsDensityIdeal(const InputParameters & parameters)
24  : RichardsDensity(parameters), _slope(getParam<Real>("slope")), _p0(getParam<Real>("p0"))
25 {
26 }
27 
28 Real
30 {
31  return _slope * (p - _p0);
32 }
33 
34 Real RichardsDensityIdeal::ddensity(Real /*p*/) const { return _slope; }
35 
36 Real RichardsDensityIdeal::d2density(Real /*p*/) const { return 0.0; }
RichardsDensityIdeal(const InputParameters &parameters)
Real _slope
density = _slope*(p - _p0)
Real density(Real p) const
fluid density as a function of porepressure
Real ddensity(Real) const
derivative of fluid density wrt porepressure
InputParameters validParams< RichardsDensityIdeal >()
Real d2density(Real) const
second derivative of fluid density wrt porepressure
Real _p0
density = _slope*(p - _p0)
Base class for fluid density as a function of porepressure The functions density, ddensity and d2dens...
InputParameters validParams< RichardsDensity >()