Skip to content

Commit 4b3db25

Browse files
cleaned up test a bit
1 parent d1abcb9 commit 4b3db25

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/engines_gpl/dsle/packages/tests/test_sealock.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ test_sealock_update__phase_wise__constituent_flush_doors_closed_below_lake_conce
11021102
// Verifies the CSTR model correctly handles c_lock < c_lake — the concentration
11031103
// in the lock is BELOW the inflow concentration, so flushing must INCREASE it.
11041104
//
1105-
// The old dsle.c-mirrored formula gave lam < 0 here, causing an exponentially
1105+
// If the lambda model would be used it would give lam < 0 here, causing an exponentially
11061106
// growing (unbounded) concentration. Q/V is always positive so it always converges.
11071107
//
11081108
// Setup: vol_lock = 5000 m3, Q = 10 m3/s, t = 60s, lam = Q/V = 0.002 s-1
@@ -1142,8 +1142,6 @@ test_sealock_update__phase_wise__constituent_flush_doors_closed_below_lake_conce
11421142
double lam = 10.0 / vol;
11431143
double expected = 20.0 + (5.0 - 20.0) * exp(-lam * 60.0);
11441144
TEST_ASSERT_DOUBLE_WITHIN(1e-6, expected, lock.constituent_lock[1]);
1145-
TEST_ASSERT_TRUE(lock.constituent_lock[1] > 5.0); // moved toward c_lake
1146-
TEST_ASSERT_TRUE(lock.constituent_lock[1] < 20.0); // didn't overshoot
11471145
}
11481146

11491147
int main(void) {

0 commit comments

Comments
 (0)