27 releases

Uses old Rust 2015

0.10.2 Jul 17, 2016
0.10.0 Jun 17, 2016
0.9.2 Feb 5, 2016
0.9.1 Oct 19, 2015
0.0.16 Mar 6, 2015

#681 in Science

Download history 1/week @ 2024-02-13 7/week @ 2024-02-20 13/week @ 2024-02-27 2/week @ 2024-03-05 8/week @ 2024-03-12 7/week @ 2024-03-19 2/week @ 2024-03-26 42/week @ 2024-04-02

52 downloads per month


412 lines

Temperature Version Status

The package provides a temperature simulator.



Your contribution is highly appreciated. Do not hesitate to open an issue or a pull request. Note that any contribution submitted for inclusion in the project will be licensed according to the terms given in LICENSE.md.


Temperature simulator.


Temperature simulation is based on the well-known analogy between electrical and thermal circuits. Given a system with units processing elements, an equivalent thermal RC circuit with nodes thermal nodes is constructed. The circuit is then used for modeling the thermal behavior of the system. Concretely, the thermal behavior is described using the following system of differential-algebraic equations:

Cth -- + Gth (T - Tamb) = Mp P

Q = Mq T


  • Cth is a nodes × nodes diagonal matrix of the thermal capacitance;

  • Gth is a nodes × nodes symmetric, positive-definite matrix of the thermal conductance;

  • T is a nodes-element vector of the temperature of the thermal nodes;

  • Tamb is a nodes-element vector of the ambient temperature;

  • P is a units-element vector of the power dissipation of the processing elements;

  • Mp is a nodes × units matrix that distributes the power dissipation of the processing elements onto the thermal nodes;

  • Q is a spots-element vector of the temperature of interest; and

  • Mq is a spots × nodes matrix that aggregates the temperature of the thermal nodes into the temperature of interest.


The original system is transformed into the following:

-- = A S + B P

Q = C S + Mq Tamb


S = D^(-1) (T - Tamb),
A = -D Gth D,
B = D Mp,
C = Mq D, and
D = Cth^(-1/2).

The eigendecomposition of A, which is real and symmetric, is

A = U diag(Λ) U^T.

For a short time interval [0, Δt], the solution is obtained using the following equation:

S(t) = E S(0) + F P(0)


E = exp(A Δt) = U diag(exp(λi Δt)) U^T and
F = A^(-1) (exp(A Δt) - I) B = U diag((exp(λi Δt) - 1) / λi) U^T B.

The solution makes use of the assumption that Δt, referred to as the time step, is short enough so that the power dissipation does not change much within [0, Δt]. In order to compute the temperature profile corresponding for the whole time span of interest, the time span is split into small subintervals, and the above equation is successively applied to each of them.


~120K SLoC