Plotting the Hamiltonian for this sytem

Mq ′′ = f(q), where f(q) = −∇U(q)
Here q are generalized positions of atoms, M is a constant, diagonal, positive mass matrix and U(q) is a scalar potential function. Also, ∇U(q) = ( ∂U ∂q1 , . . . , ∂U ∂qm ) T
q = q(t) is scalar, U(q) = D(1−e −S(q−q0) ) 2 , and we use the constants D = 90.5∗.4814e−3, S = 1.814, q0 = 1.41 and M = 0.9953.
Mq ′ = p
p ′ = f(q)
How do i plot the Hamiltonian for this system ?
H(q, p) = p T(M inverse)p/2 + U(q)
(H(𝑞(𝑡), 𝑝(𝑡)) − 𝐻(𝑞(0), 𝑝(0)) with 𝑁 = 1000, 𝑎𝑛𝑑 2000

Respuestas (0)

Categorías

Más información sobre Line Plots en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 30 de Sept. de 2020

Editada:

el 30 de Sept. de 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by