research: Dütsch driver — continuous settling, domain criteria, profile coverage
common_window requires every pair from each case's own K_case to K+2; a-priori domain criteria against the 60 D reference (separate from Table 1); bilinear sampling returns the original fluid corner weight sum; analysis time-averages bin samples, reports coverage/missing points and fails closed on an empty common profile set; cases run to the end of cycle 11. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6f95c34c0b
commit
b31a6141b3
5 files changed
+79
-32
No files matched your search
@@ -38,19 +38,22 @@ def test_settling_and_common_window():
|
||||
assert p.common_window([7, 10], [passes, passes]) is None # K + 2 = 12 beyond the cap
|
||||
assert p.common_window([7, None], [passes, passes]) is None
|
||||
assert p.common_window([7, 7], [passes, dict(passes, **{8: False})]) is None # must stay settled
|
||||
# a case settled early must keep passing while waiting for the common K
|
||||
assert p.common_window([7, 9], [dict(passes, **{8: False}), passes]) is None
|
||||
|
||||
|
||||
def test_solid_aware_bilinear():
|
||||
field = np.arange(16.0).reshape(4, 4)
|
||||
fluid = np.ones((4, 4), bool)
|
||||
value, used = p.bilinear_fluid(field, fluid, 1.25, 1.5)
|
||||
assert value == pytest.approx(0.75 * 0.5 * (5 + 9) + 0.25 * 0.5 * (6 + 10))
|
||||
value, used, total = p.bilinear_fluid(field, fluid, 1.25, 1.5)
|
||||
assert total == pytest.approx(1.0) and value == pytest.approx(0.75 * 0.5 * (5 + 9) + 0.25 * 0.5 * (6 + 10))
|
||||
fluid[1, 1] = False # one solid corner
|
||||
value, used = p.bilinear_fluid(field, fluid, 1.25, 1.5)
|
||||
value, used, total = p.bilinear_fluid(field, fluid, 1.25, 1.5)
|
||||
assert total == pytest.approx(1.0 - 0.75 * 0.5)
|
||||
assert all(not (i == 1 and j == 1) for i, j, _ in used)
|
||||
assert sum(w for *_, w in used) == pytest.approx(1.0)
|
||||
fluid[:] = False
|
||||
assert p.bilinear_fluid(field, fluid, 1.25, 1.5) == (None, ())
|
||||
assert p.bilinear_fluid(field, fluid, 1.25, 1.5) == (None, (), 0.0)
|
||||
|
||||
|
||||
def test_interval_bases_and_morison_fit_recover_known_coefficients():
|
||||
|
||||
Reference in new issue
Block a user