www.mooseframework.org
RichardsDensityConstBulk.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 assuming constant bulk modulus
9 //
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<RichardsDensity>();
17  params.addRequiredParam<Real>("dens0", "Reference density of fluid. Eg 1000");
18  params.addRequiredParam<Real>("bulk_mod", "Bulk modulus of fluid. Eg 2E9");
19  params.addClassDescription(
20  "Fluid density assuming constant bulk modulus. dens0 * Exp(pressure/bulk)");
21  return params;
22 }
23 
24 RichardsDensityConstBulk::RichardsDensityConstBulk(const InputParameters & parameters)
25  : RichardsDensity(parameters), _dens0(getParam<Real>("dens0")), _bulk(getParam<Real>("bulk_mod"))
26 {
27 }
28 
29 Real
31 {
32  return _dens0 * std::exp(p / _bulk);
33 }
34 
35 Real
37 {
38  return density(p) / _bulk;
39 }
40 
41 Real
43 {
44  return density(p) / _bulk / _bulk;
45 }
Real _dens0
density = _dens0*exp(p/_bulk)
Real _bulk
density = _dens0*exp(p/_bulk)
RichardsDensityConstBulk(const InputParameters &parameters)
Real d2density(Real p) const
second derivative of fluid density wrt porepressure
InputParameters validParams< RichardsDensityConstBulk >()
Base class for fluid density as a function of porepressure The functions density, ddensity and d2dens...
Real ddensity(Real p) const
derivative of fluid density wrt porepressure
InputParameters validParams< RichardsDensity >()
Real density(Real p) const
fluid density as a function of porepressure