blob: d1293e8ea1c3fa6e37fd90dc50278c6b95fa5a44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
//example 3.2
clear;
clc;
//given:
R=8.314;//universal gas constant [J/K/mol]
T=300;//temperture for the process [K]
U=0;//change in internal energy [J]
V1=2.28;//initial volume [m3]
V2=4.56;//final volume[m3]
//to find the heat lost or gained by the system:
W=2.303*R*T*log10(V2/V1);//work done during the process[J]
Q=W;//heat lost or gained by the system[J]
printf("the heat gained by the system is %f J",Q);
|