/** * Pure first-order package thermal physics. * * The lumped junction/body model is: * * T_inf = T_ambient + P_dissipated * R_theta_JA * T_next = T_inf + (T_previous - T_inf) * exp(-dt / tau) * tau = R_theta_JA * C_thermal * * A caller may provide either `timeConstantS` directly or thermal capacitance * `thermalCapacitanceJPerC`; an explicit time constant takes precedence. This * is a one-pole teaching model, not a replacement for a package's multi-pole * transient thermal-impedance graph. * * Continuous power derating follows the standard thermal constraint: * * P_thermal_max(Ta) = max(0, (Tj_continuous_max - Ta) / R_theta_JA) * P_allowed = min(P_rated, P_thermal_max) * * Sources for package limits and typical RθJA values: * - TI LM7805/LM340: https://www.ti.com/lit/ds/symlink/lm7800.pdf * - TI LM317: https://www.ti.com/lit/ds/symlink/lm317.pdf * - TI LM358: https://www.ti.com/lit/ds/symlink/lm358.pdf * - TI LM386: https://www.ti.com/lit/ds/symlink/lm386.pdf * - Microchip MCP6002: https://ww1.microchip.com/downloads/aemDocuments/documents/MSLD/ProductDocuments/DataSheets/MCP6001-1R-1U-2-4-1-MHz-Low-Power-Op-Amp-DS20001733L.pdf * - AMS1117 family: https://www.advanced-monolithic.com/products/voltreg.html * - Kingbright 5 mm LED example: https://www.kingbrightusa.com/images/catalog/spec/wp7113id.pdf * - Vishay/IEC resistor derating explanation: https://www.vishay.com/en/landingpage/rifaq/index.html * * Datasheets rarely specify a single package time constant, shutdown restart * threshold, or breadboard/module RθJA. Those values are explicitly marked as * assumptions in each profile and surfaced as warnings. */ export type ThermalProfileId = "lm7805-to220" | "ams1117-sot223-module" | "lm317-to220-module" | "lm358-pdip8" | "mcp6002-pdip8" | "lm386-pdip8" | "axial-resistor-quarter-watt" | "led-5mm-through-hole" | "generic-thermal-device"; export type ThermalDeviceClass = "linear-regulator" | "analog-ic" | "resistor" | "led" | "generic"; export interface ThermalNetwork { /** Junction/body-to-ambient thermal resistance. */ rThetaJA_CPerW: number; /** Optional lumped heat capacity. Used when timeConstantS is absent. */ thermalCapacitanceJPerC?: number; /** Optional first-order time constant. Takes precedence over Cth. */ timeConstantS?: number; } export interface ThermalShutdownThresholds { tripTemperatureC: number; restartTemperatureC: number; } export interface ThermalValidityBounds { recommendedAmbientTemperatureC: { min: number; max: number; }; maximumContinuousJunctionTemperatureC: number; absoluteMaximumJunctionTemperatureC: number; rThetaJACondition: string; } export interface ThermalDeviceProfile { id: ThermalProfileId; catalogUid: string | null; label: string; deviceClass: ThermalDeviceClass; network: ThermalNetwork; /** Nameplate/package power rating before ambient/package derating. */ ratedPowerW: number | null; shutdown: ThermalShutdownThresholds | null; validity: ThermalValidityBounds; warnings: readonly string[]; } export interface ResolveThermalProfileInput { catalogUid?: string | null; /** Generic fallback assumptions only. */ fallbackRThetaJA_CPerW?: number; fallbackThermalCapacitanceJPerC?: number; fallbackTimeConstantS?: number; fallbackRatedPowerW?: number; fallbackMaximumContinuousJunctionC?: number; fallbackAbsoluteMaximumJunctionC?: number; fallbackAmbientTemperatureC?: { min: number; max: number; }; fallbackShutdown?: ThermalShutdownThresholds | null; } export interface ThermalProfileResolution { profile: ThermalDeviceProfile; source: "exact-catalog-uid" | "generic-fallback"; requestedCatalogUid: string | null; warning: string | null; } export interface ThermalDeviceState { temperatureC: number; thermalShutdown: boolean; } export interface ThermalPowerDerating { ambientTemperatureC: number; thermalLimitPowerW: number; allowedPowerW: number; deratingFactor: number | null; ambientWithinRecommendedRange: boolean; warnings: string[]; } export interface ThermalStepInput { ambientTemperatureC: number; dissipatedPowerW: number; dtSeconds: number; /** Optional installed-package/heatsink override. */ network?: ThermalNetwork; } export interface ThermalStepResult { state: ThermalDeviceState; targetTemperatureC: number; timeConstantS: number; shutdownTransition: "entered" | "exited" | null; derating: ThermalPowerDerating; withinContinuousLimits: boolean; warnings: string[]; } /** * Snapshot of the exact-uid profile map for the ACTIVE part library. * Replaces simcore's module-init THERMAL_PROFILES_BY_CATALOG_UID constant: * a constant cannot be injection-reactive, so the map is now behind a call. */ export declare function thermalProfilesByCatalogUid(): Readonly>; export declare function resolveThermalProfile(input?: ResolveThermalProfileInput): ThermalProfileResolution; export declare function thermalTimeConstantS(network: ThermalNetwork): number; export declare function createThermalState(ambientTemperatureC?: number, thermalShutdown?: boolean): ThermalDeviceState; export declare function thermalPowerDerating(profile: ThermalDeviceProfile, ambientTemperatureC: number, network?: ThermalNetwork): ThermalPowerDerating; export declare function stepThermalDevice(profile: ThermalDeviceProfile, previous: ThermalDeviceState, input: ThermalStepInput): ThermalStepResult;