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 /3012/CH2/EX2.2/Ex2_2.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 '3012/CH2/EX2.2/Ex2_2.sce')
-rwxr-xr-x | 3012/CH2/EX2.2/Ex2_2.sce | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/3012/CH2/EX2.2/Ex2_2.sce b/3012/CH2/EX2.2/Ex2_2.sce new file mode 100755 index 000000000..4915ec069 --- /dev/null +++ b/3012/CH2/EX2.2/Ex2_2.sce @@ -0,0 +1,23 @@ +// Given:- +p1 = 3*(10**5) // initial pressure in pascal +v1 = 0.1 // initial volume in m3 +v2 = 0.2 // final volume +m = 4.0 // mass of the gas in kg +deltau = -4.6 // change in specific internal energy in KJ/Kg + +// Calculations + +constant = p1*(v1**1.5) // p*(v^n) = constant + +function v = p(v) + v = constant/(v**1.5) // expressing pressure as function of volume +endfunction + +work = intg(v1,v2,p) // integrating pdv from initial to final volume +w=work(1)/1000 // divided by 1000 to convert to KJ + +deltaU = m*deltau // change in internal energy in KJ +Q = deltaU + w // neglecting kinetic and potential energy changes + +// Result +printf( 'net heat transfer for the process in KJ %.2f',Q) |