blob: b0546b8542c041ec86fc1b6efa40b7cef3b88f6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
//A Textbook of Chemical Engineering Thermodynamics
//Chapter 2
//First Law of Thermodynamics
//Example 4
clear;
clc;
//Given:
//Step 1: constant pressure process
//Step 2: costant volume process
//Step 3: adibatic process
//To find internal energy change during each step and work done during adiabatic process
//For step 1
W1 = -50; //work received in J
Q1 = -25; //heat gven out in J
U1 = Q1-W1; //internal energy change in J
mprintf('Change in internal energy for constant pressure process is %i J',U1);
//For step 2
W2 = 0; //work done for constant volume process is zero
Q2 = 75; //heat received in J
U2 = Q2; //internal energy change in J
mprintf('\nChange in internal energy for constant volume process is %i J',U2);
//For step 3
Q3 = 0; //no heat exchange in adiabatic process
//Since the process is cyclic
//U3+U2+U1 = 0;
U3 = -(U1+U2);
W3 = -U3; //work done in J
mprintf('\nWork done during adiabatic process is %i J',W3);
//end
|