Escolar Documentos
Profissional Documentos
Cultura Documentos
RIO DE JANEIRO
INSTITUTO POLITÉCNICO
GRADUAÇÃO EM ENGENHARIA
MECÂNICA
Nova Friburgo
2021
UNIVERSIDADE DO ESTADO DO
RIO DE JANEIRO
INSTITUTO POLITÉCNICO
GRADUAÇÃO EM ENGENHARIA
MECÂNICA
Grazione de Souza
Nova Friburgo
2021
RESUMO
INTRODUÇÃO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1 FUNDAMENTAÇÃO TEÓRICA . . . . . . . . . . . . . . . . . . . . . . . 6
1.1 Solução Analítica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1.1 Energia no Pêndulo Duplo . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1.2 Forças no Pêndulo Duplo . . . . . . . . . . . . . . . . . . . . . . . . . 8
2 SOLUÇÃO NUMÉRICA . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.1 Método de Runge-Kutta . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2 Simulação Numérica . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3 RESULTADOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
CONCLUSÕES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5
INTRODUÇÃO
Fonte:https://es.abcdef.wiki/wiki/Double
1 FUNDAMENTAÇÃO TEÓRICA
𝑥1 = 𝑙1 sin 𝜃1 (1)
𝑑𝑥1 𝑑𝜃1
= 𝑙1 cos 𝜃1 (5)
𝑑𝑡 𝑑𝑡
𝑑𝑦1 𝑑𝜃1
= 𝑙1 sin 𝜃1 (6)
𝑑𝑡 𝑑𝑡
)︂2
𝑑 2 𝑥1 𝑑2 𝜃1
(︂
𝑑𝜃1
= −𝑙1 sin 𝜃1 + 𝑙1 cos 𝜃1 (9)
𝑑𝑡2 𝑑𝑡 𝑑𝑡2
)︂2
𝑑2 𝑦 1 𝑑2 𝜃1
(︂
𝑑𝜃1
= 𝑙1 cos 𝜃1 + 𝑙1 sin 𝜃1 (10)
𝑑𝑡2 𝑑𝑡 𝑑𝑡2
)︂2
𝑑 2 𝑥2 𝑑2 𝑥1 𝑑2 𝜃2
(︂
𝑑𝜃2
= + 𝑙2 sin 𝜃2 + 𝑙2 cos 𝜃2 (11)
𝑑𝑡2 𝑑𝑡2 𝑑𝑡 𝑑𝑡2
)︂2
𝑑2 𝑦 2 𝑑2 𝑦 1 𝑑2 𝜃2
(︂
𝑑𝜃2
= + 𝑙2 cos 𝜃2 + 𝑙2 sin 𝜃2 (12)
𝑑𝑡2 𝑑𝑡2 𝑑𝑡 𝑑𝑡2
1 1
𝐶 = 𝑚1 (𝑣1 )2 + 𝑚2 (𝑣2 )2 (15)
2 2
Logo:
(16)
E a energia total é dada pela soma das energias cinética e potencial gravitaci-
onal:
𝐸𝑡𝑜𝑡 = 𝐶 + 𝑃 (17)
𝑑𝑥21
𝐹1 = 𝑚1 = −𝑇1 sin 𝜃1 + 𝑇2 sin 𝜃2 (18)
𝑑𝑡2
Do somatório das forças atuantes na massa m1 na coordenada y, tem-se:
𝑑𝑦12
𝐹1 = 𝑚1 = −𝑇1 cos 𝜃1 − 𝑚1 𝑔 − 𝑇2 cos 𝜃2 (19)
𝑑𝑡2
9
𝑑𝑥22
𝐹2 = 𝑚2 2 = −𝑇2 sin 𝜃2 (20)
𝑑𝑡
Do somatório das forças atuantes na massa m2 na coordenada y, tem-se:
𝑑𝑦22
𝐹2 = 𝑚2 = 𝑇2 cos 𝜃2 − 𝑚2 𝑔 (21)
𝑑𝑡2
Conforme desenvolvido na prosposta do trabalho 1, a partir das Equações (18),
(19),(20) e (21), algumas manipulações algébricas são realizadas de modo a se obter
expressões para a aceleração das massas m1 e m2 em termos de suas respectivas
posição e velocidade. São estas equações:
)︂2
𝑑2 𝜃1
(︂ )︂ (︂ 2 )︂ (︂
𝑑 𝜃2 𝑑𝜃2
(𝑚1 +𝑚2 )𝑙1 +𝑚2 𝑙2 cos(𝜃1 −𝜃2 )+𝑚2 𝑙2 sin(𝜃1 −𝜃2 )+𝑔(𝑚1 +𝑚2 ) sin 𝜃1 = 0
𝑑𝑡 𝑑𝑡2 𝑑𝑡
(22)
)︂2
𝑑2 𝜃2
(︂ )︂ (︂ 2 )︂ (︂
𝑑 𝜃1 𝑑𝜃1
𝑚2 𝑙2 +𝑚2 𝑙1 cos(𝜃1 −𝜃2 )−𝑚2 𝑙1 sin(𝜃1 −𝜃2 )+𝑚2 𝑔 sin 𝜃2 = 0 (23)
𝑑𝑡2 𝑑𝑡2 𝑑𝑡
10
2 SOLUÇÃO NUMÉRICA
𝑑2 𝜃1 𝑒𝑑 − 𝑏𝑓
2
= (24)
𝑑𝑡 𝑎𝑑 − 𝑐𝑏
𝑑2 𝜃2 𝑎𝑓 − 𝑐𝑒
= (25)
𝑑𝑡2 𝑎𝑑 − 𝑐𝑏
Onde:
𝑏 = 𝑚2 𝑙2 cos(𝜃1 − 𝜃2 ) (27)
𝑐 = 𝑚2 𝑙1 cos(𝜃1 − 𝜃2 ) (28)
𝑐 = 𝑚2 𝑙1 cos(𝜃1 − 𝜃2 ) (29)
𝑑 = 𝑚2 𝑙2 (30)
(︂ )︂2
𝑑𝜃2
𝑒 = −𝑚2 𝑙2 sin(𝜃1 − 𝜃2 ) − 𝑔(𝑚1 − 𝑚2 ) sin 𝜃1 (31)
𝑑𝑡
(︂ )︂2
𝑑𝜃1
𝑓 = 𝑚2 𝑙1 sin(𝜃1 − 𝜃2 ) − 𝑔(𝑚2 ) sin 𝜃1 (32)
𝑑𝑡
𝑑𝜃1
= 𝑤1 (33)
𝑑𝑡
𝑑𝜃2
= 𝑤2 (34)
𝑑𝑡
Com isso, as Equações (25) e (26), podem ser reescritas como:
𝑑𝑤1 𝑒𝑑 − 𝑏𝑓
= (35)
𝑑𝑡 𝑎𝑑 − 𝑐𝑏
𝑑𝑤2 𝑎𝑓 − 𝑐𝑒
= (36)
𝑑𝑡 𝑎𝑑 − 𝑐𝑏
[︂ ]︂
1
𝑦𝑖+1 = 𝑦1 + (𝑘1 + 3𝑘2 + 3𝑘3 + 𝑘4 ) ∆𝑡 (37)
8
12
Onde:
𝑘1 = 𝑓 (𝑡𝑖 , 𝑦𝑖 ) (38)
1 1
𝑘2 = 𝑓 (𝑡𝑖 + ∆𝑡, 𝑦𝑖 + 𝑘1 ∆𝑡) (39)
3 3
2 1
𝑘3 = 𝑓 (𝑡𝑖 + ∆𝑡, 𝑦𝑖 − 𝑘1 ∆𝑡 + 𝑘2 ∆𝑡) (40)
3 3
Simulação 2
l1=l2= 1m
m1= 2kg, m2= 1kg
𝜃1 = 𝜃2 = 60𝑔𝑟𝑎𝑢𝑠
𝑤1 = 𝑤2 = 0𝑟𝑎𝑑/𝑠
Simulação 3
l1=l2= 1m
m1= m2= 1kg
𝜃1 = 𝜃2 = 90𝑔𝑟𝑎𝑢𝑠
13
𝑤1 = 0𝑟𝑎𝑑/𝑠𝑤2 = 5.0𝑟𝑎𝑑/𝑠
Simulação 4
l1= 1m, l2= 2m
m1= m2= 1kg
𝜃1 = 𝜃2 = 60𝑔𝑟𝑎𝑢𝑠
𝑤1 = 𝑤2 = 0𝑟𝑎𝑑/𝑠
Simulação 5
l1= 1m, l2= 2m
m1= m2= 1kg
𝜃1 = 180𝑔𝑟𝑎𝑢𝑠, 𝜃2 = 160𝑔𝑟𝑎𝑢𝑠
𝑤1 = 𝑤2 = 0𝑟𝑎𝑑/𝑠
3 RESULTADOS
CONCLUSÕES
Código
# Importando as bibliotecas
def main():
# Parâmetros Físicos
g = 9.8
L1 = 1
L2 = 1
m1 = 1
m2 = 1
t0 = 0
t_max = 50
passos = 5000
# Condições iniciais
theta1 = 30
theta2 = 0
w1 = 0
w2 = 0
tarefa = "Exemplo"
# Executa simulação
tempo = np.linspace(*tempos)
E = [energia_total(parametros_fisicos, y)]
y = [np.array(y)]
for t in tempo[1:]:
E.append(energia_total(parametros_fisicos, y[-1]))
# Gera os gráficos
k1 = f(parametros_fisicos, t, y)
k2 = f(parametros_fisicos, t + 1 / 3 * delta_t, y + 1 / 3 * k1 * delta_t)
k3 = f(
parametros_fisicos,
t + 2 / 3 * delta_t,
y - 1 / 3 * k1 * delta_t + k2 * delta_t,
)
k4 = f(
parametros_fisicos,
t + delta_t,
y + k1 * delta_t - k2 * delta_t + k3 * delta_t,
)
y_novo = y + (1 / 8 * (k1 + 3 * k2 + 3 * k3 + k4)) * delta_t
return y_novo
a = (m1 + m2) * L1
b = m2 * L2 * np.cos(theta1 - theta2)
c = m2 * L1 * np.cos(theta1 - theta2)
d = m2 * L2
e = -m2 * L2 * theta2 ** 2 * np.sin(theta1 - theta2) - g * (
m1 + m2
) * np.sin(theta1)
f = m2 * L1 * theta1 ** 2 * np.sin(theta1 - theta2) - m2 * g * np.sin(
theta2
)
dtheta1 = w1
dtheta2 = w2
dw1 = (e * d - b * f) / (a * d - c * b)
dw2 = (a * f - c * e) / (a * d - c * b)
y = np.array([dtheta1, dtheta2, dw1, dw2])
return y
C = 1 / 2 * m1 * (L1 ** 2) * (theta1 ** 2) + 1 / 2 * m2 * (
(L1 ** 2) * (theta1 ** 2)
+ (L2 ** 2) * (theta2 ** 2)
+ 2 * L1 * L2 * w1 * w2 * np.cos(theta1 - theta2)
)
E=P+C
return E
x1 = L1 * np.sin(theta1)
y1 = -L1 * np.cos(theta1)
x2 = x1 + L2 * np.sin(theta2)
y2 = y1 - L2 * np.cos(theta2)
dpi = 600
plt.figure(dpi=dpi)
plt.plot(tempo, theta1)
plt.title("\u03B8\u2081 em função do tempo")
plt.xlabel("Tempo")
plt.ylabel("\u03B8\u2081")
plt.axis((t0, t_max, -0.8, 0.8))
plt.savefig(
"\u03B8\u2081 em função do tempo.png",
bbox_inches="tight",
)
plt.figure(dpi=dpi)
plt.plot(tempo, theta2)
plt.title("\u03B8\u2082 em função do tempo")
plt.xlabel("Tempo")
plt.ylabel("\u03B8\u2082")
plt.axis((t0, t_max, -1, 1))
plt.savefig(
"\u03B8\u2082 em função do tempo.png",
bbox_inches="tight",
)
plt.figure(dpi=dpi)
plt.plot(theta1, w1)
plt.title("Espaço de fase")
plt.xlabel("\u03C9\u2081")
plt.ylabel("\u03B8\u2081")
plt.axis((-0.8, 0.8, -3, 3))
plt.savefig("Espaço de fase 1.png", bbox_inches="tight")
plt.figure(dpi=dpi)
plt.plot(theta2, w2)
plt.title("Espaço de fase")
plt.xlabel("\u03C9\u2082")
plt.ylabel("\u03B8\u2082")
plt.axis((-1, 1, -4, 4))
plt.savefig("Espaço de fase 2.png", bbox_inches="tight")
plt.figure(dpi=dpi)
plt.plot(tempo, E)
plt.title("Energia Total")
plt.xlabel("Tempo")
plt.ylabel("E")
plt.axis((t0, t_max, -60, 60))
plt.savefig("Energia Total.png", bbox_inches="tight")
# Roda o programa
if __name__ == "__main__":
main()
REFERÊNCIAS
[3] Mathematics Source Library – Runge-Kutta 3/8 Method. Disponível em Método Runge-Kutta 3/8
(mymathlib.com). Acesso em 11 de set. de 2021.