summaryrefslogtreecommitdiff
path: root/23
diff options
context:
space:
mode:
Diffstat (limited to '23')
-rwxr-xr-x23/CH3/EX3.12/Example_3_12.sce92
-rwxr-xr-x23/CH5/EX5.5/Example_5_5.sce65
2 files changed, 80 insertions, 77 deletions
diff --git a/23/CH3/EX3.12/Example_3_12.sce b/23/CH3/EX3.12/Example_3_12.sce
index cb5fe7582..54bce705b 100755
--- a/23/CH3/EX3.12/Example_3_12.sce
+++ b/23/CH3/EX3.12/Example_3_12.sce
@@ -1,47 +1,47 @@
-clear;
-clc;
-
-//To find Approx Value
-function[A]=approx(V,n)
- A=round(V*10^n)/10^n;//V-Value n-To what place
- funcprot(0)
-endfunction
-
-//Example 3.12
-//Caption : Program to Find density for ammonia
-
-//Given Values
-T=310;//Temp=310K(36.85`C)
-M=17.02;
-
-//Solution
-
-//(a)
-//saturated liquid
-Tc=405.7;//App B
-Vc=0.07247;//App B
-Zc=0.242;//App B
-Vsat=approx(Vc*(Zc^((1-Tr)^0.2857)),5);//m^3kmol^-1
-rho=approx(M/Vsat,2);
-disp('(a)Saturated liquid')
-disp('m^3/kmol',Vsat,'Volume is ')
-disp('kmol/m^3',rho,'Density is ')
-
-//(b)
-//Liquid at 100bar
-P=100;//Pressure=100bar
-Pc=112.8;//App B
-Pr=P/Pc;
-rho_r=2.38;//From Graph
-V=Vc/rho_r;
-//but this Gives large error
-rho_r1=2.34;
-V_new=approx(V*rho_r1/rho_r,5);
-//In exceptance with Experimental Value
-
-rho=approx(M/V_new,2);
-disp('(b)For Liquid at 100bar')
-disp('m^3/kmol',V_new,'Volume is ')
-disp('kmol/m^3',rho,'Density is ')
-
+clear;
+clc;
+
+//To find Approx Value
+function[A]=approx(V,n)
+ A=round(V*10^n)/10^n;//V-Value n-To what place
+ funcprot(0)
+endfunction
+
+//Example 3.12
+//Caption : Program to Find density for ammonia
+
+//Given Values
+T=310;//Temp=310K(36.85`C)
+M=17.02;
+
+//Solution
+
+//(a)
+//saturated liquid
+Tc=405.7;//App B
+Vc=0.07247;//App B
+Zc=0.242;//App B
+Vsat=approx(Vc*(Zc^((1-T)^0.2857)),5);//m^3kmol^-1
+rho=approx(M/Vsat,2);
+disp('(a)Saturated liquid')
+disp('m^3/kmol',Vsat,'Volume is ')
+disp('kmol/m^3',rho,'Density is ')
+
+//(b)
+//Liquid at 100bar
+P=100;//Pressure=100bar
+Pc=112.8;//App B
+Pr=P/Pc;
+rho_r=2.38;//From Graph
+V=Vc/rho_r;
+//but this Gives large error
+rho_r1=2.34;
+V_new=approx(V*rho_r1/rho_r,5);
+//In exceptance with Experimental Value
+
+rho=approx(M/V_new,2);
+disp('(b)For Liquid at 100bar')
+disp('m^3/kmol',V_new,'Volume is ')
+disp('kmol/m^3',rho,'Density is ')
+
//End \ No newline at end of file
diff --git a/23/CH5/EX5.5/Example_5_5.sce b/23/CH5/EX5.5/Example_5_5.sce
index b711fd6fe..4b14f2c03 100755
--- a/23/CH5/EX5.5/Example_5_5.sce
+++ b/23/CH5/EX5.5/Example_5_5.sce
@@ -1,32 +1,35 @@
-clear;
-clc;
-
-//Example 5.5
-//Caption : Program to Find the Rate of Heat Transfer and Entropy
-
-//Given Values
-
-//Gas A
-rn_A=1;//rate[mol/s]
-T_A=600;//[K]
-
-//Gas B
-rn_B=2;//rate[mol/s]
-T_B=450;//[K]
-
-//product
-rn=rn_A+rn_B;//[mol/s]
-T=400;//[K]
-R=8.314;
-Cp=(7/2)*R;
-T_s=300;//Temperature[K]
-
-//By equation (2.30) rQ=rn*H-rn_A*H_A-rn_B*H_B=rn_A(H-H_A)+rn_B*(H-H_B) Rate of heat transfer
-rQ=(rn_A*Cp*(T-T_A))+(rn_B*Cp*(T-T_B));//[J/s] or [W]
-//By eqn (5.22) rSg=rn*S-(rn_A*S_A)-(rn_B*S_B)-(rQ/T_s) rate of entropy generation for the process
-rSg=approx((rn_A*Cp*log(T/T_A))+(rn_B*Cp*log(T/T_B))-(rQ/T_s),3);//[J/K/s]
-
-disp('J/s or W',rQ,'Rate of heat transfer')
-disp('J/K/s',rSg,'Rate of entropy generation')
-
+clear;
+clc;
+function[A]=approx(V,n)
+ A=round(V*10^n)/10^n;//V-Value n-To what place
+ funcprot(0)
+endfunction
+//Example 5.5
+//Caption : Program to Find the Rate of Heat Transfer and Entropy
+
+//Given Values
+
+//Gas A
+rn_A=1;//rate[mol/s]
+T_A=600;//[K]
+
+//Gas B
+rn_B=2;//rate[mol/s]
+T_B=450;//[K]
+
+//product
+rn=rn_A+rn_B;//[mol/s]
+T=400;//[K]
+R=8.314;
+Cp=(7/2)*R;
+T_s=300;//Temperature[K]
+
+//By equation (2.30) rQ=rn*H-rn_A*H_A-rn_B*H_B=rn_A(H-H_A)+rn_B*(H-H_B) Rate of heat transfer
+rQ=(rn_A*Cp*(T-T_A))+(rn_B*Cp*(T-T_B));//[J/s] or [W]
+//By eqn (5.22) rSg=rn*S-(rn_A*S_A)-(rn_B*S_B)-(rQ/T_s) rate of entropy generation for the process
+rSg=approx((rn_A*Cp*log(T/T_A))+(rn_B*Cp*log(T/T_B))-(rQ/T_s),3);//[J/K/s]
+
+disp('J/s or W',rQ,'Rate of heat transfer')
+disp('J/K/s',rSg,'Rate of entropy generation')
+
//End \ No newline at end of file