Simulating relativity in a velocity verlet algorithm

In summary, the conversation is about a person trying to create a turn-based computer game that simulates space combat at relativistic speeds. They are seeking help with implementing a limit on the speed of the ships in the game. One person suggests using the velocity verlet algorithm with a relativistic factor for acceleration, but another person points out that this may not work due to the assumption of independent acceleration in the algorithm. They also discuss the effects of gravity on objects at different velocities and distances from a star.
  • #1
cephron
124
0
(Skip to the * mark if you would like to see my question without the background)

Hi,

I'm trying to write a turn-based computer game which simulates space combat at relativistic speeds, but I'm a beginner at programming and I don't know much physics beyond the high school level. The game consists of spacecraft flying through a 30 lightyear-by-30 lightyear 2-dimensional space roughly reminiscent of the Local Cloud, trying to destroy their opponents while dealing with the lightspeed delay and a realistic simulation of the ship's inertia and the gravity of nearby stars.

*
My current inertia-and-gravity simulation is based on the velocity verlet algorithm ( http://en.wikipedia.org/wiki/Velocity_Verlet#Velocity_Verlet ), which is purely Newtonian. Obviously, this won't do, because this puts no limit on the speeds ships can attain.
I think converting the whole simulation to general relativity would be completely above my head. I'm wanting to know if there's any simple or medium-difficulty way of simulating a lightspeed limit of the velocity of the ships - without losing kinetic/potential energy - that can be integrated into the velocity verlet algorithm.

Any help would be most welcome!

(If this is outright impossible for some obvious reason, I apologize for the blatant ignorance!)

cephron
 
Physics news on Phys.org
  • #2
Ok, here's what I'm thinking of doing, so far. It seems like an obvious solution, but I'm unsure of its accuracy.

Whenever I'm calculating the acceleration of the particle for the next timestep, I'll use the base mass multiplied by the relativistic factor of change ( 1 / sqrt(1 - v^2/c^2) ).

This would end up leaving acceleration due to stars' gravity unchanged, since the mass term cancels from the equation, but it would greatly diminish the acceleration of the drive when the ship is at high velocities. One of my main concerns with this is that, if a ship was accelerating towards a star, it's drive might bring it to 0.99c and the star's gravity - with the relativistically increased mass cancelling out - might push it over the edge.

Would this accomplish the goal? Or would it be screwed up because I'm not also including the time dilation and lorentz transformation? Or perhaps I need to include the relativistic factor in the acceleration due to star gravity, somehow?

Thanks in advance for any input.
 
Last edited:
  • #3
Since my broad questions don't seem to interest people (which is fine, lol), I'll try to break it down into simpler questions:

1)
RelativeGravity.jpg

Using the above figure as a reference (the units are only meant to be guides, change them if it becomes more convenient), what kind of acceleration due to gravity according to the star's reference frame would one expect on the 1kg-object in the case where:
a) The object is at rest or traveling at low velocity?
b) The object is traveling at .99c perpendicular to the source of the gravity?
c) The object is traveling at .99c towards the source of gravity?
Main point being, would they be different?

2)
What sort of time would it take for an object in the edge of the solar system (say, in the near edge of the kuiper belt) to fall into the sun, if it starts out at rest relative to the sun? Years, decades? A century? How about if it started a light year from the sun?
 
  • #4
Ther'es an equation on p. 34 of http://www.worldscibooks.com/etextbook/6833/6833_02.pdf" that might help you.
 
Last edited by a moderator:
  • #5
You won't get the right answer by plugging in relativistic mass. In fact, I doubt very much that this algorithm will work at all - the expansion assumes a is independent of v, right? Sorry.
 

FAQ: Simulating relativity in a velocity verlet algorithm

What is a velocity Verlet algorithm?

A velocity Verlet algorithm is a numerical method used to simulate the motion of particles in a physical system. It is commonly used in molecular dynamics simulations and is based on the laws of classical mechanics.

How does a velocity Verlet algorithm simulate relativity?

A velocity Verlet algorithm does not directly simulate relativity. However, it can be used to simulate the motion of particles at high velocities, which can exhibit relativistic effects such as time dilation and length contraction.

What are the advantages of using a velocity Verlet algorithm for simulating relativity?

One advantage of using a velocity Verlet algorithm is its simplicity and efficiency. It is a second-order algorithm, meaning it has a higher accuracy compared to other numerical methods. It also conserves energy and momentum, making it a reliable choice for long-term simulations.

Are there any limitations to simulating relativity with a velocity Verlet algorithm?

Yes, there are limitations to using a velocity Verlet algorithm for simulating relativity. This method is based on classical mechanics and does not take into account the effects of quantum mechanics. It also cannot accurately simulate extreme relativistic effects, such as black holes or the speed of light.

How can the accuracy of a velocity Verlet algorithm be improved for simulating relativity?

To improve the accuracy of a velocity Verlet algorithm for simulating relativity, one can incorporate special relativity corrections into the equations of motion. This can be done by using a relativistic version of the algorithm, such as the velocity Verlet with relativistic corrections (VVRC) method.

Similar threads

Replies
12
Views
2K
Replies
3
Views
2K
Replies
19
Views
3K
Replies
7
Views
1K
Replies
8
Views
3K
Replies
84
Views
6K
Replies
9
Views
4K
Replies
4
Views
3K
Back
Top