• API
• FAQ
• Tools
• Archive
SHARE
TWEET

Untitled

a guest Jun 25th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. %This is the code I used to calculate the PMV at points: A, B, C, D, E.
2. %Where:
3. %ta=tr=interior temperature setting (22°C, 23°C, 27°C) (variable);
4. %va=0,2 m/s (invariable);
5. %RH=50% (invariable);
6. %W=0 (invariable);
7. %Met= energy metabolism (1,2 met or 1,4 met) (variable);
8. %Iclo= static clothing insulation (0,5 clo or 1,0 clo) (variable).
9.
10. ta=22.0;
11. tr=22.0;
12. va=0.2; %air speed
13. RH=50; %relative humidity
14. W=0;%mechanical work
15. Met=1.2;%energy metabolism in met (1 met=58.2 W/m2)
16. Iclo=0.5;%static clothing insulation
17. %preparation of variables
18. PHI=RH/100;%hygrometric dimensionless degree
19. Icl=Iclo*.155;%Conversion from clo to m2K/W
20. M=Met*58.15;%conversion of metabolism in unit of measurement of SI
21. Iclr=Icldyn_7730(va, Icl, M); %calculation of dynamic clothing insulation
22. vw=0.0052*(M-58);
23. vr=va+vw;
24. PMV_Fanger=PMV_evaluator( M,W,ta,tr,vr,PHI,Iclr );
25.
26. function [ Icldyn ] = Icldyn_7730(va, Iclst, M)
27. %calculation of dynamic clothing insulation
28. %Input data
29. % va, air speed, m/s
30. % Iclst, static clothing insulation
31. % M, metabolism in W/m2
32. vw=0.0052*(M-58);
33. if vw>0.7
34.     vw=0.7;
35. end
36. vr=va+vw;
37. %Static cloting insulation conversion m2K/W to clo
38.    Iclo =  Iclst/0.155;
39.
40. %Clothing area factor
41.    if Iclst <=0.078
42.    fcl= 1.00 + 1.290 * Iclst;
43.    else
44.    fcl= 1.05 + 0.645 * Iclst;
45.    end
46. %Static boundary layer thermal insulation in quiet air in m2K/W
47.    Iast =  0.111;
48.
49. %Total static insulation
50.    Itotst= Iclst + Iast / fcl;
51.
52. %Clothing insulation correction for wind (vr) and and walking (vw)
53.    vraux= vr;
54.    if vraux > 3.5
55.        vraux=3.5;
56.    end
57.
58.    if vraux < 0.15
59.        vraux=0.15;
60.    end
61.
62.    vwaux=vw;
63.    if vwaux>0.7
64.        vwaux=0.7;
65.    end
66.
67.    CorIt=exp(-0.281*(vraux-0.15)+0.044*(vraux-0.15)^2-0.492*vwaux+0.176*vwaux^2);
68.    if CorIt>1
69.    CorIt=1;
70.    end
71.
72.    CorIa=exp(-0.533*(vraux-0.15)+0.069*(vraux-0.15)^2-0.462*vwaux+0.201*vwaux^2);
73.    if CorIa>1
74.    CorIa=1;
75.    end
76.
77.    Itr = Itotst * CorIt;
78.    Iar = CorIa * Iast;
79.    if Iclo<=0.6
80.        Itr= ((0.6-Iclo) * Iar + Iclo * Itr) / 0.6;
81.    end
82.
83.    Itdyn = Itr;
85.    Icldyn = Itdyn - Iadyn / fcl;
86. end
87.
88. function [ PMV ] = PMV_evaluator( M,W,ta,tr,vr,PHI,Icl )
89. %Function for the calculation of the PMV index
90. %   Input data
91. %   M, metabolic rate in W/m2
92. %   W, mechanical work in W/m2
93. %   ta, air temperature in °C
94. %   tr, mean radiant temperature in °C
95. %   vr, rwlative air velocity in m/s
96. %   PHI, hygrometric ratio dimensionless
97. %   Icl in m2K/W (dynamic clothing insulation )
98. if (ta >=0)
99. ps   =   exp (16.6536-4030.183 / (235 + ta ));
100. else
101.     ps   =   0.6105* exp (21.875*ta / (265.5 + ta ));
102. end;
103.
104. TAA  =  ta+273.0;
105. TRA  =  tr+273.0;
106. TCLA =  TAA + (35.5-ta) / (3.5*Icl+0.1);
107. hcf = 12.1 * sqrt(vr);
108.
109. %Clothing area factor
110. if Icl <=0.078
111. fcl= 1.00 + 1.290 * Icl;
112. else
113. fcl= 1.05 + 0.645 * Icl;
114. end
115. % Start of the loop for the evaluation of clothing surface temperature}
116. P1   = Icl * fcl;
117. P2   = P1 * 3.96;
118. P3   = P1 * 100;
119. P4   = P1 * TAA;
120. P5   = 308.7 - 0.028 * (M-W) + P2 * (TRA/100)^4;
121. XN   = TCLA/100;
122. XF   = XN;
123. EPS  = 0.00015;
124. CONV = 100;
125. N=1;
126. while (CONV>EPS)
127. XF   = (XF+XN)/2;
128. hcn = 2.38 * ((abs(100*XF - TAA))).^0.25;
129. if (hcf<=hcn)
130. hc   = hcn;
131. else
132. hc   = hcf;
133. end
134. XN   = (P5+P4*hc-P2*XF^4)/(100+P3*hc);
135. CONV=abs(XF-XN);
136. end
137.
138. tcl  = 100*XN-273;
139. % End of the loop for the evaluation of clothing surface temperature}
140.
141. %Skin diffusion heat loss
142. HL1=3.05*0.001*(5733-6.99*(M-W)-1000*PHI*ps);
143.
144. %Sweat heat loss
145. if (M-W)>58.15
146.     HL2= 0.42 * ((M-W)-58.15);
147. else
148.     HL2=0;
149. end
150.
151. %Respiration latent heat loss
152. HL3= 1.7*0.00001 * M * (5867-1000*PHI*ps);
153.
154. %Respiration dry heat loss
155. HL4= 0.0014 * M * (34-ta);
156.
158. HL5= 3.96 * fcl * ((0.01*tcl+2.73)^4-(0.01*tr+2.73)^4);
159.
160. %Convective heat loss
161. HL6= fcl * hc * (tcl-ta);
162.
163. %Thermal sensation transformation coefficient}
164. TS= 0.303 * exp(-0.036*M) + 0.028;
165.
166. PMV= TS * (M-W-HL1-HL2-HL3-HL4-HL5-HL6);
167. end
168.
169. data = [-1.5924 -0.2152 -1.1426 0.0421; -1.5924 -0.2152 -1.1426 0.0421; -1.2319 0.0313 -0.8241 0.2595; 0.2329 1.0332 0.4686 1.1427; 0.2329 1.0332 0.4686 1.1427];
170. row_names = {'A', 'B', 'C', 'D', 'E'};
171. var_names = {'met1d2_clo0d5', 'met1d2_clo1d0', 'met1d4_clo0d5', 'met1d4_clo1d0'};
172. var_description = {'M = 1.2 met - 0.5 clo', 'M = 1.2 met - 1. clo', 'M = 1.4 met - 0.5 clo', 'M = 1.4 met - 1.0 clo' };
173. testtable = array2table(data, 'VariableNames', var_names, 'RowNames', row_names);
174. testtable.Properties.VariableDescriptions = var_description;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top