12 #include "libmesh/libmesh_common.h" 13 #include "libmesh/vector_value.h" 14 #include "libmesh/dense_vector.h" 43 return (T(0) < val) - (val < T(0));
116 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
118 Reynolds(
const T1 & volume_fraction,
const T2 & rho,
const T3 & vel,
const T4 & D_h,
const T5 &
mu)
131 template <
typename T1,
typename T2,
typename T3>
151 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
176 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
181 const T4 & rho_liquid,
182 const T5 & mu_liquid,
183 const Real & gravity_magnitude)
185 return gravity_magnitude * beta * dT *
std::pow(D_h, 3) * (rho_liquid * rho_liquid) /
186 (mu_liquid * mu_liquid);
198 template <
typename T1,
typename T2>
200 Laplace(
const T1 & surf_tension,
const T2 & delta_rho,
const Real & gravity_magnitude)
202 return std::sqrt(surf_tension / (gravity_magnitude * delta_rho));
216 template <
typename T1,
typename T2,
typename T3,
typename T4>
219 const T2 & surf_tension,
221 const T4 & delta_rho,
222 const Real & gravity_magnitude)
225 std::sqrt(rho_k * surf_tension * std::sqrt(surf_tension / gravity_magnitude / delta_rho));
237 template <
typename T1,
typename T2>
239 Dean(
const T1 & Re,
const T2 & doD)
241 return Re * std::sqrt(doD);
ADReal v_from_rhoA_A(ADReal rhoA, ADReal A)
Computes specific volume and its derivatives from rho*A, and area.
ADReal rho_from_arhoA_alpha_A(ADReal arhoA, ADReal alpha, ADReal A)
Computes density from alpha*rho*A, alpha, and area.
Real de_darhoA(Real arhoA, Real arhouA, Real arhoEA)
Derivative of specific internal energy wrt density of the phase (rhoA or arhoA)
Real de_darhoEA(Real arhoA)
Derivative of specific internal energy wrt total energy of the phase (rhoEA or arhoEA) ...
ADReal e_from_E_vel(ADReal E, ADReal vel)
Computes specific internal energy from specific total energy and velocity.
static constexpr Real TOLERANCE
bool isOutlet(ADReal vel, Real normal)
auto Prandtl(const T1 &cp, const T2 &mu, const T3 &k)
Compute Prandtl number.
ADReal vel_from_arhoA_arhouA(ADReal arhoA, ADReal arhouA)
Computes velocity from alpha*rho*A and alpha*rho*u*A.
ADReal v_from_arhoA_alpha_A(ADReal arhoA, ADReal alpha, ADReal A)
Computes specific volume and its derivatives from alpha*rho*A, volume fraction, and area...
auto Reynolds(const T1 &volume_fraction, const T2 &rho, const T3 &vel, const T4 &D_h, const T5 &mu)
Compute Reynolds number.
int sgn(T val)
The sign function.
Real dv_darhoA(Real area, Real arhoA)
Derivative of specific volume wrt density equation solution variable.
auto Grashof(const T1 &beta, const T2 &dT, const T3 &D_h, const T4 &rho_liquid, const T5 &mu_liquid, const Real &gravity_magnitude)
Compute Grashof number.
auto peclet(const T1 &vel, const T2 &L, const T3 &diffusivity)
Compute Peclet number.
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
bool areParallelVectors(const RealVectorValue &a, const RealVectorValue &b, const Real &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Tests if two real-valued vectors are parallel within some absolute tolerance.
auto thermalDiffusivity(const T1 &k, const T2 &rho, const T3 &cp)
Compute thermal diffusivity.
auto viscosityNumber(const T1 &viscosity, const T2 &surf_tension, const T3 &rho_k, const T4 &delta_rho, const Real &gravity_magnitude)
Compute viscosity number (or coefficient)
static const std::string cp
ADReal e_from_arhoA_arhouA_arhoEA(ADReal arhoA, ADReal arhouA, ADReal arhoEA)
auto Laplace(const T1 &surf_tension, const T2 &delta_rho, const Real &gravity_magnitude)
Compute Laplace number (or coefficient)
static const std::string mu
Real de_darhouA(Real arhoA, Real arhouA)
Derivative of specific internal energy wrt momentum of the phase (rhouA or arhouA) ...
ADReal h_from_e_p_rho(ADReal e, ADReal p, ADReal rho)
auto Peclet(const T1 &volume_fraction, const T2 &cp, const T3 &rho, const T4 &vel, const T5 &D_h, const T6 &k)
Compute Peclet number.
Real dvel_darhouA(Real arhoA)
Derivative of velocity w.r.t.
auto wallHeatTransferCoefficient(const T1 &Nu, const T2 &k, const T3 &D_h)
Compute wall heat transfer coefficient.
auto Dean(const T1 &Re, const T2 &doD)
Compute Dean number.
auto reynolds(const T1 &rho, const T2 &vel, const T3 &L, const T4 &mu)
Compute Reynolds number.
auto prandtl(const T1 &cp, const T2 &mu, const T3 &k)
Compute Prandtl number.
bool haveSameDirection(const RealVectorValue &a, const RealVectorValue &b, const Real &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Tests if two real-valued vectors are in the same direction.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string v
static const std::string alpha
void v_from_rho(Real rho, Real &v, Real &dv_drho)
Computes specific volume and its derivative with respect to density.
void E_from_e_vel(Real e, Real vel, Real &E, Real &dE_de, Real &dE_dvel)
Computes specific total energy and its derivatives from specific internal energy and velocity...
Real dv_dalpha_liquid(Real area, Real arhoA, bool is_liquid)
Derivative of specific volume wrt alpha_liquid.
ADReal E_from_arhoA_arhoEA(ADReal arhoA, ADReal arhoEA)
Computes specific total energy from alpha*rho*A and alpha*rho*E*A.
Real dvel_darhoA(Real arhoA, Real arhouA)
Derivative of velocity w.r.t.
static const Real gravity_const
MooseUnits pow(const MooseUnits &, int)
static const std::string k
static VectorValue< Real > default_gravity_vector
DenseVector< Real > applyQuotientRule(const Real &num, const Real &den, const DenseVector< Real > &dnum_dy, const DenseVector< Real > &dden_dy)
Computes a derivative of a fraction using quotient rule for a derivative w.r.t.
bool isInlet(ADReal vel, Real normal)
static const Real Stefan_Boltzman_const
bool absoluteFuzzyEqualVectors(const RealVectorValue &a, const RealVectorValue &b, const Real &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Tests if two real-valued vectors are equal within some absolute tolerance.