29 const bool need_more_ghosting =
32 const auto & velocity_interp_method_in = obj.
getParam<
MooseEnum>(
"velocity_interp_method");
33 if (velocity_interp_method_in ==
"average")
35 else if (velocity_interp_method_in ==
"rc")
38 obj.
mooseError(
"Unrecognized interpolation type ", std::string(velocity_interp_method_in));
40 return need_more_ghosting;
47 MooseEnum velocity_interp_method(
"average rc",
"rc");
49 "velocity_interp_method",
50 velocity_interp_method,
51 "The interpolation to use for the velocity. Options are " 52 "'average' and 'rc' which stands for Rhie-Chow. The default is Rhie-Chow.");
63 return MooseEnum(
"average upwind vanLeer min_mod venkatakrishnan",
"upwind");
69 const std::string method_name = interpolation_method;
70 if (interpolation_method ==
"average")
71 return "FVGeometricAverage";
72 if (interpolation_method ==
"upwind")
73 return "FVAdvectedUpwind";
74 if (interpolation_method ==
"vanLeer")
75 return "FVAdvectedVanLeerWeightBased";
76 if (interpolation_method ==
"min_mod")
77 return "FVAdvectedMinmodWeightBased";
78 if (interpolation_method ==
"venkatakrishnan")
79 return "FVAdvectedVenkatakrishnanDeferredCorrection";
81 mooseError(
"Unsupported linear FV advected interpolation method '", method_name,
"'.");
93 const std::string method_name = interpolation_method;
94 if (interpolation_method ==
"average")
95 return "FVGeometricAverage";
96 if (interpolation_method ==
"harmonic")
97 return "FVHarmonicAverage";
99 mooseError(
"Unsupported linear FV face interpolation method '", method_name,
"'.");
107 const std::string method_name = interpolation_method;
118 std::tuple<bool, T, T>
125 return {
false, 0, 0};
127 mooseAssert(
porosity.hasBlocks(fi.
elem().subdomain_id()) &&
129 "Porosity should have blocks on both elem and neighbor");
135 const auto eps_elem =
porosity(face_elem, time), eps_neighbor =
porosity(face_neighbor, time);
136 return {!MooseUtils::relativeFuzzyEqual(eps_elem, eps_neighbor), eps_elem, eps_neighbor};
bool setInterpolationMethods(const MooseObject &obj, Moose::FV::InterpMethod &advected_interp_method, Moose::FV::InterpMethod &velocity_interp_method)
Sets the advection and velocity interpolation methods.
std::string fvFaceInterpolationMethodType(const MooseEnum &interpolation_method)
Gets the FVInterpolationMethod object type for a face interpolation method name.
const T & getParam(const std::string &name) const
void mooseError(Args &&... args)
MooseEnum fvFaceInterpolationMethods()
Enum of the interpolation methods supported by FVInterpolationMethod objects.
InputParameters interpolationParameters()
const Elem & elem() const
InputParameters getValidParams(const std::string &name) const
void addFVFaceInterpolationMethod(FEProblemBase &problem, Factory &factory, const MooseEnum &interpolation_method)
Add the FVInterpolationMethod object for a face interpolation method name, if absent.
std::string fvAdvectedInterpolationMethodType(const MooseEnum &interpolation_method)
Gets the FVInterpolationMethod object type for an advected interpolation method.
static const std::string porosity
const Elem * neighborPtr() const
bool hasFVInterpolationMethod(const InterpolationMethodName &name) const
InputParameters advectedInterpolationParameter()
template std::tuple< bool, ADReal, ADReal > isPorosityJumpFace< ADReal >(const Moose::FunctorBase< ADReal > &porosity, const FaceInfo &fi, const Moose::StateArg &time)
const Elem & neighbor() const
const Elem * elemPtr() const
MooseEnum fvAdvectedInterpolationMethods()
Enum of the advected interpolation methods supported by FVInterpolationMethod objects.
std::tuple< bool, T, T > isPorosityJumpFace(const Moose::FunctorBase< T > &porosity, const FaceInfo &fi, const Moose::StateArg &time)
Checks to see whether the porosity value jumps from one side to the other of the provided face...
void mooseError(Args &&... args) const
virtual void addFVInterpolationMethod(const std::string &method_type, const std::string &name, InputParameters ¶meters)
bool setInterpolationMethod(const MooseObject &obj, Moose::FV::InterpMethod &interp_method, const std::string ¶m_name)
template std::tuple< bool, Real, Real > isPorosityJumpFace< Real >(const Moose::FunctorBase< Real > &porosity, const FaceInfo &fi, const Moose::StateArg &time)