Skip to content

Independent clamping of face-averaged volume fractions can inflate mixture properties #1911

Description

@sbryngelson

Diffusive face fluxes weight a mixture property by the face-averaged volume fraction, clamping each component independently:

alpha_avg(fl) = 0.5_wp*(q_prim_vf(adv%beg + fl - 1)%sf(...) + q_prim_vf(adv%beg + fl - 1)%sf(...))
! Raw cell-centered alphas can under/overshoot near interfaces; clamp to [0,1]
alpha_avg(fl) = min(max(alpha_avg(fl), 0._wp), 1._wp)

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:

(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:

prop_face = sum_i(alpha_face(i)*prop(i)) / max(sum_i(alpha_face(i)), sgm_eps)

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions