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
| Public Function sigma(ByVal fc, ByVal L1, ByVal L2, ByRef plageSource As Range, ByVal nomFeuilDest As String) As Single
Dim Trouve As Boolean
Dim Str As String
Dim c As Range
Dim i As Byte
Dim Typ
for each c in PlageSource
f=c.value
If cboChoixSrce.ListIndex > -1 Then
Str = cboChoixSrce.Text
Set c = plageSource.Find(Str, LookIn:=xlValues, lookat:=xlWhole)
If Not c Is Nothing Then
Typ = Array("Scie circulaire", "Marteau électrique", "Marteau pneumatique", "BRH", "BOBCAT", "BROKK", "Chute d'étais", _
"Choc de marteau sur étais", "Perceuse", "Mini perceuse", "Chute de gravas", "Camion au ralentit", "Compresseur", _
"Coulage plancher", "Aiguille vibrante", "Scie murale", "Frappe sur métal", "Hélicoptère", "Machine à enduire", _
"Meuleuse", "Mini-pelle", "Perforateur", "Pince de démolition", "Pompe à béton", "Ponceuse plafond", _
"Rangement d'étais", "Stop Net", "Toupie Béton Vidange")
For i = 0 To UBound(Typ)
If UCase(Str) = Typ(i) Then
Trouve = True
Exit For
End If
Next i
If Trouve Then
Lws = c.Offset(25, 1 + i).Value
Lwa = c.Offset(0, 1 + i).Value
End If
Set c = Nothing
End If
sigma2 = 4 * L1 * L2 * ((f / c0) ^ 2)
sigma3 = Sqr((2 * pi * f * (L1 + L2)) / (16 * c0))
teta = teta0 + (Ms / (485 * Sqr(f)))
Y = Sqr(f / fc)
'Calcul de sigma
If f11 <= (fc / 2) And f > fc Then ' => SI condition 1 validée ALORS
sigma = 1 / Sqr(1 - (fc / f))
ElseIf f11 <= (fc / 2) And f < fc And f > (fc / 2) Then ' => SINON, SI condition 2 validée ALORS
delta1 = ((1 - (Y ^ 2)) * Log(((1 + Y) / (1 - Y)) + (2 * Y))) / (4 * ((pi) ^ 2) * ((1 - (Y ^ 2)) ^ (1.5)))
delta2 = 0
sigma = (((2 * (L1 + L2) / (L1 * L2)) * (c0 / fc)) * delta1) + delta2
'etc...
end if
epaisseur_equivalente = ThisWorkbook.Worksheets("Feuil3").Range("L28").Value
If Lws = 0 Then
Lwscorr = 0
Lwas = 0
Else
Lwscorr = Lws - (20 * (Logd((epaisseur_equivalente) / 0.2)))
End If
'Calcul de Lwas et Lwatot
If f < fc Then
Lwas = Lwscorr - (10 * Logd(2 * pi * f * teta * Ms)) + 26 + (10 * Logd(sigma))
Lwatot = 10 * Logd((10 ^ (0.1 * Lwas)) + (10 ^ (0.1 * Lwa)))
ElseIf f = fc Then
Lwas = Lwscorr - (10 * Logd(2 * pi * f * teta * Ms)) + 26 + (10 * Logd(sigma))
Lwatot = 10 * Logd((10 ^ (0.1 * Lwas)) + (10 ^ (0.1 * Lwa)))
ElseIf f > fc Then
Lwas = Lwscorr - (10 * Logd(2 * pi * f * teta * Ms)) + 26 + (10 * Logd(sigma))
Lwatot = 10 * Logd((10 ^ (0.1 * Lwas)) + (10 ^ (0.1 * Lwa)))
End If
J = J + 1
Sheets(nomFeuilDest).Cells(J, 4).Value = sigma
Sheets(nomFeuilDest).Cells(J, 6).Value = Lwas
Sheets(nomFeuilDest).Cells(J, 7).Value = Lwatot
End If
Next c
end function |