34 params.addClassDescription(
35 "Computes the Rhie-Chow velocity based on gathered 'a' coefficient data.");
38 params.suppressParameter<
bool>(
"force_preic");
40 params.addRequiredParam<VariableName>(
NS::pressure,
"The pressure variable.");
41 params.addRequiredParam<VariableName>(
"u",
"The x-component of velocity");
42 params.addParam<VariableName>(
"v",
"The y-component of velocity");
43 params.addParam<VariableName>(
"w",
"The z-component of velocity");
45 MooseEnum velocity_interp_method(
"average rc",
"rc");
47 "velocity_interp_method",
48 velocity_interp_method,
49 "The interpolation to use for the velocity. Options are " 50 "'average' and 'rc' which stands for Rhie-Chow. The default is Rhie-Chow.");
61 _dim(blocksMaxDimension()),
65 &
UserObject::_subproblem.getVariable(0, getParam<VariableName>(
"u")))),
67 &
UserObject::_subproblem.getVariable(0, getParam<VariableName>(
"v")))
70 &
UserObject::_subproblem.getVariable(0, getParam<VariableName>(
"w")))
83 paramError(
"u",
"the u velocity must be an INSFVVelocityVariable.");
90 mooseError(
"In two or more dimensions, the v velocity must be supplied and it must be an " 91 "INSFVVelocityVariable.");
99 mooseError(
"In three-dimensions, the w velocity must be supplied and it must be an " 100 "INSFVVelocityVariable.");
112 mooseError(
"x and y velocity component face interpolation methods do not match");
118 mooseError(
"x and z velocity component face interpolation methods do not match");
123 mooseError(
"Different subproblems in RhieChowInterpolatorBase!");
125 const auto & velocity_interp_method = params.
get<
MooseEnum>(
"velocity_interp_method");
126 if (velocity_interp_method ==
"average")
128 else if (velocity_interp_method ==
"rc")
137 bool subtract_mesh_velocity)
const
INSFVPressureVariable *const _p
The thread 0 copy of the pressure variable.
std::vector< MooseVariableFVReal * > _ps
All the thread copies of the pressure variable.
void paramError(const std::string ¶m, Args... args) const
T & getMesh(MooseMesh &mesh)
function to cast mesh
INSFVVelocityVariable *const _u
The thread 0 copy of the x-velocity variable.
unsigned int number() const
INSFVVelocityVariable *const _v
The thread 0 copy of the y-velocity variable (null if the problem is 1D)
static InputParameters validParams()
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
static InputParameters validParams()
virtual VectorValue< ADReal > getVelocity(const Moose::FV::InterpMethod m, const FaceInfo &fi, const Moose::StateArg &time, const THREAD_ID tid, bool subtract_mesh_velocity) const =0
Retrieve a face velocity.
std::vector< MooseVariableFVReal * > _us
All the thread copies of the x-velocity variable.
RhieChowInterpolatorBase(const InputParameters ¶ms)
const unsigned int _dim
The dimension of the mesh, e.g. 3 for hexes and tets, 2 for quads and tris.
const Point & normal() const
Moose::FV::InterpMethod _velocity_interp_method
The interpolation method to use for the velocity.
void fillContainer(const std::string &var_name, Container &container)
Fill the passed-in variable container with the thread copies of var_name.
virtual Real getVolumetricFaceFlux(const Moose::FV::InterpMethod m, const FaceInfo &fi, const Moose::StateArg &time, const THREAD_ID tid, bool subtract_mesh_velocity) const override
Retrieve the volumetric face flux, will not include derivatives.
void checkBlocks(const VarType &var) const
Check the block consistency between the passed in var and us.
Moose::FV::InterpMethod faceInterpolationMethod() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
INSFVVelocityVariable *const _w
The thread 0 copy of the z-velocity variable (null if the problem is not 3D)
std::vector< unsigned int > _var_numbers
The velocity variable numbers.
static const std::string pressure
void mooseError(Args &&... args) const
std::vector< MooseVariableFVReal * > _ws
All the thread copies of the z-velocity variable.
static InputParameters validParams()
std::vector< MooseVariableFVReal * > _vs
All the thread copies of the y-velocity variable.
static InputParameters validParams()