# Introduction to Chemical Engineering Processes/What is a mass balance?
## The "Black Box" approach to problem-solving

In this book, all the problems you'll solve will be "black-box" problems. This means that we take a look at a unit operation from the outside, looking at what goes into the system and what leaves, and extrapolating data about the properties of the entrance and exit streams from this. This type of analysis is important because it does not depend on the specific type of unit operation that is performed. When doing a black-box analysis, we don't care about how the unit operation is designed, only what the net result is. Let's look at an example:
Example:
Suppose that you pour 1L of water into the top end of a funnel, and that funnel leads into a large flask, and you measure that the entire liter of water enters the flask. If the funnel had no water in it to begin with, how much is left over after the process is completed?
Solution The answer, of course, is 0, because you only put 1L of water in, and 1L of water came out the other end. The answer to this does not depend on the how large the funnel is, the slope of the sides, or any other design aspect of the funnel, which is why it is a black-box problem.

### Conservation equations

The formal mathematical way of describing the black-box approach is with conservation equations which explicitly state that what goes into the system must either come out of the system somewhere else, get used up or generated by the system, or remain in the system and accumulate. The relationship between these is simple:
* The streams entering the system cause an increase of the substance (mass, energy, momentum, etc.) in the system.
* The streams leaving the system decrease the amount of the substance in the system.
* Generating or consuming mechanisms (such as chemical reactions) can either increase or decrease the amount of substance in the system.
* What's left over is the amount of the substance in the system.
With these four statements we can state the following very important general principle:
$Accumulation=In-Out+Generation-Consumption$
Its so important, in fact, that you'll see it a million times or so, including a few in this book, and it is used to derive a variety of forms of conservation equations.

### Common assumptions on the conservation equation

The conservation equation is very general and applies to any property a system can have. However, it can also lead to complicated equations, and so in order to simplify calculations when appropriate, it is useful to apply assumptions to the problem.
* Closed system: A closed system is one which does not have flows in or out of the substance. Almost always, when one refers to a closed system, it is implied that the system is closed to mass flow but not to other flows such as energy or momentum. The equation for a closed system is:
    $Accumulation=Generation$
    The opposite of a closed system is an open system in which the substance is allowed to enter and/or leave the system. The funnel in the example was an open system because mass flowed in and out of it.
* No generation: Certain quantities are always conserved in the strict sense that they are never created or destroyed. These are the most useful quantities to do balances on because then the model does not need to include a generation term:
    $Accumulation=In-Out$
    The most commonly-used conserved quantities in this class are mass and energy (other conserved quantities include momentum and electric charge). However, it is important to note that though the total mass and total energy in a system are conserved, the mass of a single species is not (since it may be changed into something else in a reaction). Neither is the "heat" in a system if a so-called "heat-balance" is performed (since it may be transformed into other forms of energy. Therefore, one must be careful when deciding whether to discard the generation term).
* Steady State: A system which does not accumulate a substance is said to be at steady-state. Often times, this allows the engineer to avoid having to solve differential equations and instead use algebra.
    $In-Out+Generation-Consumption=0$
    All problems in this text assume steady state but it is not always a valid assumption. It is mostly valid after a process has been running in a controlled manner for long enough that all the flow rates, temperatures, pressures, and other system parameters have reached reasonably constant values. It is not valid when a process is first warming up (or an operating condition is changed) and the system properties change significantly over time. How they change, and how long it takes to become close enough to steady state, is a subject for another course.

## Conservation of mass

TOTAL mass is a conserved quantity (except in nuclear reactions, let's not go there), as is the mass of any individual species if there is no chemical reaction occurring in the system. Let us write the conservation equation at steady state for such a case (with no reaction):
$In-Out=0$
Now, there are two major ways in which mass can enter or leave a system: diffusion and convection. However, if the velocity entering the unit operations is fairly large and the concentration gradient is fairly small, diffusion can be neglected and the only mass entering or leaving the system is due to convective flow:
$Mass_{in}={\dot {m}}_{in}=\rho *v*A$
A similar equation apply for the mass out.
In this book, we generally use the symbol ${\dot {m}}$ to signify a convective mass flow rate, in units of $mass/time$. Since the total flow in is the sum of individual flows, and the same with the flow out, the following steady state mass balance is obtained for the overall mass in the system:
$\sum {{\dot {m}}_{out}}-\sum {{\dot {m}}_{in}}=0$
If it is a batch system, or if we're looking at how much has entered and left in a given period of time (rather than instantaneously), we can apply the same mass balance without the time component. In this book, a value without the dot signifies a value without a time component:
$\sum {m_{out}}-\sum {m_{in}}=0$
Example:
Let's work out the previous example (the funnel), but explicitly state the mass balance. We're given the following information:
* ${m_{in}}=1L$
* ${m_{out}}=1L$
From the general balance equation,
$In-Out=Accumulation$
Therefore, $Accumulation=1L-1L=0$.
Since the accumulation is 0, the system is at steady state.
This is a fairly trivial example, but it gets the concepts of "in", "out", and "accumulation" on a physical basis, which is important for setting up problems. In the next section, it will be shown how to apply the mass balance to solve more complex problems with only one component.