www.mooseframework.org
RichardsDensityAux.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 // This post processor returns the density of a region.
11 //
12 #include "RichardsDensityAux.h"
13 
15 
16 template <>
17 InputParameters
19 {
20  InputParameters params = validParams<AuxKernel>();
21  params.addRequiredCoupledVar("pressure_var", "The variable that represents the pressure");
22  params.addRequiredParam<UserObjectName>("density_UO",
23  "Name of user object that defines the density.");
24  params.addClassDescription("auxillary variable which is fluid density");
25  return params;
26 }
27 
28 RichardsDensityAux::RichardsDensityAux(const InputParameters & parameters)
29  : AuxKernel(parameters),
30  _pressure_var(coupledValue("pressure_var")),
31  _density_UO(getUserObject<RichardsDensity>("density_UO"))
32 {
33 }
34 
35 Real
37 {
38  return _density_UO.density(_pressure_var[_qp]);
39 }
RichardsDensityAux
Fluid density as a function of porepressure.
Definition: RichardsDensityAux.h:25
RichardsDensity::density
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...
RichardsDensityAux::_pressure_var
const VariableValue & _pressure_var
porepressure
Definition: RichardsDensityAux.h:34
RichardsDensityAux::_density_UO
const RichardsDensity & _density_UO
userobject that defines density as a fcn of porepressure
Definition: RichardsDensityAux.h:37
registerMooseObject
registerMooseObject("RichardsApp", RichardsDensityAux)
RichardsDensity
Base class for fluid density as a function of porepressure The functions density, ddensity and d2dens...
Definition: RichardsDensity.h:24
RichardsDensityAux::RichardsDensityAux
RichardsDensityAux(const InputParameters &parameters)
Definition: RichardsDensityAux.C:28
RichardsDensityAux::computeValue
virtual Real computeValue()
Definition: RichardsDensityAux.C:36
validParams< RichardsDensityAux >
InputParameters validParams< RichardsDensityAux >()
Definition: RichardsDensityAux.C:18
RichardsDensityAux.h