summaryrefslogtreecommitdiff
path: root/167/CH4/EX4.3/ex3.sce
blob: e5e3f33f47baaaf42c162ab662f712af08e4b4a4 (plain)
1
2
3
4
5
6
7
8
//ques3
//Isothermal Compression of an Ideal Gas
clc
P1=100//Initial Pressure in kPa
V1=0.4;//Initial Volume in m^3
V2=0.1;//final Volume in m^3
w=P1*V1*log(V2/V1);//work done for Isothermal process in kJ 
printf('Work done = %.1f kJ',w);