https://mooseframework.inl.gov
PrandtlNumberAux.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 "PrandtlNumberAux.h"
12 #include "Numerics.h"
13 
14 registerMooseObject("ThermalHydraulicsApp", PrandtlNumberAux);
15 
18 {
20  params.addClassDescription("Computes the Prandtl number for the fluid in the simulation domain");
21  params.addRequiredCoupledVar("v", "Specific volume");
22  params.addRequiredCoupledVar("e", "Specific internal energy");
23  params.addRequiredParam<UserObjectName>("fp",
24  "The name of the user object with fluid properties");
25  return params;
26 }
27 
29  : AuxKernel(parameters),
30  _v(coupledValue("v")),
31  _e(coupledValue("e")),
32  _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
33 {
34 }
35 
36 Real
38 {
39  Real cp = _fp.cp_from_v_e(_v[_qp], _e[_qp]);
40  Real mu = _fp.mu_from_v_e(_v[_qp], _e[_qp]);
41  Real k = _fp.k_from_v_e(_v[_qp], _e[_qp]);
42  return THM::Prandtl(cp, mu, k);
43 }
const VariableValue & _e
Specific internal energy.
auto Prandtl(const T1 &cp, const T2 &mu, const T3 &k)
Compute Prandtl number.
Definition: Numerics.h:133
virtual Real computeValue()
registerMooseObject("ThermalHydraulicsApp", PrandtlNumberAux)
void addRequiredParam(const std::string &name, const std::string &doc_string)
static const std::string cp
Definition: NS.h:121
Computes Prandtl number.
static const std::string mu
Definition: NS.h:123
Common class for single phase fluid properties.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
const SinglePhaseFluidProperties & _fp
void addClassDescription(const std::string &doc_string)
PrandtlNumberAux(const InputParameters &parameters)
static InputParameters validParams()
const VariableValue & _v
Specific volume.
static const std::string k
Definition: NS.h:130