Introduction to Chemical Engineering Processes/Unsteady state energy and mass balances
What IS accumulation? 
Recall that so far in this text it has been assumed that all systems are at steady state, which means that there is no buildup of mass, energy, or other conserved quantities. However, there are many situations, such as whenever operating levels change, that a system will not be at steady state, and mass and energy will be accumulated over time.
The most important thing to remember about accumulation is that it deals with the actual amount of stuff in the system, not any sort of flow rate. If you remember if you're dealing with actual system properties rather than flow rates, it will help keep the terms straight in unsteady-state balances.
Unsteady-state Mass Balance 
Lets begin the derivation of an unsteady-state mass balance with the general balance equation which you should know and love by now:
Substituting the terms we usually used for in, out, and generation, we obtain:
Now we have to come up with a mathematical formulation for the accumulation. Unlike all of the other terms in this equation, which deal with energy flows into the system, the accumulation deals with the amount of energy that is already in the system at a certain point of time, and more specifically how it changes with time.
The rate of accumulation of energy will not be constant unless it is zero (otherwise every reactor in the world would either blow up from excessive mass and energy buildup or would cease operating because all of the reactants and products would be drained out). Recall that if the accumulation reaches zero, the system is at steady state. Most systems tend to move towards a steady state (it is possible to have more than one set of steady state conditions, but it won't be covered here) over long periods of time, as shown below:
Such a system is called self-regulating (or naturally stable). If a system is not self-regulating then special control techniques (see Control systems) must be utilized to force the system into a steady state.
In order to take into account variation in the accumulation rate, we must consider the rate of change over a very small amount of time, so small in fact that it is practically zero, and the accumulation vs. time curve resembles a straight line. The slope of this line at time t is approximately:
Therefore we could write the following:
We then write our mass balance by substituting this accumulation into the mass balance above:
For practical applications, this equation is generally multiplied by . Then, rather than dealing with flow rates, a new quantity is defined:
This quantity is the total amount of mass that enters the system in a finite amount of time. Substituting this definition into the mass balance yields the following:
Unsteady-state Energy Balance 
Lets start by examining what we have so far, but with the accumulation term (yet to be defined mathematically) added in the right side, since we're not at steady state any more:
Following the logic from the mass balance, we obtain for the accumulation:
Therefore, we have:
Like in the case of the mass balance, we can only consider the total energy change over a total amount of time using this equation. To do this, we multiply the entire equation above by the time change from some starting point to the point of interest.
Now we need some definitions:
- is the TOTAL heat flow over the time period.
- is the TOTAL shaft work over the time period.
- is the TOTAL mass flow into (or out of) the system due to stream i during the time period.
- is the TOTAL enthalpy carried into (or out of) the system due to stream i during the time period.
The major assumption here is that the enthalpies, heat flow rates, and shaft work on the left hand side of the equals sign must either be constant, or the average value over the whole time period must be used, in order for this equation to be valid. Whether this assumption is valid or not depends on the situation (for example, it depends on whether the process feeding mass to your process is itself at steady state or not).
With these in mind, we multiply by delta t in order to obtain the following, unsteady state energy balance.