text stringlengths 0 156 |
|---|
PASSED ::test_solver_is_a_real_computation |
PASSED ::test_wave_speed_matches_elastic_formula_and_material_ordering |
PASSED ::test_dynamics_kinematics_cross_invariants |
PASSED ::test_numerical_vs_physical_damping_audit |
PASSED ::test_friction_damping_ordering |
PASSED ::test_fast_vs_slow_surge_contrast |
PASSED ::test_cavitation_margin_contrast |
PASSED ::test_held_out_solver_generalizes |
PASSED ::test_no_leaked_reference_artifacts |
FAILED ::test_each_config_matches_independent_recompute - AssertionError: con... |
========================= 1 failed, 11 passed in 3.52s ========================= |
============================= test session starts ============================== |
platform linux -- Python 3.12.13, pytest-8.4.1, pluggy-1.6.0 -- /usr/local/bin/python3 |
rootdir: /app |
configfile: ../dev/null |
plugins: json-ctrf-0.3.5 |
collecting ... collected 12 items |
::test_frozen_instance_untampered PASSED [ 8%] |
::test_results_present_and_complete PASSED [ 16%] |
::test_solver_is_a_real_computation PASSED [ 25%] |
::test_each_config_matches_independent_recompute FAILED [ 33%] |
::test_wave_speed_matches_elastic_formula_and_material_ordering PASSED [ 41%] |
::test_dynamics_kinematics_cross_invariants FAILED [ 50%] |
::test_numerical_vs_physical_damping_audit FAILED [ 58%] |
::test_friction_damping_ordering PASSED [ 66%] |
::test_fast_vs_slow_surge_contrast PASSED [ 75%] |
::test_cavitation_margin_contrast PASSED [ 83%] |
::test_held_out_solver_generalizes FAILED [ 91%] |
::test_no_leaked_reference_artifacts PASSED [100%] |
=================================== FAILURES =================================== |
________________ test_each_config_matches_independent_recompute ________________ |
def test_each_config_matches_independent_recompute(): |
LOGS.mkdir(parents=True, exist_ok=True) |
summary = [] |
for cfg, rec in _iter_configs(): |
where = f"config {cfg['id']}" |
ref = ref_observables(cfg) |
> check_config_quantities(rec, ref, where) |
/verifier/test_outputs.py:472: |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
rec = {'H_max_mid': 117.74768951947576, 'H_max_valve': 117.7476895194767, 'H_min_valve': 2.252310480523203, 'H_valve0': 60.0, ...} |
ref = {'H_max_mid': 117.7476895194757, 'H_max_valve': 117.7476895194757, 'H_min_valve': 2.252310480524298, 'H_valve0': 60.0, ...} |
where = 'config steel_frictionless_cr08_trap' |
def check_config_quantities(rec, ref, where): |
"""Every reported quantity matches the independent recompute (or is null iff the |
reference quantity is null).""" |
for key in CORE_KEYS: |
assert key in rec, f"{where}: missing key {key!r}" |
rel, ab = TOL[key] |
rv, ov = rec[key], ref[key] |
if ov is None: |
assert rv is None, f"{where}: {key} should be null (undefined for this regime), got {rv}" |
continue |
assert rv is not None, f"{where}: {key} must not be null (reference={ov})" |
> assert approx(rv, ov, rel, ab), ( |
f"{where}: {key} = {rv} vs reference {ov} (rel {rel}, abs {ab})") |
E AssertionError: config steel_frictionless_cr08_trap: decay_rate = 0.0 vs reference 0.013488555886666413 (rel 0.25, abs 0.003) |
E assert False |
E + where False = approx(0.0, 0.013488555886666413, 0.25, 0.003) |
/verifier/test_outputs.py:396: AssertionError |
__________________ test_dynamics_kinematics_cross_invariants ___________________ |
def test_dynamics_kinematics_cross_invariants(): |
"""Interlocking consistency relations among the independently reported quantities.""" |
for cfg, rec in _iter_configs(): |
where = f"config {cfg['id']}" |
a = float(rec["a_wave"]); V0 = float(rec["V0"]); g = float(cfg.get("g", G)); L = float(cfg["L"]) |
# 1) Joukowsky relation between reported dH and reported a, V0 |
assert approx(rec["dH_joukowsky"], a * V0 / g, 1.0e-4, 0.0), f"{where}: dH_joukowsky != a V0/g" |
# 2) surge_ratio is the reported head rise normalised by the reported Joukowsky head |
sr_check = (float(rec["H_max_valve"]) - float(rec["H_valve0"])) / float(rec["dH_joukowsky"]) |
assert approx(rec["surge_ratio"], sr_check, 5.0e-3, 5.0e-3), f"{where}: surge_ratio inconsistent with heads" |
# 3) oscillation period equals the wave round trip 4L/a |
assert approx(float(rec["T_osc"]) * a, 4.0 * L, 0.035, 0.0), f"{where}: T_osc * a != 4L" |
# 4) front-arrival lag valve->midpoint equals (L/2)/a where a sharp front exists |
if rec["phase_lag_mid"] is not None: |
> assert approx(rec["phase_lag_mid"], 0.5 * L / a, 0.06, 2.0 * L / a / float(cfg["N_reaches"])), ( |
f"{where}: phase_lag_mid != (L/2)/a") |
E AssertionError: config steel_frictionless_cr08_trap: phase_lag_mid != (L/2)/a |
E assert False |
E + where False = approx(0.6362159301214858, ((0.5 * 1837.0) / 1258.89963152457), 0.06, (((2.0 * 1837.0) / 1258.89963152457) / 200.0)) |
E + where 200.0 = float(200) |
/verifier/test_outputs.py:512: AssertionError |
___________________ test_numerical_vs_physical_damping_audit ___________________ |
def test_numerical_vs_physical_damping_audit(): |
"""The central methodological stake: exact-Courant conserves energy while the Cr<1 |
interpolation trap dissipates it, even though BOTH lines are frictionless.""" |
by_id = load_results() |
cons = by_id[ID_CONSERVATION]; trap = by_id[ID_TRAP] |
assert float(cons["energy_drift"]) < 1.0e-6, "exact-Courant frictionless run must conserve energy" |
assert float(trap["energy_drift"]) > 1.0e-2, "Cr<1 interpolation must dissipate energy" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.