www.mooseframework.org
PressureAux.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 #include "PressureAux.h"
12 
13 registerMooseObject("FluidPropertiesApp", PressureAux);
14 
15 template <>
16 InputParameters
18 {
19  InputParameters params = validParams<AuxKernel>();
20  params.addRequiredCoupledVar("e", "Specific internal energy");
21  params.addRequiredCoupledVar("v", "Specific volume");
22  params.addRequiredParam<UserObjectName>("fp", "The name of the user object for fluid properties");
23  params.addClassDescription(
24  "Computes pressure given specific volume and specific internal energy");
25  return params;
26 }
27 
28 PressureAux::PressureAux(const InputParameters & parameters)
29  : AuxKernel(parameters),
30  _v(coupledValue("v")),
31  _e(coupledValue("e")),
32  _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
33 {
34 }
35 
36 Real
38 {
39  return _fp.p_from_v_e(_v[_qp], _e[_qp]);
40 }
PressureAux::PressureAux
PressureAux(const InputParameters &parameters)
Definition: PressureAux.C:28
SinglePhaseFluidProperties
Common class for single phase fluid properties.
Definition: SinglePhaseFluidProperties.h:89
PressureAux::computeValue
virtual Real computeValue()
Definition: PressureAux.C:37
SinglePhaseFluidProperties.h
PressureAux.h
PressureAux
Computes pressure from specific volume and specific internal energy.
Definition: PressureAux.h:23
PressureAux::_e
const VariableValue & _e
Definition: PressureAux.h:32
PressureAux::_fp
const SinglePhaseFluidProperties & _fp
Definition: PressureAux.h:34
validParams< PressureAux >
InputParameters validParams< PressureAux >()
Definition: PressureAux.C:17
PressureAux::_v
const VariableValue & _v
Definition: PressureAux.h:31
registerMooseObject
registerMooseObject("FluidPropertiesApp", PressureAux)