版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、.option explicitdim 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 singledim fhdmax as single, fhlmax as single, mhdmax as single, mhlmax!, fhmax!, mhmax! dim as singleconst pi = 3.141592653const g = 9.8const = 1025private sub c
2、ommand1_click()dim r as integerdo while truel1 = val(inputbox(请输入波长 l1:, 求解设计波长:, 100)t = val(inputbox(请输入设计波周期 t:, 请输入, 6)d = val(inputbox(请输入设计水深 d:, 请输入, 20)if l1 = 0 thenr = msgbox(请输入一个正数!, 5, 输入错误)if r = 2 thenendend ifelseexit doend ifloopk = 2 * pi / l1kd = k * dthkd = (exp(kd) - exp(-kd) /
3、(exp(kd) + exp(-kd)l2 = g * (t 2) * thkd / (2 * pi)do until abs(l2 - l1) 0.001l1 = l2k = 2 * pi / l1kd = k * dthkd = (exp(kd) - exp(-kd) / (exp(kd) + exp(-kd)l2 = g * (t 2) * thkd / (2 * pi)loopprint 设计波长是:; l2print 波数:; format$(k, 0.0000)end subprivate sub command2_click()endend subprivate sub comm
4、and3_click()h = val(inputbox(请输入设计波高 h:, 请输入, 3)d1 = val(inputbox(请输入桩柱直径 d1:, 请输入, 2)l = val(inputbox(请输入桩柱间距 l:, 请输入, 15).if d / l2 0.5 thenprintprint 相对水深 d/l2:; d / l2print 采用线性波理论计算:elsemsgbox 重新选择计算理论end ifprint 波陡:; h / l2print 相对柱径:; d1 / l2if d1 / l2 4 thenko = 1print koelseif ld 3 thenko =
5、 1.25print koelseif ld = 2 * fhdmax thenfhmax = fhlmaxo = 90e lseif fhlmax = 2 * mhdmax thenmhmax = mhlmaxelseif mhlmax 2 * mhdmax thenmhmax = mhdmax * (1 + (mhlmax / mhdmax) 2) / 4)end ifprintprint 单桩柱最大水平波力矩 mhmax:; mhmaxprint 最大水平波力和最大水平波力矩的相位o:; oe = mhmax / fhmaxprintprint 最大水平波力作用点离海底的距离 e:; e
6、end subpublic function sh(n) as singlesh = (exp(n) - exp(-n) / 2end functionpublic function ch(n) as singlech = (exp(n) + exp(-n) / 2end functionpublic function th(n) as singleth = (exp(n) - exp(-n) / (exp(n) + exp(-n).end functionpublic function arcsin(n) as singlearcsin = atn(n / sqr(-n * n + 1)en
7、d functionpublic function fh() as singlefh = fhdmax * cos() * abs(cos() + fhlmax * sin()end functionpublic function mh() as singlemh = mhdmax * cos() * abs(cos() + mhlmax * sin()end functionprivate sub command5_click()dim i as integeropen c:documents and settingsall users桌面不同相位水平波力.txt for output as
8、 #1 print #1, tab(8); 相位角; spc(3); cos; spc(3); cos|cos|; spc(3); sin;spc(3); fhdmaxcos|cos|; spc(3); fhlmaxsin; spc(6); fhfor i = 0 to 180 step 15 = i * pi / 180print #1, tab(10); i; tab(20); format$(cos(), 0.0000);print #1, tab(30); format$(cos() * abs(cos(), 0.0000);print #1, tab(40); format$(sin
9、(), 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 iclose #1end subprivate sub command6_click()dim i as integero pen c:documents and settingsall users 桌面不同相位水平波力矩.txt for output as #2p rint
10、 #2, tab(8); 相位角; spc(3); cos; spc(3); cos|cos|; spc(3); sin; spc(3); fhdmaxcos|cos|; spc(3); mhlmaxsin; spc(6); mhfor i = 0 to 180 step 15 = i * pi / 180print #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.00
11、00);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 iclose #2end subprivate sub command7_click().dim as singledim h as singledim i as integerdim t as single, m as integer = l * 360 / l2printprint 前后两桩柱的波浪位相差:; t = 0for i = 0 to 180 - h = fh(i) + fh(i + )if t h thent = hm = iend ifnext iprint 发生最大水平合波力的相位 :; m print 前后两桩柱的最大水平合波力为:; tend subprivate sub command8_click()clsend subprivate sub command9_click()dim as singledim m as singledim i as integerdim t as
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 基坑支护质量通病防治方案
- 2026年食品快检员岗位知识考试题库含答案
- 法律顾问管理办法
- 2026年度中级注册安全工程师职业资格考试安全生产管理复习题及答案
- 2026执业药师继续教育试题库及答案(完整版)
- 2026年全民健身条例培训考试题及答案
- 火灾、爆炸事故专项应急预案
- 2026年信用监管实施实务知识试题及答案
- 2026年模具库房安全管理员岗位题库
- 2026年家庭医生签约服务练习题及答案
- 2025年造价咨询公司廉政制度及保障措施
- 生产产品标识管理办法
- 数智企业经营沙盘模拟实训教程-财务规则
- 政府招商管理办法
- 2024年四川省邻水县人民医院公开招聘医务工作人员试题带答案详解
- 医疗纠纷预防和处理条例培训课件
- 《上古天真论》课件
- 云南省公路工程试验检测费用指导价
- JB T 5301-2007滚动轴承碳钢球
- 手机信号屏蔽器的应用
- 刘老根大舞台开幕曲简谱乐谱
评论
0/150
提交评论