www.mooseframework.org
RichardsDensityPrimeAux.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 derivative of density wrt pressure
9 //
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 d(density)/dp");
21  return params;
22 }
23 
24 RichardsDensityPrimeAux::RichardsDensityPrimeAux(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.ddensity(_pressure_var[_qp]);
35 }
const RichardsDensity & _density_UO
userobject that defines density as a fcn of porepressure
InputParameters validParams< RichardsDensityPrimeAux >()
const VariableValue & _pressure_var
porepressure
virtual Real ddensity(Real p) const =0
derivative of fluid density wrt porepressure This must be over-ridden in derived classes to provide a...
Base class for fluid density as a function of porepressure The functions density, ddensity and d2dens...
RichardsDensityPrimeAux(const InputParameters &parameters)