18 params.
addClassDescription(
"Function object for tests/ins/jeffery_hamel responsible for setting " 19 "the exact value of the velocity and pressure variables.");
21 "alpha_degrees",
"The wedge half-angle size (in degrees) used in computing 'f' below.");
26 "The variable (0==vel_x, 1==vel_y, 2==p) we are computing the exact solution for.");
29 params.
addRequiredParam<
Real>(
"K",
"Constant obtained by interating the Jeffery-Hamel ODE once.");
31 "f",
"The pre-computed semi-analytic exact solution f(theta) as a PiecewiseLinear function.");
33 "Function which computes the exact solution for Jeffery-Hamel flow in a wedge.");
40 _alpha_radians(
libMesh::
pi * (getParam<
Real>(
"alpha_degrees") / 180.)),
41 _Re(getParam<
Real>(
"Re")),
42 _var_num(getParam<unsigned
int>(
"var_num")),
43 _mu(getParam<
Real>(
"mu")),
44 _rho(getParam<
Real>(
"rho")),
46 _K(getParam<
Real>(
"K")),
47 _lambda(_Re * _nu / _alpha_radians),
48 _p_star(-2 * _mu * _lambda * (1 + _K)),
57 const Real theta = std::atan2(p(1), p(0));
61 mooseAssert(r != 0.,
"The exact solution is singular at r=0.");
76 const Real cs[2] = {std::cos(theta), std::sin(theta)};
83 return u_max * f_value * cs[
_var_num];
const Point & _point_zero
const Real _alpha_radians
The half-angle of the wedge, stored in radians.
const Real _p_star
The pressure constant, whose value is determined from the pressure pin.
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
const Real _lambda
The quantity u_max(r) * r, which is constant for this problem, and can be computed given the Reynolds...
Function object for tests/ins/jeffery_hamel responsible for setting the exact value of the velocity a...
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
registerMooseObject("NavierStokesTestApp", WedgeFunction)
virtual Real value(Real t, const Point &p) const override
const Real _K
The constant K from the Jeffery-Hamel solution, defined by: K = -f - 1/(4 * alpha^2) * (alpha * Re * ...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
const Function & _f
The pre-computed semi-analytic exact solution f(theta) as a PiecewiseLinear function.
const Real _mu
The (constant) dynamic viscosity of the fluid. Usually specified in [GlobalParams].
WedgeFunction(const InputParameters ¶meters)
virtual Real value(Real t, const Point &p) const
static InputParameters validParams()
void ErrorVector unsigned int
const unsigned int _var_num
The variable (vel_x==0, vel_y==1, p==2) being computed by this instance of WedgeFunction.