Add physics state dataclasses

Define frozen dataclasses for ThermalState and ElectricalState to
represent immutable simulation state snapshots.
This commit is contained in:
2025-02-15 19:51:02 +00:00
parent 85a0122e19
commit 9a6242c720

View File

@@ -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