diff --git a/Assignment 1_Deadline 26 Sept 2017/assignment1_step1_Genco.py b/Assignment 1_Deadline 26 Sept 2017/assignment1_step1_Genco.py new file mode 100755 index 0000000..a2d2bae --- /dev/null +++ b/Assignment 1_Deadline 26 Sept 2017/assignment1_step1_Genco.py @@ -0,0 +1,41 @@ +#determination of the total thermal resistance and the heat transfer rate throw a Composite Wall + +H = 3 #height of the wall +W = 5 #width of the wall +ht = 0.25 #total height of the unit +hb = 0.22 #height of the brick +hp = 0.015 #height of the plaster +wf = 0.03 #width of the foam +wp = 0.02 #width of the plaster layers +wb = 0.16 #width of the brick +k1 = 0.026 #foam conduction heat transfer +k2 = 0.22 #plaster conduction heat transfer +k3 = 0.72 #brick conduction heat transfer +h1 = 10 #inside convenction heat trasfer +h2 = 25 #outside convenction heat trasfer +t1 = 20 #temperature inside +t2 = -10 #temperature outside + +#Resistence +Rconv = 1/(h1*ht*1) +R1 = wf/(k1*ht*1) #foam Resistence +R2 = R6 = wp/(k2*ht*1) # the two plaster side resistence +R3 = R5 = wb/(k2*hp*1) # Plaster center Resistence +R4 = wb/(k3*hb*1) # Brick Resistence +R0 = 1/(h2*ht*1) #second convention resistence + +Rp = ( (1/R3) + (1/R4) + (1/R5) ) +RP = 1/Rp #sum of the three resistence in the middle, they are in parallel + +Rt = Rconv+R1+R2+RP+R6+R0 + +Q = (t1-(t2))/Rt #heat transfer through the wall +s = (ht*1) #surface area in m^2 +Q1 = Q/s #heat transfer per m^2 area +A = H * W #total area + +Qt = Q1*A + + +print"The amount of heat transfer of the entire wall is "+str (Qt)+" degC/W" +print"The amount of thermal resistence of the brick is "+str (Rt)+" W" \ No newline at end of file diff --git a/Assignment 1_Deadline 26 Sept 2017/assignment1_step1_riva.py b/Assignment 1_Deadline 26 Sept 2017/assignment1_step1_riva.py new file mode 100755 index 0000000..3a39cb3 --- /dev/null +++ b/Assignment 1_Deadline 26 Sept 2017/assignment1_step1_riva.py @@ -0,0 +1,41 @@ +#ASSIGNMENT 1 + +H = 3 #height of the wall +W = 5 #width of the wall +ht = 0.25 #total height of the unit +hb = 0.22 #height of the brick +hp = 0.015 #height of the plaster +wf = 0.03 #width of the foam +wp = 0.02 #width of the plaster layers +wb = 0.16 #width of the brick +k1 = 0.026 #foam conduction heat transfer +k2 = 0.22 #plaster conduction heat transfer +k3 = 0.72 #brick conduction heat transfer +h1 = 10 #inside convenction heat trasfer +h2 = 25 #outside convenction heat trasfer +t1 = 20 #temperature inside +t2 = -10 #temperature outside + +#Res +Rconv = 1/(h1*ht*1) +R1 = wf/(k1*ht*1) #foam Res +R2 = R6 = wp/(k2*ht*1) # the two plaster side res +R3 = R5 = wb/(k2*hp*1) # Plaster center Res +R4 = wb/(k3*hb*1) # Brick Res +R0 = 1/(h2*ht*1) #second convention res + +Rp = ( (1/R3) + (1/R4) + (1/R5) ) +RP = 1/Rp #sum of the three res in the middle, they are in parallel + +Rt = Rconv+R1+R2+RP+R6+R0 + +Q = (t1-(t2))/Rt #heat transfer through the wall +s = (ht*1) #surface area in m^2 +Q1 = Q/s #heat transfer per m^2 area +A = H * W #total area + +Qt = Q1*A + + +print"The amount of heat transfer of the entire wall is "+str (Qt)+" degC/W" +print"The amount of thermal resistence of the brick is "+str (Rt)+" W" \ No newline at end of file diff --git a/Assignment 1_Deadline 26 Sept 2017/assignment1_step2_Genco.py b/Assignment 1_Deadline 26 Sept 2017/assignment1_step2_Genco.py new file mode 100755 index 0000000..33c73a5 --- /dev/null +++ b/Assignment 1_Deadline 26 Sept 2017/assignment1_step2_Genco.py @@ -0,0 +1,39 @@ +H = 3 #height of the wall +W = 5 #width of the wall +ht = 0.25 #total height of the unit +hb = 0.22 #height of the brick +hp = 0.015 #height of the plaster +wf = 0.03 #width of the foam +wp = 0.02 #width of the plaster layers +wb = 0.16 #width of the brick +k1 = float (raw_input("enter the thermal conductivity of the foam in W/(degC*m) "))#foam conduction heat transfer +k2 = float (raw_input("enter the thermal conductivity of the plaster in W/(degC*m) ")) #plaster conduction heat transfer +k3 = float (raw_input("enter the thermal conductivity of the brick in W/(degC*m) ")) #brick conduction heat transfer +h1 = float (raw_input("enter the internal convenction heat transfer W/(degC*m^2) "))#inside convenction heat trasfer +h2 = float (raw_input("enter the external convenction heat tranfer W/(degC*m^2) "))#outside convenction heat trasfer +t1 = float (raw_input("enter the internal temperature in degC ")) #temperature inside +t2 = float (raw_input("enter the external temperature in degC ")) #temperature outside + +#Resistence +Rconv = 1/(h1*ht*1) +R1 = wf/(k1*ht*1) #foam Resistence +R2 = R6 = wp/(k2*ht*1) # the two plaster side resistence +R3 = R5 = wb/(k2*hp*1) # Plaster center Resistence +R4 = wb/(k3*hb*1) # Brick Resistence +R0 = 1/(h2*ht*1) #second convention resistence + +Rp = ( (1/R3) + (1/R4) + (1/R5) ) +RP = 1/Rp #sum of the three resistence in the middle, they are in parallel + +Rt = Rconv+R1+R2+RP+R6+R0 + +Q = (t1-(t2))/Rt #heat transfer through the wall +s = (ht*1) #surface area in m^2 +Q1 = Q/s #heat transfer per m^2 area +A = H * W #total area + +Qt = Q1*A + + +print"The amount of heat transfer of the entire wall is "+str (Qt)+" degC/W" +print"The amount of thermal resistence of the brick is "+str (Rt)+" W" \ No newline at end of file diff --git a/Assignment 1_Deadline 26 Sept 2017/assignment1_step2_riva.py b/Assignment 1_Deadline 26 Sept 2017/assignment1_step2_riva.py new file mode 100755 index 0000000..9268991 --- /dev/null +++ b/Assignment 1_Deadline 26 Sept 2017/assignment1_step2_riva.py @@ -0,0 +1,41 @@ +#ASSIGNMENT 1 + +H = 3 #height of the wall +W = 5 #width of the wall +ht = 0.25 #total height of the unit +hb = 0.22 #height of the brick +hp = 0.015 #height of the plaster +wf = 0.03 #width of the foam +wp = 0.02 #width of the plaster layers +wb = 0.16 #width of the brick +k1 = float (raw_input("enter the thermal conductivity of the foam in W/(degC*m) "))#foam conduction heat transfer +k2 = float (raw_input("enter the thermal conductivity of the plaster in W/(degC*m) ")) #plaster conduction heat transfer +k3 = float (raw_input("enter the thermal conductivity of the brick in W/(degC*m) ")) #brick conduction heat transfer +h1 = float (raw_input("enter the internal convenction heat transfer W/(degC*m^2) "))#inside convenction heat trasfer +h2 = float (raw_input("enter the external convenction heat tranfer W/(degC*m^2) "))#outside convenction heat trasfer +t1 = float (raw_input("enter the internal temperature in degC ")) #temperature in +t2 = float (raw_input("enter the external temperature in degC ")) #temperature out + +#Res +Rconv = 1/(h1*ht*1) +R1 = wf/(k1*ht*1) #foam Res +R2 = R6 = wp/(k2*ht*1) # the two plaster side res +R3 = R5 = wb/(k2*hp*1) # Plaster center Res +R4 = wb/(k3*hb*1) # Brick Res +R0 = 1/(h2*ht*1) #second convention res + +Rp = ( (1/R3) + (1/R4) + (1/R5) ) +RP = 1/Rp #sum of the three res in the middle, they are in parallel + +Rt = Rconv+R1+R2+RP+R6+R0 + +Q = (t1-(t2))/Rt #heat transfer through the wall +s = (ht*1) #surface area in m^2 +Q1 = Q/s #heat transfer per m^2 area +A = H * W #total area + +Qt = Q1*A + + +print"The amount of heat transfer of the entire wall is "+str (Qt)+" degC/W" +print"The amount of thermal resistence of the brick is "+str (Rt)+" W" \ No newline at end of file diff --git a/Assignment 2 Deadline Oct 3rd 2017/Assignment2_step1_Genco.py b/Assignment 2 Deadline Oct 3rd 2017/Assignment2_step1_Genco.py new file mode 100755 index 0000000..85584e9 --- /dev/null +++ b/Assignment 2 Deadline Oct 3rd 2017/Assignment2_step1_Genco.py @@ -0,0 +1,58 @@ +#determination of the total thermal resistance and the heat transfer rate throw a Composite Wall + +H = 3 #height of the wall +W = 5 #width of the wall +t1 = 20 #temperature inside +t2 = -10 #temperature outside +ht = 0.25 #total height of the unit +hb = 0.22 #height of the brick +hp = 0.015 #height of the plaster +wf = 0.03 #width of the foam +wp = 0.02 #width of the plaster layers +wb = 0.16 #width of the brick +k1 = 0.026 #foam conduction heat transfer +k2 = 0.22 #plaster conduction heat transfer +k3 = 0.72 #brick conduction heat transfer +h1 = 10 #inside convenction heat trasfer +h2 = 25 #outside convenction heat trasfer + +#Resistence +Rconv = [0.25,10] +R1 = [0.25, 0.03, 0.026] #foam Resistence +R2 = R6 = [0.25,0.02,0.22] # the two plaster side resistence +R3 = R5 = [0.015,0.16,0.22] # Plaster center Resistence +R4 = [0.22,0.16,0.72] # Brick Resistence +R0 = [0.25,25] #second convention resistence + +series = [R1,R2,R3] +parallel = [R3,R5,R4] +convseries = [Rconv,R0] + +conv = 0 +for anyelement in convseries: + A = anyelement[0] + h = anyelement[1] + Rconv = 1/(A*h) +CONVENCTION = conv + Rconv + +serie = 0 +for aanyelement in series: + A1 = aanyelement[0] + h1 = aanyelement[1] + k1= aanyelement[2] + Rconv = h1/(A1*k1) +SERIES = serie + Rconv + +paral= 0 +for anyelement in parallel: + A2 = anyelement[0] + h2 = anyelement[1] + k2 = anyelement[2] + Rpar = h2/(A2*k2) + Rparal = paral + 1/Rpar +PARALLELL = 1/Rparal + +RTOT= PARALLELL + CONVENCTION + SERIES + + +print"The amount of thermal resistence of the brick is "+str (RTOT)+" W" \ No newline at end of file diff --git a/Assignment 2 Deadline Oct 3rd 2017/Assignment2_step2_Genco.py b/Assignment 2 Deadline Oct 3rd 2017/Assignment2_step2_Genco.py new file mode 100755 index 0000000..f0038fa --- /dev/null +++ b/Assignment 2 Deadline Oct 3rd 2017/Assignment2_step2_Genco.py @@ -0,0 +1,59 @@ +#determination of the total thermal resistance and the heat transfer rate throw a Composite Wall + +H = 3 #height of the wall +W = 5 #width of the wall +t1 = 20 #temperature inside +t2 = -10 #temperature outside +ht = 0.25 #total height of the unit +hb = 0.22 #height of the brick +hp = 0.015 #height of the plaster +wf = 0.03 #width of the foam +wp = 0.02 #width of the plaster layers +wb = 0.16 #width of the brick +k1 = 0.026 #foam conduction heat transfer +k2 = 0.22 #plaster conduction heat transfer +k3 = 0.72 #brick conduction heat transfer +h1 = 10 #inside convenction heat trasfer +h2 = 25 #outside convenction heat trasfer + +#Resistence +Rconv = {"total height of the unit":0.25,"convenction heat trasfer":10} +R1 = {"name":"foam","area":0.25,"lenght": 0.03,"k":0.026} +R2 = {"name":"plaster series","area":0.25,"lenght":0.02,"k":0.22} +R6 = {"name":"plaster series1","area":0.25,"lenght":0.02,"k":0.22} +R3 = {"name":"plaster parallel","area":0.015,"lenght":0.16,"k":0.22} +R5 = {"name":"plaster parallel1","area":0.015,"lenght":0.16,"k":0.22} +R4 = {"area":0.22,"lenght":0.16,"k":0.72} +R0 = {"total height of the unit":0.25,"convenction heat trasfer":25} +series = [R1,R2,R3] +parallel = [R3,R5,R4] +convseries = [Rconv,R0] + +conv = 0 +for anyelement in convseries: + A = anyelement["total height of the unit"] + h = anyelement["convenction heat trasfer"] + Rconv = 1/(A*h) +CONVENCTION = conv + Rconv + +serie = 0 +for anyelement in series: + A1 = anyelement["area"] + h1 = anyelement["lenght"] + k1= anyelement["k"] + Rconv = h1/(A1*k1) +SERIES = serie + Rconv + +paral= 0 +for aanyelement in parallel: + A2= aanyelement["area"] + h2 = aanyelement["lenght"] + k2 = aanyelement["k"] + Rpar = h2/(A2*k2) + Rparal = paral + 1/Rpar +PARALLELL = 1/Rparal + +RTOT= PARALLELL + CONVENCTION + SERIES + + +print"The amount of thermal resistence of the brick is "+str (RTOT)+" W" \ No newline at end of file diff --git a/Assignment 2 Deadline Oct 3rd 2017/assignment2_step1_riva.py b/Assignment 2 Deadline Oct 3rd 2017/assignment2_step1_riva.py new file mode 100755 index 0000000..268496f --- /dev/null +++ b/Assignment 2 Deadline Oct 3rd 2017/assignment2_step1_riva.py @@ -0,0 +1,58 @@ +#ASSIGNMENT 2 + +H = 3 #height of the wall +W = 5 #width of the wall +t1 = 20 #temperature inside +t2 = -10 #temperature outside +ht = 0.25 #total height of the unit +hb = 0.22 #height of the brick +hp = 0.015 #height of the plaster +wf = 0.03 #width of the foam +wp = 0.02 #width of the plaster layers +wb = 0.16 #width of the brick +k1 = 0.026 #foam conduction heat transfer +k2 = 0.22 #plaster conduction heat transfer +k3 = 0.72 #brick conduction heat transfer +h1 = 10 #inside convenction heat trasfer +h2 = 25 #outside convenction heat trasfer + +#Res +Rconv = [0.25,10] +R1 = [0.25, 0.03, 0.026] #foam Res +R2 = R6 = [0.25,0.02,0.22] #the two plaster side res +R3 = R5 = [0.015,0.16,0.22] #Plaster center Res +R4 = [0.22,0.16,0.72] #Brick Res +R0 = [0.25,25] #second convention res + +series = [R1,R2,R3] +parallel = [R3,R5,R4] +convseries = [Rconv,R0] + +conv = 0 +for anyelement in convseries: + A = anyelement[0] + h = anyelement[1] + Rconv = 1/(A*h) +CONVENCTION = conv + Rconv + +serie = 0 +for aanyelement in series: + A_ = aanyelement[0] + h_ = aanyelement[1] + k_= aanyelement[2] + Rconv = h_/(A_*k_) +SERIES = serie + Rconv + +paral= 0 +for anyelement in parallel: + A__ = anyelement[0] + h__ = anyelement[1] + k__ = anyelement[2] + Rpar = h__/(A__*k__) + Rparal = paral + 1/Rpar +PARALLELL = 1/Rparal + +RTOT= PARALLELL + CONVENCTION + SERIES + + +print"The amount of thermal resistence of the brick is "+str (RTOT)+" W" \ No newline at end of file diff --git a/Assignment 2 Deadline Oct 3rd 2017/assignment2_step2_riva.py b/Assignment 2 Deadline Oct 3rd 2017/assignment2_step2_riva.py new file mode 100755 index 0000000..b498ab3 --- /dev/null +++ b/Assignment 2 Deadline Oct 3rd 2017/assignment2_step2_riva.py @@ -0,0 +1,59 @@ +#ASSIGNMENT 2 + +H = 3 #height of the wall +W = 5 #width of the wall +t1 = 20 #temperature inside +t2 = -10 #temperature outside +ht = 0.25 #total height of the unit +hb = 0.22 #height of the brick +hp = 0.015 #height of the plaster +wf = 0.03 #width of the foam +wp = 0.02 #width of the plaster layers +wb = 0.16 #width of the brick +k1 = 0.026 #foam conduction heat transfer +k2 = 0.22 #plaster conduction heat transfer +k3 = 0.72 #brick conduction heat transfer +h1 = 10 #inside convenction heat trasfer +h2 = 25 #outside convenction heat trasfer + +#Res +Rconv = {"total height of the unit":0.25,"convenction heat trasfer":10} +R1 = {"name":"foam","area":0.25,"lenght": 0.03,"k":0.026} +R2 = {"name":"plaster series","area":0.25,"lenght":0.02,"k":0.22} +R6 = {"name":"plaster series1","area":0.25,"lenght":0.02,"k":0.22} +R3 = {"name":"plaster parallel","area":0.015,"lenght":0.16,"k":0.22} +R5 = {"name":"plaster parallel1","area":0.015,"lenght":0.16,"k":0.22} +R4 = {"area":0.22,"lenght":0.16,"k":0.72} +R0 = {"total height of the unit":0.25,"convenction heat trasfer":25} +series = [R1,R2,R3] +parallel = [R3,R5,R4] +convseries = [Rconv,R0] + +conv = 0 +for anyelement in convseries: + A = anyelement["total height of the unit"] + h = anyelement["convenction heat trasfer"] + Rconv = 1/(A*h) +CONVENCTION = conv + Rconv + +serie = 0 +for anyelement in series: + A_ = anyelement["area"] + h_ = anyelement["lenght"] + k_= anyelement["k"] + Rconv = h_/(A_*k_) +SERIES = serie + Rconv + +paral= 0 +for aanyelement in parallel: + A__= aanyelement["area"] + h__ = aanyelement["lenght"] + k__ = aanyelement["k"] + Rpar = h__/(A__*k__) + Rparal = paral + 1/Rpar +PARALLELL = 1/Rparal + +RTOT= PARALLELL + CONVENCTION + SERIES + + +print"The amount of thermal resistence of the brick is "+str (RTOT)+" W" \ No newline at end of file diff --git a/Assignment 3- Deadline 10 Oct 2017/Assignment3_step1_Genco.py b/Assignment 3- Deadline 10 Oct 2017/Assignment3_step1_Genco.py new file mode 100755 index 0000000..7eb2796 --- /dev/null +++ b/Assignment 3- Deadline 10 Oct 2017/Assignment3_step1_Genco.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# assignment3 +#Determine the overall unit thermal resistance +#and the factor U + +material_library_dictionary={"outside_surface_winter":0.030,"outside_surface_summer":0.044,"wood_bevel":0.14, +"wood_fiberboard":0.23,"glass_fiber":2.45,"wood_stud":0.63,"glass_fiber":2.45,"inside_surface":0.12, +"gypsum_wallboard":0.079} + +inseries=["wood_bevel","wood_fiberboard","gypsum_wallboard"] +inparallel=["glass_fiber","wood_stud"] +air=["outside_surface_winter","inside_surface"] +series=inseries+air +firstratio=float(0.75) +secondratio=float(0.25) + +R=0 +resistence=[] +for anymaterial in inseries: + Rvalue_layer_series= material_library_dictionary[anymaterial] + R=R+Rvalue_layer_series +for anymaterial in inparallel: + Rvalue_layer_parallel= material_library_dictionary[anymaterial] + resistence.append(R+Rvalue_layer_parallel) +A=resistence[0] +B=resistence[1] +print ("the thermal resistences of the FIRST parallel layer is ")+str(A)+" m^2/(deg*W)" +print ("the thermal resistences of the SECOND parallel layer is ")+str(B)+" m^2/(deg*W)" + + +U1=1/resistence[0] +U2=1/resistence[1] + +Utot=(U1*firstratio)+(U2*secondratio) +Rt=1/Utot + +print ("the U1 is ")+str(U1)+" W/(deg*m)" +print ("the U2 ")+str(U2)+" W/(deg*m)" +print ("the UTOT is ")+str(Utot)+" W/(deg*m)" +print ("the Rt is ")+str(Rt)+"m^2/(deg*W)" + diff --git a/Assignment 3- Deadline 10 Oct 2017/Assignment3_step2_Genco.py b/Assignment 3- Deadline 10 Oct 2017/Assignment3_step2_Genco.py new file mode 100755 index 0000000..975cf56 --- /dev/null +++ b/Assignment 3- Deadline 10 Oct 2017/Assignment3_step2_Genco.py @@ -0,0 +1,38 @@ +#FUNCTION ASSIGNMENT 3 + +inseries=["wood_bevel","wood_fiberboard","gypsum_wallboard"] +inparallel=["glass_fiber","wood_stud"] +firstratio=float(0.75) + +def totalwall(S,P,FR): + air=["outside_surface_winter","inside_surface"] + material_library_dictionary={"outside_surface_winter":0.030,"outside_surface_summer":0.044,"wood_bevel":0.14, + "wood_fiberboard":0.23,"glass_fiber":2.45,"wood_stud":0.63,"glass_fiber":2.45,"inside_surface":0.12, + "gypsum_wallboard":0.079} + series=S+air + + R=0 + resistence=[] + for anymaterial in S: + Rvalue_layer_series= material_library_dictionary[anymaterial] + R=R+Rvalue_layer_series + + for anymaterial in P: + Rvalue_layer_parallel= material_library_dictionary[anymaterial] + resistence.append(R+Rvalue_layer_parallel) + + A=resistence[0]#resistence of the first step + B=resistence[1]#resistence of the second step + U1=1/resistence[0] + U2=1/resistence[1] + secondratio=float(1-FR) + Utot=(U1*FR)+(U2*secondratio) + Rt=1/Utot + + results={"Total Thermal Resistence":Rt,"thermal resistence of the first layer":A, + "thermal resistence of the second layer":B,"total U of the wall":Utot } + + return results + +X=totalwall(inseries,inparallel,firstratio) +print X \ No newline at end of file diff --git a/Assignment 3- Deadline 10 Oct 2017/assignment3_step1_Falzarano.py b/Assignment 3- Deadline 10 Oct 2017/assignment3_step1_Falzarano.py new file mode 100644 index 0000000..349d3bb --- /dev/null +++ b/Assignment 3- Deadline 10 Oct 2017/assignment3_step1_Falzarano.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +Ti = 22 +To = -2 +A_wall = 50*2.5 + + + +#list of resistance of the different materials +R_materials = {"outside": 0.03, "woodbevel":0.14, "woodfiber": 0.23, "glassfiber":2.45, "stud": 0.63, "gypsum":0.079, "inside":0.12} +wall_ser = ["outside","woodbevel","woodfiber","gypsum","inside"] +wall_par = ["stud","glassfiber"] + +#fraction area of the insulated wall and of the wall with stud +f_area_stud = 0.25 +f_area_ins = 0.75 + + +#total resistances in series +Rs_tot = 0 +for n in wall_ser: + Rs_tot = Rs_tot + R_materials[n] + print ("this layer is: "+ n) + print ("The value of R for this layer is: "+ str(R_materials[n])) + + + + +print ("The sum of the resistances in series is " + str(Rs_tot) + " m°C/W") +print ( ) + + +#different resistances in the wall: stud and ins +R_values = [] +for n in wall_par: + R = Rs_tot + R_materials[n] + print ("The resistance of the wall when there is " + (n) + " is " + str(R)+ " m°C/W") + R_values.append(R) +print () + +#U coefficient +U_values = [] +for n in R_values: + U = 1/n + U_values.append(U) + +print ("The corresponding values of U are " + str(U_values)) +print () + +#overall value of U +U_overall = U_values[0]*f_area_stud + U_values[1]*f_area_ins +print ("The overall value of U is " + str(U_overall)) +print () + +Qwall = U_overall*A_wall*(Ti-To)*0.80 +print ("The resulting value of Q is " + str(Qwall) + " W") diff --git a/Assignment 3- Deadline 10 Oct 2017/assignment3_step1_riva.py b/Assignment 3- Deadline 10 Oct 2017/assignment3_step1_riva.py new file mode 100755 index 0000000..417a5c7 --- /dev/null +++ b/Assignment 3- Deadline 10 Oct 2017/assignment3_step1_riva.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +#ASSIGNMENT 3 + +material_library_dictionary={"outside_surface_winter":0.030,"outside_surface_summer":0.044,"wood_bevel":0.14, +"wood_fiberboard":0.23,"glass_fiber":2.45,"wood_stud":0.63,"glass_fiber":2.45,"inside_surface":0.12, +"gypsum_wallboard":0.079} + +inseries=["wood_bevel","wood_fiberboard","gypsum_wallboard"] +inparallel=["glass_fiber","wood_stud"] +air=["outside_surface_winter","inside_surface"] +series=inseries+air +firstratio=0.75 #from data +secondratio=0.25 #from data + +R=0 +for anymaterial in series: + Rvalue_layer_series=material_library_dictionary[anymaterial] + R=R+Rvalue_layer_series + +resistence=[] +for anymaterial in inparallel: + Rvalue_layer_parallel= material_library_dictionary[anymaterial] + resistence.append(R+Rvalue_layer_parallel) + +A=resistence[0] +B=resistence[1] + +print ("the thermal resistences of the FIRST parallel layer is ")+str(A)+" m^2/(deg*W)" +print ("the thermal resistences of the SECOND parallel layer is ")+str(B)+" m^2/(deg*W)" + +U1=1/resistence[0] +U2=1/resistence[1] + +Utot=(U1*firstratio)+(U2*secondratio) +Rt=1/Utot + +print ("the U1 is ")+str(U1)+" W/(deg*m)" +print ("the U2 ")+str(U2)+" W/(deg*m)" +print ("the UTOT is ")+str(Utot)+" W/(deg*m)" +print ("the Rt is ")+str(Rt)+"m^2/(deg*W)" + diff --git a/Assignment 3- Deadline 10 Oct 2017/assignment3_step2_Falzarano.py b/Assignment 3- Deadline 10 Oct 2017/assignment3_step2_Falzarano.py new file mode 100644 index 0000000..585c368 --- /dev/null +++ b/Assignment 3- Deadline 10 Oct 2017/assignment3_step2_Falzarano.py @@ -0,0 +1,39 @@ + #we define the function +def U_calculation(List1,List2,float1): + R_materials={"outside": 0.03, "woodbevel":0.14, "woodfiber": 0.23, "glassfiber":2.45, "stud": 0.63, "gypsum":0.079, "inside":0.12} + layer_ser=["inside","woodbevel","woodfiber","gypsum","outside"] + layer_par=["glassfiber","stud"] + frac_area = 0.75 + + + R_series=0 + + for n in layer_ser: + R_series=R_series+R_materials[n] + print("the reisistance of "+n+" is "+str(R_materials[n])) + print () + print ("the total R between studs is "+str(R_series)) + print() + + Rtot=[] + + for i in layer_par: + + R=R_series+R_materials[i] + Rtot=Rtot+[R] + + U_overall=(1/Rtot[0]*frac_area)+(1/Rtot[1]*(1-frac_area)) + y={ "R_ins":Rtot[0], "R_wood": Rtot[1], "U_overall":U_overall } + return y + + +R_materials={"outside": 0.03, "woodbevel":0.14, "woodfiber": 0.23, "glassfiber":2.45, "stud": 0.63, "gypsum":0.079, "inside":0.12} +layer_ser=["inside","woodbevel","woodfiber","gypsum","outside"] +layer_par=["glassfiber","stud"] +frac_area = 0.75 + +result_this=U_calculation(layer_ser,layer_par,frac_area) +print ("Results: "+str(result_this)) + + + diff --git a/Assignment 3- Deadline 10 Oct 2017/assignment3_step2_riva.py b/Assignment 3- Deadline 10 Oct 2017/assignment3_step2_riva.py new file mode 100755 index 0000000..7a26e60 --- /dev/null +++ b/Assignment 3- Deadline 10 Oct 2017/assignment3_step2_riva.py @@ -0,0 +1,37 @@ +#ASSIGNMENT 3 + +inseries=["wood_bevel","wood_fiberboard","gypsum_wallboard"] +inparallel=["glass_fiber","wood_stud"] +firstratio=float(0.75) + +def totalwall(S,P,FR): + air=["outside_surface_winter","inside_surface"] + material_library_dictionary={"outside_surface_winter":0.030,"outside_surface_summer":0.044,"wood_bevel":0.14, + "wood_fiberboard":0.23,"glass_fiber":2.45,"wood_stud":0.63,"glass_fiber":2.45,"inside_surface":0.12, + "gypsum_wallboard":0.079} + series=S+air + + R=0 + for anymaterial in S: + Rvalue_layer_series=material_library_dictionary[anymaterial] + R=R+Rvalue_layer_series + resistence=[] + for anymaterial in P: + Rvalue_layer_parallel=material_library_dictionary[anymaterial] + resistence.append(R+Rvalue_layer_parallel) + + A=resistence[0] + B=resistence[1] + U1=1/resistence[0] + U2=1/resistence[1] + secondratio=float(1-FR) + Utot=(U1*FR)+(U2*secondratio) + Rt=1/Utot + + results={"Total Thermal Resistence":Rt,"thermal resistence of the first layer":A, + "thermal resistence of the second layer":B,"total U of the wall":Utot } + + return results + +X=totalwall(inseries,inparallel,firstratio) +print X \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/.DS_Store b/Assignment 4 - Deadline 17 oct 2017/.DS_Store new file mode 100644 index 0000000..b177839 Binary files /dev/null and b/Assignment 4 - Deadline 17 oct 2017/.DS_Store differ diff --git a/Assignment 4 - Deadline 17 oct 2017/Assignment 4_step2_Gardella.py b/Assignment 4 - Deadline 17 oct 2017/Assignment 4_step2_Gardella.py new file mode 100644 index 0000000..c0dc159 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/Assignment 4_step2_Gardella.py @@ -0,0 +1,52 @@ +import os +os.chdir("C:/Users/Fabio/Documents/Polimi/Magistrale/Buildings/Assignments") + +from wall_Calculations_Gardella import wallCalc_withParallel; + +from wall_Calculations_Gardella import wallCalc_onlyInSeries; + + +#SOLVE THE EXERCISE + +#Data + +DeltaT=24.8 + +Aceiling=200 +Awall=105.8 +Adoor=2.2 + + +#Wall + +WallInSeies=["Wood_Bevel_Lapped_Siding","Wood_Fiberboard_Sheeting","Gypsum_Wallboard"] + +WallInParallel=["Glass_Fiber_Insulation","Wood_Stud"] + +AreaFraction=0.70 + +WallData=wallCalc_withParallel(WallInSeies,WallInParallel,AreaFraction) + +Uwall=WallData["Utot"] + +QHeatWall=Uwall*Awall*DeltaT + +#Ceiling + +CeilingInSeries=["Wood","Gypsum_Wallboard","Glass_Fiber_Insulation"] + +CeilingData=wallCalc_onlyInSeries(CeilingInSeries) + +Uceiling=CeilingData["Utot"] + +QHeatCeiling=Uceiling*Aceiling*DeltaT + +#Door + +DoorInSeries=["Wood"] + +DoorData=wallCalc_onlyInSeries(DoorInSeries) + +Udoor=DoorData["Utot"] + +QHeatDoor=Udoor*Adoor*DeltaT \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/Assignment4_step2_Botti.py b/Assignment 4 - Deadline 17 oct 2017/Assignment4_step2_Botti.py new file mode 100644 index 0000000..0a09410 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/Assignment4_step2_Botti.py @@ -0,0 +1,30 @@ +import os +os.chdir("C:\Users\Giulia\Desktop\Buildings\python\Assignment") +from WallCalculations_Botti import WallCalc_withParallel + +from WallCalculations_Botti import WallCalc_onlyInSeries + +WallSer_wall = ["Wood_bevel_lapped_siding","Wood_fiberboard_sheeting13mm","Gypsum_wallboard13mm"] +WallPar_wall = ["Glass_fiber_insulation90mm","Wood_stud38*90mm"] +AreaFraction_wall = 0.70 +WallDATA=WallCalc_withParallel(WallSer_wall,WallPar_wall,AreaFraction_wall) +U_wall = WallDATA["U_tot"] + +Ser_door = ["Wood25mm"] +DoorDATA=WallCalc_onlyInSeries(Ser_door) +U_door = DoorDATA["U_tot"] + +CeilingSer = ["Glass_fiber_insulation90mm","Gypsum_wallboard13mm","Wood25mm"] +CeilingDATA=WallCalc_onlyInSeries(CeilingSer) +U_ceil = CeilingDATA["U_tot"] + +delta_T = 24.8 +A_ceil = 200 +A_door = 2.2 +A_wall = 105.8 + +Q_heat_wall = delta_T*A_wall*U_wall +Q_heat_ceil = delta_T*A_ceil*U_ceil +Q_heat_door = delta_T*A_door*U_door + +Q_tot = Q_heat_wall+Q_heat_ceil+Q_heat_door \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/MainScript_MUHAMMADARSLAN.py b/Assignment 4 - Deadline 17 oct 2017/MainScript_MUHAMMADARSLAN.py new file mode 100644 index 0000000..0442724 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/MainScript_MUHAMMADARSLAN.py @@ -0,0 +1,46 @@ +# 16/10/17 + +# ----------------Assignment-4--Part-2-------------------- + +# ---Example (Calculation of Heat factor & Heat load)------------ + +# ------------------MUHAMMAD ARSLAN-------------------- + +#-------------------Using Import Function ----------------------------------------------------------# + + +import os +os.chdir("C:\Users\arslan\Desktop\Assignment4") #Adress for Calling function from first file +import WallCalculation_MUHAMMADARSLAN as A + +#----Defining all values---- + +layers_In_series=["Wood bevel","Gypsum wallboard","insideSurface","OutsideSurfaceWinter"] +layers_In_parallel=["Glass fiber insulation","Wood stud"] +layers_for_Roof=["insideSurface","outsideSurfaceWinter","Wood","Asphalt shingle roofing"] +layers_for_Door=["insideSurface","outsideSurfaceWinter","Wood"] + +D_T= (25) #Change in temp: in deg C +W_Area,R_Area,D_Area=105.8,200,2.2 #Areas in m^2 + +#----Getting the U-values from imported functions of First File---- + +Uwall=A.wallCalc_LIS() +Udoor=A.wallCalc_DR()["U-Value of Door"] +Uroof=A.wallCalc_DR()["U-value of Roof"] + +#----Calculating the Heating factor from given data---- + +HFwall= ((Uwall)*(D_T)) #Heating factor for wall +HFdoor= ((Udoor)*(D_T)) #Heating factor for door +HFroof= ((Uroof)*(D_T)) #Heating factor for roof + +#----Calculating the Heating load------- + +QHwall= ((HFwall)*(W_Area)) #Heating load for wall +QHdoor= ((HFdoor)*(D_Area)) #Heating load for door +QHroof= ((HFroof)*(R_Area)) #Heating load for roof + +HeatLoad_total= ((QHwall)+(QHdoor)+(QHroof)) + +print("\nThe total heating load is: "+str(HeatLoad_total)+" Watt") \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/MainScript_Mir_Danish.py b/Assignment 4 - Deadline 17 oct 2017/MainScript_Mir_Danish.py new file mode 100644 index 0000000..e787cbc --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/MainScript_Mir_Danish.py @@ -0,0 +1,80 @@ +# Energy And Environmental Technologies For Building Systems : Assignment 03, Step-1 + +# Submitted By : Danish Ahmad Mir + +# Assignment Based On Exercise-1 From Topic 1.3 (Determine the overall unit thermal resistance and the overall heat transfer coefficient) +import os +os.chdir("C:\Users\Danish\Dropbox\git_for_clone\Python4ScientificComputing_Fundamentals\Assignments_4") + +import WallCalculation_Mir_Danish as FC + +print "This is the calculation for stud layer" +stud_layer = ["woodBevelLappedSliding_13mm_200mm","woodFiberboard_13mm", +"woodStud_38mm_90mm","gypsumWallboard_13mm"] + +Rtot_stud = FC.wallCalc_parallel(stud_layer) + +Ustud = 1/Rtot_stud["R total"] +fstud = 0.25 +Ustud_tot = fstud*Ustud + +print "The total heat transfer coefficient on stud is " + str(Ustud) + " (W/m^2 deg C)" +print "The total heat transfer coefficient on stud with 0.25 fraction area is " + str(Ustud_tot) + " (W/m^2 deg C)" + +print "This is the calculation for insulation layer" +ins_layer = ["woodBevelLappedSliding_13mm_200mm","woodFiberboard_13mm", +"glassFiberIns_90mm","gypsumWallboard_13mm"] + +Rtot_ins = FC.wallCalc_parallel(ins_layer) + +Uins = 1/Rtot_ins["R total"] +fins = 0.75 +Uins_tot = fins*Uins + +print "The total heat transfer coefficient on insulation is " + str(Uins) + " (W/m^2 deg C)" +print "The total heat transfer coefficient on insulation with 0.75 fraction area is " + str(Uins_tot) + " (W/m^2 deg C)" + +Utot = Ustud_tot + Uins_tot + +print "Thus, the overall heat transfer coefficient of the wall is " + str(Utot) + " (W/m^2 deg C)" + +print "This is the calculation for door" +door_layer = ["wood50mm"] + +Rtot_door = FC.wallCalc_series(door_layer) + +Udoor = 1/Rtot_door["R total"] +print "The total heat transfer coefficient for door " + str(Udoor) + " (W/m^2 deg C)" + +print "This is the calculation for ceiling" +The_ceiling = ["specialRoofUrethaneRigidFoam"] + +Rtot_ceiling = FC.wallCalc_series(The_ceiling) + +Uceiling = 1/Rtot_ceiling["R total"] +print "The total heat transfer coefficient for ceiling " + str(Uceiling) + " (W/m^2 deg C)" + +Tin = 20 +Tout = -4.8 + +DT=Tin-Tout + +print "The differential temperature between inside and outside of the wall is " + str(DT) + " (Deg C)" + +# All areas are in m2 + +A_wall = 105.8 +A_door = 2.2 +A_ceiling = 200 + + +# Heat flows (Q) + +Q_wall = Utot*A_wall*DT +Q_door = Udoor*A_door*DT +Q_ceiling = Uceiling*A_ceiling*DT + +Qtot = Q_wall+Q_door+Q_ceiling + +print "Thus, the total heat transfer is " + str(Qtot) + " (W)" + diff --git a/Assignment 4 - Deadline 17 oct 2017/MainScript_Zannini.py b/Assignment 4 - Deadline 17 oct 2017/MainScript_Zannini.py new file mode 100644 index 0000000..5df3543 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/MainScript_Zannini.py @@ -0,0 +1,25 @@ + +import os +os.chdir("/Users/giordanozannini/gitfork/Assignment4") +import WallCalculation_Zannini as FC + + +DTwinter=24.8 +Udoor=FC.CalcWallSeries(["Wood","outsideSurfWinter","insideSurf"],[50,1,1]) +Uroof=FC.CalcWallSeries(["Wood","FoamInsulation","GypsumBoard","AsphaltRoofing","outsideSurfWinter","insideSurf"],[100,80,2,1,1,1]) +Walldata= FC.CalcUtotWall(["WoodBevelLappedSidings","WoodFiberboardSheeting_13mm","GypsumBoard","insideSurf","outsideSurfWinter","CommonBrick_100mm"], +["WoodStud","GlassFiber_90mm"],0.75) #the output of the function is a dictonary +Uwall=Walldata["Overall heat transfert coeff"] #it takes only the value of Uwall from the dictonary +#areas in m^2 +A_wall=105.8 +A_ceiling=200 +A_door=2.2 + +Qdoor=A_door*Udoor*DTwinter +Qroof=A_ceiling*Uroof*DTwinter +Qwall=A_wall*Uwall*DTwinter + +print "**********************************" +print "The heating load of the wall is: "+str(Qwall)+" W" +print "The heating load of the roof is: "+str(Qroof)+" W" +print "The heating load of the door is: "+str(Qdoor)+" W" \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Lanzani.py b/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Lanzani.py new file mode 100644 index 0000000..2ecd679 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Lanzani.py @@ -0,0 +1,49 @@ +Material_Library = {"Outside_surface_Winter":0.030,"Inside_surface": 0.12, +"Insulation_Glass_Fiber_90mm":2.52, "WoodStud_90mm":0.63, +"WoodFiberboard": 0.23,"WoodBevel_13x200": 0.14,"Gypsum_13mm":0.079,"CommonBrick_100mm":0.12,"Wood_50mm":0.44, +"MineralFiberBat_150mm":3.96} + +def wallCalc_withParallel(Layers_Wall_Parallel,Layers_Wall_Serie,fraction): + Rtot=0 + Rvalues_serie=[] + for anyLayer in Layers_Wall_Serie: + RValue= Material_Library[anyLayer] + Rtot = Rtot+RValue + Rvalues_serie.append(RValue) + + Layers_Glass=Layers_Wall_Serie+[Layers_Wall_Parallel[0]] + RValue_glass= Material_Library["Insulation_Glass_Fiber_90mm"] + Rtot_g=Rtot+RValue_glass + Rvalues_serie.append(RValue_glass) + U_glass=1/Rtot_g + + Layers_Stud=Layers_Wall_Serie+[Layers_Wall_Parallel[1]] + RValue_stud= Material_Library["WoodStud_90mm"] + Rtot_s=Rtot+RValue_stud + Rvalues_serie.append(RValue_stud) + U_stud=1/Rtot_s + + U_tot=fraction*(U_glass)+(1-fraction)*(U_stud) + R_TOT=1/U_tot + results=U_tot + return results + +Layers_Wall_Serie = ["Outside_surface_Winter","WoodBevel_13x200","WoodFiberboard","Gypsum_13mm","Inside_surface","CommonBrick_100mm"] +Layers_Wall_Parallel= ["Insulation_Glass_Fiber_90mm","WoodStud_90mm"] +fraction=0.7 +results_wall=wallCalc_withParallel(Layers_Wall_Parallel,Layers_Wall_Serie,fraction) + +def wallCalc_onlyInSeries(Layers): + Rtot=0 + Rvalues_serie=[] + for anyLayer in Layers: + RValue= Material_Library[anyLayer] + Rtot = Rtot+RValue + Rvalues_serie.append(RValue) + U=1/Rtot + results=U + return results +Layers_door=["Outside_surface_Winter","Inside_surface","Wood_50mm"] +Layers_roof=["Outside_surface_Winter","Inside_surface","MineralFiberBat_150mm","WoodFiberboard",] +results_door=wallCalc_onlyInSeries(Layers_door) +results_roof=wallCalc_onlyInSeries(Layers_roof) diff --git a/Assignment 4 - Deadline 17 oct 2017/WallCalculation_MUHAMMADARSLAN.py b/Assignment 4 - Deadline 17 oct 2017/WallCalculation_MUHAMMADARSLAN.py new file mode 100644 index 0000000..6bf8276 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/WallCalculation_MUHAMMADARSLAN.py @@ -0,0 +1,60 @@ +# 16/10/17 + +#----------------Assignment-4--Part-1------------------# + +#---------Example (Calculation of U-Values)-----------# + +#------------------MUHAMMAD ARSLAN------------------- # + +#-----------------Using Function ---------------------# + +#------------------Values-Defined---------------------# + +Wall_material={"Wood bevel":{"Rvalue":0.14,"length":13},"Wood fiberboard":{"Rvalue":0.23,"length":13},"Glass fiber insulation":{"Rvalue":2.52,"length":90},"Wood stud":{"Rvalue":0.63,"length":90},"Gypsum wallboard":{"Rvalue":0.079,"length":13},"insideSurface":{"Rvalue":0.12},"outsideSurfaceWinter":{"Rvalue":0.030},"Wood":{"Rvalue":0.44},"Asphalt shingle roofing":{"Rvalue":0.077}} +layers_In_series=["insideSurface","outsideSurfaceWinter","Wood bevel","Wood fiberboard","Gypsum wallboard"] +fractionBetweenstuds=0.70 +layers_for_Roof=["insideSurface","outsideSurfaceWinter","Wood","Asphalt shingle roofing"] +layers_for_Door=["insideSurface","outsideSurfaceWinter","Wood"] + +def wallCalc_LIS(): #Layers in series + + between_Studs=layers_In_series+["Glass fiber insulation"] + at_Studs=layers_In_series+["Wood stud"] + + Rvalue_between=0 + Rvalue_at=0 + + for layer in between_Studs: + Rvalue_between+=Wall_material[layer]["Rvalue"] + + for layer in at_Studs: + Rvalue_at+=Wall_material[layer]["Rvalue"] + + Uwall=(fractionBetweenstuds*(1/Rvalue_between)+(1-fractionBetweenstuds)*(1/Rvalue_at)) + return Uwall + +print ("\The u value of wall is: "+str(wallCalc_LIS())+" wat") + +def wallCalc_DR(): + + R_Door=0 + R_Roof=0 + + + + + for layer in layers_for_Door: + + R_Door+=Wall_material[layer]["Rvalue"] + Udoor=(1/R_Door) + + for layer in layers_for_Roof: + + R_Roof+=Wall_material[layer]["Rvalue"] + R_Roof*=6 + Uroof= (1/R_Roof) + + return {"U-Value of Door":Udoor,"U-value of Roof":Uroof} + + +print ("\The u value of wall is: "+str(wallCalc_DR())+" wat") \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Mir_Danish.py b/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Mir_Danish.py new file mode 100644 index 0000000..7b57894 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Mir_Danish.py @@ -0,0 +1,58 @@ +# Energy And Environmental Technologies For Building Systems : Assignment 03, Step-1 + +# Submitted By : Danish Ahmad Mir + +# Assignment Based On Exercise-1 From Topic 1.3 (Determine the overall unit thermal resistance and the overall heat transfer coefficient) + +def wallCalc_parallel(defineYourLayer): + + material_table = {"outsideSurface":0.03,"woodBevelLappedSliding_13mm_200mm":0.14, + "woodFiberboard_13mm":0.23,"glassFiberIns_90mm":2.52,"woodStud_38mm_90mm":0.63, + "gypsumWallboard_13mm":0.079,"insideSurface":0.12} + + conv_layer = ["outsideSurface","insideSurface"] + + + yourNewLayer = defineYourLayer + conv_layer + + print "The layer consist of " + str(defineYourLayer) + + Rtotal = 0 + Rvalue_NewLayer = [] + + for RNewLayer in yourNewLayer: + Rvalue_new = material_table[RNewLayer] + Rtotal = Rtotal + Rvalue_new + Rvalue_NewLayer.append(Rvalue_new) + + print "Total Resistance in this layer is " + str(Rtotal) + " (m^2 DegC/W)" + result = {"R total":Rtotal,"All R value of New Layer":Rvalue_NewLayer} + + return result + + +def wallCalc_series(defineYourLayer): + + material_table = {"outsideSurface":0.03,"woodBevelLappedSliding_13mm_200mm":0.14, + "woodFiberboard_13mm":0.23,"glassFiberIns_90mm":2.52,"woodStud_38mm_90mm":0.63, + "gypsumWallboard_13mm":0.079,"insideSurface":0.12,"wood50mm":0.44, "specialRoofUrethaneRigidFoam":3.85 } + + conv_layer = ["outsideSurface","insideSurface"] + + + yourNewLayer = defineYourLayer + conv_layer + + print "The layer consist of " + str(defineYourLayer) + + Rtotal = 0 + Rvalue_NewLayer = [] + + for RNewLayer in yourNewLayer: + Rvalue_new = material_table[RNewLayer] + Rtotal = Rtotal + Rvalue_new + Rvalue_NewLayer.append(Rvalue_new) + + print "Total Resistance in this layer is " + str(Rtotal) + " (m^2 DegC/W)" + result = {"R total":Rtotal,"All R value of New Layer":Rvalue_NewLayer} + + return result \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Mir_Danish.pyc b/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Mir_Danish.pyc new file mode 100644 index 0000000..3f6077e Binary files /dev/null and b/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Mir_Danish.pyc differ diff --git a/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Putra.py b/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Putra.py new file mode 100644 index 0000000..7c275c9 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Putra.py @@ -0,0 +1,72 @@ +#------------------------Wall Calculation Function------------------------------ + +# Name : Hendra Suryana Putra + +#Definition +# stud_layer is the layer through the stud (without any insulation layer) +# ins_layer is the layer through the insulation (without any stud layer) +# conv_layer is the layer of air in the inside and outside of the wall +# fstud : the fraction of stud area compared to overall area +# fins : the fraction of insulation area compared to overall area +# Ustud : heat transfer coefficient of stud +# Uins : heat transfer coefficient of insulation +# Tin : Inside temperature of the wall +# Tout : Outside temperature of the wall +# Awall : The total area of the wall +# Qtot : The total heat transfer of the wall + +def wallCalc_withParallel(defineYourLayer): + + material_table = {"outsideSurface":0.03,"woodBevelLappedSliding_13mm_200mm":0.14, + "woodFiberboard_13mm":0.23,"glassFiberIns_90mm":2.52,"wood_50mm":0.44,"wood_100mm":0.88,"woodStud_38mm_90mm":0.63, + "gypsumWallboard_13mm":0.079,"Asphalt_Shingle_Roofing":0.077,"Acoustic_Tile":0.32,"ConcreteBlockLightWeight_439mm":2.573, + "insideSurface":0.12} + + conv_layer = ["outsideSurface","insideSurface"] + + # Calculate the total Resistance Value + + yourNewLayer = defineYourLayer + conv_layer + + print "The layer consist of " + str(defineYourLayer) + + Rtotal = 0 + Rvalue_NewLayer = [] + + for RNewLayer in yourNewLayer: + Rvalue_new = material_table[RNewLayer] + Rtotal = Rtotal + Rvalue_new + Rvalue_NewLayer.append(Rvalue_new) + + print "Total Resistance in this layer is " + str(Rtotal) + " (m^2 DegC/W)" + result = {"R total":Rtotal,"All R value of New Layer":Rvalue_NewLayer} + # print result + return result + + +def wallCalc_withSeries(defineYourSeriesLayer): + material_table = {"outsideSurface":0.03,"woodBevelLappedSliding_13mm_200mm":0.14, + "woodFiberboard_13mm":0.23,"glassFiberIns_90mm":2.52,"wood_50mm":0.44,"wood_100mm":0.88,"woodStud_38mm_90mm":0.63, + "gypsumWallboard_13mm":0.079,"Asphalt_Shingle_Roofing":0.077,"Acoustic_Tile":0.32,"ConcreteBlockLightWeight_439mm":2.573, + "insideSurface":0.12} + + conv_layer = ["outsideSurface","insideSurface"] + + # Calculate the total Resistance Value + + yourNewLayer = defineYourSeriesLayer + conv_layer + + print "The layer consist of " + str(defineYourSeriesLayer) + + Rtotal = 0 + Rvalue_NewLayer = [] + + for RNewLayer in yourNewLayer: + Rvalue_new = material_table[RNewLayer] + Rtotal = Rtotal + Rvalue_new + Rvalue_NewLayer.append(Rvalue_new) + + print "Total Resistance in this layer is " + str(Rtotal) + " (m^2 DegC/W)" + result = {"R total":Rtotal,"All R value of New Layer":Rvalue_NewLayer} + # print result + return result diff --git a/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Thouvenin.py b/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Thouvenin.py new file mode 100644 index 0000000..977f086 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Thouvenin.py @@ -0,0 +1,106 @@ +# -*- coding: utf-8 -*- + +#This function permit to calculate the U value of the walls which have 2 layers in parallel + +def wallcalc_withparallel ( wallpara1,wallpara2,f): + """This function will calculate the overall heat transfer coefficient and resistance of the wall""" + + #Definition of the material library as a dictionnary + Material_library = { 'Outside_Surface_Winter' : 0.03 , 'Inside_Surface' : 0.12 , 'Wood_25mm' : 0.22 , + 'Wood_Bevel' : 0.14 , 'Wood_Fiberboard' : 0.23 , 'Glass_Fiber' : 2.52 , 'Wood_Stud' : 0.63 , 'Gypsum' : 0.079 , + 'Cement_Mortar' : 0.018 , 'Common_Brick' : 0.12 , 'Wood_Fiberboard' : 0.23 } + + #output a dictionnary with the resistances of all layers + layers_wall_complete = wallpara1 + wallpara2 + + RValues_layers = [] + for anylayer in layers_wall_complete: + RValue_layers = Material_library[anylayer] + RValues_layers.append(RValue_layers) + print "this layer is: "+ anylayer + print "The value of R for this layer is: "+ str(RValue_layers) + print "***************************************" + + + #Unit thermal resistance and overall heat transfer in serie between studs + R_Between_Studs = 0 + + for anylayer in wallpara1 : + Between_Studs_library = Material_library [anylayer] + R_Between_Studs = R_Between_Studs + Between_Studs_library + U_Between_Studs = 1 / R_Between_Studs + print U_Between_Studs + + #Unit thermal resistance and overall heat transfer in serie at studs + + R_At_Studs = 0 + + for anylayer in wallpara2 : + At_Studs_library = Material_library [anylayer] + R_At_Studs = R_At_Studs + At_Studs_library + U_At_Studs = 1 / R_At_Studs + print U_At_Studs + + #Calculation of the global overall heat transfer and the global resistance + + U_Global = f[0] * U_Between_Studs + f[1] * U_At_Studs + R_Global = 1 / U_Global + print "Here is the value of the global overall Resistance R: " + str(R_Global) + "m2°C/W" + print "Here is the value of the global overall heat transfer U: " + str(U_Global) + "W/m2°C" + + results = { "Roverall" : R_Global, "Rvalue of all layers" : RValue_layers , "Uoverall" : U_Global} + return results + +#Informations for the function + +wallpara1 = [ 'Outside_Surface_Winter' , 'Gypsum' , 'Glass_Fiber' , 'Common_Brick' , 'Wood_Fiberboard' ,'Wood_Bevel', 'Inside_Surface' ] +wallpara2 = [ 'Outside_Surface_Winter' , 'Gypsum' , 'Wood_Stud' , 'Common_Brick' , 'Wood_Fiberboard' ,'Wood_Bevel', 'Inside_Surface' ] +f = [ 0.7 , 0.3 ] + +results_thisWall = wallcalc_withparallel ( wallpara1,wallpara2,f) + +#********************************************************************** +#This function permit to calculate the U value of layers in series: We will use it here for the door and the roof + +def WallCalcOnlyinSeries (layerlist) : + + #Definition of the material library as a dictionnary + Material_library = { 'Outside_Surface_Winter' : 0.03 , 'Inside_Surface' : 0.12 , 'Wood_25mm' : 0.22 , + 'Wood_Bevel' : 0.14 , 'Wood_Fiberboard' : 0.23 , 'Glass_Fiber' : 2.52 , 'Wood_Stud' : 0.63 , 'Gypsum' : 0.079 , + 'Cement_Mortar' : 0.018 , 'Common_Brick' : 0.12 , 'Wood_Fiberboard' : 0.23 , 'AsphaltShingleRoofing' : 0.077} + + R_serie = 0 + + for anylayer in layerlist : + if (anylayer == 'Wood_50mm') : # Here, the dimension of the material wood is not the same than the one in the Material library + R_anylayer = Material_library [ 'Wood_25mm' ] * 50 / 25 #Proportionality + else : + R_anylayer = Material_library [ anylayer ] + R_serie = R_serie + R_anylayer + print R_serie + print "**************************************" + + U_serie = 1 / R_serie + print "Here is the value of the global overall Resistance R: " + str (R_serie) + "m2°C/W" + + print "Here is the value of the global overall heat transfer U:" + str (U_serie) + "W/m2°C" + + results = {"Roverall" : R_serie , "Uoverall" : U_serie } + return results + + +#Informations for the function + +layerlist_door = [ 'Outside_Surface_Winter' , 'Wood_50mm' , 'Inside_Surface' ] +layerlist_roof = [ 'Outside_Surface_Winter' , 'AsphaltShingleRoofing' , +'Wood_Fiberboard' ,'Glass_Fiber' , 'Inside_Surface' ] + +results_door = WallCalcOnlyinSeries ( layerlist_door ) +results_roof = WallCalcOnlyinSeries ( layerlist_roof ) + + + + + + + diff --git a/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Zannini.py b/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Zannini.py new file mode 100644 index 0000000..829973c --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/WallCalculation_Zannini.py @@ -0,0 +1,53 @@ +## wall cal series + +def CalcWallSeries (List,Lenghts): #list of materials, lenghts of layers in mm + ### The function calculates the value of the total resistance of a wall. The imput must be a List with all the materials which the wall is composed of. + + MaterialLibrary={"WoodBevelLappedSidings":{"Rvalue":0.14,"lenght":1},"FoamInsulation":{"Rvalue":0.98,"lenght":1}, + "GlassFiber":{"Rvalue":0.70,"lenght":25},"WoodStud":{"Rvalue":0.63,"lenght":90},"GypsumBoard":{"Rvalue":0.079,"lenght":13}, + "WoodFiberboardSheeting":{"Rvalue":0.23,"lenght":13},"insideSurf":{"Rvalue":0.12,"lenght":1},"outsideSurfSummer": {"Rvalue":0.044,"lenght":1}, + "outsideSurfWinter":{"Rvalue":0.03,"lenght":1},"Wood": {"Rvalue":0.22,"lenght":25}} ##lenghts in mm + + print "This wall is composed by: " + str(List) + + Rtot=0 + count=0 + for any in List: + Material=MaterialLibrary[any] #I save a temporary directory of materials one by one + Rtot=Rtot+Material["Rvalue"]*(Lenghts[count]/Material["lenght"]) + count+=1 + Utot=1/Rtot + print "The total resistance of the wall is: "+str(Rtot) + print "The overall heat transfert coefficient is:"+str(Utot) + return Utot + +def CalcUtotWall (LayersSeries,LayersParallel,RatioParallel): ##function + ###the function calculates the total heat conduction coefficient of the wall composed by two resistances in parallel and other in series + MaterialLibrary={"WoodBevelLappedSidings":0.14,"FoamInsulation":0.98, +"GlassFiber_90mm":2.45,"WoodStud":0.63,"GypsumBoard":0.079,"WoodFiberboardSheeting_13mm":0.23, +"insideSurf":0.12,"outsideSurfSummer":0.044,"outsideSurfWinter":0.03} + Rtot=[] + for any in LayersParallel: + LayersSeries.append(any) + print "This type of wall is composed by: " +str(LayersSeries) + print"***" + R=0 + for any in LayersSeries: + RvalueLayer=MaterialLibrary[any] + R=R+RvalueLayer + print "The value of resistance is: " + str(R) + Rtot.append(R) + print "*************" + print" " + LayersSeries.pop(-1) + + Utot=( (Rtot[0]**-1)*(1-RatioParallel) )+( (Rtot[1]**-1) *RatioParallel ) + print "the value of the total heat transfert coefficient (Utotal) is " +str(Utot) +" W/k m^2 " + + LayersWall=LayersSeries+LayersParallel + Rvalues=[] ## creation of a list with the value of each single resistance utilized + for any in LayersWall: + Rvalues.append(MaterialLibrary[any]) + results={"Rsection":Rtot,"Rvalues":Rvalues,"Overall heat transfert coeff":Utot} + return results + \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/WallCalculations_Botti.py b/Assignment 4 - Deadline 17 oct 2017/WallCalculations_Botti.py new file mode 100644 index 0000000..b7af3b6 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/WallCalculations_Botti.py @@ -0,0 +1,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) \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/WallCalculations_Pedroza.py b/Assignment 4 - Deadline 17 oct 2017/WallCalculations_Pedroza.py new file mode 100644 index 0000000..15d1815 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/WallCalculations_Pedroza.py @@ -0,0 +1,73 @@ +# -*- coding: utf-8 -*- + +#Dictionary with unit thermal resistance of common components used in buildings. +Material_Library = {"Outside_surface_Summer":0.044, "Outside_surface_Winter":0.030,"Inside_surface": 0.12, + "Insulation_Glass_Fiber_90mm":2.52, "WoodStud_90mm":0.63, "WoodFiberboard": 0.23, + "Stucco_25":0.037, "WoodBevel_13x200": 0.14, "Gypsum_13mm":0.079, "CommonBrick_100mm": 0.12, "Wood_50mm":0.44} + +#OVERALL HEAT TRANSFER COEFICCIENT +def wallCalc_withParallel(L_WS, L_GF, A_GF): + + Layers_WoodStud = L_WS # The sum of all layers. + Rtot_Stud = 0 + Resistances={} + + for anyLayer in Layers_WoodStud: + RValue = Material_Library[anyLayer] + Rtot_Stud = Rtot_Stud + RValue + Dict1={anyLayer:RValue} + Resistances.update(Dict1) + + + #FOR GLASS FIBER + Layers_GlassFiber = L_GF #For this case, + Rtot_Fiber = 0 + + for anyLayer in Layers_GlassFiber: + RValue = Material_Library[anyLayer] + Rtot_Fiber = Rtot_Fiber + RValue + Dict1={anyLayer:RValue} + Resistances.update(Dict1) + + U_Stud = 1/(Rtot_Stud) #Overall heat transfer coefficient, which is the inverse of the specific resistance. + U_Fiber = 1/(Rtot_Fiber) + + U_Total = (A_GF)*(U_Fiber) + (1-A_GF)*(U_Stud) + R_Total = 1/U_Total + + results = {"U_Total":U_Total, "R_Tot": R_Total, "Dict":Resistances} + return results + + +#ONLY IN SERIES +def wallCalc_onlyInSeries(RValues): + Layers = RValues # The sum of all layers. + Rtot = 0 + + for anyLayer in Layers: + RValues = Material_Library[anyLayer] + Rtot = Rtot + RValues + + U_tot = 1/(Rtot) + return U_tot + + +#HEATING CALCULATIONS +def Q_heat (TempWinter, Area, Uheating): + T_confort_Winter = 20 + T_heating = T_confort_Winter - TempWinter + HF=Uheating*T_heating + Q = (HF)*(Area) + results = {"Area":Area, "U_heating":Uheating, "HF":HF, "Q_heating":Q} + return results + + +#COOLING CALCULATIONS +def Q_cool (TempSummer, Area, Ucool, OFt, OFb, OFr, DR): + T_confort_Summer = 24 + T_cooling = TempSummer - T_confort_Summer + CF=Ucool*((T_cooling*OFt)+OFb+(OFr*DR)) + Q = (CF)*(Area) + results = {"Area":Area, "U_cooling":Ucool, "CF":CF, "Q_cooling":Q} + return results + \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/assignment4_Micev/assignment4_Micev.py b/Assignment 4 - Deadline 17 oct 2017/assignment4_Micev/assignment4_Micev.py new file mode 100644 index 0000000..d4c1c58 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/assignment4_Micev/assignment4_Micev.py @@ -0,0 +1,32 @@ +import os +os.chdir('C:/Users/Pc/Desktop/politecnico/Energy and Enviromental Technologies For Building Systems/assignment4_Micev') +import wallCalc_Micev as wc + +series_layers=["gypsum_13mm","common_brick_100mm","fiberboard_13mm","wood_bevel"] +paralel_layers=["glassfiber_90mm","woodstud_90mm"] +fraction_insulation=0.7 +Area_walls=105.8 #m^2 +Area_door=2.2 #m^2 +Area_ceillings=200 #m^2 +door=["wood_50mm","insideSurface","outsideSurface_winter"] +roof=["roof"] +Twin=-4.8 # degree C - Winter temperature in Piacenza given in Weather data +Tins=20 # degree C - desired temperature in a room in winter +deltaT_heating=Tins-Twin +wall_layers,Rwall_heating,Uwall_heating=wc.wallCalc_withParallel(series_layers,paralel_layers,fraction_insulation) +Udoor_heating=wc.wallCalc_onlyinSeries(door) +U_roof=wc.wallCalc_onlyinSeries(roof) +print " Thermal conductivity of wall in winter is: "+str(Uwall_heating)+" W/m^2 K" +print " Thermal conductivity of door in winter is: "+str(Udoor_heating)+" W/m^2 K" +print " Thermal conductivity of roof in winter is: "+str(U_roof)+" W/m^2 K" +Q_wall_heating=Area_walls*Uwall_heating*deltaT_heating +Q_door_heating=Area_door*Udoor_heating*deltaT_heating +Q_roof_heating=Area_ceillings*U_roof*deltaT_heating +Q_total_heating=Q_wall_heating+Q_door_heating+Q_roof_heating +print " " +print " Total heat transfer through walls in winter is: " + str(Q_wall_heating)+ " W" +print " Total heat transfer through door in winter is: " + str(Q_door_heating)+ " W" +print " Total heat transfer through roof in winter is: " + str(Q_roof_heating)+ " W" +print " " +print " Total heat transfer through opaque surfaces in winter is: "+str(Q_total_heating)+ " W." +print " That means that We should provide heat power of "+str (Q_total_heating)+" W in order to gain desired temperature of 20 (for a opaque surfaces)." diff --git a/Assignment 4 - Deadline 17 oct 2017/assignment4_Micev/wallCalc_Micev.py b/Assignment 4 - Deadline 17 oct 2017/assignment4_Micev/wallCalc_Micev.py new file mode 100644 index 0000000..61894a0 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/assignment4_Micev/wallCalc_Micev.py @@ -0,0 +1,38 @@ +def wallCalc_withParallel(layers_in_series,layers_in_paralel,fraction): + Materials_library={"glassfiber_90mm":2.52,"stucco_25mm":0.037,"facebrick_100mm":0.075,"wood_25mm":0.22, +"woodstud_90mm":0.63,"woodstud_140mm":0.98,"plywood_13mm":0.11,"gypsum_13mm":0.079,"fiberboard_13mm":0.23, +"outsideSurface_winter":0.03,"outsideSurface_summer":0.044,"insideSurface":0.12,"wood_bevel":0.14,"common_brick_100mm":0.12,"roof":4.0} + convection_resistances=["insideSurface","outsideSurface_winter"] + layers1=layers_in_series+convection_resistances+["glassfiber_90mm"] + layers2=layers_in_series+convection_resistances+["woodstud_90mm"] + Rtot=0 + for anyLayer in layers1: + RValue_layer=Materials_library[anyLayer] + Rtot=Rtot+RValue_layer + Rtot1=0 + for anyLayer in layers2: + RValue_layer=Materials_library[anyLayer] + Rtot1=Rtot1+RValue_layer + Utot=fraction/Rtot+(1-fraction)/Rtot1 + Rsum=1/Utot + all_resistances=layers_in_series+layers_in_paralel+convection_resistances + material=[] + resistances=[] + for anyLayer in all_resistances: + material.append(Materials_library[anyLayer]) + resistances.append(anyLayer) + library=dict(zip(resistances,material)) + return library, Rsum, Utot + +def wallCalc_onlyinSeries(layers_series): + Materials_library={"glassfiber_90mm":2.52,"stucco_25mm":0.037,"facebrick_100mm":0.075,"wood_50mm":0.44, +"woodstud_90mm":0.63,"woodstud_140mm":0.98,"plywood_13mm":0.11,"gypsum_13mm":0.079,"fiberboard_13mm":0.23, +"outsideSurface_winter":0.03,"outsideSurface_summer":0.044,"insideSurface":0.12,"wood_bevel":0.14,"common_brick_100mm":0.12, +"roof":4.0} + Rtot=0 + for anyLayer in layers_series: + RValue_layer=Materials_library[anyLayer] + Rtot=Rtot+RValue_layer + U=1/Rtot + return U + diff --git a/Assignment 4 - Deadline 17 oct 2017/assignment4_Micev/wallCalc_Micev.pyc b/Assignment 4 - Deadline 17 oct 2017/assignment4_Micev/wallCalc_Micev.pyc new file mode 100644 index 0000000..70bf70c Binary files /dev/null and b/Assignment 4 - Deadline 17 oct 2017/assignment4_Micev/wallCalc_Micev.pyc differ diff --git a/Assignment 4 - Deadline 17 oct 2017/assignment4_mainscript_Genco.py b/Assignment 4 - Deadline 17 oct 2017/assignment4_mainscript_Genco.py new file mode 100644 index 0000000..01c5a97 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/assignment4_mainscript_Genco.py @@ -0,0 +1,37 @@ +import os +os.chdir ("/Users/FedericoGenco/Desktop") + +import wallCalculation_genco as calc + +inseries=["wood_bevel","wood_fiberboard","gypsum_wallboard"] +inparallel=["glass_fiber","wood_stud"] +firstratio= float(0.75) +door=["wood_5cm"] +roof=["wood_stud","wood_5cm"] + +Utot_wall= calc.wallCalc_withParallel(inseries,inparallel,firstratio) +Utot_door= calc.wallCalc_onlyInSeries (door) +Utot_roof= calc.wallCalc_onlyInSeries (roof) + +T_d_heating=-4.8 +T_int=20 +deltaT= 24.8 +area=[105.8,2.2,200] +Utot=[0.4904059,2.2727272727,0.934579] + +HF=[] +Q=[] +index=range(3) + +for anyindex in index: + HF.append(Utot[anyindex]*deltaT) + Q.append(HF[anyindex]*area[anyindex]) + +print "The values of U for wall, door and roof result "+str(HF) +print "The values of Q for wall, door and roof result "+str(Q) + + + + + + \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/assignment4_mainscript_riva.py b/Assignment 4 - Deadline 17 oct 2017/assignment4_mainscript_riva.py new file mode 100644 index 0000000..6ccd7a7 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/assignment4_mainscript_riva.py @@ -0,0 +1,48 @@ +#ASSIGNMENT 4 + +def wallcalc_withparaller(S,P,FR): + air=["outside_surface_winter","inside_surface"] + material_library_dictionary={"outside_surface_winter":0.030,"outside_surface_summer":0.044,"wood_bevel":0.14, + "wood_fiberboard":0.23,"glass_fiber":2.45,"wood_stud":0.63,"glass_fiber":2.45,"inside_surface":0.12, + "gypsum_wallboard":0.079,"wood_5cm":0.44} + series=S+air + + R=0 + for anymaterial in S: + Rvalue_layer_series= material_library_dictionary[anymaterial] + R=R+Rvalue_layer_series + resistence=[] + for anymaterial in P: + Rvalue_layer_parallel= material_library_dictionary[anymaterial] + resistence.append(R+Rvalue_layer_parallel) + + U1=1/resistence[0] + U2=1/resistence[1] + secondratio=float(1-FR) + Utot1=(U1*FR)+(U2*secondratio) + Rt=1/Utot1 + + results=Utot1 + + return results + +def wallcalc_onlyInSeries(S): + air=["outside_surface_winter","inside_surface"] + material_library_dictionary={"outside_surface_winter":0.030,"outside_surface_summer":0.044,"wood_bevel":0.14, + "wood_fiberboard":0.23,"glass_fiber":2.45,"wood_stud":0.63,"glass_fiber":2.45,"inside_surface":0.12, + "gypsum_wallboard":0.079,"wood_5cm": 0.44,} + series=S+air + + R1=0 + + for anymaterial in S: + Rvalue_layer_series= material_library_dictionary[anymaterial] + R1=R1+Rvalue_layer_series + + Utot2=1/R1 + Rt=1/Utot2 + + results=Utot2 + + return results + \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/assignment4_wallcalculation_riva.py b/Assignment 4 - Deadline 17 oct 2017/assignment4_wallcalculation_riva.py new file mode 100644 index 0000000..c5250c9 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/assignment4_wallcalculation_riva.py @@ -0,0 +1,59 @@ +#ASSIGNMENT 4 + +import os +os.chdir ("/Users/Fede/Desktop/federicoriva_as_1_2_3_4") + +import assignment4_mainscript_riva as f1 + +wall_series=["wood_bevel","wood_fiberboard","gypsum_wallboard"] +wall_paraller=["glass_fiber","wood_stud"] +door=["wood_5cm"] +roof=["wood_stud","wood_5cm"] + +FR=0.75 #from data + +U_tot_wall=f1.wallcalc_withparaller(wall_series,wall_paraller,FR) +U_tot_door=f1.wallcalc_onlyInSeries(door) +U_tot_roof=f1.wallcalc_onlyInSeries(roof) + +DT=24.8 #from data + +U_tot=[U_tot_wall,U_tot_door,U_tot_roof] + +HF=[] + +for anyU in U_tot: + HF.append(anyU*DT) + +Area_wall=105.8 #from data +Area_door=2.2 #from data +Area_roof=200 #from data + +Areas=[Area_wall,Area_door,Area_roof] +Q=[] + +index=range(3) + +for anyindex in index: + + Q.append(HF[anyindex]*Areas[anyindex]) + +print"Values of U are "+str(U_tot) + +print"Values of HF are "+str(HF) + +print"Values of thermal peak power loads are "+str(Q) + +#pt1:wall #pt2:door #pt3:roof + + + + + + + + + + + + diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Bortolotti.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Bortolotti.py new file mode 100644 index 0000000..83b5f97 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Bortolotti.py @@ -0,0 +1,44 @@ +import os + +os.chdir ("C:\Users//alice\Dropbox\Python4ScientificComputing_Fundamentals\Assignment 4") + +import wallCalculations_Bortolotti as wC + +Layers_Wall_series = ["WoodBevelLapperSiding_13mm*200mm","GypsumWallBoard_13mm","CommonBrick_100m","WoodFiberBoard_13mm"] + +Layers_Wall_par = ["GlassFiberInsultation_90mm","WoodStud_38mm*90mm"] + +Layer_Door = ["Wood_50mm"] + +Layer_Roof = ["GlassFiberInsultation_90mm","WoodStud_38mm*90mm","WoodFiberInsulation_13mm"] + +U_Roof = 0.25 + +Results_Wall = wC.wallCalc_withParallel(Layers_Wall_series,Layers_Wall_par,0.7) +Results_Door = wC.wallCalc_onlyInSeries(Layer_Door) +#Results_Roof = wC.wallCalc_onlyInSeries(Layers_Roof) U_roof is given by the example + +U_Wall = Results_Wall["U_overall"] +U_Door = Results_Door["Utot_series"] +#U_Roof = Results_Roof["Utot_series"] + +print "the U value of the Wall is " + str(U_Wall) +print "the U value of the Door is " + str(U_Door) +print "the U value of the Roof is " + str(0.25) + +Tin_winter = 20 +Tout_winter = -4.8 +DeltaT_Heating = Tin_winter - Tout_winter + + +A_Wall = 105.8 +A_Door = 2.4 +A_Roof = 200 + +Q_Wall = U_Wall*DeltaT_Heating*A_Wall +Q_Door = U_Door*DeltaT_Heating*A_Door +Q_Roof = U_Roof*DeltaT_Heating*A_Roof + +Q_tot = Q_Wall + Q_Door + Q_Roof + +print "the total heat load from the opaque surfaces is " + str(Q_tot) + "W" \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_CHEN.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_CHEN.py new file mode 100644 index 0000000..5b554ec --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_CHEN.py @@ -0,0 +1,29 @@ + +import sys +import os +ThisFileDirectory=os.path.dirname(sys.argv[0]) +os.chdir(ThisFileDirectory) +print os.getcwd() + + +import walllCalculations_CHEN as Wall + +Layers_throughInsulation=["GypsumWallboard_13mm","GlassFiberInsulation_90mm","OutsideSurfaceWinter","CommonBrick_100mm" +,"WoodBevelLappedSiding_13mm","WoodFiberboardSheeting_13mm","InsideSurfaceAir"] +Layers_throughStuds=["GypsumWallboard_13mm","WoodStud_90mm","OutsideSurfaceWinter","CommonBrick_100mm" +,"WoodBevelLappedSiding_13mm","WoodFiberboardSheeting_13mm","InsideSurfaceAir"] +door=["InsideSurfaceAir","OutsideSurfaceWinter", "Wood_50mm"] + +results= Wall.wall_calculator([Layers_throughInsulation,Layers_throughStuds],0.70,door,0.25) +print results + +A={"A_wall":105.8,"A_roof":200,"A_door":2.2} #m2 +T=24.8 #Temperature_Difference,degreeC +HF={"HF_wall":results["the total U of the wall"]*T,"HF_roof":results["the total U of the roof"]*T, +"HF_door":results["the total U of the door"]*T} #W/m2 +Q_heating={"Q_wall":A["A_wall"]*HF["HF_wall"],"Q_roof":A["A_roof"]*HF["HF_roof"],"Q_door":A["A_door"]*HF["HF_door"]} +Q_opaque=Q_heating["Q_wall"]+Q_heating["Q_roof"]+Q_heating["Q_door"] + +print "The heating factors in opaque is: " +str(HF) +" W/m2" +print "The heating loads in opaque are: "+str(Q_heating) +" W" +print "The total heating load in opaque is: " + str(Q_opaque) +" W" \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Casalicchio.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Casalicchio.py new file mode 100644 index 0000000..21ddbe4 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Casalicchio.py @@ -0,0 +1,48 @@ +import sys +import os +ThisFileDirectory=os.path.dirname(sys.argv[0]) +os.chdir(ThisFileDirectory) +print os.getcwd() + + +import wallCalculations_Casalicchio as Wall + +#INPUT WEATHER +Delta_T = 24.8 # K + +#INPUT WALLS +Global_Heat_Transfer_Coeff = 0 # if absent put 0 +Layers_In_Series=["Outside_Surface_Winter","Gypsum_Wallboard","Common_Brick","Wood_Bevel_Lapped_Siding","Wood_Fiberboard_Sheeting","Inside_Surface"] +Layers_In_Parallel=["Glass_Fiber_Insulation","Wood_Stud"] +N_Layers_In_Parallel=2 +Ratio_Insulation=[0.7,0.3] +Area = 105.8 #m2 + +Results_Wall_Function=Wall.Wall_Function(Global_Heat_Transfer_Coeff,Layers_In_Series,Layers_In_Parallel, Ratio_Insulation, N_Layers_In_Parallel, Area, Delta_T) +print "\nWALLS" +print Results_Wall_Function + +# INPUT DOOR +Global_Heat_Transfer_Coeff = 0 # if absent put 0 +Layers_In_Series=["Outside_Surface_Winter","Door_Wood","Inside_Surface"] +Layers_In_Parallel=[] +N_Layers_In_Parallel=0 +Ratio_Insulation=[1] +Area = 2.2 #m2 + +Results_Wall_Function=Wall.Wall_Function(Global_Heat_Transfer_Coeff,Layers_In_Series,Layers_In_Parallel, Ratio_Insulation, N_Layers_In_Parallel, Area, Delta_T) +print "\nDOOR" +print Results_Wall_Function + +# INPUT CEILING +Global_Heat_Transfer_Coeff=0.25 # [m2C/W] +Layers_In_Series=[] +Layers_In_Parallel=[] +N_Layers_In_Parallel=0 +Ratio_Insulation=[1] +Area = 200 #m2 + +Results_Wall_Function=Wall.Wall_Function(Global_Heat_Transfer_Coeff,Layers_In_Series, + Layers_In_Parallel, Ratio_Insulation, N_Layers_In_Parallel, Area, Delta_T) +print "\nROOF" +print Results_Wall_Function \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Cordieri.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Cordieri.py new file mode 100644 index 0000000..d18a441 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Cordieri.py @@ -0,0 +1,30 @@ +import sys +import os +ThisfileDirectory=os.path.dirname(sys.argv[0]) +os.chdir(ThisfileDirectory) +print os.getcwd() +import wall_Calculations_Cordieri as wcc +WallLayersSeries=["WoodBevelLappedSliding","WoodFiberboardSheeting","GypsumWallboard","CommonBrick"] +WallLayersParallel=["GlassFiberInsulation","Woodstud"] +f=0.75 +Uwall=wcc.wallCalc_withParallel(WallLayersSeries,WallLayersParallel,f) +DoorLayers=["Wood"] +RoofLayers=["CommonBrick","AsphaltShingleRoofing","ConcreteLight"] +Udoor=wcc.wallCalc_onlyInSeries(DoorLayers) +Uroof=wcc.wallCalc_onlyInSeries(RoofLayers) +DT=24.8 +Aroof=200 +Adoor=2.2 +Awall=144 +HFdoor=Udoor*DT +HFroof=Uroof*DT +HFwall=Uwall*DT +Qdoor=HFdoor*Adoor +Qroof=HFroof*Aroof +Qwall=HFwall*Awall +wall={"Uwall":Uwall,"HFwall":HFwall,"Qwall":Qwall} +roof={"Uroof":Uroof,"HFroof":HFroof,"Qroof":Qroof} +door={"Udoor":Udoor,"HFdoor":HFdoor,"Qdoor":Qdoor} +print wall +print roof +print door \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Cremona.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Cremona.py new file mode 100644 index 0000000..50e9871 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Cremona.py @@ -0,0 +1,30 @@ +import os +os.chdir("C:\Users\Cremona\Documents\Nuova cartella") +import wallCalculations_Cremona as w_C +w_s = ["common_brick_100mm","wood_bevel_lapped_siding_13mmx200mm","plaster_or_gypsum_board_13mm","wood_fiberboard_13mm","wood_stud_nominal"] +w_i = ["common_brick_100mm","wood_bevel_lapped_siding_13mmx200mm","plaster_or_gypsum_board_13mm","wood_fiberboard_13mm","glass_fiber_insulation_25mm"] +IF = 0.70 +U_walls = w_C.wallCalc_withParallel(w_s,w_i,IF) +Door = ["wood_25mm"] +U_door = w_C.wallCalc_onlyInSeries(Door) +Roof = ["asphalt_shingle_roofing","wood_fiberboard_13mm","common_brick_100mm"] +U_roof = w_C.wallCalc_onlyInSeries(Roof) + +Del_T_winter = 24.8 +area_walls = 105.8 +area_door = 2.2 +area_roof = 200 +list_U_opaque = {"U_walls":U_walls,"U_door":U_door,"U_roof":U_roof} +list_area_opaque = [area_walls,area_door,area_roof] +Q_tot = 0 +i = 0 + + +for anyU in list_U_opaque: + heat_factor = Del_T_winter*list_U_opaque[anyU] + Q_heat = heat_factor*list_area_opaque[i] + Q_tot = Q_tot + Q_heat + i = i+1 + print "The heating load for this surface is "+str(Q_heat) +print "The total heating load is "+str(Q_tot) + \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_DeVanna.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_DeVanna.py new file mode 100644 index 0000000..13c9050 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_DeVanna.py @@ -0,0 +1,41 @@ +import os +os.chdir("/Users/Guglielmo/Desktop/BULDINGS/phyton/assignment 4") + +import wallCalculations_DeVanna1 as WALL + +inseries=["wood_bevel","wood_fiberboard","gypsum_wallboard"] +inparallel=["glass_fiber","wood_stud"] +firstratio=float(0.75) +door=["wood_5cm"] +roof=["asphalt_shingle_roofing","wood_stud_140mm"] + +Utotwall= WALL.wallCalc_withParallel(inseries,inparallel,firstratio) +Utotdoor= WALL.wallCalc_onlyInSeries(door) +Utotroof= WALL.wallCalc_onlyInSeries(roof) +Utot=[Utotwall,Utotdoor,Utotroof] +areas=[105.8, 2.2, 200] +index=range(3) +HF=[] +Q=[] + +t_design_heating=-4.8 #from tables +tint=20 +AT=(tint-t_design_heating) + +for anyindex in index: + HF.append(Utot[anyindex]*AT) + Q.append(HF[anyindex]*areas[anyindex]) + +print"the total U of the wall is:"+str(Utotwall)+" W/(deg*m)" +print"the total U of the door is:"+str(Utotdoor)+" W/(deg*m)" +print"the total U of the roof is:"+str(Utotroof)+" W/(deg*m)" +print"the total HF of the wall is:"+str(HF[0])+" W/(m^2)" +print"the total HF of the door is:"+str(HF[1])+" W/(m^2)" +print"the total HF of the roof is:"+str(HF[2])+" W/(m^2)" +print"the total Q of the wall is:"+str(Q[0])+" W" +print"the total Q of the door is:"+str(Q[1])+" W" +print"the total Q of the roof is:"+str(Q[2])+" W" + + + + diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Depalo.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Depalo.py new file mode 100644 index 0000000..b2a92ab --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Depalo.py @@ -0,0 +1,34 @@ +#Assignment 4 - Depalo + +import os +os.chdir("M:\Poli\EETBS Energy Environmental Tech Building Systems") +import wallCalculations_Depalo as WC + +materialSeriesWall=['woodBevel','woodFiberboard13','gypsumWallboard13','commonBrick100'] +materialParallelWall=['GlassFiber90','woodStud90'] +materialDoor=['wood50'] +materialRoof=['GlassFiber25','woodFiberboard13','urethaneRigidFoam25','faceBrick200','acousticTile','concreteLight200','clayTile100','commonBrick100'] + +resultsWall=WC.wallCalc_withParallel(materialSeriesWall,materialParallelWall,0.7) +resultsDoor=WC.wallCalc_onlyInSeries(materialDoor) +resultsRoof=WC.wallCalc_onlyInSeries(materialRoof) +Uwall=resultsWall['Total U'] +Udoor=resultsDoor['Total U'] +Uroof=resultsRoof['Total U'] + +Awall=105.8 #total area of the walls [m^2] +Adoor=2.2 #area of the door +Aroof=200 #area of the roof +Tin=20 #project winter inner temperature +Tout=-4.8 #project winter outer temperature +deltaT=Tin-Tout +HFwall=Uwall*deltaT #heating factors +HFdoor=Udoor*deltaT +HFroof=Uroof*deltaT +Qwall=Awall*HFwall #heat load through the wall +Qdoor=Adoor*HFdoor #heat load through the door +Qroof=Aroof*HFroof #heat load through the roof + +Qtot=Qwall+Qdoor+Qroof + +print '\nThe U value for the walls is '+str(Uwall)+' W/m^2*K, the U value for the door is '+str(Udoor)+' W/m^2*K, the U value for the roof is ' +str(Uroof)+' W/m^2*K.\n\n'+'The heat flux through the wall is ' +str(Qwall) + ' W, the flux through the door is ' + str(Qdoor) + ' W, the flux through the roof is ' + str(Qroof) + ' W and the total flux through opaque surfaces is '+str(Qtot) + ' W.\n\n' \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_DiNarzo.pyc.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_DiNarzo.pyc.py new file mode 100644 index 0000000..f2b22fa --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_DiNarzo.pyc.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Importing the function wall_calc + +import wallCalculations_DiNarzo as wc + +#Calculating the U-Value for the wall + +Between_studs= ['Wood_bevel_lapped','Wood_fiberboard','Glass_fiber','Gypsum'] +At_studs= ['Wood_bevel_lapped','Wood_fiberboard','Wood_stud','Gypsum'] +farea=[0.75,0.25] + + +results=wc.wall_calc_with_parallel(Between_studs,At_studs,farea) +R_Wall= results['R_total'] +U_Wall= results['U_Total'] + +print ' ' + +#Calculating the U-Value for the door + +Door= ['Wood_5cm'] +results_s=wc.wallCalc_onlyInSeries(Door) +R_Door= results_s['R_total_series'] +U_Door=results_s['U_Total_series'] + +print ' ' + +#Calculating the U-Value for the ceiling + +Ceiling=['Wood_bevel_lapped','Gypsum','Wood_fiberboard'] +results_s=wc.wallCalc_onlyInSeries(Ceiling) +R_Ceiling= results_s['R_total_series'] +U_Ceiling=results_s['U_Total_series'] + +print ' ' + +#Calculating the Q-Value of Opaque surfaces + +Delta_T= 24.8 + +Wall={'U_Value':U_Wall,'Area':105.8} +Door={'U_Value':U_Door,'Area':2.2} +Ceiling={'U_Value':U_Ceiling,'Area':200} + +List_of_layers=[Wall,Door,Ceiling] +Q=0 +for anyl in List_of_layers: + HF=anyl['U_Value']*Delta_T + Q=HF*anyl['Area'] +print 'The total Q value is ' +str(Q) +' W' \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Diaz.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Diaz.py new file mode 100644 index 0000000..6b93ec5 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Diaz.py @@ -0,0 +1,28 @@ +Tin=20 +Tout=-4.8 +Adoor=2.2 +Aroof=200 +Uroof=0.25 +Awindow=36 +Adoor=2.2 +Awall=144-Awindow-Adoor +import os +os.chdir("C:\PY") +import wallCalculations_Diaz as WC +layers_wall_S=["woodBevel","woodFiberboard_13mm","woodStud_90mm","gypsumWallboard_13mm","brick_100mm"] +layers_wall_I=["woodBevel","woodFiberboard_13mm","glassFiberInsulation_90mm","gypsumWallboard_13mm","brick_100mm"] +ratio_I=0.70 +results=WC.wallCalc_withParallel(layers_wall_S,layers_wall_I,ratio_I) +U_overall=results["Total U of the wall"] +layers_G=["wood_50mm"] +results2=WC.wallCalc_onlyInSeries(layers_G) +Utot_G=results2["U"] +Qwall=Awall*(Tin-Tout)*U_overall +print(Qwall) +Qdoor=Adoor*(Tin-Tout)*Utot_G +print(Qdoor) +Qroof=Aroof*(Tin-Tout)*Uroof +print(Qroof) + +Q_tot_heating=Qwall+Qdoor+Qroof +print ("The total heating Q is "+str(Q_tot_heating)+" W") \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Dontoh.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Dontoh.py new file mode 100644 index 0000000..e532421 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Dontoh.py @@ -0,0 +1,28 @@ +import os +os.chdir("C:\Users\jude\Desktop\judes script code\WEEK 4") #Set the current directory to other to get File 1 +import wallCalculations_Dontoh as W + +#----Defining all values---- +layersInseries_forParallel=["insideSurface","outsideSurfaceWinter","Wood bevel lapped siding","Wood fiberboard","Gypsum wallboard","Common brick"] +layersInParallel=["Glass fiber insulation","Wood stud"] +layers_forRoof=["insideSurface","outsideSurfaceWinter","Wood","Asphalt shingle roofing"] +layers_forDoor=["insideSurface","outsideSurfaceWinter","Wood"] +deltaT_heating,wall_Area,roof_Area,door_Area=20-(-4.8),105.8,20*10,1*2.2 + +#----Getting the U-values from imported functions of File1---- +U_wall=W.wallCalc_withParallel(layersInseries_forParallel,layersInParallel) +U_door=W.wallCalc_OnlyInSeries(layers_forDoor,layers_forRoof)["U-Value of Door"] +U_roof=W.wallCalc_OnlyInSeries(layers_forDoor,layers_forRoof)["U-value of Roof"] + +opaque_Surfaces={"Wall":{"U-value":U_wall,"Area":wall_Area,"Heating Load":0},"Door":{"U-value":U_door,"Area":door_Area,"Heating Load":0},"Roof":{"U-value":U_roof,"Area":roof_Area,"Heating Load":0}} +heat_Load_total=0 + +for key in opaque_Surfaces: + opaque_Surfaces[key]["Heating Load"]=round((opaque_Surfaces[key]["U-value"]*deltaT_heating*opaque_Surfaces[key]["Area"]),1) + heat_Load_total+=round((opaque_Surfaces[key]["U-value"]*deltaT_heating*opaque_Surfaces[key]["Area"]),1) + +#Printing values +for key in opaque_Surfaces: + print("The heating load of the "+key+" is: "+str(opaque_Surfaces[key]["Heating Load"])+ " Watt") + +print("\nThe total heating load is: "+str(heat_Load_total)+" Watt") \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Falzarano.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Falzarano.py new file mode 100644 index 0000000..b1bd1ce --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Falzarano.py @@ -0,0 +1,38 @@ +import os +os.chdir("C:\Users\Marica\Desktop\python assignments") + + +from wallCalculations_Falzarano import wallCalculations + +layer_ser=["inside","woodbevel","woodfiber","gypsum","outside"] +layer_par=["glassfiber","stud"] +frac_area = 0.75 + +walldt = wallCalculations(layer_ser,layer_par,frac_area) +U = walldt["U_overall"] + + + +from wallCalculations_Falzarano import a +listdoor = ["outside", "inside", "wood"] +a(listdoor) + +doordata = a(listdoor) +U_door = doordata["Total U"] + + +listceiling = ["outside","inside","glassfiber", "gypsum", "wood"] +ceilingdata = a(listceiling) + +U_ceiling = ceilingdata["Total U"] + +delta_T = 24.8 +A_ceil = 200 +A_door = 2.2 +A_wall = 105.8 + +Q_wall = U*delta_T*A_wall +Q_door = U_door*delta_T*A_door +Q_ceil = U_ceiling*delta_T*A_ceil + +Q_tot = Q_wall + Q_door + Q_ceil diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Ferre.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Ferre.py new file mode 100644 index 0000000..7c92fec --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Ferre.py @@ -0,0 +1,39 @@ +import os +os.chdir("C:\Users\Lorenzo\Desktop\git_fork_clone\Python4ScientificComputing_Fundamentals\Assignment4") + +import wallCalculations_Ferre as FC + +series_wall_layer = ["wood_bevel","wood_fiberboard_13mm","gypsum_wallboard_13mm"] +parallel_wall_layer = ["glass_fiber_90mm","wood_stud_38mmx90mm"] +first_ratio=float(0.75) +door = ["wood_5cm"] +roof = ["wood_140mm","asphalt_shingle_roofing"] + +U_wall = FC.wallCalc_withParallel(series_wall_layer,parallel_wall_layer,first_ratio) +U_door = FC.wallCalc_onlyInSeries(door) +U_roof = FC.wallCalc_onlyInSeries(roof) + +U = {"U_wall":U_wall,"U_door":U_door,"U_roof":U_roof} +print str(U) + +T_design_heating = -4.8 +T_int = 20 +Delta_T_heating =(T_int - T_design_heating) + +HF=[] +for anyelement in U: + HF.append(Delta_T_heating*U[anyelement]) + +HF={"HF_wall":HF[0],"HF_door":HF[1],"HF_roof":HF[2]} +print str(HF) + +A_walls = 105.8 +A_door = 2.2 +A_roof = 200 + +Q_heating=[] +for anyelement in HF: + Q_heating.append(A_walls*HF[anyelement]) + +Q_heating={"Q_heating_wall":Q_heating[0],"Q_heating_door":Q_heating[1],"Q_heating_roof":Q_heating[2]} +print str(Q_heating) diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Funes.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Funes.py new file mode 100644 index 0000000..ce5470a --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Funes.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- + + +cd "D:\MIS DOCUMENTOS\Documents\Maestría\Energy Building Systems" +pwd + +import wallCalculations_Funes as UC + +Materials_In_Series = ["insideSurface","outsideSurfaceWinter","gypsumWallboard13mm","woodFiberboard13mm","woodBevel200mm"] +Materials_In_Parallel = ["woodStuds90mm","glassFiber25mm"] +door = ["insideSurface","outsideSurfaceWinter","wood_25mm"] +roof = ["ClayTile_100mm","woodFiberboard_13mm","woodStud_90mm","gypsumWallboard13mm"] + +Anet_wall = 105.8 +Anet_wall=float(Anet_wall) +Aroof = float(200) +Adoor = float(2.2) +Tdb_winter = float(-4.8) +Tin_winter = float(20) +DeltaT = float(Tin_winter-Tdb_winter) + +UC.wallCalc_withParallel(Materials_In_Series,Materials_In_Parallel,0.7) +Utot = 0.473684 + +UC.wallCalc_OnlyInSeries(door) +Udoor = 1.694915 + +UC.wallCalc_OnlyInSeries(roof) +Uroof = 0.893655 + +HFnet_wall = Anet_wall*DeltaT +Qnet_wall = Utot*HFnet_wall +print "The total heat transfered through the walls is :"+str(Qnet_wall)+" (W)" + +HFroof=Aroof*DeltaT +Qroof = Uroof*HFroof +print "The total heat transfered through the roof is :"+str(Qroof)+" (W)" + +HFdoor=Adoor*DeltaT +Qdoor = Uroof*HFdoor +print "The total heat transfered through the door is :"+str(Qdoor)+" (W)" + +Q=Qnet_wall+Qroof+Qdoor +print "The total heating load from opaque surfaces is :"+str(Qroof)+" (W)" \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_GopalsamySakthivel.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_GopalsamySakthivel.py new file mode 100644 index 0000000..e4276cf --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_GopalsamySakthivel.py @@ -0,0 +1,22 @@ +M={'outerConvWinter':{'R':0.030},'outerConvSummer':{'R':0.044},'InsideConv':{'R':0.12}, +'woodbevel':{'length':(13*200),'R':0.14},'fiberboard':{'length':(13),'R':0.23}, +'glassfiber':{'length':(25),'R':0.70},'woodstud':{'length':(90),'R':0.63}, +'gypsum':{'length':(13),'R':0.079},'commonbrick':{'length':(100),'R':0.12},'wood':{'length':(25),'R':0.22}, +'concrete':{'length':(200),'R':1.9},'plaster':{'length':(13),'R':0.079}} +wallLayersSeries=[{'material':'woodbevel','length':(13*200)},{'material':'fiberboard','length':13}, +{'material':'gypsum','length':13},{'material':'commonbrick','length':100}] +doorlayers=[{'material':'wood','length':(50)}] +rooflayers=[{'material':'concrete','length':500},{'material':'plaster','length':30}] +wallLayersParallel=[{'material':'glassfiber','length':90.00},{'material':'woodstud','length':90}] +fractionInsulation=0.70 +tempDifference=24.8 +Area_Walls=105.8 +Area_Door=2.2 +Area_Roof=200.00000 +import wallCalculations_GopalsamySakthivel as FC +CALCULATION=FC.WallCalc(wallLayersSeries,wallLayersParallel,fractionInsulation,M) +Q_walls=CALCULATION*Area_Walls*tempDifference +Q_door=(FC.doorOderRoofcalc(doorlayers,M))*Area_Door*tempDifference +Q_roof=(FC.doorOderRoofcalc(rooflayers,M))*Area_Roof*tempDifference +Qtotal=Q_walls+Q_door+Q_roof +print Qtotal \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Guermandi.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Guermandi.py new file mode 100644 index 0000000..533ea2c --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Guermandi.py @@ -0,0 +1,31 @@ +import os +os.chdir("/Users/Fede/Documents/Polimi/EETBS/Canopy") + +import wallCalculation_Guermandi as FC + +paral=["insulation", "wood stud"] +farea=[0.7, 0.3] +serie=["wood lapped", "wood sheeting", "gypsum wallboard", "100 mm common brick"] +roof = ["urethane rigid foam 50 mm", "100 mm common brick", "asphalt single roofing"] +door = ["door"] +U_wall = FC.wallCalc_withParallel(serie, paral, farea) +U_door = FC.wallCalc_onlyInSeries(door) +U_roof = FC.wallCalc_onlyInSeries(roof) + +Area_walls=105.8 +Area_Roof=200 +Area_door=2.2 +deltaT_heating=20-(-4.8) +Q_wall=U_wall*Area_walls*deltaT_heating +Q_roof=Area_Roof*U_roof*deltaT_heating +Q_door=Area_door*U_door*deltaT_heating +print('') +print('U of the wall is ')+str(U_wall) +print('Q disperded by wall is ')+str(Q_wall) +print('') +print('U of the roof is ')+str(U_roof) +print('Q disperded by roof is ')+str(Q_roof) +print('') +print('U of the door is ')+str(U_door) +print('Q disperded by door is ')+str(Q_door) +print('') \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Khoudari.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Khoudari.py new file mode 100644 index 0000000..a848b3c --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Khoudari.py @@ -0,0 +1,45 @@ +#Call of the file containing the functions +import os +os.chdir ("D:\Polimi Piacenza\Energy and Environment\notes\3 Python Files and Guidelines\assignment4") + + +import wallCalculations_Khoudari as WC + +series_materials=["wood_bevel","gypsum_13mm", "Common_Brick" ,"fiberboard_13mm"] +paralel_materials=["glassfiber_90mm","woodstud_90mm"] +fraction=0.7 + +results_thisWall = WC.wall_calc_parallel(series_materials,paralel_materials,fraction) + +#Call of the second function + +door= ["Wood_50mm","outsideSurface_winter","insideSurface"] +ceiling=["outsideSurface_winter","insideSurface", + "fiberboard_13mm","woodstud_90mm","gypsum_13mm"] + + +results_door = WC.WallCalcOnlyinSeries (door) +results_roof = WC.WallCalcOnlyinSeries (ceiling) + +#Calculation of the heat transfer + +Tin = 20 +Tout = -4.8 +delta_T = Tin - Tout + +Wall_area = 105.8 +Ceiling_area = 20*10 +Door_area = 1*2.2 + +Qwall = Wall_area * delta_T * results_thisWall['Uoverall'] +Qdoor = Door_area * delta_T * results_door ['Uoverall'] +Qceiling = Ceiling_area * delta_T * results_roof ['Uoverall'] + +Qtot = Qwall + Qdoor + Qceiling + +print "Q of wall= " + str(Qwall) + "W" +print "Q of door= " + str(Qdoor) + "W" +print "Q of ceiling= " + str(Qceiling) + "W" + +print "Q total= " + str (Qtot) + "W" + diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Lanzani.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Lanzani.py new file mode 100644 index 0000000..c935006 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Lanzani.py @@ -0,0 +1,25 @@ +import os +os.chdir("C:\Users\marco\Desktop\GIT\Python4ScientificComputing_Fundamentals") + +import WallCalculation_Lanzani as WC + +Layers_Wall_Serie = ["Outside_surface_Winter","WoodBevel_13x200","WoodFiberboard","Gypsum_13mm","Inside_surface","CommonBrick_100mm"] +Layers_Wall_Parallel= ["Insulation_Glass_Fiber_90mm","WoodStud_90mm"] +fraction=0.70 +results_wall=WC.wallCalc_withParallel(Layers_Wall_Parallel,Layers_Wall_Serie,fraction) +Layers_door=["Outside_surface_Winter","Inside_surface","Wood_50mm"] +Layers_roof=["Outside_surface_Winter","Inside_surface","MineralFiberBat_150mm","WoodFiberboard",] +results_door=WC.wallCalc_onlyInSeries(Layers_door) +results_roof=WC.wallCalc_onlyInSeries(Layers_roof) +Uwall=0.438 +DeltaHeating=24.8 +HF_wall=results_wall*DeltaHeating +HF_door=results_door*DeltaHeating +HF_roof=results_roof*DeltaHeating +A_wall=105.8 +A_roof=200 +A_door=2.2 +Q_wall=A_wall*HF_wall +Q_roof=A_roof*HF_roof +Q_door=A_door*HF_door +Qtot=Q_wall+Q_door+Q_roof \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_MARRUGO.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_MARRUGO.py new file mode 100644 index 0000000..6b03ca9 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_MARRUGO.py @@ -0,0 +1,58 @@ +# Assigment 4 Functions for Calculation the heating load factor (HF) +# and the total heating load (Q-heating) + +print """Assigment 4 Functions for Calculation the heating load factor (HF) + and the total heating load (Q-heating) \n""" + +import wallCalculations_MARRUGO as WC + +# List of materials of the wall in series +ListS=["Wood_bevel_lapped_siding","Wood_fiberboard_sheeting","Common_brick", +"Glass_fiber_insulation","Gypsum_wallboard"] + +# List of materials of the wall in parallel +ListP=["Wood_bevel_lapped_siding","Wood_fiberboard_sheeting","Common_brick", +"Wood stud","Gypsum_wallboard"] + +# List of materials of the door in series +ListD=["Wood"] + +# List of materials of the roof in series +ListR=["Asphalt_shingle_roofing","Plywood","Glass_fiber_insulation"] + +#Using Wall functions to calculate the U-Factor according with the list of materials +walll=WC.matParallel(ListS,ListP,0.70) +door=WC.matSeries(ListD) +roof=WC.matSeries(ListR) + +# Compute the delta of temperature in winter +TlowPiacenza=(-4.8) +Dtheating=20.0-(TlowPiacenza) + +# Compute the Heating load factor in [W/m2] +Hfwall=(walll["Utotal_winter"])*Dtheating +Hfdoor=(door["Utotal_winter"])*Dtheating +Hfroof=(roof["Utotal_winter"])*Dtheating + +# Defining the Areas of each element +length=20 +width=10 +height=2.4 + +AreaNonOpaque=14.4+14.4+7.2 +AreaDoor=1*2.2 +AreaRoof=length*width +AreaWall=((length*height)*2)+((width*height)*2)-AreaDoor-AreaNonOpaque + +# Compute the Heating load of each element +QheatWall=AreaWall*Hfwall +QheatDoor=AreaDoor*Hfdoor +QheatRoof=AreaRoof*Hfroof + +# Compute the Total Heating load +QHeatingTotal=QheatWall+QheatDoor+QheatRoof + +print "The Heating load of the wall is ",QheatWall,"W/m2 \n" +print "The Heating load of the door in W/m2 is ",QheatDoor,"W/m2 \n" +print "The Heating load of the roof in W/m2 is ",QheatRoof,"W/m2 \n" +print "The Total Heating load of the elements is ",QHeatingTotal,"W/m2 \n" \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Martinelli.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Martinelli.py new file mode 100644 index 0000000..0d351d1 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Martinelli.py @@ -0,0 +1,63 @@ +import os + +os.chdir ("C:\Users\Utente\Desktop\POLIMI\Polimi Lezioni\Building Systems\Assignments") + +import wallCalculations_Martinelli as WC + +layers_wall_series = ["gypsiumWallboard_13mm","commonBrick_100mm","woodFiberboard_13mm","WoodBevelLappedSiding"] +layers_wall_par = ["glassFiberInsulation_90mm","woodStud_38x90mm"] +layers_door = ["wood_50mm"] +layers_roof = ["WoodBevelLappedSiding","woodFiberboard_13mm","glassFiberInsulation_90mm","gypsiumWallboard_13mm"] + +U_roof = 0.25 + +results_wall = WC.wallCalc_withParallel(layers_wall_series,layers_wall_par,0.7) +results_door = WC.wallCalc_onlyInSeries(layers_door) +#results_roof = WC.wallCalc_onlyInSeries(layers_roof) the value is given by the example + +U_wall_sum = results_wall["Utot_sum"] +U_wall_win = results_wall["Utot_win"] +U_door_sum = results_door["Utot_sum"] +U_door_win = results_door["Utot_win"] + +print "the U value of the wall in summer is " + str(U_wall_sum) +print "the U value of the wall in winter is " + str(U_wall_win) + +print "the U value of the door in summer is " + str(U_door_sum) +print "the U value of the door in winter is " + str(U_door_win) +print " " + +Tin = 20 +Tout = -4.8 +deltaT_heating = Tin - Tout + +#from now on heating only + +HF_wall = U_wall_win*deltaT_heating +HF_door = U_door_win*deltaT_heating +HF_roof = U_roof*deltaT_heating + +L1 = 10 +L2 = 20 +H = 2.4 +L_d = 1 +H_d = 2.2 +A_fin = 3.0*4.0*1.8 + 8.0*1.8 + +Adoor = L_d*H_d +Awall = (L1+L2)*2.0*H - A_fin - Adoor +Aroof = L1*L2 + +Qwall = HF_wall*Awall +Qdoor = HF_door*Adoor +Qroof = HF_roof*Aroof + +Qtot = Qwall + Qdoor + Qroof + +print "The heating load of the walls is " + str(Qwall) + " (W)" +print " " +print "The heating load of the door is " + str(Qdoor) + " (W)" +print " " +print "The heating load of the roof is " + str(Qroof) + " (W)" +print " " +print "The total heating load of the opaque surfaces of the house is " + str(Qtot) + " (W)" diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Moretti.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Moretti.py new file mode 100644 index 0000000..64c7a77 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Moretti.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +""" + +EETBS 2017/2018 - Assignment 4 - RLF method, opaque surfaces (with funcion caller) + +Giorgio Moretti (10433550) + +""" +import wallCalculation_Moretti as walls + +print "\n ********** HEAT TRANSFER COEFFICIENTS OF OPAQUE SURFACES **********" + +##### U WALL ##### + +layers_wall_series = ["gypsumBoard_13mm","commonBrick_100mm","woodFiberboard_13mm","woodBevelLappedSiding_13x200mm"] +layers_wall_parallel = ["woodStud_90mm","glassFiberInsulation_25mm"] +percentage_ins = 0.70 +season = "winter" + +results_wall = walls.wallCalcSP(layers_wall_series, layers_wall_parallel, percentage_ins, season) +print "\n The global heat transfer coefficient of the wall is: U_WALL = " + str(results_wall["U"]) + " W/m^2°C" + +##### U DOOR ##### + +layers_door_series = ["wood_25mm"] +season = "winter" + +results_door = walls.wallCalcSeries(layers_door_series, season) +print "\n The global heat transfer coefficient of the door is: U_DOOR = " + str(results_door["U"]) + " W/m^2°C" + +##### U CEILING ##### +#layers_ceiling_series = ["wood_25mm","woodFiberboard_13mm","asphaltRoofing"] +#season = "winter" + +#results_ceiling = walls.wallCalcSeries(layers_ceiling_series, season) +#print "\n The global heat transfer coefficient of the ceiling is: U_CEILING = " + str(results_ceiling["U"]) + " W/m^2°C" + +U_ceiling = 0.25 +print "\n The global heat transfer coefficient of the ceiling is: U_CEILING = " + str(U_ceiling) + " W/m^2°C" + +##### HEAT TRANSFER RATE ##### +Tmin = -4.8 +Tmax = 31.9 +deltaT_heating = 20 - Tmin +deltaT_cooling = Tmax - 24 + +A_wall = 105.8 #[m^2] +A_door = 2.2 #[m^2] +A_ceiling = 200 #[m^2] + +HF_wall = results_wall["U"]*deltaT_heating #[W/m^2] +HF_door = results_door["U"]*deltaT_heating #[W/m^2] +HF_ceiling = U_ceiling*deltaT_heating #[W/m^2] + +QH_wall = round(HF_wall*A_wall,2) #[W] +QH_door = round(HF_door*A_door,2) #[W] +QH_ceiling = round(HF_ceiling*A_ceiling,2) #[W] +QH_tot = QH_wall + QH_door + QH_ceiling #[W] + +print "\n ********** HEATING LOADS **********" +print "\n The heating load through the walls is: QH_WALL = " + str(QH_wall) + " W" +print "\n The heating load through the door is: QH_DOOR = " + str(QH_door) + " W" +print "\n The heating load through the ceiling is: QH_CEILING = " + str(QH_ceiling) + " W" +print "\n The total heating load through the opaque surfaces is: QH_TOT = " + str(QH_tot) + " W" \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Mosconi.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Mosconi.py new file mode 100644 index 0000000..1ce7386 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Mosconi.py @@ -0,0 +1,28 @@ +import os +os.chdir("C:\Users\Manuel\Documents\Polimi\Building systems\Assignments\Assignment 4") + +import wallCalculations_Mosconi as uFunc + +series_wall=["gypsumBoard","commonBrick","woodfiberboard_13mm","woodBevel"] +parallel_wall=["glassFiber","woodStud"] +ratio=0.7 + +U_wall= uFunc.wallCalc_withParallel(series_wall,parallel_wall,ratio) + +door_layer=["wood_50mm"] +U_door=uFunc.wallCalc_onlyInSeries(door_layer) + +roof_layer=["wood_50mm","glassFiber","asphaltRoofing","woodfiberboard_13mm"] +U_roof=uFunc.wallCalc_onlyInSeries(roof_layer) + +T_winter=-4.8 +T_inside=20 +dT_heating=T_inside-T_winter + +A_roof=200 +A_net_wall=105.8 +A_door=2.2 + +Q_roof=A_roof*U_roof*dT_heating +Q_door=A_door*U_door*dT_heating +Q_wall=A_net_wall*U_wall*dT_heating \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Parsana.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Parsana.py new file mode 100644 index 0000000..ae1d0b1 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Parsana.py @@ -0,0 +1,24 @@ +import os +os.chdir("G:\Sem 1\ENERGY AND ENVIRONMENTAL TECHNOLOGIES FOR BUILDING SYSTEMS\Canopy Files\Assignment 4") +import wallCalculations_Parsana as W + +material_series1=['wood_bevel_siding','wood_fiberboard_13mm','glass_fiber_90mm','gypsum_13mm'] +material_series2=['wood_bevel_siding','wood_fiberboard_13mm','wood_stud_38*90mm','gypsum_13mm'] +material_door=['Wood_door_50mm'] +material_roof=['asphaltshingles_roofing','Wood_roof_100mm'] + +wall_Utot=W.U_wall_layer(material_series1,material_series2)["Total U of Wall"] +result=W.U_roof_door(material_door,material_roof) +U_R_door=result["Total U of Door is "] +U_R_roof=result["Total U of Roof is "] + +DeltaT=24.8 +A_wall=105.8 +A_roof=200.0 +A_door=2.2 + +Heat_Load=(wall_Utot*DeltaT)*A_wall+(U_R_door*DeltaT)*A_door+(U_R_roof*DeltaT)*A_roof + +print("\nThe total heating load is: "+str(Heat_Load)+" (W)") + + diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Patrignani.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Patrignani.py new file mode 100644 index 0000000..a9f4a22 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Patrignani.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +import os +os.chdir("C:/Users/stefy/Desktop/POLIMI/I ANNO/1 Semestre/Buildings/ASSIGNMENTS") + +import wallCalculations_Patrignani as CALC + +#walls +ListOfLayersInSeries=["gypsum_13mm", "common_brick", "wood_fiberboard", "wood_bevel","inside_surface","outside_surface"] +ListOfLayersInParallel=["glass_fiber", "wood_stud"] +AreaRatioInsulation = 0.70 + +U_wall = CALC.wallCalc_withParallel(ListOfLayersInSeries,ListOfLayersInParallel,AreaRatioInsulation) + +#door +ListOfLayers = ["wood_25mm", "inside_surface","outside_surface"] + +U_door = CALC.wallCalc_onlyInSeries(ListOfLayers) + +#roof +ListOfLayers = ["gypsum_13mm", "glass_fiber", "wood_bevel","inside_surface","outside_surface"] +U_roof = CALC.wallCalc_onlyInSeries(ListOfLayers) + +#Temperature difference +deltaT_heating = 20-(-4.8) + +# heating factor [W/m2] +HF_wall = U_wall * deltaT_heating +HF_door = U_door * deltaT_heating +HF_roof = U_roof * deltaT_heating + +#Areas [m2] +A_ceiling = 20*10 +A_wall = 2.4*(2*(20+10)) +A_door = 1*2.2 + +#Heating Loads [W] +HL_wall = HF_wall * A_wall +HL_door = HF_door * A_door +HL_ceiling = HF_roof * A_ceiling \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Pedroza.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Pedroza.py new file mode 100644 index 0000000..62544f7 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Pedroza.py @@ -0,0 +1,88 @@ +# -*- coding: utf-8 -*- +import os +os.chdir("C:\Users\Karla\OneDrive\SECOND SEMESTER - Sept 17\Buildings\Homework\Assignment4") +import WallCalculations_Pedroza as WC + +#EXERCISE + +#Input data: +Length_building = 20 +Width_building = 10 +H_building = 2.4 + +Windows = {"East":8, "South":4, "West":8} +L_Win = 1.8 + +W_Door = 2.2 +L_Door = 1 + +T_Winter = -4.8 +T_Summer = 31.9 +DR = 11.9 +Walls_OF = {"OFt":1,"OFb":8.2,"OFr":-0.36} +Door_OF = {"OFt":1,"OFb":8.2,"OFr":-0.36} +Ceiling_OF = {"OFt":0.62,"OFb":14.3*0.85-4.5,"OFr":-0.19} +T_confort_Summer = 24 +T_confort_Winter = 20 +U_ceiling = 0.25 + + +#CALCULATIONS + +#OVERALL HEAT TRANSFER COEFFICIENT CALCULATION + +#For Walls: + +Layers_Wall_Studs_Winter = ["Outside_surface_Winter","WoodBevel_13x200","WoodFiberboard","CommonBrick_100mm","WoodStud_90mm","Gypsum_13mm","Inside_surface"] #A list considering just Woodstud +Layers_Wall_Fiber_Winter = ["Outside_surface_Winter","WoodBevel_13x200","WoodFiberboard","CommonBrick_100mm","Insulation_Glass_Fiber_90mm","Gypsum_13mm","Inside_surface"] #Considering the layers in series including Glass fiber insulation +A_GlassFiber = 0.70 + +Layers_Wall_Studs_Summer = ["Outside_surface_Summer","WoodBevel_13x200","WoodFiberboard","CommonBrick_100mm","WoodStud_90mm","Gypsum_13mm","Inside_surface"] #A list considering just Woodstud +Layers_Wall_Fiber_Summer = ["Outside_surface_Summer","WoodBevel_13x200","WoodFiberboard","CommonBrick_100mm","Insulation_Glass_Fiber_90mm","Gypsum_13mm","Inside_surface"] #Considering the layers in series including Glass fiber insulation +A_GlassFiber = 0.70 + +UWall_Winter = WC.wallCalc_withParallel(Layers_Wall_Studs_Winter,Layers_Wall_Fiber_Winter,A_GlassFiber)#FUnction +UWall_Summer = WC.wallCalc_withParallel(Layers_Wall_Studs_Summer,Layers_Wall_Fiber_Summer,A_GlassFiber)#FUnction + + +#For Doors: +Layers_Door_Winter = ["Outside_surface_Winter","Wood_50mm","Inside_surface"] #Wood Door +Layers_Door_Summer = ["Outside_surface_Summer","Wood_50mm","Inside_surface"] + +UDoor_Winter = WC.wallCalc_onlyInSeries(Layers_Door_Winter)#Function +UDoor_Summer = WC.wallCalc_onlyInSeries(Layers_Door_Summer)#Function + + +#AREA CALCULATIONS + +Area_ceiling = Length_building*Width_building +Area_walls = (Length_building+ Width_building)*2*H_building + +#Windows +def A_Windows(W_Win): + Area_Win = W_Win + Atot_Win = 0 + + for anyWindow in Area_Win: + W_Win = Windows[anyWindow] + Atot_Win = Atot_Win + 1.8*W_Win + return Atot_Win + +Area_Windows = A_Windows(Windows) +Area_door = W_Door*L_Door + +Area_net_walls = Area_walls - Area_Windows - Area_door + + +#HEATING CALCULATIONS + +Q_heating_Walls = WC.Q_heat(T_Winter, Area_net_walls, UWall_Winter["U_Total"]) +Q_heating_Ceiling = WC.Q_heat(T_Winter, Area_ceiling, U_ceiling) +Q_heating_Door = WC.Q_heat(T_Winter, Area_door, UDoor_Winter) +Qtot_heating = Q_heating_Walls["Q_heating"]+Q_heating_Ceiling["Q_heating"]+Q_heating_Door["Q_heating"] + +print "The heat load for the walls is ",Q_heating_Walls +print "The heat load for the ceiling is ",Q_heating_Ceiling +print "The heat load for the door is ",Q_heating_Door +print "___________________________________________________________________________\n" +print "The total heat that is needed to warm the building is "+str(Qtot_heating)+" W" diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Putra.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Putra.py new file mode 100644 index 0000000..3b2037c --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Putra.py @@ -0,0 +1,133 @@ +#------------------------------Assignment 4------------------------------------ +#--------------------------Hendra Suryana Putra-------------------------------- + + +import os +os.chdir("/Users/hendrasuryanaputra/Dropbox/Python4ScientificComputing_Fundamentals/Assignment_4") # if shit happens, replace \ to / + +import WallCalculation_Putra as FC + +#--------------------------------Calculation for Wall--------------------------- + +# Input for Stud Layer +print "This is the calculation for WALL LAYER that consist of" +print "-------------------------------------------------------------------------------------" +print "Stud layer" + +stud_layer = ["woodBevelLappedSliding_13mm_200mm","woodFiberboard_13mm", +"woodStud_38mm_90mm","gypsumWallboard_13mm"] + +Rtot_stud = FC.wallCalc_withParallel(stud_layer) + +# Calculate the U factor of stud ---------------------------------------------- + +Ustud = 1/Rtot_stud["R total"] +fstud = 0.25 +Ustud_tot = fstud*Ustud + +print "The total heat transfer coefficient on stud is " + str(Ustud) + " (W/m^2 deg C)" +print "The total heat transfer coefficient on stud with 0.25 fraction area is " + str(Ustud_tot) + " (W/m^2 deg C)" +print "-------------------------------------------------------------------------------------" + +# Input for Insulation Layer + +print "Insulation layer" +ins_layer = ["woodBevelLappedSliding_13mm_200mm","woodFiberboard_13mm", +"glassFiberIns_90mm","gypsumWallboard_13mm"] + +Rtot_ins = FC.wallCalc_withParallel(ins_layer) + +# Calculate the U factor of insulation ---------------------------------------------- + +Uins = 1/Rtot_ins["R total"] +fins = 0.75 +Uins_tot = fins*Uins + +print "The total heat transfer coefficient on insulation is " + str(Uins) + " (W/m^2 deg C)" +print "The total heat transfer coefficient on insulation with 0.75 fraction area is " + str(Uins_tot) + " (W/m^2 deg C)" +print "-------------------------------------------------------------------------------------" + + +# Calculate the U Total of the wall ---------------------------------------------------- + +Uwall = Ustud_tot + Uins_tot + +print "Thus, the overall heat transfer coefficient of the wall is " + str(Uwall) + " (W/m^2 deg C)" +print "-------------------------------------------------------------------------------------" +print "-------------------------------------------------------------------------------------" + + + +#------------------------Calculation for Door and Ceiling------------------------- + + +# Input for Door Layer + +print "This is the calculation for DOOR LAYER" + +door_layer = ["wood_50mm"] +Rtot_door = FC.wallCalc_withSeries(door_layer) + +# Calculate the U factor of Door ---------------------------------------------- + +Udoor = 1/Rtot_door["R total"] + +print "The total heat transfer coefficient on Door is " + str(Udoor) + " (W/m^2 deg C)" +print "-------------------------------------------------------------------------------------" + +# Input for Ceiling Layer + +print "This is the calculation for CEILING LAYER" + +ceiling_layer = ["Asphalt_Shingle_Roofing","wood_100mm","Acoustic_Tile","ConcreteBlockLightWeight_439mm"] +Rtot_ceiling = FC.wallCalc_withSeries(ceiling_layer) + +# Calculate the U factor of Ceiling ---------------------------------------------- + +Uceiling = 1/Rtot_ceiling["R total"] + +print "The total heat transfer coefficient on Ceiling is " + str(Uceiling) + " (W/m^2 deg C)" +print "-------------------------------------------------------------------------------------" + + + +#-----------------------------Heating Factor------------------ + +Tht = -4.8 +Tint = 20 + +DT = Tint-Tht + +print "The Differential Temperature is " + str(DT) + " (Deg C)" + +HF_wall = Uwall*DT +HF_door = Udoor*DT +HF_Ceiling = Uceiling*DT + +print "Heat factor for Wall is " + str(HF_wall) + " (W/m^2)" +print "Heat factor for Door is " + str(HF_door) + " (W/m^2)" +print "Heat factor for Ceiling is " + str(HF_Ceiling) + " (W/m^2)" + + +#-----------------------------Total Load------------------ + +A_wall = 105.8 +A_door = 2.2 +A_Ceiling = 200 + +Qwall = HF_wall*A_wall +Qdoor = HF_door*A_door +QCeiling = HF_Ceiling*A_Ceiling + +print "Heating load for Wall is " + str(Qwall) + " W" +print "Heating load for Door is " + str(Qdoor) + " W" +print "Heating load for Ceiling is " + str(QCeiling) + " W" + +Qtotal = Qwall+Qdoor+QCeiling + +Qtotal_kW = Qtotal/1000 +print "-------------------------------------------------------------------------------------" +print "-------------------------------------------------------------------------------------" +print "-------------------------------------------------------------------------------------" + +print "Thus, the total heating load for opaque surface (wall, door, and ceiling) is " + str(Qtotal_kW) + " kW" \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Temporelli.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Temporelli.py new file mode 100644 index 0000000..35d9a36 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Temporelli.py @@ -0,0 +1,39 @@ +#assignment4_step2_mainScript_Temporelli (only winter) + +import sys +import os +ThisfileDirectory=os.path.dirname(sys.argv[0]) +os.chdir(ThisfileDirectory) +print os.getcwd() +import wallCalculation_Temporelli as CW + +ListOfSeriesLayersWall=["InsideSurface","WoodBevelLappedSliding","WoodFiberboardSheeting","GypsumWallboard","OutsideSurfaceWinter","CommonBrick"] +ListOfParallelLayers=["GlassFiberInsulation","Woodstud"] +ListOfSeriesDoor=["InsideSurface","WoodDoor","OutsideSurfaceWinter"] +ListOfSeriesRoof=["Roof"] +area_fraction_ins = 0.70 + +U_wall=CW.wallCalc_withParallel(ListOfSeriesLayersWall,ListOfParallelLayers,area_fraction_ins) +print ("U_wall: "+str(U_wall)+" [W/m2K]") +U_door=CW.wallCalc_onlyInSeries(ListOfSeriesDoor) +print ("U_door: "+str(U_door)+" [W/m2K]") +U_roof=CW.wallCalc_onlyInSeries(ListOfSeriesRoof) +print ("U_roof: "+str(U_roof)+" [W/m2K]") + +T_outside_winter=-4.8 +T_inside_winter=20 +deltaT_heating=T_inside_winter-T_outside_winter + +HF_wall=deltaT_heating*U_wall +HF_door=deltaT_heating*U_door +HF_roof=deltaT_heating*U_roof + +A_wall=105.8 +A_door=2.2 +A_roof=200 + +Q_wall=A_wall*HF_wall +Q_door=A_door*HF_door +Q_roof=A_roof*HF_roof + +print ("Heating loads: "+"Q_wall: "+str(Q_wall)+" [W]"+" Q_door: "+str(Q_door)+" [W]"+" Q_roof: "+str(Q_roof)+" [W]") diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Thouvenin.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Thouvenin.py new file mode 100644 index 0000000..9829301 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Thouvenin.py @@ -0,0 +1,44 @@ +#Call of the file containing the functions +import os +os.chdir ("K:\Ordi casse\Building systems\Assignments\Ass 4") #adress where the file is + +import WallCalculation_Thouvenin as WC #We can rename the file for not always writing all + +#Call of the function calculating the wall in parallel + +wallpara1 = [ 'Outside_Surface_Winter' , 'Gypsum' , 'Glass_Fiber' , 'Common_Brick' , 'Wood_Fiberboard' ,'Wood_Bevel', 'Inside_Surface' ] +wallpara2 = [ 'Outside_Surface_Winter' , 'Gypsum' , 'Wood_Stud' , 'Common_Brick' , 'Wood_Fiberboard' ,'Wood_Bevel', 'Inside_Surface' ] +f = [ 0.7 , 0.3 ] + +results_thisWall = WC.wallcalc_withparallel ( wallpara1,wallpara2,f) + +#Call of the second function + +layerlist_door = [ 'Outside_Surface_Winter' , 'Wood_50mm' , 'Inside_Surface' ] +layerlist_roof = [ 'Outside_Surface_Winter' , 'AsphaltShingleRoofing' , +'Wood_Fiberboard' ,'Glass_Fiber' , 'Inside_Surface' ] + +results_door = WC.WallCalcOnlyinSeries ( layerlist_door ) +results_roof = WC.WallCalcOnlyinSeries ( layerlist_roof ) + +#Calculation of the heat transfer + +Tin = 20 +Tout = -4.8 +delta_T = Tin - Tout + +Wall_area = 105.8 +Roof_area = 20*10 +Door_area = 1*2.2 + +Qwall = Wall_area * delta_T * results_thisWall['Uoverall'] +Qdoor = Door_area * delta_T * results_door ['Uoverall'] +Qroof = Roof_area * delta_T * results_roof ['Uoverall'] + +Qtot = Qwall + Qdoor + Qroof + +print "Qwall= " + str(Qwall) + "W" +print "Qdoor= " + str(Qdoor) + "W" +print "Qroof= " + str(Qroof) + "W" + +print "Qtot= " + str (Qtot) + "W" diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_Wong.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_Wong.py new file mode 100644 index 0000000..ad12bd7 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_Wong.py @@ -0,0 +1,76 @@ +import wallCalculations_Wong as wc + +glass=0.7*90/25 +wood=0.22*50/25 + + +Layers={"inside":0.12,"gypsum":0.079, +"woodfiber":0.23,"woodbevel":0.14,"winter":0.03, +"woodstud":0.63,"glass":glass,"brick":0.12,"summer":0.044, +"wood":wood,"asphalt":0.077,"plywood":0.11 +} + +No_studs=["inside","gypsum", +"woodfiber","woodbevel","winter", +"glass","brick" +] + +Studs=["inside","gypsum", +"woodfiber","woodbevel","winter", +"woodstud","brick" +] +Roof=["inside","glass", +"plywood","asphalt","winter" +] +Door=["winter","wood","inside"] + +Measurements_walls={"LwallNS":10,"LwallEW":20,"LwindowS":4,"LwindowE":4,"LwindowW":8,"Hwindow":1.8, "Ldoor":1,"Hdoor":2.2} + +Tdwinter=-4.8 + +SidesPara=[No_studs,Studs] +SidesSerie=[Roof,Door] + +Uwall= wc.wallCalc_withParallel(SidesPara,Layers) +Urd=wc.wallCalc_OnlyInSeries(SidesSerie,Layers) + + +dheating= 20-Tdwinter + +DBrange=11.9 +Aroof=Measurements_walls["LwallNS"]*Measurements_walls["LwallEW"] + + +Hbuilding=2.4 +Awalls=Hbuilding*(Measurements_walls["LwallNS"]+Measurements_walls["LwallEW"])*2 + +AwinW=Measurements_walls["LwindowW"]*Measurements_walls["Hwindow"] +AwinE=Measurements_walls["LwindowE"]*Measurements_walls["Hwindow"] +AwinS=Measurements_walls["LwindowS"]*Measurements_walls["Hwindow"] +AwinSF=0.5*AwinS +AwinSO=AwinS-AwinSF +Adoor=Measurements_walls["Ldoor"]*Measurements_walls["Hdoor"] +Anetwall=Awalls-(AwinW+2*AwinE+AwinS+Adoor) + +Areas={"walls":Anetwall, "ceiling":Aroof,"door":Adoor} +Uheating={"walls":Uwall,"ceiling":Urd[0],"door":Urd[1]} + + +rows=["walls","ceiling","door"] + +def HF(parts,U,delta): + F=[] + for part in parts: + MF=U[part]*delta + F.append(MF) + return F +HF=HF(rows,Uheating,dheating) + + + +Qh={"Qwalls": HF[0]*Areas["walls"],"Qceiling": HF[1]*Areas["ceiling"],"Qdoor": HF[2]*Areas["door"]} + +print "The heat in the layers is as follows: "+ str(Qh) +Qtotal=Qh["Qwalls"]+Qh["Qceiling"]+Qh["Qdoor"] +print "The total heat flux is " + str(Qtotal) + diff --git a/Assignment 4 - Deadline 17 oct 2017/mainScript_zhang.py b/Assignment 4 - Deadline 17 oct 2017/mainScript_zhang.py new file mode 100644 index 0000000..aba2cdc --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainScript_zhang.py @@ -0,0 +1,32 @@ +import os +os.chdir("C:\Users\Clevo\Desktop") +import wallCalculations_zhang as wC + + +wall_onlyInSeries = ["Wood bevel lapped siding","Wood fiberboard sheeting,13mm","Wood stud,38mm*90mm","Gypsum wallboard,13mm"] +wall_withParallel = ["Glass fiber insulation"] + +Utot_Parallel_thisWall = wC.wallCalc_withParallel(wall_withParallel) +Utot_Series_thisWall = wC.wallCalc_onlyInSeries(wall_onlyInSeries) + +door_layer=["Wood_50mm"] +U_door = wC.wallCalc_onlyInSeries(door_layer) + +roof_layer=["AsphaltRoofing"] +U_roof=wC.wallCalc_onlyInSeries(roof_layer) + +T_winter= -4.8 +T_inside= 20 +dT_heating=T_inside-T_winter #The delta T between inside and outside in winter + +HF_wall=(Utot_Parallel_thisWall+Utot_Series_thisWall)*dT_heating +HF_door=U_door*dT_heating +HF_roof=U_roof*dT_heating + +A_wall= 105.8 +A_roof= 200 +A_door= 2.2 + +Q_roof=A_roof*HF_roof +Q_door=A_door*HF_door +Q_wall=A_wall*HF_wall \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/mainscript_Persico.py b/Assignment 4 - Deadline 17 oct 2017/mainscript_Persico.py new file mode 100644 index 0000000..2f3777d --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/mainscript_Persico.py @@ -0,0 +1,30 @@ +import os +os.chdir("C:\Users\Lavinia\Desktop\PoliPC\Building systems\Wall") +fraction=float(0.70) + +layers_wall_parallel= ["glassFiberInsulation_90mm","woodStud_90mm"] +layers_wall_series = ["outsideSurfaceWinter","woodBevel","woodFiberboard_13mm", "gypsumWallboard_13mm","insideSurface","commonBrick"] + +import wallcalculation_Persico as WC + +U_overall= WC.wall_calc(layers_wall_series,layers_wall_parallel,fraction) + +door_layer=["outsideSurfaceWinter","wood","insideSurface"] +U_door= WC.wall_calc_series(door_layer) + +roof_layer=["insideSurface", "glassFiberInsulation_90mm","woodStud_90mm","gypsumWallboard_13mm","outsideSurfaceWinter"] +U_roof=WC.wall_calc_series(roof_layer) + +T_winter=-4.8 +T_inside=20 +DeltaT_heating=T_inside-T_winter + +A_roof=200 +A_net_wall=105.8 +A_door=2.2 + +Q_wall=U_overall*A_net_wall*DeltaT_heating +Q_roof=U_roof*A_roof*DeltaT_heating +Q_door=U_door*A_door*DeltaT_heating +Qtot=Q_wall+Q_roof+Q_door +print "the total load for heating of opaque surfaces is " +str(Qtot) \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculation_Guermandi.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculation_Guermandi.py new file mode 100644 index 0000000..0e1740e --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculation_Guermandi.py @@ -0,0 +1,28 @@ +mat_library={"in surface": 0.12,"100 mm common brick": 0.12, "wood lapped": 0.14,"wood sheeting": 0.23,"insulation": 2.52, +"wood stud": 0.63,"gypsum wallboard": 0.079,"out surface": 0.03, "door":0.44, "asphalt single roofing": 0.077, +"urethane rigid foam 50 mm": 1.96} +convection=["in surface", "out surface"] +def wallCalc_withParallel (layerseries, layerparallel, ratio): + rser=0 + series=layerseries+convection + for anylayer in series: + Rser=mat_library[anylayer] + rser=rser+Rser + wallresistance=[] + for anyylayer in layerparallel: + rtot=0 + rtot=mat_library[anyylayer] + wallresistance.append(rser+rtot) + Ufirst=ratio[0]/wallresistance[0] + Usecond=ratio[1]/wallresistance[1] + Utot=Ufirst+Usecond + return Utot +def wallCalc_onlyInSeries (layerseries): + rser=0 + series=layerseries+convection + for anylayer in series: + Rser=mat_library[anylayer] + rser=rser+Rser + Rtot=rser + Utot=1/Rtot + return Utot \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculation_Moretti.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculation_Moretti.py new file mode 100644 index 0000000..d54c478 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculation_Moretti.py @@ -0,0 +1,73 @@ +""" + +EETBS 2017/2018 - Assignment 4 - wall calculation function + +Giorgio Moretti (10433550) + +""" +def wallCalcSP(layers_series, layers_parallel, percentage_ins, season): + """This function can be used to calculate the total resistance of a multi-layer wall.""" + """It includes a material library and calculations for resistances in parallel and in series.""" + + material_library = {"outsideSurfaceWinter":0.030, "outsideSurfaceSummer":0.044,"insideSurface":0.12, "woodBevelLappedSiding_13x200mm":0.14, + "woodFiberboard_13mm":0.23, "glassFiberInsulation_25mm":2.45, "woodStud_90mm":0.63, "gypsumBoard_13mm":0.079, + "commonBrick_100mm":0.12, "wood_25mm":0.44, "asphaltRoofing":0.077} + + air_sides = ["insideSurface"] + + if (season == "winter"): + air_sides.append("outsideSurfaceWinter") + else: + air_sides.append("outsideSurfaceSummer") + + layers_wall_series_complete = layers_series + air_sides + + RValues_series = [] + Rtot_series = 0 + + for anyLayer in layers_wall_series_complete: + RValue_layer = material_library[anyLayer] + RValues_series.append(RValue_layer) + Rtot_series = Rtot_series + RValue_layer + + RValues_wall = [] + + for anyLayer in layers_parallel: + RValues_wall.append(material_library[anyLayer] + Rtot_series) + + Rtot = round(RValues_wall[0]*(1-percentage_ins) + RValues_wall[1]*percentage_ins,4) + Utot = round(1/RValues_wall[0]*(1-percentage_ins) + 1/RValues_wall[1]*percentage_ins,4) + + results = {"Rtot":Rtot,"U":Utot} + return results + + +def wallCalcSeries(layers_series, season): + """ This function calculates the total resistance (Rtot) and the global heat transfer coefficient (U) of layers ONLY IN SERIES. """ + + material_library = {"outsideSurfaceWinter":0.030, "outsideSurfaceSummer":0.044,"insideSurface":0.12, "woodBevelLappedSiding_13x200mm":0.14, + "woodFiberboard_13mm":0.23, "glassFiberInsulation_25mm":2.45, "woodStud_90mm":0.63, "gypsumBoard_13mm":0.079, + "commonBrick_100mm":0.12, "wood_25mm":0.44, "asphaltRoofing":0.077} + + air_sides = ["insideSurface"] + + if (season == "winter"): + air_sides.append("outsideSurfaceWinter") + else: + air_sides.append("outsideSurfaceSummer") + + layers_wall_series_complete = layers_series + air_sides + + RValues_series = [] + Rtot_series = 0 + + for anyLayer in layers_wall_series_complete: + RValue_layer = material_library[anyLayer] + RValues_series.append(RValue_layer) + Rtot_series = Rtot_series + RValue_layer + + Rtot = Rtot_series + Utot = round(1/Rtot_series,4) + + results = {"Rtot":Rtot,"U":Utot} + return results \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculation_Temporelli.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculation_Temporelli.py new file mode 100644 index 0000000..05a97e1 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculation_Temporelli.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +#assignment4_step1_wallCalculation_Temporelli (only winter) + +def wallCalc_withParallel(ListSeries,ListParallel,float1): + Materials={"WoodBevelLappedSliding":0.14,"WoodFiberboardSheeting":0.23,"GlassFiberInsulation":2.45,"Woodstud":0.63,"GypsumWallboard":0.079, + "InsideSurface":0.12,"OutsideSurfaceWinter":0.03, "CommonBrick":0.12} + + R_series=0 + + for anyLayer in ListSeries: + R_anyLayer=Materials[anyLayer] + R_series=R_series+R_anyLayer + + Rtot=[] + + for i in ListParallel: + List=ListSeries.append(i) + R=R_series+Materials[i] + Rtot=Rtot+[R] + U_ins=Rtot[0]**-1 + U_wood=Rtot[1]**-1 + U_overall=(1/Rtot[0]*float1)+(1/Rtot[1]*(1-float1)) + result=U_overall + return result + +def wallCalc_onlyInSeries(ListSeries): + Materials={"WoodBevelLappedSliding":0.14,"WoodFiberboardSheeting":0.23,"GlassFiberInsulation":2.45,"Woodstud":0.63,"GypsumWallboard":0.079, + "InsideSurface":0.12,"OutsideSurfaceWinter":0.03,"WoodDoor":0.44, "Roof":4.00} + R_series=0 + for anyLayer in ListSeries: + R_anyLayer=Materials[anyLayer] + R_series=R_series+R_anyLayer + U_series=1/R_series + + result=U_series + return result + +#test + +#ListOfSeriesLayersWall=["InsideSurface","WoodBevelLappedSliding","WoodFiberboardSheeting","GypsumWallboard","OutsideSurfaceWinter","CommonBrick"] +#ListOfParallelLayers=["GlassFiberInsulation","Woodstud"] +#ListOfSeriesDoor=["InsideSurface","WoodDoor","OutsideSurfaceWinter"] +#ListOfSeriesRoof=["Roof"] +#area_fraction_ins = 0.70 + +#result_this=wallCalc_withParallel(ListOfSeriesLayersWall,ListOfParallelLayers,area_fraction_ins) +#print ("Results: "+str(result_this)) +#result_that=wallCalc_onlyInSeries(ListOfSeriesDoor) +#print ("Results: "+str(result_that)) +#result_thisthat=wallCalc_onlyInSeries(ListOfSeriesRoof) +#print ("Results: "+str(result_thisthat)) \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculation_genco.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculation_genco.py new file mode 100644 index 0000000..78bdcde --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculation_genco.py @@ -0,0 +1,46 @@ +def wallCalc_withParallel(S,P,FR): + air=["outside_surface_winter","inside_surface"] + material_library_dictionary={"outside_surface_winter":0.030,"outside_surface_summer":0.044,"wood_bevel":0.14, + "wood_fiberboard":0.23,"glass_fiber":2.45,"wood_stud":0.63,"glass_fiber":2.45,"inside_surface":0.12, + "gypsum_wallboard":0.079,"wood_5cm":0.44,"wood_stud_140mm":0.98,"asphalt_shingle_roofing":0.077} + series=S+air + + R=0 + resistence=[] + for anymaterial in S: + Rvalue_layer_series= material_library_dictionary[anymaterial] + R=R+Rvalue_layer_series + + for anymaterial in P: + Rvalue_layer_parallel= material_library_dictionary[anymaterial] + resistence.append(R+Rvalue_layer_parallel) + + U1=1/resistence[0] + U2=1/resistence[1] + secondratio=float(1-FR) + Utot_withparallel=(U1*FR)+(U2*secondratio) + Rt=1/Utot_withparallel + + results={Utot_withparallel} + + return results + +def wallCalc_onlyInSeries(S): + air=["outside_surface_winter","inside_surface"] + material_library_dictionary={"outside_surface_winter":0.030,"outside_surface_summer":0.044,"wood_bevel":0.14, + "wood_fiberboard":0.23,"glass_fiber":2.45,"wood_stud":0.63,"glass_fiber":2.45,"inside_surface":0.12, + "gypsum_wallboard":0.079, "wood_5cm":0.44,"wood_stud_140mm":0.98,"asphalt_shingle_roofing":0.077} + series=S+air + + R1=0 + resistence=[] + for anymaterial in S: + Rvalue_layer_series= material_library_dictionary[anymaterial] + R1=R1+Rvalue_layer_series + + Utot_series=1/R1 + + results={Utot_series} + + return results + diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Bortolotti.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Bortolotti.py new file mode 100644 index 0000000..649ea4d --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Bortolotti.py @@ -0,0 +1,47 @@ +def wallCalc_onlyInSeries(ListS): + Material_library = {"OutsideSurfaceWinter":0.03,"WoodBevelLapperSiding_13mm*200mm":0.14, + "WoodFiberBoard_13mm":0.23,"GlassFiberInsultation_90mm":2.52,"FaceBreak_100m":0.075, + "WoodStud_38mm*90mm":0.63,"CommonBrick_100m":0.12,"GypsumWallBoard_13mm":0.079,"Wood_50mm":0.44,"InsideSurface":0.12} + + AirOnTwoSides = ["InsideSurface","OutsideSurfaceWinter"] + + Layers_Wall_series_tot = ListS + AirOnTwoSides + Rtot_series = 0 + + for anyLayer in Layers_Wall_series_tot: + Rvalue_Layer = Material_library[anyLayer] + Rtot_series = Rtot_series + Rvalue_Layer + + Utot_series = 1/Rtot_series + + Results_series = {"Rtot_series":Rtot_series,"Utot_series":Utot_series} + + return Results_series + +def wallCalc_withParallel(ListS,ListP,f_ins): + Material_library = {"OutsideSurfaceWinter":0.03,"WoodBevelLapperSiding_13mm*200mm":0.14, + "WoodFiberBoard_13mm":0.23,"GlassFiberInsultation_90mm":2.52,"FaceBreak_100m":0.075, + "WoodStud_38mm*90mm":0.63,"CommonBrick_100m":0.12,"GypsumWallBoard_13mm":0.079,"Wood_50mm":0.44,"InsideSurface":0.12} + + AirOnTwoSides = ["InsideSurface","OutsideSurfaceWinter"] + + Layers_Wall_series_tot = ListS + AirOnTwoSides + Rtot_series = 0 + + for anyLayer in Layers_Wall_series_tot: + Rvalue_Layer = Material_library[anyLayer] + Rtot_series = Rtot_series + Rvalue_Layer + + r_tot = [] + for anyLayer in ListP: + Rvalue_Layer = Material_library[anyLayer] + r_tot.append(Rvalue_Layer + Rtot_series) + + U_tot_ins = 1/r_tot[0] + U_tot_wood = 1/r_tot[1] + U_overall = U_tot_ins*f_ins + (1-f_ins)*U_tot_wood + Rtot = 1/U_overall + + Results = {"Rtot_series":Rtot_series,"Rtot_ins":r_tot[0],"Rtot_wood":r_tot[1],"U_overall":U_overall,"Rtot":Rtot} + + return Results diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Bortolotti.pyc b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Bortolotti.pyc new file mode 100644 index 0000000..ef00128 Binary files /dev/null and b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Bortolotti.pyc differ diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Casalicchio.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Casalicchio.py new file mode 100644 index 0000000..7cad558 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Casalicchio.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +""" +CASALICCHIO VALERIA 10424146 +""" +#Definition of the function +def Wall_Function(Global_Heat_Transfer_Coeff,Layers_In_Series, Layers_In_Parallel, Ratio_Insulation, + N_Layers_In_Parallel, Area, Delta_T): + + #Definition of the materials' library + Library_Material = {"Outside_Surface_Winter":0.030, + "Wood_Bevel_Lapped_Siding": 0.14, + "Wood_Fiberboard_Sheeting": 0.23, + "Glass_Fiber_Insulation":2.45, + "Wood_Stud":0.63, + "Gypsum_Wallboard":0.079, + "Common_Brick":0.12, + "Door_Wood":0.44, + "Inside_Surface": 0.12} + + Layers_Air=["Outside_Surface_Winter","Inside_Surface"] + + + #Monitor the serie and parallel layers + if Global_Heat_Transfer_Coeff == 0: + Tot_R_Series=0 + for anyLayer in Layers_In_Series: + Tot_R_Series=Tot_R_Series+Library_Material[anyLayer] + + if N_Layers_In_Parallel > 0: + List_R=[] + for anyLayer in Layers_In_Parallel: + R_Parallel=Tot_R_Series+Library_Material[anyLayer] + List_R.append(R_Parallel) + + #Calculate the total global heat transfer coefficient and the total thermal resistance + Tot_U=0 + for i in range (0,N_Layers_In_Parallel): + Tot_U=Tot_U+round(Ratio_Insulation[i]/List_R[i],4) + Tot_R=round(1/Tot_U,4) + else: + Tot_U=round(1/Tot_R_Series,4) + Tot_R=round(1/Tot_U,4) + else: + Tot_U=round(Global_Heat_Transfer_Coeff,4) + Tot_R=round(1/Tot_U,4) + + Heat_Exchange=round(Tot_U*Delta_T*Area,4) + + Results = {"GLOBAL HEAT TRANSFER COEFFICIENT":{"N.VALUE":Tot_U,"U.MEASURE":"[W/m2C]"}, + "TOTAL THERMAL RESISTANCE":{"N.VALUE":Tot_R,"U.MEASURE":"[m2C/W]"}, + "HEAT EXCHANGE":{"N.VALUE":Heat_Exchange,"U.MEASURE":"[W]"}} + return Results diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Cremona.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Cremona.py new file mode 100644 index 0000000..7ef55a4 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Cremona.py @@ -0,0 +1,39 @@ +# Assignment 4 + + +def wallCalc_withParallel(list_Of_Layers_Studs,list_Of_Layers_Insu,IF): + Material_library = {"stucco_25mm":0.023,"face_brick_100mm":0.075,"common_brick_100mm":0.12,"wood_bevel_lapped_siding_13mmx200mm":0.14, + "plaster_or_gypsum_board_13mm":0.079,"inside_surface":0.12,"outside_surface_summer":0.044,"outside_surface_winter":0.03,"wood_stud_nominal":0.63, + "asphalt_shingle_roofing":0.077,"cement_mortar_13mm":0.018,"wood_fiberboard_13mm":0.23,"glass_fiber_insulation_25mm":0.70,"wood_25mm":0.22} + air_on_two_sides = ["inside_surface","outside_surface_winter"] + layers_wall_studs = list_Of_Layers_Studs + air_on_two_sides + Rtot_S = 0 + for anyLayer in layers_wall_studs: + RValue_layer_s = Material_library[anyLayer] + Rtot_S = Rtot_S + RValue_layer_s + U_S=(1/(Rtot_S)) + print "the total U Value is "+ str(U_S) + layers_wall_insu = list_Of_Layers_Insu + air_on_two_sides + Rtot_I = 0 + for anyLayer in layers_wall_insu: + RValue_layer_i = Material_library[anyLayer] + Rtot_I = Rtot_I+RValue_layer_i + U_I=(1/(Rtot_I)) + print "the total U Value is "+ str(U_I) + U_global = U_I*IF + U_S*(1-IF) + print "the real total U Value is "+ str(U_global) + return U_global + +def wallCalc_onlyInSeries(list_of_layers): + Material_library = {"stucco_25mm":0.023,"face_brick_100mm":0.075,"common_brick_100mm":0.12,"wood_bevel_lapped_siding_13mmx200mm":0.14, + "plaster_or_gypsum_board_13mm":0.079,"inside_surface":0.12,"outside_surface_summer":0.044,"outside_surface_winter":0.03,"wood_stud_nominal":0.63, + "asphalt_shingle_roofing":0.077,"cement_mortar_13mm":0.018,"wood_fiberboard_13mm":0.23,"glass_fiber_insulation_25mm":0.70,"wood_25mm":0.22} + Air_On_Two_Sides = ["inside_surface","outside_surface_winter"] + layers_wall_series = list_of_layers + Air_On_Two_Sides + Rtot = 0 + for anyLayer in layers_wall_series: + RValue_layer = Material_library[anyLayer] + Rtot=Rtot+RValue_layer + U_global=((Rtot)**-1) + print "the total U Value is "+ str(U_global) + return U_global \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_DeVanna.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_DeVanna.py new file mode 100644 index 0000000..01a690a --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_DeVanna.py @@ -0,0 +1,44 @@ +def wallCalc_withParallel(S,P,FR): + air=["outside_surface_winter","inside_surface"] + material_library_dictionary={"outside_surface_winter":0.030,"outside_surface_summer":0.044,"wood_bevel":0.14, + "wood_fiberboard":0.23,"glass_fiber":2.45,"wood_stud":0.63,"glass_fiber":2.45,"inside_surface":0.12, + "gypsum_wallboard":0.079} + series=S+air + + R=0 + resistence=[] + for anymaterial in series: + Rvalue_layer_series= material_library_dictionary[anymaterial] + R=R+Rvalue_layer_series + + for anymaterial in P: + Rvalue_layer_parallel= material_library_dictionary[anymaterial] + resistence.append(R+Rvalue_layer_parallel) + + A=resistence[0]#resistence of the first step + B=resistence[1]#resistence of the second step + U1=1/resistence[0] + U2=1/resistence[1] + secondratio=float(1-FR) + Utot=(U1*FR)+(U2*secondratio) + + results= Utot + + return results + + +def wallCalc_onlyInSeries(S): + air=["outside_surface_winter","inside_surface"] + material_library_dictionary={"outside_surface_winter":0.030,"outside_surface_summer":0.044,"wood_bevel":0.14, + "wood_fiberboard":0.23,"glass_fiber":2.45,"wood_stud_140mm":0.98,"glass_fiber":2.45,"inside_surface":0.12, + "gypsum_wallboard":0.079,"wood_5cm":0.44,"steel_siding":0.00, "asphalt_shingle_roofing":0.077,"common_brick":0.12 } + + series=S+air + R1=0 + for anymaterial in series: + Rvalue_layer_series= material_library_dictionary[anymaterial] + R1=R1+Rvalue_layer_series + + Utot1=1/R1 + results= Utot1 + return results \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Depalo.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Depalo.py new file mode 100644 index 0000000..e34515d --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Depalo.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +#Assignment 4 - Depalo + +def wallCalc_withParallel(materialSeries,materialParallel,f): + + "The function receives 3 inputs: list of layers in series, list of the two layers in parallel, and the ratio between the area of the first layer in parallel and the total area. It returns a dictionary which includes the thermal resistances of all layers, the total resistance and the total U of the wall." + + materialsLibrary={'outSurface':0.03,'woodBevel':0.14,'woodFiberboard13':0.23,'GlassFiber90':2.52,'woodStud90':0.63,'gypsumWallboard13':0.079,'inSurface':0.12,'wood50':0.44,'commonBrick100':0.12,'GlassFiber25':0.70,'urethaneRigidFoam25':0.98,'faceBrick200':0.15,'acousticTile':0.32,'concreteLight200':1.17,'clayTile100':0.18} #dictionary 'material':unit thermal resistance + + surfaces = ['outSurface','inSurface'] #inner and outer surfaces of the wall + + totalWallSeries=surfaces+ materialSeries + + f1=float(f) #ratio between the area of the glass fiber parallel layer and the total area of the wall + f2=1-f1 #ratio between the area of the glass fiber parallel layer and the total area of the wall + + Rseries=0 + for anymaterial in totalWallSeries: + Rseries=Rseries+materialsLibrary[anymaterial] #sum of all the resistances of the materials in the list of layers in series + + RtotSeries=[] + for anymaterial in materialParallel: + Rtot=Rseries+materialsLibrary[anymaterial] #sum of the previous total series resistance and the resistance of one of the 2 layers in parallel + RtotSeries.append(Rtot) + + U1=1/RtotSeries[0] #U value in the case of glass fiber + U2=1/RtotSeries[1] #U value in the case of wood stud + + Utot=f1*U1+f2*U2 #total U value considering the respective proportions for glass fiber and wood stud + Rtot=1/Utot #total resistance + + RallLayers = [] + for anylayer in totalWallSeries+materialParallel: + Rlayer = materialsLibrary[anylayer] + RallLayers.append(Rlayer) + results = {"Resistance value of all layers":RallLayers, "Total resistance":Rtot,'Total U':Utot} + return results + + + +def wallCalc_onlyInSeries(materialSeries): + + "The function receives 1 input: list of layers in series. It returns a dictionary which includes the thermal resistances of all layers, the total resistance and the total U." + + materialsLibrary={'outSurface':0.03,'woodBevel':0.14,'woodFiberboard13':0.23,'GlassFiber90':2.52,'woodStud90':0.63,'gypsumWallboard13':0.079,'inSurface':0.12,'wood50':0.44,'commonBrick100':0.12,'GlassFiber25':0.70,'urethaneRigidFoam25':0.98,'faceBrick200':0.15,'acousticTile':0.32,'concreteLight200':1.17,'clayTile100':0.18} #dictionary 'material':unit thermal resistance + + surfaces = ['outSurface','inSurface'] #inner and outer surfaces of the wall + + totalWallSeries=surfaces+ materialSeries + + Rseries=0 + for anymaterial in totalWallSeries: + Rseries=Rseries+materialsLibrary[anymaterial] #sum of all the resistances of the materials in the list of layers in series + + U=1/Rseries #total U value + R=1/U #total resistance + + RallLayers = [] + for anylayer in totalWallSeries: + Rlayer = materialsLibrary[anylayer] + RallLayers.append(Rlayer) + results = {"Resistance value of all layers":RallLayers, "Total resistance":R,'Total U':U} + return results \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_DiNarzo.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_DiNarzo.py new file mode 100644 index 0000000..9586491 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_DiNarzo.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +def wall_calc_with_parallel(list_between_studs,list_at_studs,farea): + Materials= {'Wood_bevel_lapped':0.14,'Wood_fiberboard':0.23,'Glass_fiber':2.45,'Wood_stud':0.63,'Gypsum':0.079, + 'Outside_sourface':0.03,'Inside_surface':0.12} + Air= ['Outside_sourface','Inside_surface'] + + #RESISTENCES + #Calculating the wood stud + + Wall_wood= list_at_studs + Air + + R_wood_tot=0 + for anylayer in Wall_wood: + R_wood=Materials[anylayer] + R_wood_tot=R_wood_tot+R_wood + print 'The R value of ' + str(anylayer) +' is ' + str(R_wood) +' °C/W' + print ' ' + print 'The total value of R assuming a wall with stud is ' +str(R_wood_tot) +' °C/W' + + #Calculating for glass fiber + + Wall_glass=list_between_studs + Air + + R_glass_tot=0 + for anylayer1 in Wall_glass: + R_glass=Materials[anylayer1] + R_glass_tot= R_glass_tot+R_glass + print 'The R value of ' + str(anylayer1) +' is ' + str(R_glass) +' °C/W' + print ' ' + print 'The total value of R assuming a wall with glass is ' +str(R_glass_tot) +' °C/W' + + #HEAT TRANSFER COEFFICIENT + + U_stud= farea[1]/R_wood_tot + U_glass= farea[0]/R_glass_tot + U_tot= U_glass+U_stud + + print' ' + print 'The overall heat transfer coefficient is ' +str(U_tot) +' W/°C' + + R_tot=1/U_tot + print ' ' + print 'The total resistence is ' +str(R_tot) +' °C/W' + results= {'U_Total':U_tot,'R_total':R_tot} + return results + +def wallCalc_onlyInSeries(list_of_layers): + Materials_s= {'Wood_bevel_lapped':0.14,'Wood_fiberboard':0.23,'Wood_5cm':0.44,'Glass_fiber':2.45,'Wood_stud':0.63,'Gypsum':0.079, + 'Outside_sourface':0.03,'Inside_surface':0.12} + Air= ['Outside_sourface','Inside_surface'] + + Layer_plus_air= list_of_layers+Air + R_Tot_series=0 + for anylayer in Layer_plus_air: + R_value=Materials_s[anylayer] + R_Tot_series=R_Tot_series+R_value + print 'The R value of ' + str(anylayer) +' is ' + str(R_value) +' °C/W' + print ' ' + U_series=1/R_Tot_series + print 'The U-Value is ' +str(U_series) +' W/°C' + results_s= {'U_Total_series':U_series,'R_total_series':R_Tot_series} + return results_s \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Diaz.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Diaz.py new file mode 100644 index 0000000..fa2997e --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Diaz.py @@ -0,0 +1,81 @@ +layers_wall_S=["woodBevel","woodFiberboard_13mm","woodStud_90mm","gypsumWallboard_13mm"] +layers_wall_I=["woodBevel","woodFiberboard_13mm","glassFiberInsulation_90mm","gypsumWallboard_13mm"] +ratio_I=0.75 + + + +def wallCalc_withParallel(layers_wall_S,layers_wall_I,ratio_I): + """This function receives two lists of layers, first one including the wood Studs, second one including the glass + fiber insulation, and finally the third parameter is a ratio of area corresponding to the previously mentioned criteria""" + ratio_I=float(ratio_I) + Material_library={"outsideSurfaceWinter":0.03,"woodBevel":0.14,"woodFiberboard_13mm":0.23, + "glassFiberInsulation_90mm":2.45,"woodStud_90mm":0.63,"brick_100mm":0.12,"gypsumWallboard_13mm":0.079,"insideSurface":0.12} + airOnTwoSides=["outsideSurfaceWinter","insideSurface"] + layers_wall_complete1= layers_wall_S+airOnTwoSides + layers_wall_complete2= layers_wall_I+airOnTwoSides + ratio_S=1-ratio_I + Rtot_S=0 + Rtot_I=0 + RValues_layers_S=[] + RValues_layers_I=[] + + for anyLayer1 in layers_wall_complete1: + RValue_layer1=Material_library[anyLayer1] + Rtot_S=Rtot_S+RValue_layer1 + RValues_layers_S.append(RValue_layer1) + print("this layer is "+anyLayer1) + print("The value R for this layer is "+str(RValue_layer1)+" m2C/W") + print("*********************************") + Utot_S=1/Rtot_S + print("The total R Value at Studs is "+str(Rtot_S)+" m2C/W") + print("The total U Value at Studs is "+str(Utot_S)+" W/m2C") + + print("*********************************") + print("*********************************") + + for anyLayer2 in layers_wall_complete2: + RValue_layer2=Material_library[anyLayer2] + Rtot_I=Rtot_I+RValue_layer2 + RValues_layers_I.append(RValue_layer2) + print("this layer is "+anyLayer2) + print("The value R for this layer is "+str(RValue_layer2)+" m2C/W") + print("*********************************") + Utot_I=1/Rtot_I + print("The total R Value between Studs is "+str(Rtot_I)+" m2C/W") + print("The total U Value between Studs is "+str(Utot_I)+" W/m2C") + + print("\n") + U_overall=Utot_S*ratio_S+Utot_I*ratio_I + R_overall=1/U_overall + print("The Overall R Value of the system is "+str(R_overall)+" m2C/W") + print("The Overall U Value of the system is "+str(U_overall)+" W/m2C") + + results={"Thermal resistances layers S":RValues_layers_S,"Thermal resistances layers I":RValues_layers_I, + "Total R of the wall":R_overall,"Total U of the wall":U_overall} + return results +#Roof +layers_G=["wood_50mm"] +def wallCalc_onlyInSeries(layers_G): + Material_library2={"outsideSurfaceWinter":0.03,"woodBevel":0.14,"woodFiberboard_13mm":0.23, + "glassFiberInsulation_90mm":2.45,"woodStud_90mm":0.63,"gypsumWallboard_13mm":0.079,"insideSurface":0.12,"wood_50mm":0.44} + airOnTwoSides=["outsideSurfaceWinter","insideSurface"] + layers_G_complete= layers_G+airOnTwoSides + Rtot_G=0 + RValues_layers_G=[] + + for anylayer_G in layers_G_complete: + RValue_layer_G=Material_library2[anylayer_G] + Rtot_G=Rtot_G+RValue_layer_G + RValues_layers_G.append(RValue_layer_G) + print ("this layer is"+anylayer_G) + print("The value R for this layer is "+str(RValue_layer_G)+" m2C/W") + print("*********************************") + Utot_G=1/Rtot_G + print("The total R Value for this is "+str(Rtot_G)+" m2C/W") + print("The total U Value for this is "+str(Utot_G)+" W/m2C") + print("*********************************") + results2={"R":Rtot_G,"U":Utot_G} + return results2 + + + \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Dontoh.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Dontoh.py new file mode 100644 index 0000000..5abb621 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Dontoh.py @@ -0,0 +1,40 @@ +def wallCalc_withParallel(layer1,layer2): #Calculate U-value of Wall + if("Glass fiber insulation" in layersInParallel): + betweenStuds=layersInseries_forParallel+["Glass fiber insulation"] + if("Wood stud" in layersInParallel): + atStuds=layersInseries_forParallel+["Wood stud"] + RValuebetween,RValueat=0,0 + for layer in betweenStuds: + if(layer!="Glass fiber insulation"): + RValuebetween+=materialLibrary[layer]["Rvalue"] + else: + RValuebetween+=materialLibrary[layer]["Rvalue"]*(90.0/materialLibrary[layer]["length"]) + for layer in atStuds: + RValueat+=materialLibrary[layer]["Rvalue"] + Uwall=round((fractionBetweenstuds*(1/RValuebetween)+(1-fractionBetweenstuds)*(1/RValueat)),3) + return Uwall + +def wallCalc_OnlyInSeries(layer1,layer2): #Calculate U-value of Door & roof + RforDoor,RforRoof=0,0 + for layer in layers_forDoor: + if(layer!="Wood"): + RforDoor+=materialLibrary[layer]["Rvalue"] + else: + RforDoor+=materialLibrary[layer]["Rvalue"]*(50.0/materialLibrary[layer]["length"]) + Udoor=round((1/RforDoor),3) + for layer in layers_forRoof: + if(layer!="Wood"): + RforRoof+=materialLibrary[layer]["Rvalue"] + else: + RforRoof+=materialLibrary[layer]["Rvalue"]*(400.0/materialLibrary[layer]["length"]) + Uroof=round((1/RforRoof),3) + return {"U-Value of Door":Udoor,"U-value of Roof":Uroof} + +#----Defining all values---- +materialLibrary={"Wood bevel lapped siding":{"Rvalue":0.14,"length":13},"Wood fiberboard":{"Rvalue":0.23,"length":13},"Glass fiber insulation":{"Rvalue":0.68,"length":25},"Wood stud":{"Rvalue":0.63,"length":90},"Wood":{"Rvalue":0.22,"length":25},"Gypsum wallboard":{"Rvalue":0.079,"length":13},"Common brick":{"Rvalue":0.12,"length":100},"Asphalt shingle roofing":{"Rvalue":0.077,"length":13},"insideSurface":{"Rvalue":0.12},"outsideSurfaceWinter":{"Rvalue":0.030}} +layersInseries_forParallel=["insideSurface","outsideSurfaceWinter","Wood bevel lapped siding","Wood fiberboard","Gypsum wallboard","Common brick"] +layersInParallel=["Glass fiber insulation","Wood stud"] +layers_forRoof=["insideSurface","outsideSurfaceWinter","Wood","Asphalt shingle roofing"] +layers_forDoor=["insideSurface","outsideSurfaceWinter","Wood"] +fractionBetweenstuds=0.70 + diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Dontoh.pyc b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Dontoh.pyc new file mode 100644 index 0000000..9962132 Binary files /dev/null and b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Dontoh.pyc differ diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Falzarano.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Falzarano.py new file mode 100644 index 0000000..bde30d3 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Falzarano.py @@ -0,0 +1,41 @@ + #we define the function +def wallCalculations(List1,List2,float1): + R_materials={"outside": 0.03,"wood":0.44, "woodbevel":0.14, "woodfiber": 0.23, "glassfiber":2.45, "stud": 0.63, "gypsum":0.079, "inside":0.12} + + R_series=0 + + for n in List1: + R_n=R_materials[n] + R_series=R_series+R_n + + R_p = 0.0 + Rtot = [] + for i in List2: + R_p = R_series + R_materials[i] + Rtot.append(R_p) + + + + + U_overall=(1/Rtot[0]*float1)+(1/Rtot[1]*(1-float1)) + y={ "R_ins":Rtot[0], "R_wood": Rtot[1], "U_overall":U_overall } + return y + + + + +#we define now a function which accepts only one list in order to compute the U value of door and roof +def a(oneList): + R_materials={"outside": 0.03, "wood":0.44, "woodbevel":0.14, "woodfiber": 0.23, "glassfiber":2.45, "stud": 0.63, "gypsum":0.079, "inside":0.12} + + R_sertot = 0.0 + for n in oneList: + R_sertot = R_sertot + R_materials[n] + + U_tot = 1/R_sertot + + result = {"Total resistance":R_sertot, "Total U": U_tot} + return result + + + \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Ferre.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Ferre.py new file mode 100644 index 0000000..1efac35 --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Ferre.py @@ -0,0 +1,46 @@ +def wallCalc_withParallel(S,P,FR): + air=["outside_surface_winter","inside_surface"] + material_library = {"outside_surface_winter":0.030,"outside_surface_summer":0.44, + "wood_bevel":0.14,"wood_fiberboard_13mm":0.23,"face_brick_100mm":0.075, + "glass_fiber_90mm":2.45,"wood_stud_38mmx90mm":0.63,"gypsum_wallboard_13mm":0.079, + "inside_surface":0.12,"stucco_25mm":0.037,"acustic_tile":0.32,"wood_5cm":0.44, + "asphalt_shingle_roofing":0.077,"wood_140mm":0.98} + series=S+air + + R=0 + resistence=[] + for anymaterial_s in series: + Rvalue_layer_series= material_library[anymaterial_s] + R=R+Rvalue_layer_series + + for anymaterial_p in P: + Rvalue_layer_parallel= material_library[anymaterial_p] + resistence.append(R+Rvalue_layer_parallel) + + U1=1/resistence[0] + U2=1/resistence[1] + secondratio=float(1-FR) + Utot_withParallel=(U1*FR)+(U2*secondratio) + Rt=1/Utot_withParallel + + results=Utot_withParallel + + return results + +def wallCalc_onlyInSeries(Serie): + AIR=["outside_surface_winter","inside_surface"] + material_library = {"outside_surface_winter":0.030,"outside_surface_summer":0.44, + "wood_bevel":0.14,"wood_fiberboard_13mm":0.23,"face_brick_100mm":0.075, + "glass_fiber_90mm":2.45,"wood_stud_38mmx90mm":0.63,"gypsum_wallboard_13mm":0.079, + "inside_surface":0.12,"stucco_25mm":0.037,"acustic_tile":0.32,"wood_5cm":0.44, + "asphalt_shingle_roofing":0.077,"wood_140mm":0.98} + SERIES=Serie+AIR + + r=0 + for anymaterial_s in SERIES: + Rvalue_Layer_Series= material_library[anymaterial_s] + r=r+Rvalue_Layer_Series + + Utot_onlyInSeries = 1/r + RESULTS= Utot_onlyInSeries + return RESULTS \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Funes.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Funes.py new file mode 100644 index 0000000..8d4cafa --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Funes.py @@ -0,0 +1,89 @@ +# -*- coding: utf-8 -*- +def wallCalc_withParallel (Materials_In_Series,Materials_In_Parallel,fins): + """This function computes each resistance of a composite wall, and also the total thermal Resistance and the overall heat transfer coefficient (U)""" + + Materials_RValues = {"insideSurface":0.12,"outsideSurfaceWinter":0.03,"gypsumWallboard13mm":0.079, + "woodStuds90mm":0.63,"glassFiber25mm":2.45,"woodFiberboard13mm":0.23,"woodBevel200mm":0.14, "commonBrick_100mm":0.12} + + Rseries = 0 + RValues_layers = [] + for AnyMaterial in Materials_In_Series: + RValue_layer_series = Materials_RValues [AnyMaterial] + RValues_layers.append(RValue_layer_series) + print "The name of this layer is: "+AnyMaterial + print "The resistance of the layer "+AnyMaterial+" is: "+str(RValue_layer_series) + print "************************" + Rseries = Rseries + RValue_layer_series + print "The equivalent Resistance Value of the materials in series is: "+str(Rseries)+"(m2*°C/W)" + + Rparallel = 99999999999999999999 + for AnyMaterial in Materials_In_Parallel: + RValue_layer_parallel = Materials_RValues [AnyMaterial] + RValues_layers.append(RValue_layer_parallel) + print "The name of this layer is: "+AnyMaterial + print "The resistance of the layer "+AnyMaterial+" is: "+str(RValue_layer_parallel) + print "************************" + Rparallel = 1/((1/Rparallel) + (1/RValue_layer_parallel)) + print "The equivalente Resistance Value of the materials in parallel is: "+str(Rparallel)+"(m2*°C/W)" + + + CenterWallJustGlassFiber = ["glassFiber25mm"] + WallFirstLayer = Materials_In_Series + CenterWallJustGlassFiber + RfirstLayer=0 + for AnyMaterial in WallFirstLayer: + RValue_layer = Materials_RValues [AnyMaterial] + RfirstLayer = RfirstLayer + RValue_layer + print "The resistance of the wall considering just the insulation is: "+str(RfirstLayer)+"(m2*°C/W)" + + CenterWallJustWoodStud = ["woodStuds90mm"] + WallSecondLayer = Materials_In_Series + CenterWallJustWoodStud + RsecondLayer=0 + for AnyMaterial in WallSecondLayer: + RValue_layer = Materials_RValues [AnyMaterial] + RsecondLayer = RsecondLayer + RValue_layer + print "The resistance of the wall considering just the wood studs is: "+str(RsecondLayer)+"(m2*°C/W)" + + Uins = (1/RfirstLayer) + Uwood = (1/RsecondLayer) + print "The heat transfer coefficient taking into account that there's only wood in the center is :"+str(Uwood)+"(W/m2*°C)" + print "The heat transfer coefficient taking into account that there's only glass fiber insulator in the center is :"+str(Uins)+"(W/m2*°C)" + + Utot = Uins*fins + Uwood*(1-fins) + print "The overall heat transfer coefficient is: "+str(Utot)+"(W/m2*°C)" + + Rtot = 1/Utot + print "The overall thermal resistance of the wall is: "+str(Rtot)+"(m2*°C/W)" + + results = {"RValue of all layers":RValues_layers, "Total Resistance":Rtot, "Total U":Utot} + return results + + + + +def wallCalc_OnlyInSeries (Materials_In_Series): + """This function computes each resistance of a composite wall, and also the total thermal Resistance and the overall heat transfer coefficient (U)""" + + Materials_RValues = {"insideSurface":0.12,"outsideSurfaceWinter":0.03, + "wood_25mm":0.44,"ClayTile_100mm":0.18,"woodFiberboard_13mm":0.23,"woodStud_90mm":0.63, "gypsumWallboard13mm":0.079} + + Rseries = 0 + RValues_layers = [] + for AnyMaterial in Materials_In_Series: + RValue_layer_series = Materials_RValues [AnyMaterial] + RValues_layers.append(RValue_layer_series) + print "The name of this layer is: "+AnyMaterial + print "The resistance of the layer "+AnyMaterial+" is: "+str(RValue_layer_series) + print "************************" + Rseries = Rseries + RValue_layer_series + print "The equivalent Resistance Value of the materials in series is: "+str(Rseries)+"(m2*°C/W)" + + Utot = 1/Rseries + print "The total coefficient heat transfer is :"+str(Utot) + + results = {"RValue of all layers":RValues_layers, "Total Resistance":Rseries, "Total U":Utot} + return results + +Materials_In_Series = ["insideSurface","outsideSurfaceWinter","gypsumWallboard13mm","woodFiberboard13mm","woodBevel200mm"] +Materials_In_Parallel = ["woodStuds90mm","glassFiber25mm"] +door = ["insideSurface","outsideSurfaceWinter","wood_25mm"] +roof = ["ClayTile_100mm","woodFiberboard_13mm","woodStud_90mm","gypsumWallboard13mm"] \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_GopalsamySakthivel.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_GopalsamySakthivel.py new file mode 100644 index 0000000..c113b0a --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_GopalsamySakthivel.py @@ -0,0 +1,39 @@ +def WallCalc(wallLayersSeries,wallLayersParallel,fractionInsulation,Matlib): + ConvectionLayers=['InsideConv','outerConvWinter'] + totalSeriesRes=0.000 + for everyL in wallLayersSeries: + if(everyL['length']==Matlib[everyL['material']]['length']): + i=Matlib[everyL['material']]['R'] + else: + i=(Matlib[everyL['material']]['R'])*(everyL['length'])/(Matlib[everyL['material']]['length']) + totalSeriesRes+=i + for a in ConvectionLayers: + totalSeriesRes+=Matlib[a]['R'] + R=0.00 + z=0.00 + for every in wallLayersParallel: + if(every['length']==Matlib[every['material']]['length']): + j=Matlib[every['material']]['R'] + else: + j=Matlib[every['material']]['R']*(every['length']/Matlib[every['material']]['length']) + y=totalSeriesRes+j + z=(1/(y)) + if(every['material']=='glassfiber'): + R+=(fractionInsulation*z) + else: + R+=((1-fractionInsulation)*z) + return R + +def doorOderRoofcalc(ABC,Matlib): + ConvectionLayers=['InsideConv','outerConvWinter'] + Res=0.00 + for a in ConvectionLayers: + Res+=Matlib[a]['R'] + for everyL in ABC: + if(everyL['length']==Matlib[everyL['material']]['length']): + i=Matlib[everyL['material']]['R'] + else: + i=Matlib[everyL['material']]['R']*(everyL['length']/Matlib[everyL['material']]['length']) + Res+=i + Value_U=(1.00/Res) + return Value_U \ No newline at end of file diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_GopalsamySakthivel.pyc b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_GopalsamySakthivel.pyc new file mode 100644 index 0000000..61f1d40 Binary files /dev/null and b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_GopalsamySakthivel.pyc differ diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Khoudari.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Khoudari.py new file mode 100644 index 0000000..eb01cec --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_Khoudari.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +def wall_calc_parallel(layers_in_series,layers_in_paralel,fraction): + Materials_library={ 'outsideSurface_winter' : 0.03 , 'insideSurface' : 0.12 , 'Wood_50mm' : 0.44 , + 'wood_bevel' : 0.14 , 'fiberboard_13mm' : 0.23 , 'glassfiber_90mm' : 2.52 , 'woodstud_90mm' : 0.63 , 'gypsum_13mm' : 0.079 , + 'Common_Brick' : 0.12 } + convection_resistances=["insideSurface","outsideSurface_winter"] + layers1=layers_in_series+convection_resistances+["glassfiber_90mm"] + layers2=layers_in_series+convection_resistances+["woodstud_90mm"] + Rtot=0 + for anyLayer in layers1: + RValue_layer=Materials_library[anyLayer] + Rtot=Rtot+RValue_layer + Rtot1=0 + for anyLayer in layers2: + RValue_layer=Materials_library[anyLayer] + Rtot1=Rtot1+RValue_layer + Utot=fraction/Rtot+(1-fraction)/Rtot1 + Rsum=1/Utot + all_resistances=layers_in_series+layers_in_paralel+convection_resistances + material=[] + resistances=[] + for anyLayer in all_resistances: + material.append(Materials_library[anyLayer]) + resistances.append(anyLayer) + library=dict(zip(resistances,material)) + print " Total resistance is :"+str(Rsum)+" m^2* degree C/W" + print " " + print " Total thermal coefficient is: "+str(Utot)+" W/m^2*degree C" + print " " + print " Library that gives layers that are used in wall and their resistance respectively:" + print " " + print library + + + +def WallCalcOnlyinSeries (layerlist) : + + #Definition of the material library as a dictionnary + Material_library={ 'outsideSurface_winter' : 0.03 , 'insideSurface' : 0.12 , 'Wood_50mm' : 0.44 , + 'wood_bevel' : 0.14 , 'fiberboard_13mm' : 0.23 , 'glassfiber_90mm' : 2.52 , 'woodstud_90mm' : 0.63 , 'gypsum_13mm' : 0.079 , + 'Common_Brick' : 0.12 } + + R_series = 0 + + for anylayer in layerlist : + R_anylayer = Material_library [anylayer] + R_series = R_series + R_anylayer + print R_series + print "****************" + + U_series = 1 / R_series + print "Here is the value of the global overall Resistance R: " + str (R_series) + "m2°C/W" + + print "Here is the value of the global overall heat transfer U:" + str (U_series) + "W/m2°C" + + results = {"Roverall" : R_series , "Uoverall" : U_series } + return results + diff --git a/Assignment 4 - Deadline 17 oct 2017/wallCalculations_MARRUGO.py b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_MARRUGO.py new file mode 100644 index 0000000..a00655f --- /dev/null +++ b/Assignment 4 - Deadline 17 oct 2017/wallCalculations_MARRUGO.py @@ -0,0 +1,167 @@ +# -*- coding: utf-8 -*- +# Assigment 4 Functions for Calculation of the overall unit thermal resistance (the R-value) +# and the overall heat transfer coefficient (the U-factor) in parallel and series + + +# Librery of materials +material={"Inside_surface":0.12,"Outside_surface_winter": 0.030, +"Outside_surface_summer": 0.044,"Common_brick":0.12, +"Wood_bevel_lapped_siding": 0.14,"Wood_fiberboard_sheeting":0.23, +"Glass_fiber_insulation":2.52,"Wood stud":0.63,"Gypsum_wallboard":0.079,"Wood":0.44,"Asphalt_shingle_roofing":0.077,"Plywood":0.11} + +def matSeries(List): + """Function designed for calculate the overall unit thermal resistance (the R-value) +# and the overall heat transfer coefficient (the U-factor) for a element with all materials in series""" + # Adding the thermal resistance for the inside and outside surface for winter and summer + Winter=["Inside_surface","Outside_surface_winter"] + Summer=["Inside_surface","Outside_surface_summer"] + + # Defining the total list of materials in series for winter and summer + LSwinter=List+Winter + LSsummer=List+Summer + + # Defining the variables for the total unit thermal resistance in series and parallel + Rtotals=0 + Rtotalw=0 + # Defining the variable for the unit thermal resistance of each material + Rvalues_layers={} + + + # Defining the for cycle to acquired and compute the unit thermal resistance for + # Summer season + for anylayer in LSsummer: + + # Acquiring the thermal resistance for the specific material of the list in [m2*ºC/W] + Rvalue_layer=material[anylayer] + # Computing the sum of each unit thermal resistance of each material in series in [m2*ºC/W] + Rtotals=Rtotals+Rvalue_layer + # Saving the value of each unit thermal resistance of each material in [m2*ºC/W] + Rdict={anylayer:Rvalue_layer} + Rvalues_layers.update(Rdict) + for anylayer in LSwinter: + + # Acquiring the thermal resistance for the specific material of the list in [m2*ºC/W] + Rvalue_layer=material[anylayer] + # Computing the sum of each unit thermal resistance of each material in series in [m2*ºC/W] + Rtotalw=Rtotalw+Rvalue_layer + # Saving the value of each unit thermal resistance of each material in [m2*ºC/W] + Rdict={anylayer:Rvalue_layer} + Rvalues_layers.update(Rdict) + + # Computing the overall heat transfer coefficient of the wall according with its + # respectively U-factor and area percentages for the list of materials + # in series and parallel in winter and summer [W/m2*ºC] + Uoverallw=(1/Rtotalw) + Uoveralls=(1/Rtotals) + + Results={"Resistances":Rvalues_layers,"Rtotal_Winter":Rtotalw,"Utotal_winter":Uoverallw,"Rtotal_Summer":Rtotals,"Utotal_Summer":Uoveralls} + return Results + +def matParallel(ListS,ListP,percentage): + """Function designed for calculate the overall unit thermal resistance (the R-value) +# and the overall heat transfer coefficient (the U-factor) for a element with materials in parallel""" + + + # Adding the thermal resistance for the inside and outside surface for winter and summer + Winter=["Inside_surface","Outside_surface_winter"] + Summer=["Inside_surface","Outside_surface_summer"] + + # Defining the total list of materials in series for winter and summer + LSwinter=ListS+Winter + LSsummer=ListS+Summer + + # Defining the total list of materials in parallel for winter and summer + LPwinter=ListP+Winter + LPsummer=ListP+Summer + + # Defining lenght of list of materials + x=len(LSwinter) + # Defining an accounter + y=0 + + # Defining the total list of materials for winter and summer + ListWinter=LSwinter+LPwinter + ListSummer=LSsummer+LPsummer + + # Defining the variables for the total unit thermal resistance in series and parallel + Rtotals=0 + Rtotalp=0 + # Defining the variable for the unit thermal resistance of each material + Rvalues_layers={} + + + # Defining the for cycle to acquired and compute the unit thermal resistance for + # Summer season + for anylayer in ListSummer: + + # Acquiring the thermal resistance for the specific material of the list in [m2*ºC/W] + Rvalue_layer=material[anylayer] + + if y