Porous Media Weakly Compressible Linear Finite Volume
The linear finite volume porous-flow formulation solves for superficial velocity , where is porosity and is interstitial velocity. PorousRhieChowMassFlux extends the SIMPLE pressure-velocity coupling so this definition remains consistent across discontinuous porosity interfaces.
For a face , the Rhie-Chow object supplies the mass flux
The momentum advection operator transports interstitial velocity. Its contribution to cell is therefore
where is component of the superficial velocity interpolated to face by the advection scheme, and is the face area. On a baffle face, is replaced by the one-sided state described in the velocity jump section below.
LinearPWCNSFVMomentumFlux applies the factor to each cell row.
Velocity jump
Across a baffle, mass conservation keeps continuous, and a stream crossing the baffle carries its interstitial tangential velocity with it, so the superficial velocity jumps wherever density or porosity does. Every operator that would otherwise interpolate velocity across the baffle uses one-sided states instead.
Face values, which would otherwise be interpolated between the two cells:
Momentum advection in LinearPWCNSFVMomentumFlux uses the same tangential velocity on both sides, namely the interstitial value from the upstream side. The superficial normal velocity is recovered from the shared face mass flux and the face-interpolated density, so it is the same on both sides and satisfies mass conservation exactly. This assumes that density varies smoothly across the baffle, the same assumption made by the pressure jump below.
The Rhie-Chow face flux combines the one-sided fluxes with the half-cell conductance weights of the pressure operator (LinearFVPressureCorrectionDiffusionJump) rather than interpolating , which also carries the body forces, to the face. On side , with the half-cell vector between the cell center and the face centroid and the cell pressure mobility, the half-cell pressure conductance and the face transmissibility are
and each side's one-sided flux is weighted by .
Gradients and stresses, which would otherwise read the jump as a slope:
FVVelocityJumpGreenGaussGradient computes the velocity gradients from face states extrapolated within each side. It is required as the default gradient method of every velocity variable.
The viscous stress in LinearPWCNSFVMomentumFlux is reduced to a tangential shear, set by the porosity of the two sides (see the baffle stress treatment). With the set of clear sides (porosity of one) and the distance from the center of cell to the face, the viscous momentum-diffusion conductance and the resulting shear traction are
where is the face velocity of side , and when neither side is clear:
Clear fluid on both sides (porosity of one): ordinary viscous shear between the two cells.
Clear fluid against a porous medium: the clear fluid shears against the porous side as against a rough wall moving with the superficial velocity of the porous medium at the interface, extrapolated from the porous cell.
Porous media on both sides: no shear, because drag in the beds dominates it.
FVReconstructedPressureGradient reconstructs the cell pressure gradient from each side's face normal velocity, recovered from the shared mass flux and that side's density, and uses the velocity gradient of the cell being reconstructed at a baffle face instead of a face average.
With these, a velocity field that is linear on each side of a baffle, together with its piecewise-constant pressure, is reproduced to round-off on uniform meshes, and a fluid at rest under a porosity-weighted buoyancy force keeps zero velocity and the hydrostatic pressure across porosity and density jumps. The rest state is exact when the baffle is parallel or normal to gravity on an orthogonal mesh. On a nonorthogonal mesh with a stratified density, the quadratic hydrostatic pressure enters the Green-Gauss gradient through one-sided face values, and the nonorthogonal correction turns that gradient error into a small spurious velocity. This velocity has the same size with and without the baffle and converges at second order with mesh refinement.
Postprocessing on a baffle
The two postprocessors usually evaluated on a baffle sideset behave differently:
VolumetricFlowRate with "rhie_chow_user_object" integrates the corrected Rhie-Chow face flux. This flux is shared by both sides of a baffle, so the flow rate through the baffle is conservative and does not depend on the side it is evaluated from.
PressureDrop evaluates the pressure variable on its faces. On a baffle face the variable interpolates the two cell pressures across the baffle, so the value lies between the two sides and is neither one-sided face pressure. To measure the pressure change across a baffle, place the upstream and downstream sidesets away from the baffle, on faces where the pressure is continuous, so the jump falls between them.
The same rule holds inside the solver: the face value of the pressure variable is valid only where the pressure is continuous. An object that needs the face pressure of one side of a baffle must recover it from the half-cell flux relation, as FVPressureJumpGreenGaussGradient does for the surface sum of each cell.
Pressure jump
The pressure jump across a baffle is supplied by the pressure-jump models listed in "pressure_jump_models". BernoulliFormLossPressureJump is one such model: a sideset listed in its "boundary" carries the reversible Bernoulli jump
where and denote the owner and non-owner sides, and is the face-interpolated density. This assumes density varies smoothly, so one interpolated face density stands in for the owner and non-owner densities. The stored jump is pressure on the non-owner side minus pressure on the owner side. An optional form-loss term adds . The reference side is selected with "reference_velocity_side". The BernoulliFormLossPressureJump model provides this jump to the PorousRhieChowMassFlux object named by "pressure_jump_models".
LinearFVPressureCorrectionDiffusionJump inserts the relaxed jump into the pressure-correction equation. The same jump-aware operator is then used to recompute the Rhie-Chow face flux, while LinearPWCNSFVMomentumPressure uses the corresponding reconstructed pressure gradient in the next momentum predictor. This keeps the pressure solve, face flux, and cell momentum equation on one discrete definition of the interface jump.
The tested setup below shows the porous Rhie-Chow object and the coupled pressure and momentum kernels:
[UserObjects<<<{"href": "../syntax/UserObjects/index.html"}>>>]
[pressure_jump]
type = BernoulliFormLossPressureJump<<<{"description": "Provides Bernoulli and form-loss pressure jumps to PorousRhieChowMassFlux.", "href": "../source/userobjects/BernoulliFormLossPressureJump.html"}>>>
boundary<<<{"description": "The boundaries on which this pressure jump model applies."}>>> = 'baffle baffle2'
porosity<<<{"description": "The porosity functor. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = porosity
density<<<{"description": "The density functor. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = ${rho}
[]
[rc]
type = PorousRhieChowMassFlux<<<{"description": "Rhie-Chow mass flux object specialized for porous flow/baffle cases.", "href": "../source/userobjects/PorousRhieChowMassFlux.html"}>>>
u<<<{"description": "The x-component of velocity"}>>> = superficial_u
pressure<<<{"description": "The pressure variable."}>>> = pressure
rho<<<{"description": "Density functor. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = ${rho}
porosity<<<{"description": "Porosity functor (defaults to 1 for non-porous calculations). A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = porosity
p_diffusion_kernel<<<{"description": "The LinearFVPressureCorrectionDiffusion kernel acting on the pressure."}>>> = p_diffusion
pressure_jump_models<<<{"description": "Pressure jump models applied by this object."}>>> = pressure_jump
pressure_jump_relaxation<<<{"description": "Under-relaxation factor for pressure jump updates."}>>> = 0.1
[]
[](modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/linear-segregated/1d-simple-channel/porous-baffle-1d.i)[LinearFVKernels<<<{"href": "../syntax/LinearFVKernels/index.html"}>>>]
[u_advection]
type = LinearPWCNSFVMomentumFlux<<<{"description": "Momentum flux kernel with porous-specific advection handling.", "href": "../source/linearfvkernels/LinearPWCNSFVMomentumFlux.html"}>>>
variable<<<{"description": "The name of the variable whose linear system this object contributes to"}>>> = superficial_u
advected_interp_method_name<<<{"description": "Name of the FVInterpolationMethod to use for the advected velocity."}>>> = ${advected_interp_method}
mu<<<{"description": "The diffusion coefficient. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = ${mu}
u<<<{"description": "The velocity in the x direction."}>>> = superficial_u
momentum_component<<<{"description": "The component of the momentum equation that this kernel applies to."}>>> = 'x'
rhie_chow_user_object<<<{"description": "The rhie-chow user-object which is used to determine the face velocity."}>>> = rc
use_nonorthogonal_correction<<<{"description": "If the nonorthogonal correction should be used when computing the normal gradient."}>>> = false
[]
[u_pressure]
type = LinearPWCNSFVMomentumPressure<<<{"description": "Adds the porosity-weighted pressure gradient to a porous momentum equation.", "href": "../source/linearfvkernels/LinearPWCNSFVMomentumPressure.html"}>>>
variable<<<{"description": "The name of the variable whose linear system this object contributes to"}>>> = superficial_u
momentum_component<<<{"description": "The component of the momentum equation that this kernel applies to."}>>> = 'x'
porosity<<<{"description": "The porosity functor. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = porosity
pressure<<<{"description": "The pressure variable whose gradient should be used."}>>> = pressure
gradient_method<<<{"description": "Gradient method to use for the pressure gradient in this kernel. If omitted, the pressure variable's default gradient method is used."}>>> = reconstructed
[]
[u_friction]
type = LinearFVMomentumFriction<<<{"description": "Computes Darcy and/or Forchheimer resistance in a Navier-Stokes momentum equation.", "href": "../source/linearfvkernels/LinearFVMomentumFriction.html"}>>>
variable<<<{"description": "The name of the variable whose linear system this object contributes to"}>>> = superficial_u
Forchheimer_name<<<{"description": "Name of the Forchheimer coefficients property. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = forch
porosity<<<{"description": "The porosity. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = porosity
rho<<<{"description": "The density required by Forchheimer resistance. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = ${rho}
u<<<{"description": "The x-component of superficial velocity. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = superficial_u
momentum_component<<<{"description": "The component of the momentum equation that this kernel applies to."}>>> = 'x'
block<<<{"description": "The list of blocks (ids or names) that this object will be applied"}>>> = 2
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusionJump<<<{"description": "Pressure correction diffusion kernel that adds a baffle jump contribution on internal faces.", "href": "../source/linearfvkernels/LinearFVPressureCorrectionDiffusionJump.html"}>>>
variable<<<{"description": "The name of the variable whose linear system this object contributes to"}>>> = pressure
rhie_chow_user_object<<<{"description": "The rhie-chow user-object which provides baffle jump information."}>>> = rc
use_nonorthogonal_correction<<<{"description": "If the nonorthogonal correction should be used when computing the normal gradient."}>>> = false
[]
[HbyA_divergence]
type = LinearFVDivergence<<<{"description": "Represents a divergence term. Note, this term does not contribute to the system matrix, only takes the divergence of a face flux field and adds it to the right hand side of the linear system.", "href": "../source/linearfvkernels/LinearFVDivergence.html"}>>>
variable<<<{"description": "The name of the variable whose linear system this object contributes to"}>>> = pressure
face_flux<<<{"description": "Functor for the face flux. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = HbyA
force_boundary_execution<<<{"description": "Whether to force execution of this object on all external boundaries."}>>> = true
[]
[](modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/linear-segregated/1d-simple-channel/porous-baffle-1d.i)