An equation to describe a process of heating one room using hotter air from another room There are two rooms completly isolated from the outer world (a closed system, no heat losses). They are connected with each other through a ventilation tube. Temperature in room A is 32 degrees Celsious (for example), temperature in room B is 15 degrees Celsious. Ventilator in the tube starts to transfer hot air from room A to room B. I need to make an equation which would describe the process of heating room B in time. My later plans are to model this in MATLAB.
As far as I understand the equation should include volumes of the rooms, speed of the air flow, etc.
I myself have little knowledge of these things, any help, links, clarifications will be highly appreciated!
Thanks!

Update 1: I imagine MATLAB model as a combination of room A, B, and the ventialtor between them. Room A has a volume, and temp, room B as well, during each point in time after ventilator starts working with a certain speed I would see drop of temperature in room A and an increase in room B. 
  Update 2: There should also be a second tube with a ventilator that would take cold air from room B to room A.

 A: If you have a volume of air $V$ at temperature $T_B$, then you replace a part of that air with air of volume $\Delta V$ and temperature $T_A$, then the new average temperature is a weighted average of the temperatures of the room's air and the new air.
$$T_B(t+\Delta t) = \frac{(V-\Delta V) T_B(t) + \Delta V T_A(t)}{V}$$
We get a symmetrical expression for the air in the other room:
$$T_A(t+\Delta t) = \frac{(V-\Delta V) T_A(t) + \Delta V T_B(t)}{V}$$
Simplifying...
$$T_B(t+\Delta t) - T_B(t) = \frac{\Delta V}{V} (T_A(t) - T_B(t))$$
$$T_A(t+\Delta t) - T_A(t) = \frac{\Delta V}{V} (T_B(t) - T_A(t))$$
If we divide both sides by the time interval $\Delta t$ it takes for this volume $\Delta V$ to transfer,
$$\frac{T_B(t+\Delta t) - T_B(t)}{\Delta t} = \frac{\Delta V}{\Delta t} \frac 1 V (T_A(t) - T_B(t))$$
$$\frac{T_A(t+\Delta t) - T_A(t)}{\Delta t} = \frac{\Delta V}{\Delta t} \frac 1 V (T_B(t) - T_A(t))$$
That is an equation you can model in MATLAB.  Of if you prefer, you can take the limit as $\Delta t$ approaches zero of both equations, and deal with it as a differential equation:
$$\frac{dT_B}{dt} = \frac Q V (T_A(t) - T_B(t))$$
$$\frac{dT_A}{dt} = \frac Q V (T_B(t) - T_A(t))$$
Where $Q$ is the volumetric flow rate $\frac{dV}{dt}$.
A: In general, the idea looks like this: you keep track of a "stuff" (in this case both air and energy) as it flows into and out-of some "perfectly mixed reactors" (in this case "reactor" means a tank where things which react are often stored). The "stuff" can be anything which obeys a conservation law in that context, so momentum and energy and volume (at constant pressure) are all things which can be dealt with.
What is perfect mixing? It means that the "stuff" is always at uniform density throughout the reactor. 
In this case, if we want volume-stuff to be conserved in the cooler room, we have to describe air "leaving" it with its current heat. Where does that go? Does it go "outdoors"? Then is air from the outdoors also going into the hot room to replace its heat? Or is the hot room kept at constant temperature, say? These decisions affect how the model will work!
We also need to make some assumptions about specific heat capacities (how thermal energy goes with temperature). We are also modeling the hotter room as infinite (so we don't care about its volume conservation).
Supposing a linear heat capacity, and that the hot room is kept at constant temperature $T_1$ while the cold room vents to the outdoors and has temperature $T$, and a constant volume $V$ and constant heat capacity at constant pressure $c_P$, then we have: "The time rate of thermal energy inside the cold room is equal to heat flowing into the room minus heat flowing out of the room",
$c_P ~ V ~ \frac{dT}{dt} ~=~ c_P ~ \Phi ~ (T_1 - T)$
where $\Phi$ is the volume transported per unit time. Whereas if they both share with each other but are 100% isolated from the outdoors, now there are two volumes and temperatures to track:
$V_h ~ \frac{dT_h}{dt} ~=~ \Phi ~ (T_c - T_h)~,~~~ V_c ~ \frac{dT_c}{dt} ~=~ \Phi ~ (T_h - T_c).$
If you want, we can also include a little draft $\phi$ through the house and enforce the warm temperature of $T_h$ by including a constant heating term $h$ in the differential equation, then examining what $\Phi(t)$ does to the system. We could even pretend that one of the "rooms" was, say, a bellows, with changing volume. There are lots of ways to go.
They all look like "there is stuff in a box. The time rate of change of the stuff in a box is equal to the flow of stuff into the box, minus the flow of stuff out of the box." In these problems the "stuff" is volume $V$ and thermal energy $Q ~=~ c_P ~ V ~ T$.
