Vielen Dank Mase und Gast...
Habe ich erledigt. Eigentlisch mein problem war beim Step (For condition). Wann ich den Step einfach 0,00001 gebe denn versuchte er convergence sonst ist nicht mehr in meinem If Loop.
Jedenfalls Danke euch
''
Function Do_FDBR_9_4_5_4(Zeta_SOLL As Double, D_1_mm As Double, D_2_mm As Double, R_kante_mm As Double) As Double
Dim Pi As Double, A1 As Double, Ao As Double, A2 As Double, m1 As Double, m2 As Double, D_h As Double, Zeta_Strich As Double, D_o_mm As Double, Zeta_IST As Double, X As Double
For D_o_mm = 0.01 * D_2_mm To D_2_mm Step 0.0001
Pi = 3.14
A1 = (Pi / 4) * (D_1_mm / 1000) ^ 2
Ao = (Pi / 4) * (D_o_mm / 1000) ^ 2
A2 = (Pi / 4) * (D_2_mm / 1000) ^ 2
m1 = Ao / A1
m2 = Ao / A2
D_h = 4 * Ao / (Pi * D_o_mm / 1000)
Zeta_Strich = 0.5 - 0.47 * tanh(13.9 * R_kante_mm * 0.001 / D_h)
Zeta_IST = ((Zeta_Strich * (1 - m1)) ^ 0.5 + (1 - m2)) ^ 2 * (1 / m2) ^ 2
X = Zeta_SOLL - Zeta_IST
If X > -0.0005 And X < 0.0005 Then
Do_FDBR_9_4_5_4 = D_o_mm
Exit For
End If
Next
End Function
|