Skip to main content

Module thermodynamics

Module thermodynamics 

Source
Expand description

Thermodynamics & Statistical Ensembles Implements pure Rust Markov Chain Monte Carlo (MCMC) sampling for macroscopic properties.

Structs§

EnsembleState
State of a thermodynamic ensemble
LithiumPack
An off-grid lithium pack as an S×P array of prismatic cells, modelled as a first-order equivalent circuit (OCV − I·R sag). Captures the “down to the internal 4-prismatic-cell architecture” requirement: terminal voltage and deliverable power depend on the series/parallel topology, per-cell internal resistance, and SoC under a fluctuating load.
SolarPanel
A solar panel on a simplified single-knee I-V curve (I_sc scales with irradiance; fill_factor sets the knee sharpness ∝ panel/impedance quality).
ThermodynamicSampler
Computes thermodynamic macroscopic properties from discrete structures via MCMC.

Functions§

array_mppt_power
Total MPP power (W) harvested from a mixed-topology array — the sum of each panel’s independently-tracked maximum power point. Zero-heap (slice in, scalar out).
heat_loss_rate
Conductive/convective heat-loss rate (W) through an envelope: Q = U·A·ΔT.
phase_change_energy
Latent heat (J) of a phase change for mass_kg at specific latent heat latent_heat_j_kg — the multi-phase (boiling/condensing/melting) energy term that sits alongside the sensible Q = U·A·ΔT loss.
thermal_efficiency
Thermal efficiency of a heating/cooling system delivering useful_power_w against an envelope loss U·A·ΔT: η = useful / (useful + loss), in 0..1. Models the efficiency drop-off in constrained / mobile / pop-up infrastructure (thin envelope ⇒ high U ⇒ low η).