www.mooseframework.org
RichardsDensityAux.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 // This post processor returns the density of a region.
9 //
10 #include "RichardsDensityAux.h"
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<AuxKernel>();
17  params.addRequiredCoupledVar("pressure_var", "The variable that represents the pressure");
18  params.addRequiredParam<UserObjectName>("density_UO",
19  "Name of user object that defines the density.");
20  params.addClassDescription("auxillary variable which is fluid density");
21  return params;
22 }
23 
24 RichardsDensityAux::RichardsDensityAux(const InputParameters & parameters)
25  : AuxKernel(parameters),
26  _pressure_var(coupledValue("pressure_var")),
27  _density_UO(getUserObject<RichardsDensity>("density_UO"))
28 {
29 }
30 
31 Real
33 {
34  return _density_UO.density(_pressure_var[_qp]);
35 }
RichardsDensityAux(const InputParameters &parameters)
const RichardsDensity & _density_UO
userobject that defines density as a fcn of porepressure
virtual Real density(Real p) const =0
fluid density as a function of porepressure This must be over-ridden in derived classes to provide an...
const VariableValue & _pressure_var
porepressure
Base class for fluid density as a function of porepressure The functions density, ddensity and d2dens...
virtual Real computeValue()
InputParameters validParams< RichardsDensityAux >()