Академический Документы
Профессиональный Документы
Культура Документы
F
0.010667
Transition Range
Nre
2500
3500
4500
5500
6500
7500
8500
9500
F
0.005748
0.005144
0.004734
0.004431
0.004193
0.004000
0.003838
0.003700
Turbulent Range
Nre
10000
20000
30000
40000
50000
60000
70000
80000
90000
F
0.003638
0.002894
0.002531
0.002302
0.002139
0.002014
0.001914
0.001831
0.001762
PROGRAM 2
A PROGRAM TO FIT A CURVE FOR ARRHENIUS EQUATION USING LEAST
SQUARE METHOD.
/*PROGRAM*/
#include<stdio.h>
#include<math.h>
#include<conio.h>
void main()
{
int n,i;
double x[10], y[10], sumx=0,sumy=0,sumsq=0,sumxy=0,numr,denr,m,c;
clrscr();
/* n is the total number of data points*/
printf("\n Enter the total number of data points: ");
scanf("%d",&n);
printf("\n Enter the data points one by one: ");
for(i=0;i<n;i++)
{
printf("\n Enter values of X and Y when i is %d : ",i+1);
scanf("%lf%lf",&x[i],&y[i]);
}/* end for*/
for(i=0;i<n;i++)
{
/* Least Squares Method */
sumx=sumx+x[i];
sumy=sumy+y[i];
sumsq=sumsq+(x[i]*x[i]);
sumxy=sumxy+(x[i]*y[i]);
}/* end for*/
numr=n*sumxy-sumx*sumy;
denr=n*sumsq-sumx*sumx;
m=numr/denr;
c=(sumy-(m*sumx))/n;
printf("\n Slope = %lf ",m);
printf("\n Intercept = %lf ",c);
getch();
}/* end main*/
-7.75
-6.87
-6.32
-5.69
-4.94
Slope = -0.000298
Intercept = 0.001359
3.93e-3
3.13e-3
3.09e-3
3.04e-3
3.00e-3
PROGRAM 3
NUMERICAL INTEGRATION OF A ORDINARY DIFFERENTIAL EQUATION
BY RUNGE KUTTA METHOD.
PROBLEM STATEMENT:A reaction mixture contains propyl benzene, dipropyl benzene. The rate of
formation of propyl benzene is given by dp/dt = 4-0.3p-0.1p. The rate of
disappearance of dipropyl benzene is given by dp/dt = -0.5d. Here p and d are molar
concentrations in mol/lit of propyl benzene and dipropyl benzene respectively. It is
given that at t =0, p = 6 mol/lit and d = 4 mol/lit. Using 4th order Runge Kutta
method, find the concentration at t = 2 second.
/*PROGRAM*/
#include <stdio.h>
#include <math.h>
#include <conio.h>
/* Function decalarations*/
double func1(double, double);
double func2(double, double);
void main()
{
int i,n;
double k1, k2,k3,k4,l1,l2,l3,l4, p,d,h,t=0.0,tn;
clrscr();
p = 6.0;
d = 4.0;
h = 0.5;
tn = 2.0;
n = (int) ((tn - t) / h);
for(i = 0; i < n; i++)
{
/*Runge Kutta Method*/
/* Functions called*/
k1 = func1(p,d);
l1 = func2(p,d);
k2 = func1(p + 0.5 * k1* h, d + 0.5 * l1 * h);
l2 = func2(p + 0.5 * k1* h, d + 0.5 * l1 * h);
k3 = func1(p + 0.5 * k2* h, d + 0.5 * l2 * h);
l3 = func2(p + 0.5 * k2* h, d + 0.5 * l2 * h);
k4 = func1(p + k3 * h, d + l3 * h);
l4 = func2(p + k3 * h, d + l3 * h);
p = p + h / 6.0 * (k1 + 2.0 * k2 + 2.0 * k3 + k4);
d = d + h / 6.0 * (l1 + 2.0 * l2 + 2.0 * l3 + l4);
t = t+h;
} /*end for*/
/* Output display*/
printf("At t = %lf\t seconds p = %lf\t mol/lit d= %lf\n mol/lit ", t, p ,d);
getch();
} /*end main*/
/* Function func1*/
double func1(double x1, double x2)
{
double temp;
temp = (4.0 - 0.3 * x1 - 0.1 * x2);
return(temp);
} /*end function*/
/* Function func2*/
double func2(double x1, double x2)
{
double temp;
temp = (0.0 * x1 - 0.5 * x2);
return(temp);
} /*end function*/
OUTPUT:At t = 2 seconds
PROGRAM 4
TO FIND THE AVERAGE SPECIFIC HEAT OF A GAS BY TRAPEZOIDAL
METHOD AND SIMPSONS 1/3rd RULE.
PROBLEM STATEMENT:The molar heat capacity of n-butane is given by the expression Cp = a + bT + cT 2
where Cp is in cal / gm mol K, T is in K. The parameters a, b and c are as follows:
a = 3.844.
b = 73.35e-3.
c = 22.655e-6.
Determine the average heat capacity of n-butane in the temperature range 100- 300
degree Celsius by Trapezoidal rule and Simpsons 1/3rd rule.
/* PROGRAM*/
#include <stdio.h>
#include <math.h>
#include <conio.h>
/* Global declarations */
double a, b, c;
void main()
{
int n;
double f1, f2, f3, t1, t2,x, h, avgcp, inttrap, intsimp;
double sumtrap = 0, sumsimp = 0;
/* Function Declaration */
double func(double);
clrscr();
/* Constants a, b and c have been assigned */
a = 3.844;
b = 73.35e-3;
c = 22.655e-6;
printf("Enter the temperature limits t1 and t2 in oC\n");
scanf("%lf%lf", &t1, &t2);
OUTPUT:
Enter the temperature limits t1 and t2 in oC: 100
300
Enter the number of segments: 100
Integral value by trapezoidal method = 8952.906654
Average specific heat by Trapezoidal method is = 44.764533 cal / gm mol K
Integral value by Simpson's 1/3rd rule is = 8952.894330
Average specific heat by Simpson's 1/3rd rule is = 44.764472 cal / gm mol K
PROGRAM 5
CALCULATION OF BUBBLE POINT TEMPERATURE AND PRESSURE FOR
AN IDEAL MULTI COMPONENT MIXTURE.
PROBLEM STATEMENT:1. Write a C program to calculate the temperature at which an ideal mixture
consisting of 33 mol% methyl acetate, 34 mol % acetone and 33 mol % methanol
would boil at 2 bar. Also compute the composition of the vapour formed.
2) Write a C program to calculate the bubble point pressure and corresponding
vapour composition of an ideal 3 component mixture consisting of 33 mol% methyl
acetate, 34 mol% acetone and 33 mol% methanol would boil at 2 bar. Also compute
the composition of the vapour formed.
Component
Methyl acetate
Acetone
Methanol
Tc
506.8
508.1
512.6
Pc
46.9
47
80.9
A
-8.0541
-7.4551
-8.5480
B
2.5638
1.202
0.7689
C
-5.1299
-2.4393
-3.1085
10
D
0.1613
-3.3559
1.5448
scanf("%d",&compo);
/* for(i=0;i<compo;i++)
{
printf("\n For component number %d ",i+1);
printf("\n Input the liquid mole fraction : ");
scanf("%lf",&x[i]);
printf("\n Input the critical temperature and pressure : ");
scanf("%lf%lf",&tc[i],&pc[i]);
printf("\n Input A,B,C and D for vapour pressure equation : ");
scanf("%lf%lf%lf%lf",&a[i],&b[i],&c[i],&d[i]);
}/* end for */
*/
/* Mole fractions of feed, tc, pc values and the Wagners constants have been
assigned */
x[0] = 0.33;
x[1]= 0.34;
x[2]= 0.33;
tc[0]= 506.8;
tc[1]= 508.1;
tc[2]= 512.6;
pc[0]= 46.01;
pc[1]= 47;
pc[2]= 80.9;
a[0]= -8.0541;
a[1]= -7.4551;
a[2]= -8.5480;
b[0]= 2.5638;
b[1]= 1.202;
b[2]= 0.7689;
c[0]= -5.1299;
c[1]= -2.4393;
c[2]= -3.1085;
d[0]= 0.1613;
d[1]= -3.3559;
d[2]= 1.5448;
AGAIN:
printf("\n Enter 1 For bubble point pressure or \n Enter 2 for bubble point temperature
or\n Enter 0 to exit :");
scanf("%d",&choice);
/* Part 2 of the problem */
if(choice==1)
{
printf("\n To calculate bubble point pressure ");
11
12
13
14
PROGRAM 6
CALCULATION OF DEW POINT TEMPERATURE AND PRESSURE FOR AN
IDEAL MULTICOMPONENT MIXTURE.
PROBLEM STATEMENT:1. Write a C program to calculate the temperature at which an ideal mixture
consisting of 33 mol% methyl acetate, 34 mol % acetone and 33 mol % methanol
would condense at 2 bar. Also compute the composition of the liquid formed.
2) Write a C program to calculate the dew point pressure and corresponding liquid
composition of an ideal 3 component mixture consisting of 33 mol% methyl acetate,
34 mol% acetone and 33 mol% methanol at 65oC.
Component
Methyl acetate
Acetone
Methanol
Tc
506.8
508.1
512.6
Pc
46.9
47
80.9
A
-8.0541
-7.4551
-8.5480
B
2.5638
1.202
0.7689
C
-5.1299
-2.4393
-3.1085
15
D
0.1613
-3.3559
1.5448
/* for(i=0;i<compo;i++)
{
printf("\n For component number %d ",i+1);
printf("\n Input the Vapor mole fraction : ");
scanf("%lf",&y[i]);
printf("\n Input the critical temperature and pressure : ");
scanf("%lf%lf",&tc[i],&pc[i]);
printf("\n Input A,B,C and D for vapour pressure equation : ");
scanf("%lf%lf%lf%lf",&a[i],&b[i],&c[i],&d[i]);
} /* end for */
*/
/* Mole fractions of feed, tc, pc values and the Wagners constants have been
assigned */
y[0] = 0.33;
y[1] = 0.34;
y[2] = 0.33;
tc[0] = 506.8;
tc[1]= 508.1;
tc[2]= 512.6;
pc[0]= 46.9;
pc[1]= 47.0;
pc[2]= 80.9;
a[0]= -8.0541;
a[1]= -7.4551;
a[2]= -8.5480;
b[0]= 2.5638;
b[1]= 1.202;
b[2]= 0.7689;
c[0]= -5.1299;
c[1]= -2.4393;
c[2]= -3.1085;
d[0]= 0.1613;
d[1]= -3.3559;
d[2]= 1.5448;
AGAIN:
printf("\n Enter 1 For Dew point pressure or \n Enter 2 for Dew point temperature or\n
Enter 3 to exit :");
scanf("%d",&choice);
if(choice==1)
{
/* Part 2 of the problem */
printf("\n To calculate Dew point pressure ");
printf("\n Give Temperature in oC: ");
scanf("%lf",&temper);
16
17
18
Xsum = 1.000415
Dew point pressure is 1.223 bar
Mole Fraction of component 1 in liquid is 0.303586
Mole Fraction of component 2 in liquid is 0.305743
Mole Fraction of component 3 in liquid is 0.391086
Enter 1 For Dew point pressure or
Enter 2 for Dew point temperature or
Enter 3 to exit :
2
To calculate dew point temperature
Give pressure in bar: 2
Give a guess value of temperature in oC: 79.5
x[0] = 0.315738
x[1] = 0.320733
x[2] = 0.371509
xsum = 1.007981
Dew temperature is 79.500000 oC
Mole Fraction of component 1 in liquid is 0.315738
Mole Fraction of component 2 in liquid is 0.320733
Mole Fraction of component 3 in liquid is 0.371509
Enter 1 For Dew point pressure or
Enter 2 for Dew point temperature or
Enter 3 to exit :
3
Press any key to exit
19
PROGRAM 7
FLASH CALCULATIONS OF AN IDEAL MULTICOMPONENT MIXTURE.
PROBLEM STATEMENT:A mixture of 33 mol% n-hexane, 37% n-heptane and 30% octane is subjected to
lash distillation at 1.217 bar pressure. Write a C program to:
1) calculate the temperature of the flash and the composition of the liquid and
vapour products for 60% vapourisation.
2) find the percentage vapour formed at 109 oC and the composition of the two
phases.
Component
Tc
Pc
A
B
C
n-hexane
507.5
30.1
-7.4677
1.4421
-3.2822
n-heptane
540.3
27.4
-7.6747
1.3707
-3.5362
n-octane
568.8
24.9
-7.9121
1.3801
-3.8044
The pure component vapour pressure is given by the Wagners equation:
Ln(P/Pc) =
1
[Aq + Bq1.5 + CQ3 + Dq6]
(3- q)
where q = 1 T
Tc
/*PROGRAM */
#include <stdio.h>
#include <math.h>
#include <conio.h>
/* Function declarations */
double psat (double,double,double, double, double, double,double);
void main()
{
double k[10], tc[10], pc[10], a[10], b[10], c[10], d[10];
double t, x[10],f, y[10], z[10], xsum, ysum, totp, flasht, bubt, dewt;
int i, compo;
clrscr();
printf("enter the number of components\n");
scanf("%d", &compo);
20
D
-2.5094
-3.2024
-4.5013
/* Mole fractions of feed, tc, pc values and the Wagners constants have been
assigned */
z[0] = 0.33;
z[1] = 0.37;
z[2] = 0.30;
tc[0] = 507.5;
tc[1] = 540.3;
tc[2] = 568.8;
pc[0] = 30.1;
pc[1] = 27.4;
pc[2] = 24.9;
a[0]= -7.4677;
a[1]= -7.6747;
a[2]= -7.9121;
b[0]= 1.4421;
b[1]= 1.3707;
b[2]= 1.3801;
c[0] = -3.2822;
c[1] = -3.5362;
c[2] = -3.8044;
d[0]= -2.5094;
d[1]= -3.2024;
d[2]= -4.5013;
printf("Entert he system pressure in bar\n");
scanf("%lf", &totp);
do
{
printf("DEW POINT CALCULATION: GIVE A TEMPEARTURE TO TRY\n");
scanf("%lf", &dewt);
/* Converting from oC to K*/
dewt =dewt + 273.12;
xsum = 0.0;
for(i = 0; i < compo; i++)
{
k[i] = psat(dewt, tc[i], pc[i], a[i], b[i], c[i], d[i])/ totp;
21
22
23
24
25
PROGRAM 8
TO CALCULATE THE THEORITICAL FLAME TEMPERATURE FOR
CARBON MONOXIDE BURNING AT CONSANT PRESSURE WITH 100%
EXCESS AIR WHEN REACTANTS ENTER AT 100 DEGREE CELCIUS
AND 1 ATM
PROBLEM STATEMENT: Calculate the theoretical flame temperature for Carbon monoxide burnt at constant
pressure with 100% excess air when the reactants enter at 100 degree celsius and 1
atm pressure.
The reaction is :
CO + O2 -- CO2
Heat of formation data:CO = -110,520 J/Mol
CO2 = -393,510 J/mol
Specific heat data: Cp= a + bT+ cT2
Component
Carbon monoxide
Oxygen
Nitrogen
Carbon dioxide
a
27.11
25.29
27.02
26.75
b
6.55e-3
13.25e-3
5.81e-3
42.26e-3
/* PROGRAM */
#include<stdio.h>
#include<conio.h>
#include <math.h>
/* Function declaration */
double intdq(double,double,double,double,double);
void main()
{
/* Specific heat data have been assigned */
double aco=27.11,bco=6.55e-3,cco= -0.999e-6;
double ao2=25.29,bo2=13.25e-3,co2= -14.20e-6;
26
C
-0.999e-6
-14.2e-6
-0.029e-6
-14.25e-6
27
do
{
t2 =temp2;
dhp=pmoleco2*(dhfco2+intdq(298.0,temp2,aco2,bco2,cco2))
+pmoleo2*intdq(298.0,temp2,ao2,bo2,co2)+pmolen2*intdq(298.0,temp2,an2,bn2,cn2);
printf("\n dhp = %lfJ/mol",dhp);
dh=dhp-dhr;
printf("\n dhp-dhr = %lf ",dh);
printf("dhp - dhr must be equal to zero\n");
printf("\n Enter another temperature in degree Kelvin to try or 0 to stop : ");
scanf("%lf",&temp2);
} /*
while(temp2 >1);
printf("\n The adiabatic flame temperature is T = %lf K",t2);
}
/*Function*/
double intdq(double t1,double t2,double a,double b,double c)
{
double val;
val=a*(t2-t1)+b*(t2*t2-t1*t1)/2+c*(t2*t2*t2-t1*t1*t1)/3;
return(val);
}
28
He further states that this reaction is I order with respect to acetone and that the
specific reaction rate can be expressed by
LnK = 34.34 34222/T
Where K, is in reciprocal seconds and T is in Kelvin. In this design, it is desired to
feed 8000 kg/hr to a tubular reactor. If the reactor is adiabatic, the pure acetone
and inlet temperature is at 1035 K and pressure of 162 KPa, a tubular (PFR) of
what volume is required for 20% conversion?
Heat capacity data:CH3COCH3 : Cpa = 26.63 + 0.183T 45.86 x 10-6 T2 J/mol K
CH2CO
: Cpb = 20.04 + 0.0945T 30.05 x 10-6 T2 J/mol K
CH4
: Cpc = 13.39 + 0.077T 18.71 x 10-6 T2 J/mol K
Note:
delalpha
= C + B - A = 13.34 + 20.04 26.63 = 6.8
delbeta
= C + B A = 0.0777+ 0.0945 0.183 = 0.0115
delgamma = C + B A = -18.7 x 10-6 30.95 x 10-6 + 45.86 x 10-6 = 3.8e-6
/* PROGRAM */
#include<stdio.h>
#include<math.h>
#include<conio.h>
/* Function declarations */
double func(double,double);
/* Global declarations */
double dhr=80770,tr=298,alpha=26.63,beta=0.183,gamma=-45.86e-6;
double delalpha=6.8,delbeta=-0.0115,delgamma=-3.8e-6;
29
void main()
{
int i;
double feed,p,r=8.31,to,xf,fao,cao,v,vo,dh, mw_feed;
float xx;
double k[6],f[6],x[6],t[6], curr_xdiff, prev_xdiff, tempvar;
clrscr();
/* Feed rate in kg/h */
feed=8000;
/* Pressure in Pa */
p=162000;
/* Inlet temperature in K */
to=1035;
/* Final conversion */
xf=0.2;
/* Molecular weight of feed */
mw_feed = 58;
/* Molar feed rate in kgmol/s*/
fao=(feed/58*1000/3600);
/* Initial concentration in kgmol/m3 */
cao=(p)/(r*to);
/* Volumetric flow rate of feed in m3/s
vo=fao/cao;
x[1]=0.0;
t[1]=to;
/* Calculation of rate constant */
k[1]=exp(34.340-34222/t[1]);
f[1]=(1+x[1])/(k[1]*(1-x[1]));
dh=xf/4;
printf("\n Fao = %lf kgmol/s ",fao);
printf("\n Cao = %lf kgmol/m3 ",cao);
printf("\n vo = %lf m3/s",vo);
printf("Initial conversion is %lf\t and temperature is %lf K\n", x[1], t[1]);
curr_xdiff= 0.0;
for(i=2;i<=5;i++)
{
x[i]=(i-1)*dh;
t[i] = t[i-1];
do
{
t[i] = t[i] - 1.0;
xx = func(t[i], to);
30
prev_xdiff = curr_xdiff;
curr_xdiff = xx - x[i];
} /* end while */
while((fabs(x[i]- xx) > 0.01) || (prev_xdiff * curr_xdiff) > 0.0);
printf("Calculated conversion is %lf\t for temperature %lf\n K", xx, t[i]);
getch();
/* Calculation of rate constants */
k[i]=exp(34.340-34222/t[i]);
tempvar = t[i] / to;
f[i]= tempvar * ((1+x[i])/(k[i]*(1-x[i])));
} /* end for */
dh = xf/4.0;
printf("\n Conversion \t\t Temperature \t\t Rate constant\t\t Ratio T/To \t\t f[i] ");
for(i=1;i<=5;i++)
printf("\n %lf \t%lf \t%lf \t%lf \t%lf ",x[i],t[i],k[i],t[i]/to, Rate expression f[i]\n );
/* Simpsons 1/3 rd rule to find the volume of PFR*/
v=vo*dh/3*(f[1]+4*f[2]+2*f[3]+4*f[4]+f[5]);
printf("\n The volume of the tubular reactor (PFR) is : %lf m3\n",v);
getch();
}
/* Function*/
double func(double t,double to)
{
double a,b,x;
a=(alpha*(to-t))+(beta*(to*to-t*t)/2)+(gamma*(to*to*to-t*t*t)/3);
b=dhr+(delalpha*(t-tr))+(delbeta*(t*t-tr*tr)/2)+(delgamma*(t*t*t-tr*tr*tr)/3);
x=a/b;
return(x);
} /* end function */
OUTPUT:
Fao = 38.314176 kgmol/s
Cao = 18.835348 kgmol/m3
vo = 2.034163 m3/s
31
Temperature
1035.000000
1011.000000
986.000000
962.000000
937.000000
32
33
d=(xf-xb)*f/(xd-xb);
b=f-d;
er=rr*d;
vr=d+er;
ls=er+q*f;
vs=ls-b;
//printf("\n %f %f %f %f %f %f ",d,b,er,vr,ls,vs);
/* Calculating number of trays in stripping section */
i=1;
yb=(alpha*xb)/(1+(alpha-1)*xb);
printf("\n Table giving Tray no:, composition for stripping : ");
printf("\n Tray no: \t Xi \t Yi ");
printf("\n %d \t %f \t %f ",i,xb,yb);
xi=xb;
yi=yb;
while(xi<xf)
{
i++;
xi=((yi*vs)+(xb*b))/ls;
yi=(alpha*xi)/(1+(alpha-1)*xi);
printf("\n %d \t %f \t %f ",i,xi,yi);
}
//getch();
/* Calculating number of trays in rectifying section */
j=0;
printf("\n Table giving Tray no:, composition for rectifying : ");
printf("\n Tray no: \t Xi \t Yi ");
while(yi<xd)
{
i++;
j++;
xi=((yi*vr)+(xb*b)-(xf*f))/er;
yi=(alpha*xi)/(1+(alpha-1)*xi);
printf("\n %d \t %f \t %f ",i,xi,yi);
}
printf("\n The number of trays in stripping section is equal to %d",i-j);
printf("\n The number of trays in rectifying section is equal to %d",j);
printf("\n The total number of trays is %d",i);
getch();
}
34
OUTPUT:
Enter the flow rate and composition of the feed
1000
0.5
Enter the compositions of the distillate and bottoms 0.95
0.1
Enter the Reflux ratio and q
2.0
1.0
Enter the relative volatility
2.5
Table giving the tray no. composition of liquid and vapour in stripping section
_______________________________________________________
Trayno.
xi
yi
_______________________________________________________
0
0.100000
0.217391
1
0.185375
0.362610
2
0.290989
0.506426
3
0.395583
0.620668
4
0.478668
0.696547
5
0.533853
0.741141
Table giving the tray no. composition of liquid and vapour in rectifying section
_______________________________________________________
Tray no.
xi
yi
_______________________________________________________
6
0.636712
0.814181
7
0.746272
0.880283
8
0.845425
0.931849
9
0.922774
0.967609
The no. of trays in stripping sections = 5
The no. of trays in rectifying sections = 4
The total no. of trays for the given separation = 9
35
36
37
38
} /* end if */
else
{
if(M>m)
hio=func2(cp,k,mu,m,dii,ap);
else
hio=func2(Cp,K,Mu,M,dii,ap);
} /* end else */
/* Reading Fouling Factor (m2 oC / W) */
printf("\n Enter the value of rd : ");
scanf("%f",&rd);
/* Calculation of Clean Overall Heat Transfer Coefficient */
uc=hio*ho/(hio+ho);
/* Calculation of design Overall Heat Transfer Coefficient */
ud=uc/(1+2*rd*uc);
printf("\n Uc = %f W / m2 oC",uc);
printf("\n Ud = %f W / m2 oC",ud);
/* Calculation of Heat Transfer Area*/
area=q/(ud*lmtd);
printf("\n Surface area of heat transfer = %f m2\n",area);
getch();
}
/* Function */
float func1(float cp,float k,float mu,float m,float d,float a)
{
float ga,nre,jh,ho,d1,d2;
/* Calculation of mass velocity */
ga=m/a;
printf("\n The mass velcoity is = %f kg / m2 sec",ga);
/* Calculation of Reynold number */
nre=ga*d/mu;
printf("\n The value of Nre = %f ",nre);
/* Reading jh factor */
printf("\n Enter the value jh : ");
scanf("%f",&jh);
39
d1=k/d;
/* Calculation of Prandtl number*/
d2=cp*mu/k;
/* Calculation of outside heat transfer coefficient */
ho=jh*d1*pow(d2,0.33);
printf("\n The value of ho is = %f W / m2 oC ",ho);
return(ho);
}
float func2(float cp,float k,float mu,float m,float d,float a)
{
float ga,nre,jh,hio,hi,d1,d2,d3,d4;
/* Calculation of mass velocity */
ga=m/a;
printf("\n The mass velcoity is = %f kg / m2 sec",ga);
/* Calculation of Reynold number */
nre=ga*d/mu;
printf("\n The value of Nre = %f ",nre);
/* Reading jh factor */
printf("\n Enter the value jh : ");
scanf("%f",&jh);
/* Reading doi and dio */
printf("\n Enter the value of D1 and D2 : ");
scanf("%f%f",&d1,&d2);
d3=k/d;
/* Calculation of Prandtl number*/
d4=cp*mu/k;
/* Calculation of inside heat transfer coefficient */
hi=jh*d3*pow(d4,0.33);
printf("\n The value of hi is = %f W / m2 oC\n",hi);
/* Calculation of inside heat transfer coefficient based on outside area */
hio=hi*d2/d1;
printf("\n The value of hio is %f W / m2 oC\n",hio);
return(hio);
}
40
OUTPUT:
The average temperature for hot fluid is 130 oC
The average temperature for cold fluid is 100 oC
The flow rate of hot fluid is = 6323.484863 kg/s
The Value of Q is 166940 Watt
LMTD = 28.853901 oC
aa = 0.008414 m2
ap = 0.009853 m2
de = 0.077625 m
The mass velcoity is = 1167036.75 kg /m2 sec
The value of Nre = 995508.125
Enter the value jh : 167
The value of ho is = 1134.642822
The mass velcoity is = 641762.3125 kg /m2 sec
The value of Nre = 84561.625
Enter the value jh : 236
Enter the value of D1 and D2 : 0.1725 0.138
The value of hi is = 1512.924316 W / m2 oC
The value of Hio is 1210.339478 W / m2 oC
Enter the value of rd : 0.002 m2 oC / W
Uc = 585.634705 W / m2 oC
Ud = 175.206543 W / m2 oC
Surface area of heat transfer = 33.022167 m2
41