case_validator.py accepts bubbles_euler with any num_fluids, but the ensemble-averaged model
MFC implements is derived for a single carrier liquid, and the code's own arms disagree above two
fluids. Found while reviewing #1762.
What the model says
The liquid phase closure is
$$\Gamma_l\,p_l = \frac{1}{1-\alpha}\left(E - \tfrac{1}{2}\rho|\mathbf{u}|^2\right) - \Pi_{\infty,l}$$
- the liquid's own
Gamma_l and Pi_inf,l, undiluted, with the void entering only through the
1/(1 - alpha) on the energy. s_compute_pressure and f_pressure implement exactly this.
The mixture pressure is p = (1 - alpha_b) p_l + alpha_b (...), with p_l a single carrier-phase
pressure. The formulation does not define several distinct liquid components alongside the bubbles.
What the code does
Under bubbles_euler the void fraction is the last advection slot
(eqn_idx%alf = eqn_idx%adv%end), so the material slots are 1..num_fluids-1. The mixture rule is:
num_fluids |
mpp_lim |
coefficients |
| <= 2 |
either |
fluid 1's own, undiluted - matches the closure above |
| > 2 |
false |
sum_{i=1}^{N-1} alpha_i gamma_i, which is the liquid mixture diluted by (1 - alpha) |
| > 2 |
true |
sum_{i=1}^{N} alpha_i gamma_i, which includes the void slot |
The first row is the published closure. The second is not obviously it: for
Gamma_l p_l + Pi_l = (E - rho|u|^2/2)/(1 - alpha) to hold with Gamma_l the true liquid-mixture
value, that sum would need dividing by (1 - alpha), since the material volume fractions sum to
1 - alpha rather than 1. The third row folds the void's gammas(num_fluids) into the mixture and
relies on mpp_lim having renormalized the fractions.
Why it has not surfaced
No test in the suite runs bubbles_euler with num_fluids > 1 at all; #1762 adds a two-fluid case,
so the > 2 rows remain uncovered.
Suggested resolution
Decide which of these is intended:
bubbles_euler supports one carrier liquid only, and case_validator.py prohibits
num_fluids > 2 with a PHYSICS_DOCS entry. This matches the published model and is the smallest
change.
- A multi-component carrier is intended, in which case the
num_fluids > 2 arm needs the
(1 - alpha) normalization and a test that exercises it.
Until it is decided, num_fluids > 2 with bubbles_euler runs a closure nobody has validated.
case_validator.pyacceptsbubbles_eulerwith anynum_fluids, but the ensemble-averaged modelMFC implements is derived for a single carrier liquid, and the code's own arms disagree above two
fluids. Found while reviewing #1762.
What the model says
The liquid phase closure is
Gamma_landPi_inf,l, undiluted, with the void entering only through the1/(1 - alpha)on the energy.s_compute_pressureandf_pressureimplement exactly this.The mixture pressure is
p = (1 - alpha_b) p_l + alpha_b (...), withp_la single carrier-phasepressure. The formulation does not define several distinct liquid components alongside the bubbles.
What the code does
Under
bubbles_eulerthe void fraction is the last advection slot(
eqn_idx%alf = eqn_idx%adv%end), so the material slots are1..num_fluids-1. The mixture rule is:num_fluidsmpp_limsum_{i=1}^{N-1} alpha_i gamma_i, which is the liquid mixture diluted by(1 - alpha)sum_{i=1}^{N} alpha_i gamma_i, which includes the void slotThe first row is the published closure. The second is not obviously it: for
Gamma_l p_l + Pi_l = (E - rho|u|^2/2)/(1 - alpha)to hold withGamma_lthe true liquid-mixturevalue, that sum would need dividing by
(1 - alpha), since the material volume fractions sum to1 - alpharather than 1. The third row folds the void'sgammas(num_fluids)into the mixture andrelies on
mpp_limhaving renormalized the fractions.Why it has not surfaced
No test in the suite runs
bubbles_eulerwithnum_fluids > 1at all; #1762 adds a two-fluid case,so the
> 2rows remain uncovered.Suggested resolution
Decide which of these is intended:
bubbles_eulersupports one carrier liquid only, andcase_validator.pyprohibitsnum_fluids > 2with aPHYSICS_DOCSentry. This matches the published model and is the smallestchange.
num_fluids > 2arm needs the(1 - alpha)normalization and a test that exercises it.Until it is decided,
num_fluids > 2withbubbles_eulerruns a closure nobody has validated.