diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2510/CH4/EX4.6/Ex4_6.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '2510/CH4/EX4.6/Ex4_6.sce')
-rwxr-xr-x | 2510/CH4/EX4.6/Ex4_6.sce | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/2510/CH4/EX4.6/Ex4_6.sce b/2510/CH4/EX4.6/Ex4_6.sce new file mode 100755 index 000000000..b9702a842 --- /dev/null +++ b/2510/CH4/EX4.6/Ex4_6.sce @@ -0,0 +1,29 @@ +//Variable declaration: +q1 = 1000.0 //Volumetric flowrate from tank 1 (gal/day) +q2 = 1000.0 //Volumetric flowrate from tank 2 (gal/day) +q3 = 2000.0 //Volumetric flowrate from tank 3 (gal/day) +q4 = 200.0 //Volumetric flowrate from tank 4 (gal/day) +q5 = 1800.0 //Volumetric flowrate from tank 5 (gal/day) +q6 = 1000.0 //Volumetric flowrate from tank 6 (gal/day) +C1 = 4.0 //Phosphate concentration in tank 1 (ppm) +C2 = 0.0 //Phosphate concentration in tank 2 (ppm) +C3 = 2.0 //Phosphate concentration in tank 3 (ppm) +C4 = 20.0 //Phosphate concentration in tank 4 (ppm) +C5 = 0.0 //Phosphate concentration in tank 5 (ppm) +C6 = 0.0 //Phosphate concentration in tank 6 (ppm) +Cf = 120000.0 //conversion factor for water (gal/10**6lb) + +//Calculations: +C1q1 = C1*q1/Cf //Data 1 (lb/day) +C2q2 = C2*q2/Cf //Data 2 (lb/day) +C3q3 = C3*q3/Cf //Data 3 (lb/day) +C4q4 = C4*q4/Cf //Data 4 (lb/day) +C5q5 = C5*q5/Cf //Data 5 (lb/day) +C6q6 = C6*q6/Cf //Data 6 (lb/day) + +//Results: +if (((C1q1 + C2q2) == C3q3) & C3q3 == (C4q4 + C5q5) & C5q5 == C6q6 & C2q2 == C6q6) then + printf("The data appear to be consistent .") +else + printf ("The data appear to be inconsistent .") +end |