Summary
When int_comp > 0 is combined with viscous = T or surface_tension = T, interface compression is silently disabled — no error, no warning, no sharpening.
Root cause
In m_rhs.fpp, the reconstruction path splits into multiple s_reconstruct_cell_boundary_values calls with disjoint variable index ranges when viscosity or surface tension is enabled:
# Viscous case (Re_size > 0):
call s_reconstruct(vf(1 : cont%end), ...) ! partial densities only
call s_reconstruct(vf(E : sys_size), ...) ! energy + adv (volume fractions)
# Surface tension case:
call s_reconstruct(vf(1 : E-1), ...) ! cont + mom
call s_reconstruct_first_order(vf(E), ...) ! energy
call s_reconstruct(vf(E+1 : sys_size), ...) ! adv (volume fractions)
Inside s_weno and s_muscl, compression is guarded by:
if (int_comp > 0 .and. v_size >= eqn_idx%adv%end) then
call s_thinc_compression(...)
end if
v_size = ubound(v_vf, 1) for the current slice. In the split paths, no single slice contains both cont (needed for density ratios) and adv (volume fractions), so v_size >= eqn_idx%adv%end is never true and compression never fires.
Current mitigation (merged in PR #1303)
check_interface_compression in toolchain/mfc/case_validator.py now prohibits these combinations explicitly:
self.prohibit(int_comp != 0 and viscous,
"int_comp > 0 is not supported with viscosity (reconstruction is split; compression would be silently skipped)")
self.prohibit(int_comp != 0 and surface_tension,
"int_comp > 0 is not supported with surface tension (reconstruction is split; compression would be silently skipped)")
This turns a silent wrong result into a clear error at validation time.
What full support would require
To actually support int_comp with viscosity or surface tension, the reconstruction in m_rhs would need to be restructured so that cont and adv variables are always reconstructed together in a single WENO/MUSCL call when int_comp > 0, allowing s_thinc_compression to access both sets of variables at once. This is non-trivial and warrants its own PR.
Summary
When
int_comp > 0is combined withviscous = Torsurface_tension = T, interface compression is silently disabled — no error, no warning, no sharpening.Root cause
In
m_rhs.fpp, the reconstruction path splits into multiples_reconstruct_cell_boundary_valuescalls with disjoint variable index ranges when viscosity or surface tension is enabled:Inside
s_wenoands_muscl, compression is guarded by:v_size = ubound(v_vf, 1)for the current slice. In the split paths, no single slice contains bothcont(needed for density ratios) andadv(volume fractions), sov_size >= eqn_idx%adv%endis never true and compression never fires.Current mitigation (merged in PR #1303)
check_interface_compressionintoolchain/mfc/case_validator.pynow prohibits these combinations explicitly:This turns a silent wrong result into a clear error at validation time.
What full support would require
To actually support
int_compwith viscosity or surface tension, the reconstruction inm_rhswould need to be restructured so thatcontandadvvariables are always reconstructed together in a single WENO/MUSCL call whenint_comp > 0, allowings_thinc_compressionto access both sets of variables at once. This is non-trivial and warrants its own PR.