summaryrefslogtreecommitdiff
path: root/409/CH6
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /409/CH6
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '409/CH6')
-rwxr-xr-x409/CH6/EX6.1/Example6_1.sce31
-rwxr-xr-x409/CH6/EX6.2/Example6_2.sce16
-rwxr-xr-x409/CH6/EX6.3/Example6_3.sce15
3 files changed, 62 insertions, 0 deletions
diff --git a/409/CH6/EX6.1/Example6_1.sce b/409/CH6/EX6.1/Example6_1.sce
new file mode 100755
index 000000000..3712acb6e
--- /dev/null
+++ b/409/CH6/EX6.1/Example6_1.sce
@@ -0,0 +1,31 @@
+clear ;
+clc;
+// Example 6.1
+printf('Example 6.1\n\n');
+// Page no. 142
+// Solution
+
+// Given
+P_O = 89 ;// Premium octane -[octane/gal]
+S_O = 93 ;// Supereme octane - [octane/gal]
+R_O = 87 ;// Regular octane - [octane/gal]
+CP = 1.269 ;// Cost of premium octane -[$/gal]
+SP = 1.349 ;// Cost of supereme octane -[$/gal]
+RP = 1.149 ;// Cost of regular octane -[$/gal]
+
+// Let x and y fraction of regular octane and supreme octane is blended respectively,therefore: x + y = 1 ...(a)
+// and 89 = 87x + 93y ...(b)
+// Solve equations (a) and (b) simultaneously
+a = [1 1;87 93] ;// Matrix of coefficients of unknown
+b = [1;89] ;// Matrix of constant
+c = a\b ;// Matrix of solutons- x = c(1) , y = c(2)
+cost = c(1)*RP + c(2)*SP ;// Cost after blending - [$/gal]
+sv = CP - cost ;// Save on blending - [$/gal]
+
+// Check whether there is loss or save
+if (sv<0)
+ then
+ printf('We will not save money by blending.');
+
+ else
+ printf('We will save money by blending, and save is %.3f $/gal.',sv); \ No newline at end of file
diff --git a/409/CH6/EX6.2/Example6_2.sce b/409/CH6/EX6.2/Example6_2.sce
new file mode 100755
index 000000000..5068fb6b6
--- /dev/null
+++ b/409/CH6/EX6.2/Example6_2.sce
@@ -0,0 +1,16 @@
+clear ;
+clc;
+// Example 6.2
+printf('Example 6.2\n\n');
+//Page no. 147
+// Solution
+
+// Basis 1 hour
+fd= 1000.0 ;//feed rate-[L/hr]
+cfd= 500.0;//Weight of cells per litre- [mg/L]
+dn= 1.0 ;//Density of feed-[g/cm^3]
+wp= 50.0 ;// Weight percent of cells in product stream
+Pg=(fd*cfd*dn)/(1000*wp*.01) ;// Mass balance for cells
+printf(' Product flow(P) per hour is %.1f g\n',Pg);
+Dg= (fd*dn*1000) - Pg*(wp*.01) ;// Mass balance for the fluid
+printf(' Discharge flow per hour is %.3e g\n',Dg); \ No newline at end of file
diff --git a/409/CH6/EX6.3/Example6_3.sce b/409/CH6/EX6.3/Example6_3.sce
new file mode 100755
index 000000000..405d61c84
--- /dev/null
+++ b/409/CH6/EX6.3/Example6_3.sce
@@ -0,0 +1,15 @@
+clear ;
+clc;
+// Example 6.3
+printf('Example 6.3\n\n');
+//Page no. 154
+// Solution
+
+//Basis 10000 gal motor oil at an assumed 77 degree fahrenheit
+dn = 0.80 ;//Density of motor oil-[g/cm^3]
+in_ms = (10000*(0.1337)*62.4*dn) ;// Initial mass of motor oil in the tank -[lb]
+printf(' Initial mass of motor oil in the tank is %.1f lb\n',in_ms);
+m_fr = .0015 ;//Mass fractional loss
+printf(' Mass fractional loss is %.4f \n',m_fr);
+Dsg = m_fr*in_ms ;// Mass balance for the fluid
+printf(' Discharge of motor oil on flushing flow for 10000 gal motor oil is %.1f lb\n',Dsg); \ No newline at end of file