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 --- 575/CH4/EX4.6.1/4_6_1.sce | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 575/CH4/EX4.6.1/4_6_1.sce (limited to '575/CH4/EX4.6.1/4_6_1.sce') diff --git a/575/CH4/EX4.6.1/4_6_1.sce b/575/CH4/EX4.6.1/4_6_1.sce new file mode 100755 index 000000000..724df3837 --- /dev/null +++ b/575/CH4/EX4.6.1/4_6_1.sce @@ -0,0 +1,35 @@ +clc +pathname=get_absolute_file_path('4_6_1.sce') +filename=pathname+filesep()+'461.sci' +exec(filename) +printf(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook") +nP=basis*xP +nN=basis*xN +nO2=basis*xA*0.21 +if(nN/nP>1) + disp("NH3 is in excess") +else + disp("Propene is in excess") +end +if(nO2/nP>1) + disp("O2 is in excess") +else + disp("propene is in excess") +end +nO2reacted=nP*1.5 +nNreacted=nP*1 +ExcessAmmonia=(nN-nNreacted)*100/nNreacted +ExcessO2=(nO2-nO2reacted)*100/nO2reacted +printf(" \n percentage excess Ammonia=%f",ExcessAmmonia) +printf(" \n percentage excess Oxygen=%f",ExcessO2) +nPout=(1-x)*nP +printf(" \n no.of moles of Propylene left= %d mol",nPout) +E=nP-nPout +nNout=nN-E +nO2out=nO2-1.5*E +nAc=E +nW=3*E +printf(" \n no.of moles of Ammonia left= %f mol",nNout) +printf(" \n no.of moles of oxygen left= %f mol",nO2out) +printf(" \n no.of moles of ACN formed= %d mol",nAc) +printf(" \n no.of moles of water formed= %d mol",nW) \ No newline at end of file -- cgit