1. Trang chủ
  2. » Luận Văn - Báo Cáo

Code tự động hóa thiết kế chân vịt tàu thủy dùng VB

18 2 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Code Tự Động Hóa Thiết Kế Chân Vịt Tàu Thủy
Thể loại Thesis
Định dạng
Số trang 18
Dung lượng 15,87 KB

Nội dung

Private Sub Command1_Click() Dim vantoc As Single Dim lucday As Single Dim vongquay As Single Dim tysodia As Single Dim socanh As Single vantoc = Val(Text1) lucday = Val(Text2) vongquay = Val(Text3) tysodia = Val(Text4) socanh = Val(Text5) Dim c1(1 To 39) As Single Dim s1(1 To 39) As Single Dim t1(1 To 39) As Single Dim u1(1 To 39) As Single Dim v1(1 To 39) As Single Dim c2(1 To 47) As Single Dim s2(1 To 47) As Single Dim t2(1 To 47) As Single Dim u2(1 To 47) As Single Dim v2(1 To 47) As Single c1(1) = 0.00880496 c1(2) = -0.204554 c1(3) = 0.166351 c1(4) = 0.158114 c1(5) = -0.147581 c1(6) = -0.481497 c1(7) = 0.415437 c1(8) = 0.0144043 c1(9) = -0.0530054 c1(10) = 0.0143481 c1(11) = 0.0606826 c1(12) = -0.0125894 c1(13) = 0.0109689 c1(14) = -0.133698 c1(15) = 0.00638407 c1(16) = -0.00132718 c1(17) = 0.168496 c1(18) = -0.0507214 c1(19) = 0.0854559 c1(20) = -0.0504475 c1(21) = 0.010465 c1(22) = -0.00648272 c1(23) = -0.00841728 c1(24) = 0.0168424 c1(25) = -0.00102296 c1(26) = -0.0317791 c1(27) = 0.018604 c1(28) = -0.00410798 c1(29) = -0.000606848 c1(30) = -0.0049819 c1(31) = 0.0025983 c1(32) = -0.000560528 c1(33) = -0.00163652 c1(34) = -0.000328787 c1(35) = 0.000116502 c1(36) = 0.000690904 c1(37) = 0.00421749 c1(38) = 0.0000565229 c1(39) = -0.00146564 s1(1) = 0 s1(2) = 1 s1(3) = 0 s1(4) = 0 s1(5) = 2 s1(6) = 1 s1(7) = 0

Trang 1

Private Sub Command1_Click() Dim vantoc As Single

Dim lucday As Single

Dim vongquay As Single Dim tysodia As Single

Dim socanh As Single

vantoc = Val(Text1)

lucday = Val(Text2)

vongquay = Val(Text3)

tysodia = Val(Text4)

socanh = Val(Text5)

Dim c1(1 To 39) As Single Dim s1(1 To 39) As Single Dim t1(1 To 39) As Single Dim u1(1 To 39) As Single Dim v1(1 To 39) As Single Dim c2(1 To 47) As Single Dim s2(1 To 47) As Single Dim t2(1 To 47) As Single Dim u2(1 To 47) As Single Dim v2(1 To 47) As Single c1(1) = 0.00880496

c1(2) = -0.204554

c1(3) = 0.166351

c1(4) = 0.158114

c1(5) = -0.147581

Trang 2

c1(6) = -0.481497 c1(7) = 0.415437 c1(8) = 0.0144043 c1(9) = -0.0530054 c1(10) = 0.0143481 c1(11) = 0.0606826 c1(12) = -0.0125894 c1(13) = 0.0109689 c1(14) = -0.133698 c1(15) = 0.00638407 c1(16) = -0.00132718 c1(17) = 0.168496 c1(18) = -0.0507214 c1(19) = 0.0854559 c1(20) = -0.0504475 c1(21) = 0.010465 c1(22) = -0.00648272 c1(23) = -0.00841728 c1(24) = 0.0168424 c1(25) = -0.00102296 c1(26) = -0.0317791 c1(27) = 0.018604 c1(28) = -0.00410798 c1(29) = -0.000606848 c1(30) = -0.0049819 c1(31) = 0.0025983 c1(32) = -0.000560528 c1(33) = -0.00163652

