Вы находитесь на странице: 1из 10

g𝑚
𝑣 (𝑡 ) =
𝑐
(1 − 𝑒 −(𝑐⁄𝑚)𝑡 ),
𝑚
g ≈ 9.81 𝑠2
𝑚 𝑐

𝑐
𝑣(𝑡𝑖+1 ) = 𝑣(𝑡𝑖+1 ) + [𝑔 − 𝑣(𝑡𝑖 )] (𝑡𝑖+1 − 𝑡𝑖 ),
𝑚

(𝑡𝑖+1 − 𝑡𝑖 )

𝑑𝑣 𝑐
=𝑔− 𝑣.
𝑑𝑡 𝑚
𝑡 =2𝑠

𝑡
𝑡𝑚𝑎𝑥 = 12 𝑠

𝑡𝑖+1

𝑡𝑖 )
Option Explicit

Function Euler(dt, ti, tf, yi, m, cd)


Dim h As Double, t As Double, y As Double, dydt As Double
t = ti
y = yi
h = dt
Do
If t + dt > tf Then
h = tf - t
End If
dydt = dy(t, y, m, cd)
y = y + dydt * h
t = t + h
If t >= tf Then Exit Do
Loop
Euler = y
End Function

• Function

Euler = y,
End Function.
• As Double

• Do Loop
t = ti t = t + h h = dt)
If t >= tf
• Euler dy(t, y,
m, cd)
Function dy(t, v, m, cd)
Const g As Double = 9.81
dy = g - (cd / m) * v
End Function

𝑖=1

• Function Euler

19.620 m/s
𝑡𝑚𝑎𝑥 = 16 𝑠



𝑡𝑚𝑎𝑥 = 16 𝑠
𝑡 = 0 𝑠, 𝑡 = 0.5 𝑠, … , 𝑡 = 16 𝑠