https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SoundSpeedAux.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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 "SoundSpeedAux.h"
12
13registerMooseObject("ThermalHydraulicsApp", SoundSpeedAux);
14
17{
19 params.addRequiredCoupledVar("v", "specific volume");
20 params.addRequiredCoupledVar("e", "specific internal energy");
21 params.addRequiredParam<UserObjectName>("fp", "The name of fluid properties object to use.");
22 params.addClassDescription("Computes the speed of sound.");
23
24 return params;
25}
26
28 : AuxKernel(parameters),
29 _v(coupledValue("v")),
30 _e(coupledValue("e")),
31 _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
32{
33}
34
35Real
37{
38 return _fp.c_from_v_e(_v[_qp], _e[_qp]);
39}
registerMooseObject("ThermalHydraulicsApp", SoundSpeedAux)
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Common class for single phase fluid properties.
Computes the sound speed, given the equation of state.
SoundSpeedAux(const InputParameters &parameters)
const SinglePhaseFluidProperties & _fp
static InputParameters validParams()
const VariableValue & _e
virtual Real computeValue()
const VariableValue & _v