www.mooseframework.org
TemperatureAux.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 "TemperatureAux.h"
12 
13 registerMooseObject("FluidPropertiesApp", TemperatureAux);
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 temperature given specific volume and specific internal energy");
25  return params;
26 }
27 
28 TemperatureAux::TemperatureAux(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.T_from_v_e(_v[_qp], _e[_qp]);
40 }
TemperatureAux::_fp
const SinglePhaseFluidProperties & _fp
Definition: TemperatureAux.h:34
registerMooseObject
registerMooseObject("FluidPropertiesApp", TemperatureAux)
SinglePhaseFluidProperties
Common class for single phase fluid properties.
Definition: SinglePhaseFluidProperties.h:89
SinglePhaseFluidProperties.h
TemperatureAux::TemperatureAux
TemperatureAux(const InputParameters &parameters)
Definition: TemperatureAux.C:28
TemperatureAux::_v
const VariableValue & _v
Definition: TemperatureAux.h:31
TemperatureAux::_e
const VariableValue & _e
Definition: TemperatureAux.h:32
TemperatureAux::computeValue
virtual Real computeValue()
Definition: TemperatureAux.C:37
validParams< TemperatureAux >
InputParameters validParams< TemperatureAux >()
Definition: TemperatureAux.C:17
TemperatureAux.h
TemperatureAux
Compute temperature values from specific volume and internal energy.
Definition: TemperatureAux.h:23