- See part “3 Fully discrete approximation” in Lecture 3 - Finite Volume Discretization of the Heat Equation
\frac{\partial T}{\partial t} = A \times T + S(t)
Time discretization using theta-method (time step k): \frac{\partial T}{\partial t} = f(t,\, T)
\frac{T^{k+1}-T^k}{dt} \approx \theta\, f(t^{k+1},\, T^{k+1}) + (1-\theta)\, f(t^{k},\, T^{k})
where \theta is a constant chosen between 0 and 1.
\begin{aligned} T^{k+1} - T^{k} &= \theta\, dt \left[ A \, T^{k+1} + S^{k+1} \right] + (1-\theta)\, dt \left[ A \, T^{k} + S^{k} \right] \\ \left[ I - \theta\, dt\, A \right] T^{k+1} &= \theta\, dt \, S^{k+1} + (1-\theta)\, dt \left[ A \, T^{k} + S^{k} \right] + T^k \\ \left[ I - \theta\, dt\, A \right] T^{k+1} &= \left[I + (1-\theta)\, dt \,A \right] T^{k} + \left( \theta \, S^{k+1} + (1-\theta)\, S^{k} \right) dt \end{aligned}
T^{k+1} is solved for using the backslash operator
“Remark 2: The Crank-Nicolson scheme is second order accurate but gives slowly decaying oscillations for large eigenvalues. It is unsuitable for parabolic problems with rapidly decayingtransients. The \theta=1 scheme damps all components, and should be used in the initial steps.” from http://www.csc.kth.se/utbildning/kth/kurser/DN2255/ndiff13/Lecture3.pdf)
code Python (& Julia) de simulation thermique dynamique (du bâtiment)
pvlib
Le modèle est l’équivalent d’un circuit électrique de résistances et condensateurs.
Système d’équations différentielles linéaires:
M dT/dt = K × T(t) + S(t)
avec T
le vecteur de température des noeuds du réseau, M
les masses thermiques, K
la matrice de connections entre les noeuds (conduction & convection) et S
les termes extérieures (sources).
«Solving inverse problems in building physics: an overview ofguidelines for a careful and optimal use of data» S. Rouchier (2018), Energy and Buildings, vol. 166, p. 178-195
https://hal.archives-ouvertes.fr/hal-01739623/document
http://henrikmadsen.org/wp-content/uploads/2014/05/Journal_article_-1995-_Estimation_of_continuous-time_models_for_the_heat_dynamics_of_a_building.pdf