pub enum DeltaCoeff {
Orthogonal,
NonOrthogonal,
}Expand description
Which face-to-face distance the Laplacian divides by — OpenFOAM’s choice of
deltaCoeffs versus nonOrthDeltaCoeffs.
This selects the implicit coefficient only. It says nothing about the
explicit deferred correction, which lives in
laplacian_corrected and is orthogonal to this
choice. Together the two reproduce OpenFOAM’s three snGradSchemes entries:
OpenFOAM snGradSchemes | DeltaCoeff | explicit correction |
|---|---|---|
orthogonal | Orthogonal | none |
uncorrected | NonOrthogonal | none |
corrected | NonOrthogonal | full (laplacian_corrected) |
§Why the distinction matters
uncorrected is not “the orthogonal scheme”. It still projects the
cell-to-cell vector onto the face normal; it merely drops the explicit term.
Treating the two as the same under-estimates every face conductance by
1/cos(theta), theta being the face’s non-orthogonality angle — silently,
and with no residual to reveal it. Measured on the GeN-Foam 2D_MSFR
neutronics mesh (whose fvSchemes asks for uncorrected), that is 1.7 % on
the interior faces and up to 12 % on the boundary patches, worth +580 pcm
in k_eff.
Variants§
Orthogonal
1/|d| — OpenFOAM’s deltaCoeffs, exact only on an orthogonal mesh.
The default, so that every existing caller keeps its behaviour bit-for-bit.
NonOrthogonal
1/max(n . d, 0.05 |d|) — OpenFOAM’s nonOrthDeltaCoeffs, the
projection of the cell-to-cell vector onto the face normal.
On a boundary face OpenFOAM first replaces d = Cf - C_P by its
patch-normal component n (n . d) (fvPatch::delta()), which makes the
coefficient 1/(n . d) there.
Implementations§
Source§impl DeltaCoeff
impl DeltaCoeff
Sourcepub fn interior_delta(self, mesh: &FvMesh, face: usize) -> f64
pub fn interior_delta(self, mesh: &FvMesh, face: usize) -> f64
The distance [m] this scheme divides by on internal face face.
The reciprocal is OpenFOAM’s deltaCoeffs/nonOrthDeltaCoeffs entry for
that face. Exposed so a caller that builds its own boundary or face
coefficient can divide by exactly the same length the Laplacian does —
a Robin condition whose weight uses a different one is silently wrong by
1/cos(theta).
Sourcepub fn boundary_delta(self, mesh: &FvMesh, face: usize) -> f64
pub fn boundary_delta(self, mesh: &FvMesh, face: usize) -> f64
The distance [m] this scheme divides by on boundary face face
(a global face index, patch.start + i).
See Self::interior_delta for why a caller would want this.