文档库 最新最全的文档下载
当前位置:文档库 › 海浪波长以及波浪力计算

海浪波长以及波浪力计算

海浪波长以及波浪力计算
海浪波长以及波浪力计算

Option Explicit

Dim L1 As Single, L2 As Single, t As Single, d!, k!, kd!, thkd!, H!, D1!

Dim CD As Single, CM As Single, l As Single, Ko As Single

Dim Fhdmax As Single, Fhlmax As Single, Mhdmax As Single, Mhlmax!, Fhmax!, Mhmax!

Dim θ As Si ngle

Const Pi =

Const G =

Const γ = 1025

Private Sub Command1_Click()

Dim r As Integer

Do While True

L1 = Val(InputBox("请输入波长L1:", "求解设计波长:", "100"))

t = Val(InputBox("请输入设计波周期T:", "请输入", "6"))

d = Val(InputBox("请输入设计水深d:", "请输入", "20"))

If L1 <= 0 Then

r = MsgBox("请输入一个正数!", 5, "输入错误")

If r = 2 Then

End

End If

Else

Exit Do

End If

Loop

k = 2 * Pi / L1

kd = k * d

thkd = (Exp(kd) - Exp(-kd)) / (Exp(kd) + Exp(-kd))

L2 = G * (t ^ 2) * thkd / (2 * Pi)

Do Until Abs(L2 - L1) <

L1 = L2

k = 2 * Pi / L1

kd = k * d

thkd = (Exp(kd) - Exp(-kd)) / (Exp(kd) + Exp(-kd))

L2 = G * (t ^ 2) * thkd / (2 * Pi)

Loop

Print "设计波长是:"; L2

Print "波数:"; Format$(k, "")

End Sub

Private Sub Command2_Click()

End

End Sub

Private Sub Command3_Click()

H = Val(InputBox("请输入设计波高H:", "请输入", "3"))

D1 = Val(InputBox("请输入桩柱直径D1:", "请输入", "2"))

l = Val(InputBox("请输入桩柱间距l:", "请输入", "15"))

If d / L2 < Then

Print

Print "相对水深d/L2:"; d / L2

Print "采用线性波理论计算:"

Else

MsgBox "重新选择计算理论"

End If

Print "波陡:"; H / L2

Print "相对柱径:"; D1 / L2

If D1 / L2 < Then

Print "属于小直径桩柱"

Else

Print "属于大直径桩柱"

End If

CD = Val(InputBox("请输入拖曳力系数:", "请输入", ""))

CM = Val(InputBox("请输入质量系数:", "请输入", ""))

Print

Print "选用拖曳力系数:"; CD

Print "选用质量系数:"; CM

Dim LD As Single

LD = l / D1

Print "桩柱相对间距:"; LD

Print "群桩系数Ko:";

If LD > 4 Then

Ko = 1

Print Ko

ElseIf LD < 4 And LD > 3 Then

Ko =

Print Ko

ElseIf LD < 2 Then

Ko =

Print Ko

End If

End Sub

Private Sub Command4_Click()

Dim K1 As Single, K2 As Single, K3 As Single, K4 As Single

Dim e As Single, θo As Single

K1 = (2 * k * (d + H / 2) + sh(2 * k * (d + H / 2))) / (8 * sh(2 * k * d)) Fhdmax = CD * γ * G * D1 * (H ^ 2) * K1 / 2

Print

Print "K1值:"; Format$(K1, "")

Print "单桩柱最大水平拖曳力Fhdmax:"; Fhdmax

K2 = th(k * d)

Fhlmax = CM * γ * G * Pi * (D1 ^ 2) * H * K2 / 8

Print

Print "K2值:"; Format$(K2, "")

Print "单桩柱最大水平惯性力Fhlmax:"; Fhlmax

K3 = (2 * (k ^ 2) * (d + H / 2) ^ 2 + 2 * k * (d + H / 2) * sh(2 * k * (d + H / 2)) - ch(2 * k * (d + H / 2)) + 1) / (32 * sh(2 * k * d))

Mhdmax = CD * γ * G * D1 * (H ^ 2) * L2 * K3 / (2 * Pi)

Print

Print "K3值:"; Format$(K3, "")

Print "单桩柱最大水平拖曳力矩Mhdmax:"; Mhdmax

K4 = (k * d * sh(k * d) - ch(k * d) + 1) / ch(k * d)

Mhlmax = CM * γ * G * (D1 ^ 2) * H * L2 * K4 / 16

Print

Print "K4值:"; Format$(K4, "")

Print "单桩柱最大水平惯性力矩Mhlmax:"; Mhlmax

If Fhlmax >= 2 * Fhdmax Then

Fhmax = Fhlmax

θo = 90

ElseIf Fhlmax < 2 * Fhdmax Then

