# Introduction to Chemical Engineering Processes/Multiple Components in Multiple Processes
## Introduction to Problem Solving with Multiple Components and Processes

In the vast majority of chemical processes, in which some raw materials are processed to yield a desired end product or set of end products, there will be more than one raw material entering the system and more than one unit operation through which the product must pass in order to achieve the desired result. The calculations for such processes, as you can probably guess, are considerably more complicated than those either for only a single component, or for a single-operation process. Therefore, several techniques have been developed to aid engineers in their analyses. This section describes these techniques and how to apply them to an example problem.

## Degree of Freedom Analysis

For more complex problems than the single-component or single-operation problems that have been explored, it is essential that you have a method of determining if a problem is even solvable given the information that you have. There are three ways to describe a problem in terms of its solvability:
* If the problem has a finite (not necessarily unique!) set of solutions then it is called well-defined.
* The problem can be overdetermined (also known as overspecified), which means that you have too much information and it is either redundant or inconsistent. This could possibly be fixed by consolidating multiple data into a single function or, in extreme cases, a single value (such as a slope of a linear correlation), or it could be fixed by removing an assumption about the system that one had made.
* The problem can be underdetermined (or underspecified), which means that you don't have enough information to solve for all your unknowns. There are several ways of dealing with this. The most obvious is to gather additional information, such as measuring additional temperatures, flow rates, and so on until you have a well-defined problem. Another way is to use additional equations or information about what we want out of a process, such as how much conversion you obtain in a reaction, how efficient a separation process is, and so on. Finally, we can make assumptions in order to simplify the equations, and perhaps they will simplify enough that they become solvable.
The method of analyzing systems to see whether they are over or under-specified, or if they are well-defined, is called a degree of freedom analysis. It works as follows for mass balances on a single process:
* From your flowchart, determine the number of unknowns in the process. What qualifies as an unknown depends on what you're looking for, but in a material balance calculation, masses and concentrations are the most common. In equilibrium and energy balance calculations, temperature and pressure also become important unknowns. In a reactor, you should include the conversion as an unknown unless it is given OR you are doing an atom balance.
* Subtract the number of Equations you can write on the process. This can include mass balances, energy balances, equilibrium relationships, relations between concentrations, and any equations derived from additional information about the process.
* The number you are left with is the degrees of freedom of the process.
If the degrees of freedom are negative that means the unit operation is overspecified. If it is positive, the operation is underspecified. If it is zero then the unit operation is well-defined, meaning that it is theoretically possible to solve for the unknowns with a finite set of solutions.

### Degrees of Freedom in Multiple-Process Systems

Multiple-process systems are tougher but not undoable. Here is how to analyze them to see if a problem is uniquely solvable:
* Label a flowchart completely with all the relevant unknowns.
* Perform a degree of freedom analysis on each unit operation, as described above.
* Add the degrees of freedom for each of the operations.
* Subtract the number of variables in intermediate streams, i.e. streams between two unit operations. This is because each of these was counted twice, once for the operation it leaves and once for the one it enters.
The number you are left with is the process degrees of freedom, and this is what will tell you if the process as a whole is overspecified, underspecified, or well-defined.

## Using Degrees of Freedom to Make a Plan

Once you have determined that your problem is solvable, you still need to figure out how you'll solve for your variables. This is the suggested method.
* Find a unit operation or combination of unit operations for which the degrees of freedom are zero.
* Calculate all of the unknowns involved in this combination.
* Recalculate the degrees of freedom for each process, treating the calculated values as known rather than as variables.
* Repeat these steps until everything is calculated (or at least that which you seek)

## Multiple Components and Multiple Processes: Orange Juice Production

Example:
Consider a process in which raw oranges are processed into orange juice. A possible process description follows:
* The oranges enter a crusher, in which all of the water contained within the oranges is released.
* The now-crushed oranges enter a strainer. The strainer is able to capture 90% of the solids, the remainder exit with the orange juice as pulp.
The velocity of the orange juice stream was measured to be $30{\frac {m}{s}}$ and the radius of the piping was 8 inches. Calculate:
a) The mass flow rate of the orange juice product. b) The number of oranges per year that can be processed with this process if it is run 8 hours a day and 360 days a year. Ignore changes due to unsteady state at startup.
Use the following data: Mass of an orange: 0.4 kg Water content of an orange: 80% Density of the solids: Since its mostly sugars, its about the density of glucose, which is $1.540{\frac {g}{cm^{3}}}$

### Step 1: Draw a Flowchart

This time we have multiple processes so it's especially important to label each one as its given in the problem.
Notice how I changed the 90% capture of solids into an algebraic equation relating the mass of solids in the solid waste to the mass in the feed. This will be important later, because it is an additional piece of information that is necessary to solve the problem.
Also note that from here in, "solids" are referred to as S and "water" as W.

### Step 2: Degree of Freedom analysis

Recall that for each stream there are C independent unknowns, where C is the number of components in the individual stream. These generally are concentrations of C-1 species and the total mass flow rate, since with C-1 concentrations we can find the last one, but we cannot obtain the total mass flow rate from only concentration.
Let us apply the previously described algorithm to determining if the problem is well-defined.
On the strainer:
* There are 6 unknowns: m2, xS2, m3, xS3, m4, and xS4
* We can write 2 independent mass balances on the overall system (one for each component).
* We are given a conversion and enough information to write the mass flow rate in the product in terms of only concentration of one component (which eliminates one unknown). Thus we have 2 additional pieces of information.
* Thus the degrees of freedom of the strainer are 6-2-2 = 2 DOF
On the crusher:
* There are 3 unknowns (m1, m2, and xS2).
* We can write 2 independent mass balances.
* Thus the crusher has 3-2 = 1 DOF
Therefore for the system as a whole:
* Sum of DOF for unit operations = 2 + 1 = 3 DOF
* Number of intermediate variables = 2 (m2 and xS2)
* Total DOF = 3 - 2 = 1 DOF.
Hence the problem is underspecified.

