Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
Intro Physics Homework Help
Advanced Physics Homework Help
Precalculus Homework Help
Calculus Homework Help
Bio/Chem Homework Help
Engineering Homework Help
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
Intro Physics Homework Help
Advanced Physics Homework Help
Precalculus Homework Help
Calculus Homework Help
Bio/Chem Homework Help
Engineering Homework Help
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Homework Help
Advanced Physics Homework Help
Numerical integration of a magnetic spin vector in a magnetic field
Reply to thread
Message
[QUOTE="chaiyar, post: 4478935, member: 310826"] [h2]Homework Statement [/h2] Hi there, thanks in advance for any help! I have a first order DE: [tex] \frac{\partial \vec{m}}{\partial t} = -\vec{m} \times \vec{h}_{eff} + \alpha \vec{m} \times \frac{\partial \vec{m}}{\partial t}[/tex] (a scaled Landau-Lifshitz-Gilbert equation) where m is a magnetism vector, alpha is a damping factor and h is an effective uniform magnetic field. I'm trying to numerically integrate it with the Euler method to get a precession of the spin vector around the h vector. So far I've integrated the first term but the second, damping term I can't see how to translate into code.. (in C++) So essentially what I've done is assumed the magnetic field to be aligned in the z-direction, and written [CODE]for(i=1 ; i<=tmax ; i++) { mx = mx + h * -my; my = my + h * mx; t = t + h;[/CODE] for the first term, where mx is the x-component of the m vector etc. and h is the timestep, and I need to add the damping term onto the end. Considering the x-component first, presumably the derivative in the damping term has to be put down as m_x as well, but what direction is the other m vector to be taken in? Sorry if that's not very well asked, but thanks a lot for any help! [/QUOTE]
Insert quotes…
Post reply
Forums
Homework Help
Advanced Physics Homework Help
Numerical integration of a magnetic spin vector in a magnetic field
Back
Top