In thermodynamics, the Carnot efficiency is the maximum possible efficiency of a heat engine operating between two reservoirs at different temperatures. The Carnot efficiency is given as
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:3| Question number:34.3
All Answers
total answers (1)
carnot.m
% Calculates the Carnot efficiency, given the temps
% of cold and hot reservoirs, error-checking both
Tc = input('Enter the cold reservoir temperature: ');
Th = input('Enter the hot reservoir temperature: ');
carnotEff = calcCarnot(Tc, Th);
fprintf('The Carnot efficiency is %.3f\n',carnotEff)
calcCarnot.m
function eff = calcCarnot(Tc, Th)
eff = 1 - (Tc/Th);
end
need an explanation for this answer? contact us directly to get an explanation for this answer