Dim Dw0 As Double, dm0 As Double, Z0 As Double, Dw1 As Double, dm1 As Double, z1 As Double, t As Double, fc As Double
Dim Dwmin As Double, dmmin As Double, Zmin As Double, Dwmax As Double, dmmax As Double, Zmax As Double
Dim wj As Double, nj As Double, kd As Double, e1 As Double, e2 As Double, p2 As Double, p1 As Double, g As Double
Dim As Long, I str1 As String, str2 As String, str3 As String, SS As a Double, As Double f1 and f0 As Double
Dim FF0 As Double, FF1 As Double, tj1 As Double, tj2 As Double
Wj=CDbl (Text3. Text)
Nj=CDbl (Text2. Text)
Kd=CDbl (Text4. Text)
'calculating variable minimum
Dwmin=0.3 * (wj, nj)
Dmmin=0.5 * (wj + nj)
E1=Dwmin/dmmin
G=Round (e1, 2)
P1=(Atn (e1/Sqr (- e1 * e1 + 1))) * 180/3.1415926
Zmin=(180/2/p1) + 1
'a maximum of calculating variable
Dwmax=0.6 * (wj, nj)
Dmmax=0.515 * (wj + nj)
E2=Dwmin/dmmin
The p2=(Atn (e2/Sqr (e2 - e2 * + 1))) * 180/3.1415926
Zmax=(186/2/p2) + 1
'to the three variables initialization
Dw0=Dwmin
Dm0=dmmin
Z0=Zmax
'select load coefficient of the fc
Call openRs (" select [fc] from zhxs_fc where [bz]="& amp; Round (e1, 2))
Fc=rs. Fields (0)
Rs. Close
'Do
I=0
Str1=Grad_unit_1 (Dw0 dm0, Z0, fc, t)
Dw1=CDbl (Left (str1, InStrRev (str1, "%") - 1))
Dm1=Mid (str1 InStrRev (str1, "%") + 1, InStrRev (str1, "@") - InStrRev (str1, "%") - 1)
Z1=Right (str1, Len (str1) - InStrRev (str1, "@"))
SS=S (Dw1 dm1, z1, Dwmin, dmmin, Zmin, Dwmax, dmmax, Zmax)
'meet first determine whether convergence condition
If SS & gt; 0.0001 Then
Do
I=I + 1
Dw0=Dw1
Dm0=dm1
Z0=z1
T=0.4 * t
Str2=Grad_S (Dw0 dm0, Z0, Dwmin, dmmin, Zmin, Dwmax, dmmax, Zmax, t)
Dw1=CDbl (Left (str2, InStrRev (str2, "%") - 1))
Dm1=Mid (str2, InStrRev (str2, "%") + 1, InStrRev (str2, "@") - InStrRev (str2, "%") - 1)
Z1=Right (str2, Len (str2) - InStrRev (str2, "@"))
If I=1 Then
T=0.8
Str3=Grad_unit_1 (Dw0 dm0, Z0, fc, t)
Dw1=CDbl (Left (str3, InStrRev (str3, "%") - 1))
Dm1=Mid (str3, InStrRev (str3, "%") + 1, InStrRev (str3, "@") - InStrRev (str3, "%") - 1)
Z1=Right (str3, Len (str3) - InStrRev (str3, "@"))
SS=S (Dw1 dm1, z1, Dwmin, dmmin, Zmin, Dwmax, dmmax, Zmax)
The Else
SS=S (Dw1 dm1, z1, Dwmin, dmmin, Zmin, Dwmax, dmmax, Zmax)
End the If
Loop Until SS & lt;=0.0001
F0=f (Dw0, Z0, fc)
F1=f (Dw1, z1, fc)
The Else
F0=f (Dw0, Z0, fc)
F1=f (Dw1, z1, fc)
End the If
Tj1=f1 - f0
'meet the second convergence condition determine whether
If tj1 & gt;=10 ^ (8) Then
FF0=FF (Dw0, Z0, fc)
FF1=FF (Dw1, z1, fc)
If FF1 & lt; FF0 Then
Tj2=Sqr ((Dw1 - Dw0) ^ 2 + (dm1 - dm0) ^ 2 + (Z0 - z1) ^ 2)
If tj2 & lt; T Then=
T=(2 * t + tj2)/3
The Else
T=0.98 * t
End the If
The Else
T=0.5 * t
End the If
The Else
Text6. Text=Str (Dw1)
Text7. Text=Str (dm1)
Text8. Text=Str (z1)
Text9. Text=FF (Dw1, z1, fc)
End the If
Loop Until tj1 & lt; 10 ^ (8)
End Sub
Block diagram is as follows:
CodePudding user response:
What call procedure no response?This sort of thing can only rely on themselves according to the flowchart to debug step by step, to see if the program's execution process and flow chart of consistent...
CodePudding user response:
Add: within the loop structure DoEventsCodePudding user response: