Excel - help with eulers method on coupled equations

Click For Summary
SUMMARY

The discussion focuses on implementing Euler's method in Excel for simulating a magnetic moment in a magnetic field, specifically using the coupled equations m'-x=B*m-y and m'-y=-B*m-x. The user is experiencing issues with the output, which only produces half a sine wave instead of the expected full cycle. The equations are confirmed to be correct, but the user suspects that the problem lies within the Excel formulas, particularly regarding the period of oscillation, which may involve a missing factor of PI.

PREREQUISITES
  • Understanding of Euler's method for numerical integration
  • Familiarity with coupled differential equations
  • Basic knowledge of magnetic moments and fields
  • Proficiency in using Excel for data simulation and plotting
NEXT STEPS
  • Research "Euler's method implementation in Excel" for step-by-step guidance
  • Investigate "coupled differential equations in physics" for deeper understanding
  • Explore "Excel plotting techniques for sine waves" to improve visualization
  • Learn about "periodicity in oscillatory systems" to clarify the role of PI
USEFUL FOR

Physics students, data analysts, and anyone involved in simulations of dynamic systems, particularly those working with magnetic fields and numerical methods in Excel.

ragga puffin
Messages
1
Reaction score
0
im doing a simulation on a magnetic moment in a magnetic field B and I am quite stuck.

its a set of coupled equations: m'-x=B*m-y & m'-y= - B*m-x
where m-x is the x component, ' is rate of with respect to time etc.
the vector should be precessing in a circle with frequency w= - B, B is set to one so it should make one rotation in one second -> full cycle -> full sine wave, but i seem to only be getting about half a sine wave :confused:

the cosine term in the m'-y formula can be neglected, as can the m'-z and m-z columns because the starting point is M'= M X B (the cross product of the moment and the magnetic field) and B is defined as being in the z direction.

im pretty sure the equations are right and the problem lies in my formulae in excel, any help will be greatly appreciated:!)
 

Attachments

Physics news on Phys.org
I filled the data for mx down past 1.5 seconds and plotted it, and it looks reasonable except for the expected period that you mention. How did you derive that the period should be 1? Is there maybe a factor of PI missing? It looks like the period is actually closer to PI...
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
4
Views
4K
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
3
Views
1K