pydynamicestimator.tests.test_post_fault_omega_modes ==================================================== .. py:module:: pydynamicestimator.tests.test_post_fault_omega_modes .. autoapi-nested-parse:: Regression tests: simulation must stay finite and bounded after a fault for every reference-frame mode (nom, coi, single, dist) and both line_dyn settings. Covers the bug where DaeSim.exec_dist() rebuilt self.x via init_symbolic() but did not refresh self.omega_ref_*_expr, leaving the post-fault integrator substituting placeholders with expressions that referenced the pre-rebuild SX symbols. The symptom was post-fault divergence or garbage trajectories for every omega_mode except 'nom' (whose ω_ref is a numeric constant). Attributes ---------- .. autoapisummary:: pydynamicestimator.tests.test_post_fault_omega_modes.FIXTURE_ROOT Functions --------- .. autoapisummary:: pydynamicestimator.tests.test_post_fault_omega_modes._base_config pydynamicestimator.tests.test_post_fault_omega_modes._omega_state_indices pydynamicestimator.tests.test_post_fault_omega_modes._assert_post_fault_healthy pydynamicestimator.tests.test_post_fault_omega_modes.test_open_line_post_fault pydynamicestimator.tests.test_post_fault_omega_modes.test_bus_fault_post_clear Module Contents --------------- .. py:data:: FIXTURE_ROOT .. py:function:: _base_config(omega_mode: str, line_dyn: bool, testsystemfile: str) .. py:function:: _omega_state_indices(sim) -> list[int] Return indices of states whose name ends in '_omega' (synchronous-machine rotor speeds and similar). Used as a sanity-check probe. .. py:function:: _assert_post_fault_healthy(sim, fault_time: float) -> None .. py:function:: test_open_line_post_fault(omega_mode: str, line_dyn: bool) -> None 3_bus_lineopen: OPEN_LINE at t=1.0s. Sim must complete and stay sane. .. py:function:: test_bus_fault_post_clear(omega_mode: str, line_dyn: bool) -> None 3_bus_busfault: FAULT_BUS at t=1.0s, CLEAR at t=1.04s. Sim must complete and recover to plausible state.