diff --git a/src/py_dvt_ate/simulation/physics/models/base.py b/src/py_dvt_ate/simulation/physics/models/base.py new file mode 100644 index 0000000..c2fed0b --- /dev/null +++ b/src/py_dvt_ate/simulation/physics/models/base.py @@ -0,0 +1,61 @@ +"""Base protocol for Device Under Test (DUT) models. + +Defines the interface that all DUT models must implement to integrate +with the physics engine. +""" + +from typing import Protocol, runtime_checkable + + +@runtime_checkable +class DUTModel(Protocol): + """Protocol for DUT electrical/thermal models. + + DUT models encapsulate the temperature-dependent electrical behaviour + of a device, enabling realistic simulation of thermal-electrical coupling. + + All temperature parameters are in degrees Celsius. + All voltage parameters are in volts. + All current parameters are in amps. + All power parameters are in watts. + """ + + def calculate_output_voltage(self, junction_temperature: float) -> float: + """Calculate the output voltage at the given junction temperature. + + Args: + junction_temperature: DUT junction temperature in degrees Celsius. + + Returns: + Output voltage in volts. + """ + ... + + def calculate_quiescent_current(self, junction_temperature: float) -> float: + """Calculate the quiescent current at the given junction temperature. + + Args: + junction_temperature: DUT junction temperature in degrees Celsius. + + Returns: + Quiescent current in amps. + """ + ... + + def calculate_power_dissipation( + self, + input_voltage: float, + load_current: float, + junction_temperature: float, + ) -> float: + """Calculate the power dissipation for given operating conditions. + + Args: + input_voltage: Input voltage in volts. + load_current: Load current in amps. + junction_temperature: DUT junction temperature in degrees Celsius. + + Returns: + Power dissipation in watts. + """ + ...