海浪波長以及波浪力計算_第1頁
海浪波長以及波浪力計算_第2頁
海浪波長以及波浪力計算_第3頁
海浪波長以及波浪力計算_第4頁
海浪波長以及波浪力計算_第5頁
已閱讀5頁,還剩1頁未讀 繼續免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、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 Single Const Pi = 3.141592653 Const G = 9.8 Const = 1025Private

2、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 = M

3、sgBox("請輸入一個正數!", 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) < 0.001 L1 = L2 k = 2 * Pi / L1 kd = k * d thkd = (Exp(kd) - Exp(-k

4、d) / (Exp(kd) + Exp(-kd) L2 = G * (t 2) * thkd / (2 * Pi) Loop Print "設計波長是:" L2 Print "波數:" Format$(k, "0.0000")End SubPrivate Sub Command2_Click()EndEnd SubPrivate Sub Command3_Click() H = Val(InputBox("請輸入設計波高H:", "請輸入", "3") D1 = Val(In

5、putBox("請輸入樁柱直徑D1:", "請輸入", "2") l = Val(InputBox("請輸入樁柱間距l:", "請輸入", "15") If d / L2 < 0.5 Then Print Print "相對水深d/L2:" d / L2 Print "采用線性波理論計算:" Else MsgBox "重新選擇計算理論" End If Print "波陡:" H / L2 P

6、rint "相對柱徑:" D1 / L2 If D1 / L2 < 0.2 Then Print "屬于小直徑樁柱" Else Print "屬于大直徑樁柱" End If CD = Val(InputBox("請輸入拖曳力系數:", "請輸入", "1.0") CM = Val(InputBox("請輸入質量系數:", "請輸入", "2.0") Print Print "選用拖曳力系數:"

7、; 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 = 1.25 Print Ko ElseIf LD < 2 Then Ko = 1.5 Print Ko End IfEnd SubPrivate Sub Command4_Click() Dim K1 As S

8、ingle, 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, "0.0000") Print "單樁柱最大水平拖曳力Fhdmax:" Fhdmax K2 = th

9、(k * d) Fhlmax = CM * * G * Pi * (D1 2) * H * K2 / 8 Print Print "K2值:" Format$(K2, "0.0000") 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

10、* * G * D1 * (H 2) * L2 * K3 / (2 * Pi) Print Print "K3值:" Format$(K3, "0.0000") 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, "0.0000&qu

11、ot;) 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 T

12、hen 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:" eEnd SubPublic Function sh(n) As Single sh =

13、 (Exp(n) - Exp(-n) / 2End FunctionPublic Function ch(n) As Single ch = (Exp(n) + Exp(-n) / 2End FunctionPublic Function th(n) As Single th = (Exp(n) - Exp(-n) / (Exp(n) + Exp(-n)End FunctionPublic Function arcsin(n) As Single arcsin = Atn(n / Sqr(-n * n + 1)End FunctionPublic Function FH() As Single

14、 FH = Fhdmax * Cos() * Abs(Cos() + Fhlmax * Sin()End FunctionPublic Function MH() As Single MH = Mhdmax * Cos() * Abs(Cos() + Mhlmax * Sin()End FunctionPrivate Sub Command5_Click() Dim i As Integer Open "C:Documents and SettingsAll Users桌面不同相位水平波力.txt" For Output As #1 Print #1, Tab(8); &q

15、uot;相位角" 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(), "0.0000"); Print #1, Tab(

16、30); Format$(Cos() * Abs(Cos(), "0.0000"); Print #1, Tab(40); Format$(Sin(), "0.0000"); Print #1, Tab(55); Format(Fhdmax * Cos() * Abs(Cos(), "0.00"); Print #1, Tab(70); Format(Fhlmax * Sin(), "0.00"); Print #1, Tab(85); Format(FH(), "0.00") Next i C

17、lose #1End SubPrivate Sub Command6_Click() Dim i As Integer Open "C:Documents and SettingsAll 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); &qu

18、ot;Mhlmaxsin" Spc(6); "MH" For i = 0 To 180 Step 15 = i * Pi / 180 Print #2, Tab(10); i; Tab(20); Format$(Cos(), "0.0000"); Print #2, Tab(30); Format$(Cos() * Abs(Cos(), "0.0000"); Print #2, Tab(40); Format$(Sin(), "0.0000"); Print #2, Tab(55); Format(Mhdmax * Cos() * Abs(Cos(), "0.00"); Print #2, Tab(70); Format(Mhlmax * Sin(), "0.00"); Print #2, Tab(85); Format(MH(), "0.00") Next i Close #2End SubPrivate Sub Command7_Click() Dim As Single Dim

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論