Trang 3

c1(34) = -0.000328787 c1(35) = 0.000116502 c1(36) = 0.000690904 c1(37) = 0.00421749 c1(38) = 0.0000565229 c1(39) = -0.00146564 s1(1) = 0

s1(2) = 1

s1(3) = 0

s1(4) = 0

s1(5) = 2

s1(6) = 1

s1(7) = 0

s1(8) = 0

s1(9) = 2

s1(10) = 0

s1(11) = 1

s1(12) = 0

s1(13) = 1

s1(14) = 0

s1(15) = 0

s1(16) = 2

s1(17) = 3

s1(18) = 0

s1(19) = 2

s1(20) = 3

s1(21) = 1

s1(22) = 2

Trang 4

s1(23) = 0 s1(24) = 1 s1(25) = 3 s1(26) = 0 s1(27) = 1 s1(28) = 0 s1(29) = 0 s1(30) = 1 s1(31) = 2 s1(32) = 3 s1(33) = 1 s1(34) = 1 s1(35) = 2 s1(36) = 0 s1(37) = 0 s1(38) = 3 s1(39) = 0 t1(1) = 0 t1(2) = 0 t1(3) = 1 t1(4) = 2 t1(5) = 0 t1(6) = 1 t1(7) = 2 t1(8) = 0 t1(9) = 0 t1(10) = 1 t1(11) = 1

Trang 5

t1(12) = 0 t1(13) = 0 t1(14) = 3 t1(15) = 6 t1(16) = 6 t1(17) = 0 t1(18) = 0 t1(19) = 0 t1(20) = 0 t1(21) = 6 t1(22) = 6 t1(23) = 3 t1(24) = 3 t1(25) = 3 t1(26) = 3 t1(27) = 0 t1(28) = 2 t1(29) = 0 t1(30) = 0 t1(31) = 0 t1(32) = 0 t1(33) = 2 t1(34) = 6 t1(35) = 6 t1(36) = 0 t1(37) = 3 t1(38) = 6 t1(39) = 3

Trang 6

u1(1) = 0 u1(2) = 0 u1(3) = 0 u1(4) = 0 u1(5) = 1 u1(6) = 1 u1(7) = 1 u1(8) = 0 u1(9) = 0 u1(10) = 0 u1(11) = 0 u1(12) = 1 u1(13) = 1 u1(14) = 0 u1(15) = 0 u1(16) = 0 u1(17) = 1 u1(18) = 2 u1(19) = 2 u1(20) = 2 u1(21) = 2 u1(22) = 2 u1(23) = 0 u1(24) = 0 u1(25) = 0 u1(26) = 1 u1(27) = 2 u1(28) = 2

Trang 7

u1(29) = 0 u1(30) = 0 u1(31) = 0 u1(32) = 0 u1(33) = 0 u1(34) = 0 u1(35) = 0 u1(36) = 1 u1(37) = 1 u1(38) = 1 u1(39) = 2 v1(1) = 0 v1(2) = 0 v1(3) = 0 v1(4) = 0 v1(5) = 0 v1(6) = 0 v1(7) = 0 v1(8) = 1 v1(9) = 1 v1(10) = 1 v1(11) = 1 v1(12) = 1 v1(13) = 1 v1(14) = 0 v1(15) = 0 v1(16) = 0 v1(17) = 0

Trang 8

v1(18) = 0

v1(19) = 0

v1(20) = 0

v1(21) = 0

v1(22) = 0

v1(23) = 1

v1(24) = 1

v1(25) = 1

v1(26) = 1

v1(27) = 1

v1(28) = 1

v1(29) = 2

