Commit Graph

10 Commits

Author SHA1 Message Date
6b9922a8ae Refactor DUTModel from Protocol to ABC for explicit interface implementation 2025-12-02 22:11:48 +00:00
e36349c853 Fix linting and type errors for CI
All checks were successful
CI / Lint (push) Successful in 4s
CI / Type Check (push) Successful in 16s
CI / Test (push) Successful in 9s
CI / Release (push) Has been skipped
- Use X | None syntax instead of Optional[X] (UP045)
- Sort imports in dashboard app (I001)
- Remove unnecessary UTF-8 encoding argument (UP012)
- Add 'from err' to exception re-raises (B904)
- Remove unused imports in integration tests (F401)
- Fix useless expression in test (B018)
- Cast **1.5 result to float in LDO model (mypy no-any-return)
- Use functools.partial instead of lambda in server (mypy misc)
2025-12-02 16:22:57 +00:00
1429bf34a7 Implement physics engine stepping
Full implementation of step() method with thermal-electrical coupling:
- Chamber temperature first-order response to setpoint
- Case temperature with self-heating via thermal calculations
- Junction temperature from θ_jc thermal resistance
- Electrical state from temperature-dependent DUT model
- Default LDO model when none provided
2025-12-02 02:57:19 +00:00
151ad8d673 Implement LDO DUT model
Temperature-dependent LDO voltage regulator model with:
- Output voltage tempco (ppm/°C)
- Quiescent current tempco
- Dropout voltage temperature dependence
- Power dissipation calculation (Vin-Vout)*Iload + Vin*Iq
- Dropout detection

Implements DUTModel protocol for physics engine integration.
2025-12-02 02:56:19 +00:00
37b3ca912a Implement thermal calculation functions
Pure functions for first-order thermal response calculations:
- Temperature derivative and update using Euler integration
- Case temperature with self-heating via θ_ca
- Junction temperature calculation via θ_jc
- Steady-state junction temperature helper
2025-12-02 02:55:07 +00:00
47d02f6a12 Rename models.py to state.py to avoid conflict with models/ directory
The models.py file conflicts with the models/ subdirectory when
importing. Renamed to state.py for clarity.
2025-12-02 02:38:25 +00:00
13a7516773 Add physics engine stub
Define PhysicsEngine class with stub methods for thermal-electrical
simulation. Methods return placeholder values; full implementation
will be added in Sprint 3.
2025-12-02 02:21:44 +00:00
65f57ccf86 Add DUT model protocol
Define the DUTModel Protocol interface that all device models must
implement to integrate with the physics engine.
2025-12-02 02:21:01 +00:00
2edb7b7c10 Add physics state dataclasses
Define frozen dataclasses for ThermalState and ElectricalState to
represent immutable simulation state snapshots.
2025-12-02 02:20:22 +00:00
99f70bb23b Restructure package for domain-driven design
Reorganise package structure to improve separation of concerns:
- instruments/ - SCPI, transport, drivers, interfaces, factory
- simulation/ - physics engine, virtual instruments, server
- framework/ - test runner, logger, limits, context
- tests/ - thermal/, electrical/ (DVT test implementations)
- data/ - repository, models
- reporting/ - generator, templates
- app/ - CLI, config, dashboard

This structure enables:
- Reusable instruments package for other test suites
- Clear separation of simulation (dev) vs production code
- Domain-focused package organisation

Updated documentation to reflect new paths.
2025-12-02 01:53:33 +00:00