Modeling forces in a sphere using a system of ODEs
2 次查看(过去 30 天)
显示 更早的评论
Hello,
I'd like to use matlab to model force interactions between 2 electrons in a helium atom. I'm familiar with ode45 but am having a little trouble because my spherical coordinates r,theta,phi need to be redefined every iteration.
I have a starting velocity and position r,theta,phi for each particle and equations of the forces between the nucleus and each electron which should guide the movement. But, I am not sure how to introduce a position vector into an ode and have it change each time step to represent the result of the forces.
Here would be my input:
pos1=[r,theta,phi] % Starting values
velocity= some value
Particle 1 eq:
prt1eq=-k*2*e^2/me*(pos1)^2+k*e^2/me*(pos1-pos2)^2;
Particle 2 eq:
prt2eq=-k*2*e^2/me*(pos2)^2+k*e^2/me*(pos2-pos1)^2;
The equations are coupled. I'd like to do many iterations to map out the force values and corresponding positions.
Can someone point me in the right direction?
Thanks
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Numerical Integration and Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!