### So how do we solve it?

In order to solve an underspecified problem, one way we can obtain an additional specification is to make an assumption. What assumptions could we make that would reduce the number of unknowns (or equivalently, increase the number of variables we do know)?
The most common type of assumption is to assume that something that is relatively insignificant is zero.
In this case, one could ask: will the solid stream from the strainer contain any water? It might, of course, but this amount is probably very small compared to both the amount of solids that are captured and how much is strained, provided that it is cleaned regularly and designed well. If we make this assumption, then this specifies that the mass fraction of water in the waste stream is zero (or equivalently, that the mass fraction of solids is one). Therefore, we know one additional piece of information and the degrees of freedom for the overall system become zero.

### Step 3: Convert Units

This step should be done after the degree of freedom analysis, because that analysis is independent of your unit system, and if you don't have enough information to solve a problem (or worse, you have too much), you shouldn't waste time converting units and should instead spend your time defining the problem more precisely and/or seeking out appropriate assumptions to make.
Here, the most sensible choice is either to convert everything to the cgs system or to the m-kg-s system, since most values are already in metric. Here, the latter route is taken.
$r_{4}=8{\mbox{ in}}*{\frac {2.54{\mbox{ cm}}}{in}}*{\frac {1{\mbox{ m}}}{100{\mbox{ cm}}}}=0.2032{\mbox{ m}}$
${\rho }_{S}=1.54{\frac {g}{cm^{3}}}=1540{\frac {kg}{m^{3}}}$
Now that everything is in the same system, we can move on to the next step.

### Step 4: Relate your variables

First we have to relate the velocity and area given to us to the mass flowrate of stream 4, so that we can actually use that information in a mass balance. From chapter 2, we can start with the equation:
${\rho }_{n}*v_{n}*A_{n}={\dot {m}}_{n}$
Since the pipe is circular and the area of a circle is $\pi *r^{2}$, we have:
$A_{4}=\pi *0.2032^{2}=0.1297{\mbox{ m}}^{2}$
So we have that:
${\rho }_{4}*30*0.1297=3.8915*{\rho }_{4}={\dot {m}}_{4}$
Now to find the density of stream 4 we assume that volumes are additive, since the solids and water are essentially immiscible (does an orange dissolve when you wash it?). Hence we can use the ideal-fluid model for density:
${\frac {1}{\rho _{4}}}={\frac {x_{S4}}{\rho _{S}}}+{\frac {x_{W4}}{\rho _{W}}}={\frac {x_{S4}}{\rho _{S}}}+{\frac {1-x_{S4}}{\rho _{W}}}$
$={\frac {x_{S4}}{1540}}+{\frac {1-x_{S4}}{1000}}$
Hence, we have the equation we need with only concentrations and mass flowrates:
${\frac {x_{S4}}{1540}}+{\frac {1-x_{S4}}{1000}}={\frac {3.8915}{{\dot {m}}_{4}}}$
Now we have an equation but we haven't used either of our two (why two?) independent mass balances yet. We of course have a choice on which two to use.
In this particular problem, since we are directly given information concerning the amount of solid in stream 4 (the product stream), it seems to make more sense to do the balance on this component. Since we don't have information on stream 2, and finding it would be pointless in this case (all parts of it are the same as those of stream 1), lets do an overall-system balance on the solids:
$\Sigma {\dot {m}}_{S,in}-\Sigma {\dot {m}}_{S,out}=0$
Expanding the mass balance in terms of mass fractions gives:
${\dot {m}}_{1}*x_{S1}={\dot {m}}_{3}*x_{S3}+{\dot {m}}_{4}*x_{S4}$
Plugging in the known values, with the assumption that stream 3 is pure solids (no water) and hence $x_{S3}=1$:
$0.2*{\dot {m}}_{1}=(0.9*0.2*{\dot {m}}_{1})*1+x_{S4}*{\dot {m}}_{4}$
Finally, we can utilize one further mass balance, so let's use the easiest one: the overall mass balance. This one again assumes that the total flowrate of stream 3 is equal to the solids flowrate.
${\dot {m}}_{1}=0.9*0.2*{\dot {m}}_{1}+{\dot {m}}_{4}$
We now have three equations in three unknowns $({\dot {m}}_{1},{\dot {m}}_{4},x_{S4})$ so the problem is solvable. This is where all those system-solving skills will come in handy.
If you don't like solving by hand, there are numerous computer programs out there to help you solve equations like this, such as MATLAB, POLYMATH, and many others. You'll probably want to learn how to use the one your school prefers eventually so why not now?
Using either method, the results are:
${\dot {m}}_{1}=4786{\frac {kg}{s}}$
${\dot {m}}_{4}=3925.07$
$x_{S4}=0.0244$
We're almost done here, now we just have to calculate the number of oranges per year.
$4786{\frac {kg}{s}}*1{\frac {orange}{0.4{\mbox{ kg}}}}*3600{\frac {s}{hr}}*8{\frac {wk{\mbox{ hr}}}{day}}*360{\frac {\mbox{wk day}}{year}}$
$1.24*10^{11}{\frac {oranges}{year}}$