Process Variability Study Using Monte Carlo Simulation
Scaling Tendency Defined
Scaling tendency (also called the saturation level or ratio) is a measure of a systems level of saturation with respect
to a solid phase chemical species, NaCl or BaCl2 for example. The scaling tendency indicates the magnitude of the driving
force for the dissolved species to precipitate. The value is thermodynamically based on the ratio of the ion activity product
(IAP) to the equilibrium constant of the precipitation reaction, or the solubility product.


Equation 1. 
where the IAP is the product of the the activities (ai) of the chemical species in solution and Ksp is the solubility product for the precipitation reaction. (Remember that the activity of the solid species, the product in
the chemical reaction equation, is equal to one).
The solubility product is, by definition, equal to the IAP at equilibrium, which for a precipitation reaction is the solubility
limit for the solid chemical species. Therefore, a system is at saturation with respect to a solid when the scaling tendency
for that solid species is equal to one. When the scaling tendency is less than one, the system is not saturated. When it
is greater than one, the system is supersaturated. The base ten log of the scaling tendency is known as the Langelier Saturation
Index.
Supersaturation Calculations
For the thermodynamic equilibrium calculation, the OLI calcuation engine will normally predict the formation of a solid
phase, and subsequent reduction in solution concentation of the appropriate species, whenever the scaling tendency is predicted
to be one or greater. The concetration in the solution of the chemical species is reduced until the scaling tendency for the
solid is equal to one. This condition is tested for all possible solid species during the equilibrium calculaiton.
This makes sense because the saturated condition is the one that corresponds to thermodynamic equilibrium. This, however,
does not allow for the evaluation of systems at supersaturation, which are encounted in practice and are important in cyrstallization
processes, for example.
In order to simulate supersaturation conditions, the setup needs to be modified. The chemical equilibrium equation for the
precipitation reactions are removed from the chemistry model. Without these equilibrium equations, no solids formation will
be predicted. Enough information is carried through, however, to allow the calculation of the solubility products and the scaling tendency.
Since the species that form the solid remain in solution, their activities can be calculated and compared to the solubility
product using the scaling tendency ratio. Supersaturated solutions will have scaling tendencies greater than one.
The value in this analysis is that the scaling tendency is a (generally) monotonic, smooth function that is easily calculated and provides
information that can be used in the evaulation of chemical processes, including crystallization.
Monte Carlo Simulation
The evaluation of an engineering model over many trials, with the values of the input variables sampled from a known, or
assumed, distribution, yields a distribution of model result values. These results can be analyzed to better understand the variability
and sensitivity of the process being modeled. If the distribution of input values represents the normal range and variation
for the process under normal operating conditions, the simulation results can be used to determine the probability, or risk,
of the process operating at undesirable conditions. For instance, the question asked may be that if the controlled process
variables can be held within a certain range, what is the likelyhood that offspec product will be produced.
Crystallization Example
For a certain crystallization process, the supersaturation level (scaling tendency) needs to be maintained in a given range in order to have sufficient neucleation and growth kinetics. If the scaling tendency falls below one, the precipitation
process stops altogether. What is the probability of encountering these conditions?
The scaling tendency is a function of the process temperature, pressure and composition. The pH, which effects the composition,
can also be considered a variable. The crystallizer is open to the atmosphere, so the pressure is constant and not a significant
factor. The temperature and inflowing concentration of BaCO3 fluctuate around known values. The pH
is controlled by the addition of NaOH. Table 1 provides the mean values and the normal operating range for the input variables.
Variable 
Mean 
Range 
Sampling Function 
Temperature 
40 °C 
±0.4 °C 
=(RAND()1/2)*Range + Mean 
Pressure 
1 atm 
constant 

pH 
12 
±0.6 pH 
=(RAND()1/2)*Range + Mean 
Water Inflow rate 
1.0 kg 
constant 

BaCO3 Inflow rate 
0.0704 g 
±0.004 g 
=(RAND()1/2)*Range + Mean 
NaOH Inflow rate 
f(pH) 
f(pH) 
=f(pH) 
Table 1.
A calcAQ application was created using the vertical layout organization of a calcAQ workbook . Excel's RAND() function was used with proper scaling to
provide independent, (pseudo) randomly sampled values for the input variables. The RAND() function provides a distribution of
values between 0 and 1. For each trial, new values were independently sampled for each input variable and used for the calculation
of the scaling tendency. The input values and calculated scaling tendency were saved from each trial and used to construct
cumulative and histogram plots of frequency versus the respective variable.
The results showed that a uniform distribution of the input variables translated into a uniform distribution of scaling
tendency. The range of scaling tendency values was from about 0.75 to 1.7. The probability of being below a desired 1.1
times saturation was 38% and the probability of being beneath the saturation limit, and therefore not in a production mode,
was 28%. (See Figure 1.) This is obviously not acceptable for a production
crystallizer if nearly 40% of the time it is producing offspec product or not producing at all. Tightening the controls or
changing the mean operating conditions would likely result in great improvements in the process. 