Process Modelling and Simulation
Process Modelling and Simulation
(UCH802)
Submitted By:
Megha Goyal
(101301040)
Submitted To:
Dr. Raj Kumar Gupta
QUESTION 1..............................................................................................................................................................3
PROGRAM.............................................................................................................................................................3
OUTPUT.................................................................................................................................................................5
QUESTION 2..............................................................................................................................................................5
PROGRAM.............................................................................................................................................................6
OUTPUT.................................................................................................................................................................7
QUESTION 3..............................................................................................................................................................8
PROGRAM.............................................................................................................................................................8
OUTPUT.................................................................................................................................................................9
QUESTION 4............................................................................................................................................................10
PROGRAM...........................................................................................................................................................10
OUTPUT...............................................................................................................................................................11
QUESTION 5............................................................................................................................................................11
PROGRAM...........................................................................................................................................................12
OUTPUT...............................................................................................................................................................13
QUESTION 1............................................................................................................................................................14
PROBLEM DESCRIPTION.................................................................................................................................14
RESULT...............................................................................................................................................................14
QUESTION 2............................................................................................................................................................15
PROBLEM DESCRIPTION.................................................................................................................................15
RESULT...............................................................................................................................................................16
QUESTION 3............................................................................................................................................................17
PROBLEM DESCRIPTION.................................................................................................................................17
RESULT...............................................................................................................................................................18
2|P a g e
PART I: PROGRAMS
QUESTION 1
Find the roots of an algebraic equation using bisection method.
PROGRAM
#include<stdio.h>
#include<conio.h>
#include<math.h>
float f(float x)
float ans;
ans=eqn;
return(ans);
void main()
float a,b,x=0,x1=0;
int i=0;
clrscr();
if(f(a)*f(b)>=0)
getch();
return;
do
x=(a+b)/2;
printf("\ta=%f\tb=%f\tX%d=%f\tf(x%d)=%f\n",a,b,i,x,i,f(x));
if(f(x)==0)
break;
i++;
if(f(a)*f(x)<0)
b=x;
else
a=x;
4|P a g e
}
while(f(a)*f(b)<0);
getch();
OUTPUT
QUESTION 2
Write a program to calculate the bubble point of an equimolar liquid mixture of benzene and
toluene. Given Ptotal = 760mm Hg.
B
log 10 P= A− , where P is in mm Hg and T is in ᵒC.
T +C
5|P a g e
C = 219.888 C = 209.197
PROGRAM
#include<stdio.h>
#include<conio.h>
#include<math.h>
#define eqn 760-pow(10,((6.89272*x+311.908346)/(x+219.88)))-pow(10,
((6.95805*x+141.193182)/(x+209.197)))
float f(float x)
{
float ans;
ans=eqn;
return(ans);
}
void main()
{
float a,b,x=0,x1=0;
int i=0;
clrscr();
printf("Enter initial values");
scanf("%f%f",&a,&b);
if(f(a)*f(b)>=0)
{
printf("The interval is wrong");
getch();
return;
}
do
{
x=(a+b)/2;
6|P a g e
printf("\ta=%f\tb=%f\tX%d=%f\tf(x%d)=%f\n",a,b,i,x,i,f(x));
if(x==x1)
{
printf("\n\n The boiling point is %f\n",x);
break;
}
x1=x;
i++;
if(f(a)*f(x)<0)
b=x;
else
a=x;
}
while(f(a)*f(b)<0);
getch();
}
OUTPUT
7|P a g e
QUESTION 3
Write a program to find a new values of H & V at the (n+1)th step. Given initial conditions, at t
= 0, V = 3.4 and H = 2.050. Assume delta as 1 unit. At the nth step in time,
h1 =0.311−( 0.0624 × v n )
The new values of H & V at the (n+1)th step are calculated with step size of delta.
h=hn + ( δ ×h1 )
v=v n + ( δ × v 1)
PROGRAM
#include<stdio.h>
#include<math.h>
#include<conio.h>
void main()
float hn=2.050,vn=3.400,v,h,v1,h1;
int t=1;
printf("time\tV\tH\n");
do
v1=(0.0107*hn)-(0.00205*vn*vn);
h1=0.311-(0.0624*vn);
8|P a g e
h=hn+(1*h1);
v=vn+(1*v1);
printf("%d %f %f\n",t,v,h);
hn=h;
vn=v;
t=t+1;
while(t<200);
getch();
OUTPUT
9|P a g e
QUESTION 4
Write a program to calculate the exit concentration of 3 CSTR’s in series at (n+1) th step. The
initial conditions are, CA1(0) = 0.4 kgmol of A/m3, CA2(0) = 0.2 kgmol of A/m3 and CA3(0) = 0.1
kgmol of A/m3. Assume CA0 is set as 1.8 kgmol of A/m3. The parameter τ = 2 min. and value of k
is 0.5 min-1.
dC A 1 1
= ( C A 0 −C A 1 )−k C A 1
dt τ
dC A 2 1
= ( C A 1 −C A 2) −k C A 2
dt τ
dC A 3 1
= ( C A 2−C A 3 )−k C A 3
dt τ
PROGRAM
#include<stdio.h>
#include<conio.h>
void main()
float ca10=0.400,ca20=0.200,ca30=0.100,k=0.5,t=0,ca0=1.8,ca1,ca2,ca3,ca11,ca21,ca31;
int taw=2;
do
ca1=((ca0-ca10)/taw)-(k*ca10);
ca2=((ca10-ca20)/taw)-(k*ca20);
ca3=((ca20-ca30)/taw)-(k*ca30);
ca11=ca10+(0.1*ca1);
ca21=ca20+(0.1*ca2);
ca31=ca30+(0.1*ca3);
printf("%f %f %f %f\n",t,ca11,ca21,ca31);
ca10=ca11;
10 | P a g e
ca20=ca21;
ca30=ca31;
t=t+0.1;
while(t<2.9);
getch();
OUTPUT
QUESTION 5
Given function, f (x,t) = 1- x.
11 | P a g e
PROGRAM
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
clrscr();
float x0, t0, delta, t1, x, k1, k2, k3, k4, k,f;
printf("Enter the value of x0, t0,delta and the value of t at which x is to be calculated\n");
scanf("%f%f%f%f",&x0,&t0,&delta,&t1);
for(;t0<t1; t0=t0+delta)
f=F(t0,x0);
k1=delta*f;
f=F(t0+delta/2,x0+k1/2);
k2=delta*f;
f=F(t0+delta/2,x0+k2/2);
k3=delta*f;
f=F(t0+delta/2, x0+k3/2);
k4=delta*f;
k=x0+(k1+2*k2+2*k3+k4)/6;
x0=k;
getch();
12 | P a g e
}}
OUTPUT
13 | P a g e
PART II: ASPEN
QUESTION 1
PROBLEM DESCRIPTION
A mixture containing 50.0 wt% acetone and 50.0 wt% water is to be separated into two streams –
one enriched in acetone and the other in water. The separation process consists of extraction of
the acetone from the water into methyl isobutyl ketone (MIBK), which dissolves acetone but is
nearly immiscible with water. The overall goal of this problem is to separate the feed stream into
two streams which have greater than 90% purity of water and acetone respectively.
RESULT
14 | P a g e
QUESTION 2
PROBLEM DESCRIPTION
A feed stream of 60 mol% ethane and 40 mol% ethylene, enters a DSTWU column having flow
rate of 200 lbmol/hr at 75oF and 15 psia. This feed is required to fractionate in a distillation
column capable of recovering at least 99.6% of the light key component in the distillate and
99.9% of the heavy key component in the bottoms. The process operates at 300psia. The total
number of 30 theoretical stages (including the reboiler and condenser). Applying the RK soave
property method for the thermodynamic property calculation, simulate the column and calculate
the minimum reflux ratio, actual reflux ratio, minimum number of stages, actual number of
stages and feed location
The above problem is continued with a few modifications. The same feed enters and the various
specifications such as feed stage, reflux ratio, total number of stages and distillate rate are taken
from the results of the DSTWU model. Simulate this column and determine the top and bottom
product compositions.
15 | P a g e
RESULT
16 | P a g e
QUESTION 3
PROBLEM DESCRIPTION
Simulation of a multicomponent system using a RadFac Model
A multicomponent distillation column has total 20 stages (including condenser and reboiler )
with 60% murphree efficiency. A hydrocarbon feed mixture enters about tray 10 of the RadFrac
column. Apply the Peng-Robinson correlation and consider 120 psia pressure throughout the
column.
Feed specification:
Temperature = 12ᵒF
Components Mole %
C3 5
i-C4 15
n-C4 20
17 | P a g e
i-C6 25
n-C5 35
RESULT
18 | P a g e
19 | P a g e
Block REDFRAC: Temperature Profile
235.0
230.0
Temperature F
225.0
220.0
215.0
210.0
195.0 200.0 205.0
Temperature F
190.0
185.0
180.0
175.0
170.0
1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0
Stage
20 | P a g e