|
Elektronning elektr va magnit maydonlaridagi harakatini modellashtirishBog'liq elektronning-elektr-va-magnit-maydonlaridagi-harakatini-modellashtirish-12022
№4
28
k = 12600#: v0 = 1800000#: p0 = 0.000000005: a = 0.000000005: dt = 1E-16 kx =
1000000000000#: ky = 200000000000#
P1.Cls RTF.FileName = "Nuqta.rtf"
P1.Print "Nuqtaviy zaryad maydonidagi harakat"
P1.Print "Vo="; v0 / 1000000#; "(Mm/s)"
For j = 1 To 200:
P1.Circle (a * kx - 200, 900), j, QBColor(4): Next j
P1.Line (a * kx - 280, 900)-(a * kx - 120, 900), vbWhite
P1.Line (a * kx - 200, 820)-(a * kx - 200, 980), vbWhite For p = p0 To 2 * p0 Step p0 / 4
x = 0: y = p: vx = v0: vy = 0
31 r2 = (a - x) ^ 2 + y ^ 2: r = Sqr(r2)
fx = -k / r2 * (a - x) / r ‘kuch komponentalari
fy = -k / r2 * y / r
vx = vx + fx * dt ‘tezliklar vy = vy + fy * dt
x = x + vx * dt ‘koordinatalar
y = y + vy * dt
X1 = x * kx: Y1 = y * ky If X1 < 0 Then GoTo 32
If X1 > 7000 Then GoTo 32 If Y1 < 0 Then Go To 32
If Y1 > 5600 Then GoTo 32
P1.Circle (X1, Y1 * 1.7 + 800), 15, QBColor(3) ‘trayektoriyani chizish
For j = 1 To 1000000: Next j
P1.Circle (X1, Y1 * 1.7 + 800), 15, QBColor(8)
For j = 1 To 2000000: Next j GoTo
Next p
End Sub
Private Sub Command4_Click() ‘Bir jinsli sim maydonidagi harakat P1.Cls
a = 0.002: pi = 3.1415926: l = 0.005
R0 = -0.000000004
q = -1.6E-19: E0 = 0.00000000000885: m = 9E-31 t = 0: t1 = 0.00000000001
n = 10: k = 200000: k1 = k * 1
Cls: RTF.FileName = "Sim.rtf" P1.Print
P1.Print "Bir jinsli sim maydonidagi harakat"
For p = 0 To 0.012 Step 0.004
vx = 10000000#: vy = 0: x = -l: y = p
220 For j = 1 To 100: P1.Circle (500 + l * k, 1500 + a / 2 * k1), j, vbRed: Next j For i = 0
To n
r = Sqr(x * x + (a / 2 + y) * (a / 2 + y)) z = -R0 * q / (2 * pi * E0)
f = z / r
fx = f * x / r: fy = f * (a / 2 + y) / r wx = fx / m: wy = fy / m
vx = vx + wx * t1: vy = vy + wy * t1 x = x + vx * t1: y = y + vy * t1
t = t + t1 Next i
x9 = (x + l) * k: y9 = y * k1 + 2300 If x9 < 0 Then GoTo 490
If x9 > 7000 Then GoTo 490 If y9 < 0 Then GoTo 490
If y9 > 5600 Then GoTo 490 P1.Circle (x9, 1.1 * y9), 20, vbGreen GoTo 220
UIF-2022: 8.2
SCIENCE AND INNOVATION
ISSN: 2181-3337
INTERNATIONAL SCIENTIFIC JOURNAL
|
| |