Global Errors when solving the Equation of Motion

In summary, The speaker is implementing a code using the 4-step Adams-Bashforth method to solve an equation of motion. They share a section of their code and mention that it produces results that are similar to the Euler forwards method. The speaker wonders why the global error does not follow the expected pattern and questions if there is a mistake in their code. Another person suggests that the issue may be due to the updating order of variables in the code and provides a suggestion for fixing it.
  • #1
RH10
6
0
Hi All,
I’m implementing a code to solve the equation of motion using the 4-step Adams-Bashforth method.
Here’s my section of code that does this:

a=F/m;

upnew= up + delta *( (55/24)*a - (59/24)*am1 +(37/24)*am2 - (3/8)*am3 );
xnew=x + delta *( (55/24)*up - (59/24)*upm1 +(37/24)*upm2 - (3/8)*upm3);

am1=a;
am2=am1;
am3=am2;
upm1=up;
upm2=upm1;
upm3=upm2;

up=upnew;
x=xnew;

It seems to work; at least it produces sensible results which agree with the Euler forwards method. However, I read that the global error should be proportional to delta^4, but this code produces results that have errors proportional to delta. Why is this? Is there some quirk of using the method as a double integral reduces the accuracy? Or am I getting something wrong?

Thanks in advance,
 
Last edited:
Physics news on Phys.org
  • #2
RH10 said:
am1=a;
am2=am1;
am3=am2;
Assuming your programming language executes statements sequentially. that sets am1 = a, then am2 = a, then am3 = a. You are getting similar results to the Euler forwards method because your code is just a complicated way of doing the Euler forwards method!

The fix is to update things in the right order.
am3=am2;
am2=am1;
am1=a;
and similarly for the u's
 

What are global errors when solving the Equation of Motion?

Global errors when solving the Equation of Motion refer to inaccuracies or discrepancies that occur when using numerical methods to solve complex equations. These errors can accumulate and affect the overall accuracy of the solution.

What causes global errors when solving the Equation of Motion?

Global errors can be caused by a variety of factors such as rounding errors, truncation errors, and numerical instability. These errors can occur during the process of converting continuous equations into discrete equations for numerical solutions.

How do global errors affect the accuracy of the solution?

Global errors can significantly impact the accuracy of the solution, especially when they accumulate over multiple iterations. These errors can lead to deviations from the expected results and affect the overall reliability of the solution.

How can global errors be minimized when solving the Equation of Motion?

To minimize global errors, it is essential to use numerical methods that are more accurate and have smaller truncation errors. Additionally, using smaller time steps and increasing the number of iterations can also help reduce global errors.

What are some common techniques for reducing global errors in the Equation of Motion?

Some common techniques for reducing global errors in the Equation of Motion include using higher-order numerical methods, implementing adaptive time stepping, and incorporating error control methods. It is also crucial to carefully select the appropriate numerical method based on the characteristics of the equation being solved.

Similar threads

  • Programming and Computer Science
Replies
4
Views
588
Replies
14
Views
1K
  • Beyond the Standard Models
Replies
0
Views
989
  • General Math
Replies
11
Views
1K
  • Advanced Physics Homework Help
Replies
3
Views
2K
  • Differential Equations
Replies
1
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
1K
  • Classical Physics
Replies
8
Views
2K
  • Differential Equations
Replies
4
Views
9K
  • Differential Equations
Replies
1
Views
7K
Back
Top