From 2edb7b7c103ef8517361a6f9e6385d37e891bbb3 Mon Sep 17 00:00:00 2001 From: Kai Chappell Date: Tue, 2 Dec 2025 02:20:22 +0000 Subject: [PATCH] Add physics state dataclasses Define frozen dataclasses for ThermalState and ElectricalState to represent immutable simulation state snapshots. --- src/py_dvt_ate/simulation/physics/models.py | 48 +++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/py_dvt_ate/simulation/physics/models.py diff --git a/src/py_dvt_ate/simulation/physics/models.py b/src/py_dvt_ate/simulation/physics/models.py new file mode 100644 index 0000000..d8d7c4c --- /dev/null +++ b/src/py_dvt_ate/simulation/physics/models.py @@ -0,0 +1,48 @@ +"""Physics state dataclasses for thermal-electrical simulation. + +These immutable state snapshots represent the simulation state at a point in time. +""" + +from dataclasses import dataclass + + +@dataclass(frozen=True) +class ThermalState: + """Immutable thermal state snapshot. + + Represents the thermal conditions of the DUT and its environment + at a specific point in simulation time. + + Attributes: + chamber_temperature: Chamber air temperature in degrees Celsius. + case_temperature: DUT case/package temperature in degrees Celsius. + junction_temperature: DUT junction/die temperature in degrees Celsius. + timestamp: Simulation time in seconds since start. + """ + + chamber_temperature: float + case_temperature: float + junction_temperature: float + timestamp: float + + +@dataclass(frozen=True) +class ElectricalState: + """Immutable electrical state snapshot. + + Represents the electrical conditions of the DUT at a specific + point in simulation time. + + Attributes: + input_voltage: DUT input voltage in volts. + output_voltage: DUT output voltage in volts. + load_current: Load current drawn from DUT in amps. + quiescent_current: DUT quiescent/bias current in amps. + power_dissipation: Total power dissipated by DUT in watts. + """ + + input_voltage: float + output_voltage: float + load_current: float + quiescent_current: float + power_dissipation: float