um(g_fine.cells.volumes.*rock.poro)./rate;
    dT     = T/10;
    <span class="keyword">end</span>
</pre><h2>Start the main loop<a name="16"></a></h2><p>Iterate through the time steps and plot the saturation profiles along the way.</p><pre class="codeinput">    t = 0;
    msSat = [];
    refSat = [];

    <span class="comment">%if doPlotSim, figure, end</span>

    <span class="keyword">while</span> t &lt; T,
        <span class="comment">% Solve transport equations using the transport solver</span>
       