https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ReynoldsNumberAux.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 "ReynoldsNumberAux.h"
12#include "Numerics.h"
13
14registerMooseObject("ThermalHydraulicsApp", ReynoldsNumberAux);
15
18{
20 params.addClassDescription("Computes the Reynolds number.");
21 params.addCoupledVar("alpha", 1, "Volume fraction of the phase");
22 params.addRequiredCoupledVar("rho", "Density of the phase");
23 params.addRequiredCoupledVar("vel", "Component of phase velocity aligned with the flow");
24 params.addRequiredCoupledVar("D_h", "Hydraulic diameter");
25 params.addRequiredCoupledVar("v", "Specific volume");
26 params.addRequiredCoupledVar("e", "Specific internal energy");
27 params.addRequiredParam<UserObjectName>("fp",
28 "The name of the user object with fluid properties");
29 return params;
30}
31
33 : AuxKernel(parameters),
34 _alpha(coupledValue("alpha")),
35 _rho(coupledValue("rho")),
36 _vel(coupledValue("vel")),
37 _D_h(coupledValue("D_h")),
38 _v(coupledValue("v")),
39 _e(coupledValue("e")),
40 _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
41{
42}
43
44Real
46{
47 Real visc = _fp.mu_from_v_e(_v[_qp], _e[_qp]);
48 return THM::Reynolds(_alpha[_qp], _rho[_qp], _vel[_qp], _D_h[_qp], visc);
49}
registerMooseObject("ThermalHydraulicsApp", ReynoldsNumberAux)
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)
void addCoupledVar(const std::string &name, const std::string &doc_string)
Computes Reynolds number.
const SinglePhaseFluidProperties & _fp
const VariableValue & _D_h
Hydraulic diameter.
static InputParameters validParams()
const VariableValue & _rho
Density of the phase.
virtual Real computeValue()
const VariableValue & _v
Specific volume.
const VariableValue & _e
Specific internal energy.
const VariableValue & _alpha
Volume fraction.
const VariableValue & _vel
Velocity of the phase.
ReynoldsNumberAux(const InputParameters &parameters)
Common class for single phase fluid properties.
auto Reynolds(const T1 &volume_fraction, const T2 &rho, const T3 &vel, const T4 &D_h, const T5 &mu)
Compute Reynolds number.
Definition Numerics.h:118