https://mooseframework.inl.gov
RichardsDensityIdeal.C
Go to the documentation of this file.
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 
15 
18 {
20  params.addRequiredParam<Real>("slope", "Density = slope*(p - p0)");
21  params.addRequiredParam<Real>("p0", "Density = slope*(p - p0)");
22  params.addClassDescription("Fluid density of ideal gas. Density = slope*(p - p0)");
23  return params;
24 }
25 
27  : RichardsDensity(parameters), _slope(getParam<Real>("slope")), _p0(getParam<Real>("p0"))
28 {
29 }
30 
31 Real
33 {
34  return _slope * (p - _p0);
35 }
36 
37 Real RichardsDensityIdeal::ddensity(Real /*p*/) const { return _slope; }
38 
39 Real RichardsDensityIdeal::d2density(Real /*p*/) const { return 0.0; }
RichardsDensityIdeal(const InputParameters &parameters)
Real _slope
density = _slope*(p - _p0)
Real d2density(Real) const
second derivative of fluid density wrt porepressure
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
Real ddensity(Real) const
derivative of fluid density wrt porepressure
Real density(Real p) const
fluid density as a function of porepressure
Fluid density of an ideal gas.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
Real _p0
density = _slope*(p - _p0)
void addClassDescription(const std::string &doc_string)
Base class for fluid density as a function of porepressure The functions density, ddensity and d2dens...
registerMooseObject("RichardsApp", RichardsDensityIdeal)