blob: 3fbd1f6bc58ff9c4a1d240a287c34d810a9a4d88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
clc
//initialization of variables
T = 32 //F
T0 = 10//F
Tinf= 80 //F
U = 3.6 //Btu/hr-ft^2-F
A = 27 //ft^2
d = 8.31 //lb/gal
V = 100 //gal
Cv = 1//Btu/lb-F
//Calculations
t = (-log((T-T0)/(Tinf-T0)))*d*V*Cv/(U*A)//hr
//Results
printf("The time we can wait before the water in the tank starts to freeze is %.f hr",t)
|