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 --- 1922/CH8/EX8.3/8_3.sce | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 1922/CH8/EX8.3/8_3.sce (limited to '1922/CH8/EX8.3/8_3.sce') diff --git a/1922/CH8/EX8.3/8_3.sce b/1922/CH8/EX8.3/8_3.sce new file mode 100755 index 000000000..be78de929 --- /dev/null +++ b/1922/CH8/EX8.3/8_3.sce @@ -0,0 +1,23 @@ +clc +clear +//Initialization of variables +ye=0.434 +Pt=40.25 //kPa +xe=0.616 +Pe1=22.9 //kPa +Pe2=29.6 //kPa +//calculations +ge= ye*Pt/(xe*Pe1) +gb=(1-ye)*Pt/((1-xe)*Pe2) +E= log10(ge) *(1+ (1-xe)*log(gb) /(xe*log(ge)))^2 +B= log10(gb) *(1+ xe/(1-xe) *log(ge) /log(gb))^2 +xe2=0.4 +xb2=0.6 +lnge2=E/(1+ E*xe2/(B*xb2))^2 +lngb2=B/(1+ B*xb2/(E*xe2))^2 +ge2=10^(lnge2) +gb2=10^(lngb2) +Pt1=ge2*Pe1 +Pt2=gb2*Pe2 +//results +printf("Total pressure in case 1 = %.2f kPa and in case 2 = %.2f kPa",Pt1, Pt2 ) -- cgit