Fhmax = Fhdmax * ((1 + (Fhlmax / Fhdmax) ^ 2) / 4)

θo = arcsin(Fhlmax / (2 * Fhdmax))

End If

Print

Print "单桩柱最大水平波力Fhmax:"; Fhmax

If Mhlmax >= 2 * Mhdmax Then

Mhmax = Mhlmax

ElseIf Mhlmax < 2 * Mhdmax Then

Mhmax = Mhdmax * ((1 + (Mhlmax / Mhdmax) ^ 2) / 4)

End If

Print

Print "单桩柱最大水平波力矩Mhmax:"; Mhmax

Print "最大水平波力和最大水平波力矩的相位θo:"; θo

e = Mhmax / Fhmax

Print

Print "最大水平波力作用点离海底的距离e:"; e

End Sub

Public Function sh(n) As Single

sh = (Exp(n) - Exp(-n)) / 2

End Function

Public Function ch(n) As Single

ch = (Exp(n) + Exp(-n)) / 2

End Function

Public Function th(n) As Single

th = (Exp(n) - Exp(-n)) / (Exp(n) + Exp(-n))

End Function

Public Function arcsin(n) As Single

arcsin = Atn(n / Sqr(-n * n + 1))

End Function

Public Function FH(θ) As Single

FH = Fhdmax * Cos(θ) * Abs(Cos(θ)) + Fhlmax * Sin(θ)

End Function

Public Function MH(θ) As Single

MH = Mhdmax * Cos(θ) * Abs(Cos(θ)) + Mhlmax * Sin(θ)

End Function

Private Sub Command5_Click()

Dim i As Integer

Open "C:\Documents and Settings\All Users\桌面\不同相位水平波力.txt" For Output As #1 Print #1, Tab(8); "相位角θ"; Spc(3); "cosθ"; Spc(3); "cosθ|cosθ|"; Spc(3); "sinθ"; Spc(3); "Fhdmaxcosθ|cosθ|"; Spc(3); "Fhlmaxsinθ"; Spc(6); "FH"

For i = 0 To 180 Step 15

θ = i * Pi / 180

Print #1, Tab(10); i; Tab(20); Format$(Cos(θ), "");

Print #1, Tab(30); Format$(Cos(θ) * Abs(Cos(θ)), "");

Print #1, Tab(40); Format$(Sin(θ), "");

Print #1, Tab(55); Format(Fhdmax * Cos(θ) * Abs(Cos(θ)), "");

Print #1, Tab(70); Format(Fhlmax * Sin(θ), "");

Print #1, Tab(85); Format(FH(θ), "")

Next i

Close #1

End Sub

Private Sub Command6_Click()

Dim i As Integer

Open "C:\Documents and Settings\All Users\桌面\不同相位水平波力矩.txt" For Output As #2

Print #2, Tab(8); "相位角θ"; Spc(3); "cosθ"; Spc(3); "cosθ|cosθ|"; Spc(3); "sinθ"; Spc(3); "Fhdmaxcosθ|cosθ|"; Spc(3); "Mhlmaxsinθ"; Spc(6); "MH"

For i = 0 To 180 Step 15

θ = i * Pi / 180

Print #2, Tab(10); i; Tab(20); Format$(Cos(θ), "");

Print #2, Tab(30); Format$(Cos(θ) * Abs(Cos(θ)), "");

Print #2, Tab(40); Format$(Sin(θ), "");

Print #2, Tab(55); Format(Mhdmax * C os(θ) * Abs(Cos(θ)), "");

Print #2, Tab(70); Format(Mhlmax * Sin(θ), "");

Print #2, Tab(85); Format(MH(θ), "")

Next i

Close #2

End Sub

Private Sub Command7_Click()

Dim ψ As Single

Dim ∑H As Single

Dim i As Integer

Dim t As Single, m As Integer

ψ = l * 360 / L2

Print

Print "前后两桩柱的波浪位相差ψ:"; ψ

t = 0

For i = 0 To 180 - ψ

∑H = FH(i) + FH(i + ψ)

If t < ∑H Then

t = ∑H

m = i

End If

Next i

Print "发生最大水平合波力的相位:"; m Print "前后两桩柱的最大水平合波力为:"; t End Sub

Private Sub Command8_Click()

Cls

End Sub

Private Sub Command9_Click()

Dim ψ As Single

Dim ∑M As Single

Dim i As Integer

Dim t As Single, m As Integer

ψ = l * 360 / L2

t = 0

For i = 0 To 180 - ψ

∑M = MH(i) + MH(i + ψ)

If t < ∑M Then

t = ∑M

m = i

End If

Next i

Print

Print "发生最大水平合波力矩的相位:"; m Print "前后两桩柱的最大水平合波力矩为:"; t End Sub

海洋环境作业计算结果:

相关文档