24 "Van Leer interpolation for advected quantities implemented as limited blending weights " 25 "(no MUSCL reconstruction, no deferred correction).");
29 "Whether to limit the scheme to be no more downwind-biased than linear interpolation " 30 "(blends between upwind and linear; avoids 'compressive' weights that can lead to " 31 "downwind weighting and poor linear solver behavior).");
35 "blending_factor>=0 & blending_factor<=1",
36 "Scales the high-order blending strength; 0 gives pure upwind, 1 gives the full limited " 37 "blending. Values < 1 can improve linear solver robustness for fully implicit assembly.");
43 _limit_to_linear(getParam<bool>(
"limit_to_linear")),
44 _blending_factor(getParam<
Real>(
"blending_factor"))
56 mooseAssert(elem_grad && neighbor_grad,
57 "Van Leer advected interpolation requires both element and neighbor gradients.");
59 const bool upwind_is_elem = mass_flux >= 0.0;
61 const Real phi_upwind = upwind_is_elem ? elem_value : neighbor_value;
62 const Real phi_downwind = upwind_is_elem ? neighbor_value : elem_value;
64 const VectorValue<Real> grad_upwind = upwind_is_elem ? *elem_grad : *neighbor_grad;
65 const Point upwind_to_downwind = upwind_is_elem ? face.
dCN() : Point(-face.
dCN());
67 const auto r_f =
Moose::FV::rF(phi_upwind, phi_downwind, grad_upwind, upwind_to_downwind);
71 const Real w_f = upwind_is_elem ? face.
gC() : (1.0 - face.
gC());
80 const Real w_upwind = 1.0 - g;
81 const Real w_downwind = g;
84 const Real w_elem = upwind_is_elem ? w_upwind : w_downwind;
85 const Real w_neighbor = upwind_is_elem ? w_downwind : w_upwind;
102 advectedInterpolate(face, elem_value, neighbor_value, elem_grad, neighbor_grad, mass_flux);
103 return result.weights_matrix.first * elem_value + result.weights_matrix.second * neighbor_value;
MetaPhysicL::DualNumber< V, D, asd > abs(const MetaPhysicL::DualNumber< V, D, asd > &a)
registerMooseObject("MooseApp", FVAdvectedVanLeerWeightBased)
Scalar rF(const Scalar &phiC, const Scalar &phiD, const Vector &gradC, const RealVectorValue &dCD)
From Moukalled 12.30.
Registered base class for linear FV interpolation objects.
Van Leer interpolation for advected quantities that blends between upwind and the higher-order limite...
std::pair< Real, Real > weights_matrix
auto max(const L &left, const R &right)
This data structure is used to store geometric and variable related metadata about each cell face in ...
static InputParameters validParams()
AdvectedSystemContribution advectedInterpolate(const FaceInfo &face, Real elem_value, Real neighbor_value, const VectorValue< Real > *elem_grad, const VectorValue< Real > *neighbor_grad, Real mass_flux) const override
Compute the matrix weights for the advected face value.
Real gC() const
Return the geometric weighting factor.
static InputParameters validParams()
const bool _limit_to_linear
Whether to clamp the blending to be no more downwind-biased than linear.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
FVAdvectedVanLeerWeightBased(const InputParameters ¶ms)
Matrix/RHS contribution for an advected face interpolation.
Real advectedInterpolateValue(const FaceInfo &face, Real elem_value, Real neighbor_value, const VectorValue< Real > *elem_grad, const VectorValue< Real > *neighbor_grad, Real mass_flux) const override
Compute the advected face value.
const Real _blending_factor
Scales the high-order blending strength (0 = upwind, 1 = full limited blending).
auto min(const L &left, const R &right)
const Point & dCN() const