blob: 3409ecb82604d35532daf4e6958297444980398d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
clear;
clc;
printf("\t\t\tProblem Number 6.31\n\n\n");
// Chapter 6: The Ideal Gas
// Problem 6.31 (page no. 275)
// Solution
//data given
T1=800+273; //Celsius temperature converted to Kelvin //initial temperature
T2=500+273; //Celsius temperature converted to Kelvin //final temperature
p2=1; //atm //absolute final pressure
p1=5; //atm //absolute initial pressure
//A gas expands isentropically
//From the equation,
//T2/T1=((p2/p1)^((k-1)/k));
//rearranging,
k=inv(1-((log(T2/T1)/log(p2/p1)))); //k=cp/cv //Ratio of specific heats
printf("Ratio of specific heats (k) is %f\n",k);
|