# Question:Applying thermostat control to heat equations using dsolve/event

## Question:Applying thermostat control to heat equations using dsolve/event

Maple

Hi everybody,

I already discussed my tasks with @Preben Alsholm. Therefore, I decided to share it with you and try to finalize solution.

Actually, I want to calculate heat dynamics transfer between one, two or more rooms. Hence, I used heat balance approach to set the system of differential equations:

eq1:=C1*diff(T1(t),t)=U12*A1*(T1(t)-T2(t))+U13*A2*(T1(t)-T3(t))+H1(t);
eq2:=C2*diff(T2(t),t)=U21*A1*(T1(t)-T2(t))+U23*A2*(T2(t)-T2(t))+H2(t);

ics:=T1(0)=Ta, T2(0)=Tb;
res:=dsolve({eq1,eq2, ics},params);

T3(t),H1(t) and H2(t) are functions over time noted as outside temperature and heat sources in rooms. My primary tasks are solving system in discrete time of 15 or 30 minutes and apply thermostat control since I could control heater activity. Otherwise, temperatures will be so high in all rooms. I used numerical method to solve system in discrete time but I obtained the same results as in the continous time.

Does somebody could help me how to apply thermostat control with dsolve/events? Furthermore, I would like to apply thermostat which not react immediately after temperature reaches given boundary temperatures but more to keep heater stable for a few time intervals?

Thanks a lot!

﻿