forked from bnajafi/Python4ScientificComputing_Fundamentals
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWallCalculations_Botti.py
More file actions
68 lines (55 loc) · 2.42 KB
/
WallCalculations_Botti.py
File metadata and controls
68 lines (55 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# -*- coding: utf-8 -*-
def WallCalc_withParallel(WallSer,WallPar,AreaFraction):
Materials_Dictionary = {"Outside_surface":0.030,"Wood_bevel_lapped_siding":0.14,"Wood_fiberboard_sheeting13mm":0.23,"Glass_fiber_insulation90mm":2.45,"Wood_stud38*90mm":0.63,"Gypsum_wallboard13mm":0.079,"Wood25mm":0.44,"Inside_surface":0.12}
Air = ["Outside_surface","Inside_surface"]
RSeriesValues = []
RParallelValues = []
RAirValues = []
RSerTot = 0
RAirTot = 0
for AnyLayer in WallSer:
RValueSer = Materials_Dictionary[AnyLayer]
RSeriesValues.append(RValueSer)
RSerTot = RSerTot + RValueSer
for AnyLayer in Air:
RValueAir = Materials_Dictionary[AnyLayer]
RAirValues.append(RValueAir)
RAirTot = RAirTot + RValueAir
Uoverall = 0
for AnyLayer in WallPar:
RValuePar = Materials_Dictionary[AnyLayer]
RParallelValues.append(RValuePar)
Rsection = RSerTot + RAirTot + RValuePar
Usection = 1 / Rsection
if (AnyLayer=="Glass_fiber_insulation90mm"):
AreaCoeff=AreaFraction
else:
AreaCoeff=1-AreaFraction
Uoverall = Uoverall + Usection*AreaCoeff
Roverall = 1 / Uoverall
R_tot = RSerTot+RAirTot+Roverall
U_tot = 1/R_tot
result = {"R_tot":R_tot,"U_tot":U_tot}
return result
def WallCalc_onlyInSeries(WallSer):
Materials_Dictionary = {"Outside_surface":0.030,"Wood_bevel_lapped_siding":0.14,"Wood_fiberboard_sheeting13mm":0.23,"Glass_fiber_insulation90mm":2.45,"Wood_stud38*90mm":0.63,"Gypsum_wallboard13mm":0.079,"Wood25mm":0.44,"Inside_surface":0.12}
Air = ["Outside_surface","Inside_surface"]
RSeriesValues = []
RAirValues = []
RSerTot = 0
RAirTot = 0
for AnyLayer in WallSer:
RValueSer = Materials_Dictionary[AnyLayer]
RSeriesValues.append(RValueSer)
RSerTot = RSerTot + RValueSer
for AnyLayer in Air:
RValueAir = Materials_Dictionary[AnyLayer]
RAirValues.append(RValueAir)
RAirTot = RAirTot + RValueAir
R_tot = RSerTot+RAirTot
U_tot = 1/R_tot
result = {"R_tot":R_tot,"U_tot":U_tot}
return result
#**************************************TEST************************************************************
WallSerie = ["Wood_bevel_lapped_siding","Wood_fiberboard_sheeting13mm","Gypsum_wallboard13mm"]
WallCalc_onlyInSeries(WallSerie)