You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem. Clamping each component independently does not preserve the sum. With three or more fluids, a physically-summing set can clamp to a sum greater than one:
(0.6, 0.6, -0.2) sums to 1.0
clamped ->
(0.6, 0.6, 0.0) sums to 1.2
The mixture property is then inflated by up to that factor — it is no longer a convex combination of the per-fluid values, so it is not bounded by [min_i prop_i, max_i prop_i].
Scope.
Unreachable when mpp_lim = T: s_convert_species_to_mixture_variables_kernel already clamps and renormalizes (alpha_K = alpha_K/max(alpha_K_sum, sgm_eps)), so cell alphas sum to one and the face clamp is a no-op.
Sum-preserving for two fluids whose alphas sum to one — (1.05, -0.05) clamps to (1.0, 0.0), still one.
Real for three or more fluids with mpp_lim = F (the default).
Suggested fix, applied to all three sites together so the two diffusive terms keep treating interfaces the same way:
Identical to the current result whenever the clamped alphas sum to one, and a true convex combination otherwise. Doing it in one place for both viscous and conduction avoids the two diverging; doing it for conduction alone would be worse than leaving it.
Regenerating whichever viscous goldens move is part of the work.
Raised by an automated review on #1906. The conduction site copies the existing viscous convention deliberately, so this is a property of the shared pattern rather than something that PR introduced.
Diffusive face fluxes weight a mixture property by the face-averaged volume fraction, clamping each component independently:
Three sites share this pattern:
src/simulation/m_riemann_state.fpp:880(cylindrical viscous source flux)src/simulation/m_riemann_state.fpp:1091(Cartesian viscous source flux)src/simulation/m_conduction.fpp(Fourier conduction face conductivity, added in Fourier heat conduction in the energy equation #1906)The problem. Clamping each component independently does not preserve the sum. With three or more fluids, a physically-summing set can clamp to a sum greater than one:
The mixture property is then inflated by up to that factor — it is no longer a convex combination of the per-fluid values, so it is not bounded by
[min_i prop_i, max_i prop_i].Scope.
mpp_lim = T:s_convert_species_to_mixture_variables_kernelalready clamps and renormalizes (alpha_K = alpha_K/max(alpha_K_sum, sgm_eps)), so cell alphas sum to one and the face clamp is a no-op.(1.05, -0.05)clamps to(1.0, 0.0), still one.mpp_lim = F(the default).Suggested fix, applied to all three sites together so the two diffusive terms keep treating interfaces the same way:
Identical to the current result whenever the clamped alphas sum to one, and a true convex combination otherwise. Doing it in one place for both viscous and conduction avoids the two diverging; doing it for conduction alone would be worse than leaving it.
Regenerating whichever viscous goldens move is part of the work.
Raised by an automated review on #1906. The conduction site copies the existing viscous convention deliberately, so this is a property of the shared pattern rather than something that PR introduced.