Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clc;clear all;
- %% Problem 5
- %N2 Properties
- R = 296.8; %N2 J/kg*K
- Tv = 3521; %K, characteristic vibrational temp
- T1 = 300; %K
- T2 = 3000; %K
- % Since density is constant:
- density_ratio = 1;
- %% Calorically Perfect Gas
- Cv_cpg = (5/2)*R;
- Cp_cpg = Cv_cpg + R;
- gamma_cpg = Cp_cpg/Cv_cpg;
- entropy_change_cpg = Cv_cpg*log(T2/T1) - R*log(density_ratio);
- disp(['Assuming CPG, the change in entropy is: ', num2str(entropy_change_cpg), ' J/K', newline]);
- %% Thermally Perfect Gas
- theta_v1 = Tv/(2*T1);
- theta_v2 = Tv/(2*T2);
- entropy_change_tpg = R*(log(((T2/T1)^1/(gamma_cpg-1))*density_ratio) + ((theta_v2*coth(theta_v2)) + log(sinh(theta_v1)/sinh(theta_v2)) - ((theta_v1*coth(theta_v1)))));
- disp(['Assuming TPG, the change in entropy is: ', num2str(entropy_change_tpg), ' J/K']);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement