Skip to content

Commit 0f37542

Browse files
committed
fix: prohibit int_comp > 0 with model_eqns = 3 (THINC leaves int_en stale)
1 parent 3ebb1e3 commit 0f37542

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

src/simulation/m_checker.fpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ contains
3535
end if
3636

3737
call s_check_inputs_time_stepping
38+
call s_check_inputs_interface_compression
3839

3940
@:PROHIBIT(ib_state_wrt .and. .not. ib, "ib_state_wrt requires ib to be enabled")
4041

@@ -106,4 +107,13 @@ contains
106107

107108
end subroutine s_check_inputs_nvidia_uvm
108109

110+
!> Checks constraints on interface compression parameters
111+
impure subroutine s_check_inputs_interface_compression
112+
113+
@:PROHIBIT(int_comp /= 0 .and. model_eqns == 3, &
114+
& "int_comp > 0 is not supported with model_eqns = 3: THINC does not update " &
115+
& // "per-fluid internal energies, leaving thermodynamically inconsistent face states")
116+
117+
end subroutine s_check_inputs_interface_compression
118+
109119
end module m_checker

toolchain/mfc/case_validator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,14 @@ def check_interface_compression(self):
388388
int_comp = self.get("int_comp", 0)
389389
n = self.get("n", 0)
390390
num_fluids = self.get("num_fluids", 0)
391+
model_eqns = self.get("model_eqns", 2)
391392
self.prohibit(int_comp not in [0, 1, 2], "int_comp must be 0 (off), 1 (THINC), or 2 (MTHINC)")
392393
self.prohibit(int_comp == 2 and n == 0, "int_comp = 2 (MTHINC) requires at least 2D (n > 0)")
393394
self.prohibit(int_comp != 0 and num_fluids != 2, "int_comp > 0 requires num_fluids = 2")
395+
self.prohibit(
396+
int_comp != 0 and model_eqns == 3,
397+
"int_comp > 0 is not supported with model_eqns = 3: THINC does not update per-fluid internal energies, leaving thermodynamically inconsistent face states",
398+
)
394399

395400
recon_type = self.get("recon_type", 1)
396401
if recon_type == 1: # WENO

0 commit comments

Comments
 (0)