Wednesday, 26 June 2019

[How To] Perform Design Of Experiments (DOE) using Minitab


Hiii all....!!!

Back with a typical post which is related to process optimization using software i.e., Minitab, simply performing Design of Experiments(DOE).

I've done final year project during BTech on 'Treatment of Industrial waste using Coaggulation - Flocculation with Minitab using DOE & Response Surface Methadology'. A special thanks to Mrs. Kalyani Gaddam & Mr. Shishir Kumar Behera for their guidance.


Most of you are having good knowledge on this topic, but recently i've received a request asking to demonstrate, as on we currently there is no related content which can be easily understandable by process engineers.







So i've taken initiation to explain it here.

To be a perfect engineer, one should be able to perform calculations manually as well as should be in a position to workout through software's. But most of the companies are not able to provide those to their engineers. But believe me, working with those will have an awesome feeling.

Also Read:

Getting into the topic, Minitab is a package of many purposeful applications. Can draw graphs to evaluate the trends, can evaluate the moving ranges of the variables, can define some random equations based on the available data(regression), Can be used during process optimization stage of product manufacturing.



So, here i'm gonna provide you a small demo about optimization using minitab step-wise manner.







Let the case be particle size distribution, we have to get a desired PSD from a customized isolation step. In this case the variables / factors would be Cooling temperature, Agitator Speed, Rate of cooling. And the output will be d(0.1), d(0.5), d(0.9) with some desired specification.


Let the raw limits of the variables / factors would be 


Cooling temperature : 0 - 20 °C,
Agitator RPM             : 20 - 60,
Rate of cooling           : 10 °C / hour.

Let the expected response be d(0.1) = 10 - 50 ยต, d(0.5) = 50 - 100 ยต, d(0.9) = 100 - 200 ยต 
& yield % = 80 - 90%.




Lets start the show,