v1(30) = 2

v1(31) = 2

v1(32) = 2

v1(33) = 2

v1(34) = 2

v1(35) = 2

v1(36) = 2

v1(37) = 2

v1(38) = 2

v1(39) = 2

c2(1) = 0.00379368 c2(2) = 0.00886523 c2(3) = -0.032241 c2(4) = 0.00344778 c2(5) = -0.0408811 c2(6) = -0.108009

Trang 9

c2(7) = -0.0885381 c2(8) = 0.188561 c2(9) = -0.00370871 c2(10) = 0.00513696 c2(11) = 0.0209449 c2(12) = 0.00474319 c2(13) = -0.00723408 c2(14) = 0.00438388 c2(15) = -0.0269403 c2(16) = 0.0558082 c2(17) = 0.0161886 c2(18) = 0.00318086 c2(19) = 0.015896 c2(20) = 0.0471729 c2(21) = 0.0196283 c2(22) = -0.0502782 c2(23) = -0.030055 c2(24) = 0.0417122 c2(25) = -0.0397722 c2(26) = -0.00350024 c2(27) = -0.0106854 c2(28) = 0.00110903 c2(29) = -0.000313912 c2(30) = 0.0035985 c2(31) = -0.00142121 c2(32) = -0.00383637 c2(33) = 0.0126803 c2(34) = -0.00318278

Trang 10

c2(35) = 0.00334268 c2(36) = -0.00183491 c2(37) = 0.000112451 c2(38) = -0.0000297228 c2(39) = 0.000269551 c2(40) = 0.00083265 c2(41) = 0.00155334 c2(42) = 0.000302683 c2(43) = -0.0001843 c2(44) = -0.000425399 c2(45) = 0.0000869243 c2(46) = -0.0004659 c2(47) = 0.0000554194

s2(1) = 0

s2(2) = 2

s2(3) = 1

s2(4) = 0

s2(5) = 0

s2(6) = 1

s2(7) = 2

s2(8) = 0

s2(9) = 1

s2(10) = 0

s2(11) = 1

s2(12) = 2

s2(13) = 2

s2(14) = 1

Trang 11

s2(15) = 0 s2(16) = 3 s2(17) = 0 s2(18) = 1 s2(19) = 0 s2(20) = 1 s2(21) = 3 s2(22) = 0 s2(23) = 3 s2(24) = 2 s2(25) = 0 s2(26) = 0 s2(27) = 3 s2(28) = 3 s2(29) = 0 s2(30) = 3 s2(31) = 0 s2(32) = 1 s2(33) = 0 s2(34) = 2 s2(35) = 0 s2(36) = 1 s2(37) = 3 s2(38) = 3 s2(39) = 1 s2(40) = 2 s2(41) = 0 s2(42) = 0

Trang 12

s2(43) = 0 s2(44) = 0 s2(45) = 3 s2(46) = 0 s2(47) = 1

t2(1) = 0 t2(2) = 0 t2(3) = 1 t2(4) = 2 t2(5) = 1 t2(6) = 1 t2(7) = 1 t2(8) = 2 t2(9) = 0 t2(10) = 1 t2(11) = 1 t2(12) = 1 t2(13) = 0 t2(14) = 1 t2(15) = 2 t2(16) = 0 t2(17) = 3 t2(18) = 3 t2(19) = 0 t2(20) = 0 t2(21) = 0 t2(22) = 1

Trang 13

t2(23) = 1 t2(24) = 2 t2(25) = 3 t2(26) = 6 t2(27) = 0 t2(28) = 3 t2(29) = 6 t2(30) = 0 t2(31) = 6 t2(32) = 0 t2(33) = 2 t2(34) = 3 t2(35) = 6 t2(36) = 1 t2(37) = 2 t2(38) = 6 t2(39) = 0 t2(40) = 0 t2(41) = 2 t2(42) = 6 t2(43) = 0 t2(44) = 3 t2(45) = 3 t2(46) = 6 t2(47) = 6

