Created
July 7, 2012 16:26
-
-
Save Xodarap/3067074 to your computer and use it in GitHub Desktop.
Heat calculation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function q = heat(mph) | |
% Given a walking speed in miles per hour, returns the energy given off as heat | |
% in 30 degree celsius temperature with no wind. | |
% No simple formula for energy taken by exercise, unfortunately | |
if mph == 3 | |
exCalPerH = 230; | |
elseif mph == 4 | |
exCalPerH = 350; | |
elseif mph == 5 | |
exCalPerH = 544; | |
end | |
calFromSun = 172; | |
windSpeed = mph * .447; % mph -> m/s | |
convection = 59.8 * sqrt(windSpeed); | |
convectionCals = 860.42 / 1000 * convection % 1 W = 860 Cal/h | |
timeTaken = (1/2) / mph; % walking half a mile | |
q = (exCalPerH + calFromSun - convectionCals) * timeTaken; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment