25 "Computes a Green-Gauss pressure gradient that excludes the pressure jump across baffles, "
26 "using a one-sided face pressure for each cell, so the zero-thickness jump does not appear "
27 "as a mesh-dependent gradient in the adjacent cells.");
40 if (&pressure_gradient.
method() !=
this)
41 mooseError(
"Must be linked using a gradient field produced by that method.");
45 mooseError(
"Must be linked to the pressure variable owned by PorousRhieChowMassFlux '",
50 mooseError(
"Already linked to PorousRhieChowMassFlux '",
52 "'. Use a separate gradient method for each flow system.");
64 const std::unordered_set<unsigned int> & variable_numbers)
const
66 if (variable_numbers.size() != 1)
67 mooseError(
"must be used by exactly one pressure variable, but it is used by ",
68 variable_numbers.size(),
74 "FVPressureJumpGreenGaussGradient can only compute gradients for its linked "
77 "FVPressureJumpGreenGaussGradient can only compute the linked pressure variable.");
88 const Real elem_value,
89 const Real neighbor_value)
const
93 fi, elem_info, neighbor_info, variable, elem_value, neighbor_value);
95 mooseAssert(
_pressure_gradient,
"A linked pressure gradient is required on pressure-jump faces.");
108 const auto face_operator =
120 face_operator, elem_value, mass_flux,
true),
122 face_operator, neighbor_value, mass_flux,
false)};
registerMooseObject("NavierStokesApp", FVPressureJumpGreenGaussGradient)
std::vector< std::unique_ptr< libMesh::NumericVector< libMesh::Number > > > GradientContainer
static InputParameters validParams()
virtual InternalFaceValues internalFaceValues(const FaceInfo &fi, const ElemInfo &elem_info, const ElemInfo &neighbor_info, const MooseLinearVariableFV< Real > &variable, Real elem_value, Real neighbor_value) const
void computeGradientWithoutLimiter(SystemBase &system, GradientContainer &gradient, const std::unordered_set< unsigned int > &variable_numbers) const override
std::pair< Real, Real > InternalFaceValues
Green-Gauss pressure gradient that removes prescribed jumps before interpolating across baffles.
InternalFaceValues internalFaceValues(const FaceInfo &fi, const ElemInfo &elem_info, const ElemInfo &neighbor_info, const MooseLinearVariableFV< Real > &variable, Real elem_value, Real neighbor_value) const override
void linkFlowSystem(PorousRhieChowMassFlux &rc, const LinearFVGradientReader &pressure_gradient)
Link this method to the porous Rhie-Chow object that supplies pressure jumps.
const PorousRhieChowMassFlux * _rhie_chow
Porous Rhie-Chow object supplying baffle locations and signed pressure jumps after linkage.
const SystemBase * _pressure_system
Pressure system to which this method is linked.
static InputParameters validParams()
void computeGradientWithoutLimiter(SystemBase &system, GradientContainer &gradient, const std::unordered_set< unsigned int > &variable_numbers) const override
const LinearFVGradientReader * _pressure_gradient
Published gradient used to lag the explicit half-cell correction during reconstruction.
FVPressureJumpGreenGaussGradient(const InputParameters ¶ms)
unsigned int _pressure_variable_number
Pressure variable number within the linked system.
const FVGradientMethod & method() const
const SystemBase & system() const
unsigned int variableNumber() const
RealVectorValue gradient(const ElemInfo &elem_info) const
const std::string & name() const
void mooseError(Args &&... args) const
Computes Rhie-Chow face mass fluxes for porous flow with optional internal pressure jumps.
bool pressureDiffusionDataReady() const
Whether the pressure-diffusion kernel and cell coefficients are ready for interface use.
bool faceIsBaffle(const FaceInfo &fi) const
Whether a face is governed by a pressure-jump model.
NS::FV::PressureJumpInterfaceData pressureJumpInterfaceData(const FaceInfo &fi, const RealVectorValue &elem_gradient, const RealVectorValue &neighbor_gradient, Real face_area) const
Construct the complete pressure-jump operator for a face.
Real getSignedBaffleJump(const FaceInfo &fi, bool elem_side) const
Return the pressure jump seen from one side of a baffle face.
const LinearSystem & pressureSystem() const
Pressure linear system.
unsigned int pressureVariableNumber() const
Variable number of the pressure variable reconstructed by this object.
unsigned int number() const
libMesh::CompareTypes< T, T2 >::supertype linearInterpolation(const T &value1, const T2 &value2, const FaceInfo &fi, const bool one_is_elem, const InterpMethod interp_method=InterpMethod::Average)
Real pressureJumpOneSidedFaceValue(const PressureJumpInterfaceData &data, const Real cell_pressure, const Real mass_flux, const bool elem_side)
Recover one side's face pressure from the common oriented face mass flux.
Real pressureJumpHbyAFlux(const PressureJumpInterfaceData &data)
Compute the H/A part of the face mass flux after eliminating the interface pressures.
Real pressureJumpFlux(const PressureJumpInterfaceData &data, const Real elem_pressure, const Real neighbor_pressure)
Compute the pressure part of the element-to-neighbor flux after eliminating the interface pressures.