Calculate Position in 3D Space with Force and Impulse

  • Context: Undergrad 
  • Thread starter Thread starter Dona123
  • Start date Start date
  • Tags Tags
    Calculation Position
Click For Summary
SUMMARY

This discussion focuses on calculating the position of a body in 3D space using force and impulse through numerical integration techniques. The trapezoidal method is highlighted as a key approach for updating velocities and positions iteratively. The algorithm involves calculating average acceleration and applying a predictor-corrector method to refine results, emphasizing the importance of small time steps for accuracy. The iterative process is essential for achieving convergence in position and velocity calculations.

PREREQUISITES
  • Understanding of Newton's laws of motion
  • Familiarity with numerical integration techniques
  • Knowledge of the trapezoidal rule for approximating integrals
  • Basic programming skills for implementing algorithms
NEXT STEPS
  • Research the implementation of the trapezoidal method in numerical simulations
  • Learn about predictor-corrector algorithms for improved accuracy in simulations
  • Explore advanced numerical integration techniques such as Runge-Kutta methods
  • Study the physics of forces and impulses in 3D motion
USEFUL FOR

Physics students, game developers, and engineers involved in simulation and modeling of motion in three-dimensional space.

Dona123
Messages
7
Reaction score
0
Hi,

I want to calculate a body x and y position at a particular z value in 3D space when applying particular force and impulse.

Appreciates all the help!

Tnx
Dona
 
Physics news on Phys.org
My objective is to draw the curvature path of the body in 3D space when applying a particular force and impulse!

Thanks
 
Assuming you can calculate accelerations, you'll need to do some form of numerical integration to calculate velocities and positions in small steps of time.

For each time step, you calculate

new_velocity = old_velocity + time_step x average_acceleration

One way to do this is to use trapezoidal method

average_accleration = 1/2 (acceleration0 + acceleration1)

where acceleration0 is the acceleration at the start of a time step and acceleration1 is the acceleration at the end of a time step. This requires you be able to calculate acceleration1 directly or to be able to predict it via an iterative method (see below)

You can then calculate position once you calculate the new velocity, using the same method:

new_position = old_position + time_step x 1/2 x (old_velocity + new_velocity)

An iterative corrector method will improve the results. In the algorithm shown below, an, vn, and pn, are successive "guesses" that should converge quickly. F(...) calculates the acceleration based on pn(t), and Δt is the elapsed time per step. You may want to do 6 to 8 interations instead of the 4 shown in this example. The first step is essentially Euler (since a1(t) is set = F(p0(t)) (= a(t-1)), the remaining steps are trapezoidal. Even though each step of this algorithm will converge to a specific set of values, the algorithm is based on trapezoidal rule, a linear approximation, so you need to use small time steps (Δt).

v0(t) = v(t-1)
p0(t) = p(t-1)

a1(t) = F(p0(t)) (= a(t-1))
v1(t) = v(t-1) + 1/2 (a(t-1) + a1(t)) Δt
p1(t) = p(t-1) + 1/2 (v(t-1) + v1(t)) Δt

a2 = F(p1(t))
v2(t) = v(t-1) + 1/2 (a(t-1) + a2(t)) Δt
p2(t) = p(t-1) + 1/2 (v(t-1) + v2(t)) Δt

a3 = F(p2(t))
v3(t) = v(t-1) + 1/2 (a(t-1) + a3(t)) Δt
p3(t) = p(t-1) + 1/2 (v(t-1) + v3(t)) Δt

a4 = F(p3(t))
v4(t) = v(t-1) + 1/2 (a(t-1) + a4(t)) Δt
p4(t) = p(t-1) + 1/2 (v(t-1) + v4(t)) Δt

...

v(t) = vn(t)
p(t) = pn(t)
a(t) = F(pn(t))

time += Δt
t += 1

This is a predictor-corrector type algorithm:

http://en.wikipedia.org/wiki/Predictor-corrector_method#Euler_trapezoidal_example
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 35 ·
2
Replies
35
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 5 ·
Replies
5
Views
3K