summaryrefslogtreecommitdiff
path: root/587/CH1/EX1.5/example1_5.sce
blob: 23b1602a841f96aebbc672ca54d7a6656a173bad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
clear;
clc;

//Example1.5 (The cost of Heat loss through a Roof)

//(a)
k=0.8;//The thermal conductivity of the roof[W/m.degree.C]
A=6*8;//Area of the roof[m^2]
t1=15;//temperature of inner surface roof[degree C]
t2=4;//temperature of outer surface roof[degree C]
L=0.25;//thickness of roof[m]
Q_=k*A*(t1-t2)/L;//[W]
disp("W",Q_,"The steady rate of heat transfer through the roof is")

//(b)
dt=10;//time period[h]
Q=Q_*dt/1000;//[kWh]
u_cost=0.08;//Unit cost of energy[$/kWh]
Cost=Q*u_cost;//[$]
disp(Cost,"and its cost is $","kWh",Q,"The amount of heat lost through the roof")