# Rigid rod moving in potential field

kirzoaktrt
Hi,

I'd like to write a program that "simulates" a rigid rod of length L moving in a potential field. The problem is in two dimensions. Friction is assumed to be negligible. The potential field and its gradient is known at every point of the two-dimensional domain.

The "mass" of the rod and the magnitude of the potential gradient can be arbitrarily set. The rod has uniform density.

I understand that the force acting upon a particle in a potential field is -∇P, where P is the potential. This is an attraction of the particle towards lower potentials. What is the force acting on the rod?

Since this is a computer simulation, time and space are discretized. The simulation would proceed in discrete timesteps Δt. How do I compute the position of the rod in each timestep? How would you generally approach this problem?

Your help is greatly appreciated.

## Answers and Replies

mikeph
How does the rod couple to the field?

For example, in an electric potential field, the units are V = J/C, i.e. energy per unit charge. What is the equivalent "charge" of the rod?

kirzoaktrt
The force is -∇P at every point in the two-dimensional domain, while

P=qψ.

In this context, P is the potential energy, which is known and ψ is the potential. q would be a constant, which could be the mass, charge or whatever. I can set it to be anything, but it is a real constant. I set Δt and q such that the problem can be handled numerically, but they don't have any significance besides this.

Answering your question, it does not matter whether you treat this as a gravity or electric problem. Units are unimportant.

dauto
All you need is to figure the total force and total torque acting on the rod. These would be given by integrals, but in your computer program they will be calculated as sums. Break down the rod into N parts and for each part calculate the force as if it was a particle. calculate the torque using the center of mass as pivot. Add all the forces to find the total force and add all the torques to find the total torque. Use those to figure out the acceleration and angular acceleration of the rod. use those to update one time step to find what's the updated values for angular velocity and velocity. Use those to update the position of the center of mass and orientation (angle) of the rod. Rinse and repeat.

kirzoaktrt
Thanks!

Two questions.

1, Without losing generality, can the rod be treated as two particles connected by a massless rod?
2, I assume that it does not matter whether I rotate or translate the rod first at each iteration, yes?

kirzoaktrt