From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 647/CH2/EX2.1/Example2_1.sce | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 647/CH2/EX2.1/Example2_1.sce (limited to '647/CH2/EX2.1/Example2_1.sce') diff --git a/647/CH2/EX2.1/Example2_1.sce b/647/CH2/EX2.1/Example2_1.sce new file mode 100755 index 000000000..aaff9dbb9 --- /dev/null +++ b/647/CH2/EX2.1/Example2_1.sce @@ -0,0 +1,22 @@ +clear; +clc; + +// Example: 2.1 +// Page: 39 + +printf("Example: 2.1 - Page: 39\n\n"); + +// Solution + +//*****Data*****// +deff('[E] = f1(T)','E = 50 + 25*T + 0.05*T^2');// [J] +deff('[Q] = f2(T)','Q = 4000 + 10*T');// [J] +Ti = 400;// [K] +Tf = 800;// [K] +//*************// + +// From the first law of thermodynamics: +// W = Q - delta_E +// W = f2 -f1 +W = integrate('(4000 + 10*T) - (50 + (25*T) + (0.05*T^2))','T',Ti,Tf); +printf("The work done during the process is %.2f kJ\n",W/1000); \ No newline at end of file -- cgit