1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
| Sub Initialisation()
Application.Cursor = xlDefault
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
'Nommage des feuilles relatives
Set param_entree = Workbooks("Indic.xlsm").Sheets("Paramètres d'entrée")
Set donnees_entree = Workbooks("Incic.xlsm").Sheets("Données d'entrée")
Set resultats = Workbooks("Indic.xlsm").Sheets("Résultats globaux")
Set feuille_travail = Workbooks("Indic.xlsm").Sheets("FeuilleDeTravail")
' Extraction des hypothèses
Debut = donnees_entree.Range("E9").Value 'extration du début de simulation
Fin = donnees_entree.Range("E10").Value ' extraction de la fin de simulation
Finprogression = Fin * 24 + 1
param_entree.Activate
ICL = 0.5 * 0.155
M = 58.15
W = 0
VA = 0.2
RH = 50
MW = M - W
PMV = 1
If ICL < 0.078 Then
FCL = 1 + 1.29 * ICL
Else
FCL = 1.05 + 0.645 * ICL
End If
For i = Debut + 3 To Fin * 24 + 2 'Boucle sur les pas de temps
'Pour TA = Theta_op
TA = param_entree.Range("Q" & i).Value
TR = TA
TAA = TA + 273 'Température de l'air en degrés kelvin
TRA = TR + 273 'Température moyenne de rayonnement en degrés kelvin
P1 = ICL * FCL 'Etape de calcul
P2 = P1 * 3.96 'Etape de calcul
P3 = P1 * 100 'Etape de calcul
P4 = P1 * TAA 'Etape de calcul
P5 = 308.7 - 0.028 * MW + P2 * (TRA / 100) ^ 4
XN = TCLA / 100
XF = XN
N_LIM = 150 'Nombre limite d'itérations
EPS = 0.00015 'Critère de convergence
N = 0 'N : Nombre d 'itérations
NWHILE = 1
While (Abs(XN - XF) > EPS) Or (NWHILE = 1)
XF = (XF + XN) / 2
HCN = 2.38 * Abs(100 * XF - TAA) ^ 0.25 'Coefficient de transfert de chaleur par convection naturelle
If HCF > HCN Then
HC = HCF
Else
HC = HCN
End If
XN = (P5 + P4 * HC - P2 * (XF ^ 4)) / (100 + P3 * HC)
N = N + 1
If N > N_LIM Then
Exit Sub
End If
If NWHILE = 1 Then
NWHILE = NWHILE + 1
End If
Wend
TCL = 100 * XN - 273 'Température de surface du vêtement
PA = RH * 10 * Exp(16.6536 - 4030.183 / (TA + 235))
TS = 0.303 * Exp(-0.036 * M) + 0.028
H1 = 3.05 * 10 ^ -3 * (5733 - 6.99 * (M - W) - PA)
If MW > 58.15 Then
H2 = 0.42 * (MW - 58.15)
Else
H2 = 0 'Perte de chaleur par sudation (confort)
End If
H3 = 1.7 * 0.00001 * M * (5867 - PA) 'Perte de chaleur latente par respiration
H4 = 0.0014 * M * (34 - TA) 'Perte de chaleur sèche par respiration
H5 = 3.96 * 0.00000001 * FCL * (XN ^ 4 - (TRA / 100) ^ 4) 'Perte de chaleur par rayonnement
H6 = FCL * HC * (TCL - TA) 'Perte de chaleur par convection
PMV = TS * (MW - H1 - H2 - H3 - H4 - H5 - H6)
param_entree.Range("AD" & i).Value = PMV
Next i
Application.Calculation = xlAutomatic
Application.ScreenUpdating = True
End Sub |
Partager