《海浪波长以及波浪力计算.doc》由会员分享,可在线阅读,更多相关《海浪波长以及波浪力计算.doc(6页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
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.1
2、41592653 Const G = 9.8 Const = 1025Private 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
3、 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(-kd) / (Exp(kd) + Exp(-kd) L2 = G * (t 2) * thkd / (2 * Pi) Loop Print 设计波长是:; L2 Print 波数:; Format$
4、(k, 0.0000)End SubPrivate Sub Command2_Click()EndEnd SubPrivate Sub Command3_Click() H = Val(InputBox(请输入设计波高H:, 请输入, 3) D1 = Val(InputBox(请输入桩柱直径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 波陡:;
5、 H / L2 Print 相对柱径:; D1 / L2 If D1 / L2 4 Then Ko = 1 Print Ko ElseIf LD 3 Then Ko = 1.25 Print Ko ElseIf LD = 2 * Fhdmax Then Fhmax = Fhlmax o = 90 ElseIf Fhlmax = 2 * Mhdmax Then Mhmax = Mhlmax ElseIf Mhlmax 2 * Mhdmax Then Mhmax = Mhdmax * (1 + (Mhlmax / Mhdmax) 2) / 4) End If Print Print 单桩柱最大水平
6、波力矩Mhmax:; Mhmax Print 最大水平波力和最大水平波力矩的相位o:; o e = Mhmax / Fhmax Print Print 最大水平波力作用点离海底的距离e:; eEnd SubPublic Function sh(n) As Single sh = (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) /
7、(Exp(n) + Exp(-n)End FunctionPublic Function arcsin(n) As Single arcsin = Atn(n / Sqr(-n * n + 1)End FunctionPublic Function FH() As Single FH = Fhdmax * Cos() * Abs(Cos() + Fhlmax * Sin()End FunctionPublic Function MH() As Single MH = Mhdmax * Cos() * Abs(Cos() + Mhlmax * Sin()End FunctionPrivate S
8、ub Command5_Click() Dim i As Integer Open C:Documents and SettingsAll 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); F
9、ormat$(Cos(), 0.0000); Print #1, Tab(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 Close #1End SubPrivate S
10、ub 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); Mhlmaxsin; Spc(6); MH For i = 0 To 180 Step 15 = i * Pi / 180 Print #2, Tab(10); i; Tab(20);
11、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
12、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 前后两桩柱的最大水平合波力为:; tEnd SubPrivate Sub Command8_Click() ClsEnd SubPrivate 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 前后两桩柱的最大水平合波力矩为:; tEnd Sub 海洋环境作业计算结果: