summaryrefslogtreecommitdiff
path: root/1472
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /1472
parent7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff)
downloadScilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip
updated the code
Diffstat (limited to '1472')
-rwxr-xr-x1472/CH10/EX10.5/10_5.sce28
-rwxr-xr-x1472/CH11/EX11.5.c/11_5c.sce45
-rwxr-xr-x1472/CH16/EX16.2/16_2.sce35
-rwxr-xr-x1472/CH17/EX17.1.b/17_1b.sce27
-rwxr-xr-x1472/CH17/EX17.3.b/17_3b.sce65
-rwxr-xr-x1472/CH21/EX21.3/21_3.sce43
-rwxr-xr-x1472/CH23/EX23.4/23_4.sce113
7 files changed, 181 insertions, 175 deletions
diff --git a/1472/CH10/EX10.5/10_5.sce b/1472/CH10/EX10.5/10_5.sce
index bc0d5d9a7..e0021570e 100755
--- a/1472/CH10/EX10.5/10_5.sce
+++ b/1472/CH10/EX10.5/10_5.sce
@@ -1,14 +1,14 @@
-clc
-//initialization of varaibles
-x=0.97
-P=100 //psia
-//calculations
-disp("From table 2,")
-hf=298.4
-hfg=888.8
-hx=hf+x*hfg
-hg=1187.2
-hx2=hg-(1-x)*hfg
-//results
-printf("Accurate Enthalpy = %.1f B/lb",hx2)
-printf("\n Enthalpy = %d B/lb")
+clc
+//initialization of variables
+x=0.97
+P=100 //psia
+//calculations
+disp("From table 2,")
+hf=298.4
+hfg=888.8
+hx=hf+x*hfg
+hg=1187.2
+hx2=hg-(1-x)*hfg
+//results
+printf("Accurate Enthalpy = %.1f B/lb",hx2)
+printf("\n Enthalpy = %.1f B/lb", hg) \ No newline at end of file
diff --git a/1472/CH11/EX11.5.c/11_5c.sce b/1472/CH11/EX11.5.c/11_5c.sce
index 56beaa1e8..fad2d13c3 100755
--- a/1472/CH11/EX11.5.c/11_5c.sce
+++ b/1472/CH11/EX11.5.c/11_5c.sce
@@ -1,22 +1,23 @@
-clc
-//initialization of varaibles
-P1=100 //psia
-T1=2000+460 //R
-P2=15 //psia
-g=1.4
-cp=0.276
-cv=0.207
-T2=1520 //R
-//calculations
-h1=634.4
-pr1=407.3
-pr2=pr1*P2/P1
-disp("From table 1,")
-T2=1535 //R
-h2=378.44
-dh=h2-h1
-v2=53.34*T2/(P2*144)
-dv=v2-v1
-//results
-printf("Enthalpy change = %.2f B/lb",dh)
-printf("\n Volume change = %.1f cu ft/lb",dv)
+clc
+//initialization of variables
+P1=100 //psia
+T1=2000+460 //R
+P2=15 //psia
+g=1.4
+cp=0.276
+cv=0.207
+T2=1520 //R
+//calculations
+h1=634.4
+pr1=407.3
+pr2=pr1*P2/P1
+disp("From table 1,")
+T2=1535 //R
+h2=378.44
+dh=h2-h1
+v1=53.34*T1/(P1*144)
+v2=53.34*T2/(P2*144)
+dv=v2-v1
+//results
+printf("Enthalpy change = %.2f B/lb",dh)
+printf("\n Volume change = %.1f cu ft/lb",dv) \ No newline at end of file
diff --git a/1472/CH16/EX16.2/16_2.sce b/1472/CH16/EX16.2/16_2.sce
index b9336080e..5317d6746 100755
--- a/1472/CH16/EX16.2/16_2.sce
+++ b/1472/CH16/EX16.2/16_2.sce
@@ -1,17 +1,18 @@
-clc
-//initialization of varaibles
-e=0.75
-Ta=870 //R
-Tc=1075//R
-cp=0.24
-Td=550 //R
-//calculations
-Tadash=e*(Tc-Ta) +Ta
-Tcdash=Tc+Ta-Tadash
-Q1=cp*(Tb-Tadash)
-Q2=cp*(Tcdash-Td)
-Wnet=Q1-Q2
-eta=Wnet/Q1
-//results
-printf("Net work done = %d B/lb",Wnet)
-printf("\n efficiency = %.2f ",eta)
+clc
+//initialization of variables
+e=0.75
+Ta=870 //R
+Tc=1075//R
+cp=0.24
+Td=550 //R
+Tb=1700;
+//calculations
+Tadash=e*(Tc-Ta) +Ta
+Tcdash=Tc+Ta-Tadash
+Q1=cp*(Tb-Tadash)
+Q2=cp*(Tcdash-Td)
+Wnet=Q1-Q2
+eta=Wnet/Q1
+//results
+printf("Net work done = %d B/lb",Wnet)
+printf("\n efficiency = %.2f ",eta) \ No newline at end of file
diff --git a/1472/CH17/EX17.1.b/17_1b.sce b/1472/CH17/EX17.1.b/17_1b.sce
index 0a7bb1974..d97b02f13 100755
--- a/1472/CH17/EX17.1.b/17_1b.sce
+++ b/1472/CH17/EX17.1.b/17_1b.sce
@@ -1,13 +1,14 @@
-clc
-//initialization of varaibles
-k=1.3
-P=100 //psia
-//calculations
-Pratio=(2/(k+1))^(k/(k-1))
-Pt=Pratio*P
-disp("From table 3,")
-ht=1221.5 //B/lb
-vt=8.841 //cu ft/lb
-at=w*vt/1700
-//results
-printf("Throat area = %.4f sq ft",at)
+clc
+//initialization of variables
+w = 1;
+k=1.3
+P=100 //psia
+//calculations
+Pratio=(2/(k+1))^(k/(k-1))
+Pt=Pratio*P
+disp("From table 3,")
+ht=1221.5 //B/lb
+vt=8.841 //cu ft/lb
+at=w*vt/1700
+//results
+printf("Throat area = %.4f sq ft",at) \ No newline at end of file
diff --git a/1472/CH17/EX17.3.b/17_3b.sce b/1472/CH17/EX17.3.b/17_3b.sce
index 00e93490c..eaa6adbba 100755
--- a/1472/CH17/EX17.3.b/17_3b.sce
+++ b/1472/CH17/EX17.3.b/17_3b.sce
@@ -1,32 +1,33 @@
-clc
-//initialization of varaibles
-h0=191.81 //B/lb
-Pr0=5.526
-w=1 //lb/sec
-Pratio=0.53
-k=1.4
-T0=800 //R
-cp=0.24
-P0=150 //psia
-P2=15 //psia
-//calculations
-Prt=Pratio*Pr0
-disp("From keenan and kaye steam tables,")
-Pr=2.929
-Tts=668 //R
-hts=159.9 //B/lb
-Vts=sqrt(2*32.2*778*(h0-hts))
-vts=53.34*Tts/(Pt*144)
-at=w*vts/(Vts)
-Pr2=P2*Pr0/P0
-T2s=415 //R
-h2s=99.13 //B/lb
-h2=110.25 //B/lb
-T2=462 //R
-V2=sqrt(2*32.2*778*(h0-h2))
-v2=53.34*T2/(144*P2)
-a2=w*v2/V2
-//results
-printf("Exit velocity = %d fps",Vts)
-printf("\n Throat area = %.5f ft^2",at)
-printf("\n Exit area = %.5f ft^2",a2)
+clc
+//initialization of variables
+h0=191.81 //B/lb
+Pr0=5.526
+w=1 //lb/sec
+Pratio=0.53
+k=1.4
+T0=800 //R
+cp=0.24
+P0=150 //psia
+P2=15 //psia
+Pt=79.5;
+//calculations
+Prt=Pratio*Pr0
+disp("From keenan and kaye steam tables,")
+Pr=2.929
+Tts=668 //R
+hts=159.9 //B/lb
+Vts=sqrt(2*32.2*778*(h0-hts))
+vts=53.34*Tts/(Pt*144)
+at=w*vts/(Vts)
+Pr2=P2*Pr0/P0
+T2s=415 //R
+h2s=99.13 //B/lb
+h2=110.25 //B/lb
+T2=462 //R
+V2=sqrt(2*32.2*778*(h0-h2))
+v2=53.34*T2/(144*P2)
+a2=w*v2/V2
+//results
+printf("Exit velocity = %d fps",Vts)
+printf("\n Throat area = %.5f ft^2",at)
+printf("\n Exit area = %.5f ft^2",a2) \ No newline at end of file
diff --git a/1472/CH21/EX21.3/21_3.sce b/1472/CH21/EX21.3/21_3.sce
index 0cdb4760a..6e12126cb 100755
--- a/1472/CH21/EX21.3/21_3.sce
+++ b/1472/CH21/EX21.3/21_3.sce
@@ -1,21 +1,22 @@
-clc
-//initialization of varaibles
-R=53.34
-T1=540 //R
-n=1.4
-g=n
-n2=1.3
-P2=90 //psia
-P1=15 //psia
-cv=0.171
-eta=0.95
-//calculations
-pv=R*T1
-Wk=n*R*T1*((P2/P1)^((g-1)/g) -1) /(n-1)
-Wn=n2*R*T1*((P2/P1)^((n2-1)/n2) -1) /(n2-1)
-Wt=R*T1*log(P2/P1)
-Wx=-Wk/eta
-dh=cp*T1*(1.52 - 1)
-Q=dh+Wx/778
-//results
-printf("Heat transferred = %.1f B/lb",Q)
+clc
+//initialization of variables
+R=53.34
+T1=540 //R
+n=1.4
+g=n
+n2=1.3
+P2=90 //psia
+P1=15 //psia
+cv=0.171
+cp=0.24;
+eta=0.95
+//calculations
+pv=R*T1
+Wk=n*R*T1*((P2/P1)^((g-1)/g) -1) /(n-1)
+Wn=n2*R*T1*((P2/P1)^((n2-1)/n2) -1) /(n2-1)
+Wt=R*T1*log(P2/P1)
+Wx=-Wk/eta
+dh=cp*T1*(1.52 - 1)
+Q=dh+Wx/778
+//results
+printf("Heat transferred = %.1f B/lb",Q) \ No newline at end of file
diff --git a/1472/CH23/EX23.4/23_4.sce b/1472/CH23/EX23.4/23_4.sce
index ad9a56c1e..1345b351c 100755
--- a/1472/CH23/EX23.4/23_4.sce
+++ b/1472/CH23/EX23.4/23_4.sce
@@ -1,56 +1,57 @@
-clc
-//initialization of varaibles
-V1=587 //fps
-etaD=0.9
-etaC=0.8
-h1=114.69
-P1=10 //psia
-P6=P1
-dhB=-19100 //B/lb
-T1=480 //R
-//calculations
-h2s=etaD*V1^2 /(778*2*32.2) +h1
-disp("From tables,")
-Pr2s=1.104
-Pr1=0.9182
-P2=P1*Pr2s/Pr1
-h2=h1+(h2s-h1)/etaD
-T2=509 //R
-Pr2=1.127
-Pr3s=Pr2*P3/P2
-Pr3s=6.76
-h3s=203.2
-h3=(h3s-h2)/etaC +h2
-T3=930 //R
-P3=6*P2
-T4=2160 //R
-h4=549.35
-Pr4=238
-h4B=126.66
-dh4=422.7
-h3B=h4B
-dh3=h3-h3B
-cp=0.5
-Ta=480 //R
-Tb=530 //R
-dhf=cp*(Tb-Ta)
-wratio=(-dh4+dh3)/(dh4+dhf+dhB)
-h5s=425.3
-Pr5s=93.1
-P5=27.6
-T5=1801 //R
-Pr5=114.28
-Pr6s=Pr5*P6/P5
-h5=450
-h6=351
-V6=sqrt(2*32.2*778*(h5-h6))
-SI=((1+wratio)*V6 -V1)/(32.2)
-v1=53.34*T1/(P1*144)
-wa=V1/v1
-thrust = wa*SI
-SC=wa*0.0174*3600/1840
-eff=2545/(SC*-dhB)
-//results
-printf("Specific impulse = %.1f lb/lb per sec of air",SI)
-printf("\n Thrust = %d lb",thrust)
-printf("\n Efficiency = %.3f",eff)
+clc
+//initialization of variables
+V1=587 //fps
+etaD=0.9
+etaC=0.8
+h1=114.69
+P1=10 //psia
+P3=626;
+P6=P1
+dhB=-19100 //B/lb
+T1=480 //R
+//calculations
+h2s=etaD*V1^2 /(778*2*32.2) +h1
+disp("From tables,")
+Pr2s=1.104
+Pr1=0.9182
+P2=P1*Pr2s/Pr1
+h2=h1+(h2s-h1)/etaD
+T2=509 //R
+Pr2=1.127
+Pr3s=Pr2*P3/P2
+Pr3s=6.76
+h3s=203.2
+h3=(h3s-h2)/etaC +h2
+T3=930 //R
+P3=6*P2
+T4=2160 //R
+h4=549.35
+Pr4=238
+h4B=126.66
+dh4=422.7
+h3B=h4B
+dh3=h3-h3B
+cp=0.5
+Ta=480 //R
+Tb=530 //R
+dhf=cp*(Tb-Ta)
+wratio=(-dh4+dh3)/(dh4+dhf+dhB)
+h5s=425.3
+Pr5s=93.1
+P5=27.6
+T5=1801 //R
+Pr5=114.28
+Pr6s=Pr5*P6/P5
+h5=450
+h6=351
+V6=sqrt(2*32.2*778*(h5-h6))
+SI=((1+wratio)*V6 -V1)/(32.2)
+v1=53.34*T1/(P1*144)
+wa=V1/v1
+thrust = wa*SI
+SC=wa*0.0174*3600/1840
+eff=2545/(SC*-dhB)
+//results
+printf("Specific impulse = %.1f lb/lb per sec of air",SI)
+printf("\n Thrust = %d lb",thrust)
+printf("\n Efficiency = %.3f",eff) \ No newline at end of file