From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 914/CH1/EX1.1/ex1_1.sce | 16 ++++++++++++++++ 914/CH1/EX1.2/ex1_2.sce | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100755 914/CH1/EX1.1/ex1_1.sce create mode 100755 914/CH1/EX1.2/ex1_2.sce (limited to '914/CH1') diff --git a/914/CH1/EX1.1/ex1_1.sce b/914/CH1/EX1.1/ex1_1.sce new file mode 100755 index 000000000..938dd261f --- /dev/null +++ b/914/CH1/EX1.1/ex1_1.sce @@ -0,0 +1,16 @@ +clc; +warning('off'); +printf("\n\n example1.1 - pg6"); +// given +v=0.01283; //[m^3] - volume of tank in m^3 +v=0.4531; //[ft^3] - volume of tank in ft^3 +p=2; //[atm] - pressure +T=1.8*300; //[degR] - temperature +R=0.73; //[(atm*ft^3)/(lbmol*degR)] - gas constant +// using the equation of state for an ideal gas pv=nRT +n=(p*v)/(R*T); +disp(n,"no. of moles,n="); +xN2=0.5; // fractiom of N2 in tank +nN2=xN2*n; +Ca=nN2/v; +printf("\n\n Ca=%elb*mol/ft^3",Ca); diff --git a/914/CH1/EX1.2/ex1_2.sce b/914/CH1/EX1.2/ex1_2.sce new file mode 100755 index 000000000..fb3b6644c --- /dev/null +++ b/914/CH1/EX1.2/ex1_2.sce @@ -0,0 +1,16 @@ +clc; +warning("off"); +printf("\n\n example1.2 - pg9"); +// given +// the three unknowns are x,y,z +// the three equations are- +// x+y+z=1500 +// (1) 0.05*x+0.15*y+0.40*z=1500*0.25 +// (2) 0.95*x+0.00*y+0.452*z=1500*0.50 +a=[1 1 1;0.05 0.15 0.40;0.95 0 0.452]; +d=[1500;1500*0.25;1500*0.50]; +ainv=inv(a); +sol=ainv*d; +printf("\n\n the amount of concentrated HNO3 is %fkg\n the amount of concentrated H2SO4 is %fkg\n the amount of waste acids is %fkg",sol(2),sol(1),sol(3)); + + -- cgit