Calculation of heat flows and temperatures in slabs in series, parallel and series-parallel