u2(1) = 0 u2(2) = 0

Trang 14

u2(3) = 0 u2(4) = 0 u2(5) = 1 u2(6) = 1 u2(7) = 1 u2(8) = 1 u2(9) = 0 u2(10) = 0 u2(11) = 0 u2(12) = 0 u2(13) = 1 u2(14) = 1 u2(15) = 1 u2(16) = 1 u2(17) = 1 u2(18) = 1 u2(19) = 2 u2(20) = 2 u2(21) = 2 u2(22) = 2 u2(23) = 2 u2(24) = 2 u2(25) = 2 u2(26) = 2 u2(27) = 0 u2(28) = 0 u2(29) = 0 u2(30) = 1

Trang 15

u2(31) = 1 u2(32) = 2 u2(33) = 2 u2(34) = 2 u2(35) = 2 u2(36) = 0 u2(37) = 0 u2(38) = 0 u2(39) = 1 u2(40) = 1 u2(41) = 1 u2(42) = 1 u2(43) = 2 u2(44) = 2 u2(45) = 2 u2(46) = 2 u2(47) = 2 v2(1) = 0 v2(2) = 0 v2(3) = 0 v2(4) = 0 v2(5) = 0 v2(6) = 0 v2(7) = 0 v2(8) = 0 v2(9) = 1 v2(10) = 1 v2(11) = 1

Trang 16

v2(12) = 1 v2(13) = 1 v2(14) = 1 v2(15) = 1 v2(16) = 0 v2(17) = 0 v2(18) = 0 v2(19) = 0 v2(20) = 0 v2(21) = 0 v2(22) = 0 v2(23) = 0 v2(24) = 0 v2(25) = 0 v2(26) = 0 v2(27) = 1 v2(28) = 1 v2(29) = 1 v2(30) = 1 v2(31) = 1 v2(32) = 1 v2(33) = 1 v2(34) = 1 v2(35) = 1 v2(36) = 2 v2(37) = 2 v2(38) = 2 v2(39) = 2

Trang 17

v2(40) = 2

v2(41) = 2

v2(42) = 2

v2(43) = 2

v2(44) = 2

v2(45) = 2

v2(46) = 2

v2(47) = 2

Dim kt As Single, kq As Single, heso3 As Single, hieusuat As Single, hieusuattrunggian As Single, ktcantim As Single, kqcantim As Single, i As Single, j As Single, k As Integer, h As Integer, a As Single, b As Single, c As Single, d As Single, kttrunggian As Single

heso3 = (vongquay / 60) ^ 2 * lucday / (1.025 * (vantoc * 0.5144) ^ 4)

For i = 0.5 To 1.4 Step 0.01

For j = 0.1 To 1.5 Step 0.01

For k = 1 To 39

kt = kt + c1(k) * (j) ^ s1(k) * (i) ^ t1(k) * tysodia ^ u1(k) * socanh ^ v1(k)

Next k

For h = 1 To 47

kq = kq + c2(h) * (j) ^ s2(h) * (i) ^ t2(h) * tysodia ^ u2(h) * socanh ^ v2(h)

Next h

hieusuattrunggian = (kt * j) / (kq * 2 * 3.14159265358979)

a = Round(Abs(Round(kt / j ^ 4, 2) - Round(heso3, 2)), 2)

If kt > 0 And kq > 0 Then

If a = 0 Then

If hieusuattrunggian >= hieusuat Then

hieusuat = hieusuattrunggian

ktcantim = kt

kqcantim = kq

Trang 18

c = j

d = i

End If

End If

End If

kt = 0

kq = 0

hieusuattrunggian = 0

Next j

Next i

Text6 = c

Text7 = d

Text8 = hieusuat

Text9 = 0.97 * vantoc * 0.5144 / (vongquay / 60 * c)

End Sub

Ngày đăng: 10/05/2024, 10:14

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w