Step - 1: Open Minitab, [I'm using Minitab 18].








Step - 2: Click on STAT in main menu bar and then enter the DOE from the drop down,






Also Read:

Select Screening > Create Screening design.

Below screen will appear.

Select Definitive screening.


Step - 3: Set number of factors to 3 (As our output PSD will depend on cooling rate, agitation rate & Cooling temperature, factors shall be 3).
For proceeding further click on designs and close that then the factors option will be highlighted.





Now click on Factors, it will look like below:


Enter the Low & High values as shown above in the factors dialogue box and click OK.

Again Click OK. random runs will be generated like shown below:

Step - 4: Random runs & experiments.






As like shown above, total of 13 random runs are generated and now experiments need to be performed in lab scale (preferably in laboratory Auto reactors replicating plant agitators). 

Also Read:

Step - 5: Responses 


After getting the results, we have to fill the results in C8, C9, C10 & C11 columns in the work sheet. Below are some of the tentative results.









Step - 6: Analyzing the response.
Click on Stat > DOE > Screening > Analyzing Screening Design.







By clicking the 'Analyse Screening Design', a window will appear like below shown:


Now we have to select the responses that we need to analyse, now i'll be selecting all the available four responses,


Then Click Ok.


Step - 7: Analyzing the Graphs (Pareto's).


As we have selected a total of 4 responses, 4 pareto graphs will appear on screen, below screenshot fyr:



Now you may get a doubt, 'what does these graphs represent and what we need to understand ?',
Actually in the before clicking Ok, we have to select % of confidence in 'Graphs' option.
Which means the graphs will show that what factors will impact the responses with 95% significance level.

Also Read:

Let me explain you clearly,

First graph is Yield Vs Factors(Cooling time, Rate, RPM):




There will be a red coloured line over the graph, which represents the standard, the bars which are above the line are said to be having impact over yield. So in the first graph, Factor B, C are having impact on yield, Factor B, C are RPM & temperature, and the factor A is below the standard line, which indicates that Cooling rate(A) is not having considerable impact.


Similarly,

Second Graph ( d(0.1) Vs Factors ):




Factor C(Temperature) bar is below the standard line, hence it is not having impact on d(0.1), whereas factors A, B are above the reference line, hence both of then are having impact on d(0.1).


Third Graph ( d(0.5) Vs Factors ):




Factor B(RPM), C(Temperature) bars are below the standard line, hence it can be said that those two factors are not having significant impact on d(0.5) response, whereas factor A is having significant impact on d(0.5).


Fourth  Graph ( d(0.9) Vs Factors ):




Factor B(RPM), C(Temperature) bars are below the standard line, hence it can be said that those two factors are not having significant impact on d(0.9) response, whereas A is having significant impact on d(0.9)..


That's it, now half of the job is done. You understood the pareto's.


Step - 8: Finding the Regression equations.


If you close all the pareto's, there will be a Session / Activity sheet.

This sheet will record all the process that we have done.





Below is the screenshot fyr:




Now, lets expand each of them.


Yield % Vs Factors:


In the model summary, there will be R-Sq, here it is shown as 66.10%, which indicates that the model is not stable. For a stable model the R-Sq value should be greater than 90% [Some times the design experts will consider even 80% also as stable, but i'll consider 90% as stable].


Regression equation is 87.77 - 0.053 x Cooling rate - 0.2050 x RPM - 0.36 x Temperature.

Using this equation we can predict the yield %, once if the factors are known.


Similarly for other responses also, there will be the regression equations.


Step - 9: Optimizing the response.


This is what we need actually, finding out the optimum response based on our requirement. 

As we need the Yield % in 80 - 90%, d(0.1) : 10-50 ยต, d(0.5): 50-100 ยต, d(0.9): 100-200 ยต.

Navigation to Response Optimizer:


Stat > DOE > Screening > Response Optimizer.








By clicking that, a window will appear as below:




As we have total of four responses, they will appear and we have to select the range for them.


Available options for them are Do Not Optimize, Minimize, Target, Maximize.


From these 4 we have to select any one for the responses.


As we need Yield % in range of 80-90%, i'll prefer it as 88% by selecting target option,
For d(0.1), i'll select 30 as target, 
For d(0.5), i'll select 80 as target,
For d(0.9), i'll select 150 as target.

Below screenshot fyr:


Then Click Ok.


The optimum value will appear for you. Below Screenshot FYR:




The optimum values are Cooling rate : 5 ℃/hr, RPM : 37.77, Temperature : 0 ℃.

Apart from this we have to check one more thing here, that is desirability which is denoted by d.






The desirability d represents the total probability. If its above 95% the optimized response is reproducible, or else not.


In our case the average desirability is 61.28%
Individual desirability are

Yield % : 58.81 %,
d(0.1)    : 67.79 %,
d(0.5)    : 93.95 %,
d(0.9)    : 37.65 %.

So from the above, we can say that the probability of reproducing the desired response is very less.


So if we change the targets to different values, the optimum values might vary and desirability might increase / decrease.






That's it.......!!!!!


Hope you understand, this is the basic explanation and i'll generate a video in future explaining this topic in detail.


Any queries feel free to comment. or reach me at pharmacalc823@gmail.com.

Comments are most appreciated......!!!!





Related Articles:


[How To] Perform Energy Balance 
Calculating Raw Material cost contributions
Enhancing plant capacity, how to do that?
Analyse TLC method, how to perform TLC ?





About The Author


Hi! I am Ajay Kumar Kalva, Currently serving as the CEO of this site, a tech geek by passion, and a chemical process engineer by profession, i'm interested in writing articles regarding technology, hacking and pharma technology.
Follow Me on Twitter AjaySpectator & Computer Innovations

Sunday, 16 June 2019

[How To] Perform Energy Balance

Hiiii everyone.!!

Hope everyone is fine, this post is about Energy Balance which is more basic.

Usually energy balance is used to calculate the unknown parameters such as time, heat loads, utility line sizes, quantities etc.

The basis for energy balance is mass balance.

Energy balance will vary from equipment to equipment and process to process based on the in and out streams. for example the energy balance for a reactor can be explained in one way during reaction and during distillation in other. But the basis will remain same and the most important thing is that we have to stick to basics while performing these calculations.




There wont be anything difficult in these but just need to look with common sense.

Let me explain you with a simple example of energy balance for a distillation operation. Distillation is being performed in a 5 KL reactor and the reaction mass is having ~3 KL toluene and the utility used in reactor jacket is steam pressure of 1.5 bar.

Also Read:


Raw Material Cost Contribution calculation 
Vent size calculation for reactors & pressure vessels

Energy Balance for Reactor :

Reaction mass in + Hot water in = Distillate out + Hot water out

M  =  C + D - Material Balance [In this case, i've considered pure solvent in reactor],

C is concentrate, D is distillate.


Coming to energy balance, the energy supplied in form of steam will be used to evaporate the toluene. Hence, the equation will be 

( S x Hs ) = ( D x Hd ) + ( S x Hc ),

S x (Hs - Hc) = ( D x Hd ),

S    - Qty. of steam (Kgs),
Hs - Steam enthalphy (Kcal),
Hd - Condensate enthalphy (Kcal),
D    - Qty. of distillate (Kgs),
Hd - Enthalphy of toluene (Heat of vaporation) 




So now we made the energy balance equation for distillation reactor and the equation will suffice two things. 
One is to calculate the steam required to evaporate known quantity of toluene, 
Second is to calculate the amount of toluene that can be evaporated with known amount of steam.

Also Read:


Scale-Up of crystallisation using zwiettering equation 
[How To] Design packed bed scrubber

Case-1: Steam required for evaporating 400 Kgs toluene

S x (2717.13 - 536.27) / 4.178 = ( 400 x 86.8 );

S = ( 400 x 86.8 x 4.178) / (2717.13 - 536.27) = 66.51 Kgs

For the values of steam enthalphy and condensate enthalphy at 1.50 bar pressure, 
refer this link: Steam Tables 





4.178 is the conversion factor from joules to calories, 86.8 is latent heat for toluene in KCal.

Case-2: Amount of toluene to be evaporated with 20 Kgs of steam.

( 20 x 540 ) = ( D x 86.8 ),

D = 20 x 540 / 86.8 = 124.42 Kgs.

Here we got the 2nd thing i.e., amount of toluene that can be vaporated with 20 Kgs od steam.

Note: I haven't considered sensible heat.


Energy Balance for Condenser:

Now lets take the case of condenser.

Condenser will have 5 nozzles.
1. Vapour in,
2. Condensate out,
3. Vent out,
4. Coolant in,
5. Coolant out.

Lets consider an atmospheric distillation.

Also Read:


Guidelines for process development & optimization 
[How To] Reduce ANFD drying time-cycle

Material Balance :

Vapour in = Condensate out + Vent out

V = C + VO

we will consider above mentioned case only where 3KL toluene is being taken in reactor for distillation.

Vapour will be 868 Kgs of toluene, Utility supplied is RT water with an inlet temperature of 25℃ and say the outlet be at 33℃ with a flowrate of 2 m3/hr.




Now the equation will be like,

( V x ฦ› ) + ( C x Cp x dT ) = m x Cp x dT.

So above is the Energy balance equation that we prepared.

Now lets prepare a energy balance equation for reaction step.

Let there be a reaction between A & B chemicals and we have to evaluate the utility supply rate through energy balance. I can distinguish this into two types.
1. with available RC1e study,
2. without RC1e study.

Again in without RC1e case, we can get two more types:
1. Reaction above ambient temperature,
2. Reaction below ambient temperature.

Lets discuss about the case if, 


RC1e study is available:

Heat of reaction as per RC1 report is found to be 483 KJ/Kg of batch size,

Batch size be 500 Kgs. 

So the total energy liberation would be 500 x 483 = 241500 KJ = 57802.77 Kcal.

Now in order to host the reaction safely we need to supply 57802.77 Kcal of energy as a counter part.




That means, Energy liberated during reaction = Energy gained by utility.

i.e., ๐™Hr = U x A x LMTD.

We got our energy balance equation.

So next case we don't have heat of reaction or RC1e study, we have to calculate tentative energy.

Also Read:


NPSH of pump, troubleshooting of pumping problems 
[How To] PErform material balance calculation

RC1e Study not available:

The method i select for this task is performing group contribution method / using bond energy calculation.

already in one of the previous post i've discussed about bond energy calculation.
Pl refer the following link: Bond Energy Calculations

Let the reactants be A & B, the quantities of A & B are 30 Kgs & 45 Kgs respectively.

Let the derived energy liberation during the reaction be 58319 KCal.

And the reaction temperature be 0-5℃, we have to slowly dose a reagent in the temperature for completing the reaction.

Consider the reaction as spontaneous and propagates in-line to the charged reagent.





So the energy balance equation would be,

๐™Hr - M x Cp x dT= U x A x LMTD,

๐™Hr - heat of reaction from group contribution method,
M - reaction mass weight,
Cp - Specific heat of reaction mass,
dT - operating temperature difference,
U - Overall heat transfer coefficient,
A - Heat transfer area,
LMTD - Log mean temperature difference.

The above equation can be written as,

๐™Hr x t - m x Cp x dT= U x A x LMTD x t,

Since, M = m / t.

As the heat of reaction, reaction mass, area will vary with time, integrals shall be used.

The equation will look like:





In the above equation you can see that we have just applied integrals on both sides to the varying quantities.





As area is dependent on length of cylinder, we can simplify the integral of area as

Area of cylinder = Area of torispherical dish + Area of cylinder.

Let the volume of reactor is 5 KL and the total heat transfer area of the reactor is 12.68 Sq.m.
out of which the torispherical dish will attribute to 2.64 Sq.m and 
the remaining 10.04 Sq.m will be of cylinder,

tentative dimensions of the reactor cylinder would be 
Length of cylinder - 2.00 m, Dia of cylinder - 1.60 m

Also Read:


[How To] Desin a chiller plant 
Calculate Overall heat transfer coefficient

Lets say before the addition of reagent B, the volume of the reaction mass is completely filled in torispherical dish and the cylinder filling would start by the start of reagent solution addition.

So the initial length would be zero (0) and lets calculate the end length based on our general calculation. presented below:

Let the reagent quantity be 1000 L, for a cylindrical vessel 1000 L will fill upto a height of

1 = (3.141 / 4) x (1.60 ^ 2) x L,

L = 0.497 m = 0.5 m.

so the final height would be 0.5 m.

So after including all the limits for integrals, the above equation would turn to,


You may get a doubt that how Area transformed to length and from where that d came from.

So for those, usually a cylinder would turn into a rectangle if we cut at one point, below is for your understanding:


Hope you understand from above, what i delivered.

Let the reactor be a SSR, and the overall heat transfer coefficient be 300 KCal/Sq.m.hr.C

and the LMTD = ((5 - (-10)) - (0 - (-2))) / ln((5 - (-10)) / (0 - (-2)) = 14 C.

Now include everything in the above integral equation, it will turn to:


1.2 is the specific heat of reaction mass in KCal/Kg.C

Lets start simplifying the above equation,




That's it......!!!!! This is the first case and from this we can derive the tentative addition time of reagent even if we don't have the heat of reaction from RC1e study.

Also Read:


Types of agitators and their selection 

[How To] Calculate power required for an operation

Lets consider a case where the reaction(addition of reagent) is at temperature higher than ambient temperature.

That case we need to consider the M x Cp x dT as a positive i.e., the equation will look like,


Hope you understand, what i delivered above.


Still any queries feel free to comment / message me.

Comments are most appreciated.........!!!!



Related Articles:


Bond Energy calculations 
Calculate Product Assay in liquid ?
Calculate NPSH - Net Positive Suction Head
How to Calculate height required for vapour column of batch reactor ?


Finally dear engineers, i would like to add one thing..,
Peak Environmental temperature is raising year by year, and as an engineer we are playing a major role in that imbalance, some of you may not accept this but its true.

Most of the imbalance is due to petrochemical and pharmacuetical industries, where we use the chilled water & chilled brine and liquid nitrogen. The more cooling we consume for process the more heat we are generating. 

However most of the times we cannot stop ourselves in stopping all these but try to reduce something which we can. As most of these can be done during process optimization time.

Apart from these try to reduce the usage of AC's and fuels which will generate more heat than we think. Below is the picture at kuwait:

Kuwait this year, may be ours next year. Preserve it, encourage greenary.

Look at China's 'Forest City' which is first in world:




About The Author


Hi! I am Ajay Kumar Kalva, Currently serving as the CEO of this site, a tech geek by passion, and a chemical process engineer by profession, i'm interested in writing articles regarding technology, hacking and pharma technology.
Follow Me on Twitter AjaySpectator & Computer Innovations