16#include "metaphysicl/raw_type.h"
28int delta(
unsigned int i,
unsigned int j);
44unsigned int getIndex(
const Real &
p,
const std::vector<Real> & bounds);
67 const Real &
Re,
const Real &
rho,
const Real &
mu,
const Real & drho,
const Real & dmu);
117using MooseUtils::isZero;
135 const unsigned int rz_radial_coord = 0);
144 const std::set<SubdomainID> & block_ids,
145 std::unordered_set<const Elem *> & wall_bounded);
151void getWallDistance(
const std::vector<BoundaryName> & wall_boundary_name,
154 const std::set<SubdomainID> & block_ids,
155 std::map<
const Elem *, std::vector<Real>> & dist_map);
164 const std::set<SubdomainID> & block_ids,
165 std::map<
const Elem *, std::vector<const FaceInfo *>> & face_info_map);
170template <
typename T,
typename VectorType,
typename Po
intType>
173 const VectorType & value,
174 const PointType & point,
176 const unsigned int rz_radial_coord)
179 "This function only supports calculations of divergence in Cartesian and "
180 "axisymmetric coordinate systems");
181 auto div = gradient.tr();
184 div += value(rz_radial_coord) / point(rz_radial_coord);
196template <
typename T1,
typename T2,
typename T3>
223 const unsigned int rz_radial_coord);
231 const unsigned int rz_radial_coord);
DualNumber< Real, DNDerivativeType, true > ADReal
void getWallBoundedElements(const std::vector< BoundaryName > &wall_boundary_name, const FEProblemBase &fe_problem, const SubProblem &subproblem, const std::set< SubdomainID > &block_ids, std::unordered_set< const Elem * > &wall_bounded)
Map marking wall bounded elements The map passed in wall_bounded_map gets cleared and re-populated.
T findyPlus(const T &mu, const T &rho, const T &u, Real dist)
Finds the non-dimensional wall distance normalized with the friction velocity Implements a fixed-poin...
void getWallDistance(const std::vector< BoundaryName > &wall_boundary_name, const FEProblemBase &fe_problem, const SubProblem &subproblem, const std::set< SubdomainID > &block_ids, std::map< const Elem *, std::vector< Real > > &dist_map)
Map storing wall ditance for near-wall marked elements The map passed in dist_map gets cleared and re...
int computeSign(const Real &a)
Sign function, returns $+1$ if $a$ is positive and $-1$ if $a$ is negative.
template ADReal findyPlus< ADReal >(const ADReal &mu, const ADReal &rho, const ADReal &u, Real dist)
T computeShearStrainRateNormSquared(const Moose::Functor< T > &u, const Moose::Functor< T > *v, const Moose::Functor< T > *w, const Moose::ElemArg &elem_arg, const Moose::StateArg &state, const Moose::CoordinateSystemType coord_sys=Moose::COORD_XYZ, const unsigned int rz_radial_coord=0)
Utility function to compute the shear strain rate.
template Real computeSpeed< Real >(const libMesh::VectorValue< Real > &velocity)
static const std::string cp
T divergence(const TensorValue< T > &gradient, const VectorType &value, const PointType &point, const Moose::CoordinateSystemType &coord_sys, const unsigned int rz_radial_coord)
Compute the divergence of a vector given its matrix of derivatives.
Real reynoldsPropertyDerivative(const Real &Re, const Real &rho, const Real &mu, const Real &drho, const Real &dmu)
Computes the derivative of the Reynolds number, $Re\equiv \frac{\rho Vd}{\mu}$, with respect to an ar...
template ADReal computeSpeed< ADReal >(const libMesh::VectorValue< ADReal > &velocity)
static const std::string mu
static const std::string v
auto wallHeatTransferCoefficient(const T1 &Nu, const T2 &k, const T3 &D_h)
Compute wall heat transfer coefficient.
static const std::string k
T findUStar(const T &mu, const T &rho, const T &u, Real dist)
Finds the friction velocity using standard velocity wall functions formulation.
template ADReal computeShearStrainRateNormSquared< ADReal >(const Moose::Functor< ADReal > &u, const Moose::Functor< ADReal > *v, const Moose::Functor< ADReal > *w, const Moose::ElemArg &elem_arg, const Moose::StateArg &state, const Moose::CoordinateSystemType coord_sys, const unsigned int rz_radial_coord)
Real prandtlPropertyDerivative(const Real &mu, const Real &cp, const Real &k, const Real &dmu, const Real &dcp, const Real &dk)
Computes the derivative of the Prandtl number, $Pr\equiv\frac{\mu C_p}{k}$, with respect to an arbitr...
unsigned int getIndex(const Real &p, const std::vector< Real > &bounds)
Determines the index $i$ in a sorted array such that the input point is within the $i$-th and $i+1$-t...
template ADReal findUStar< ADReal >(const ADReal &mu, const ADReal &rho, const ADReal &u, const Real dist)
T computeSpeed(const libMesh::VectorValue< T > &velocity)
Compute the speed (velocity norm) given the supplied velocity.
template Real findyPlus< Real >(const Real &mu, const Real &rho, const Real &u, Real dist)
int delta(unsigned int i, unsigned int j)
Delta function, which returns zero if $i\ne j$ and unity if $i=j$.
template Real computeShearStrainRateNormSquared< Real >(const Moose::Functor< Real > &u, const Moose::Functor< Real > *v, const Moose::Functor< Real > *w, const Moose::ElemArg &elem_arg, const Moose::StateArg &state, const Moose::CoordinateSystemType coord_sys, const unsigned int rz_radial_coord)
template Real findUStar< Real >(const Real &mu, const Real &rho, const Real &u, const Real dist)
static const std::string velocity
void getElementFaceArgs(const std::vector< BoundaryName > &wall_boundary_name, const FEProblemBase &fe_problem, const SubProblem &subproblem, const std::set< SubdomainID > &block_ids, std::map< const Elem *, std::vector< const FaceInfo * > > &face_info_map)
Map storing face arguments to wall bounded faces The map passed in face_info_map gets cleared and re-...