Simulating relativity in a velocity verlet algorithm

Click For Summary
The discussion revolves around simulating space combat at relativistic speeds using a velocity Verlet algorithm, which is currently Newtonian and lacks a lightspeed limit. The user seeks a method to incorporate relativistic effects without fully converting to general relativity, specifically by adjusting the acceleration calculations with a relativistic mass factor. Concerns are raised about whether this adjustment would accurately reflect the effects of gravity from nearby stars and if it would lead to unrealistic scenarios, such as exceeding lightspeed. Additionally, the user poses questions about the expected gravitational acceleration on an object moving at relativistic speeds and the time it would take for an object to fall into the sun from various distances. The conversation highlights the complexities of integrating relativistic physics into game mechanics while maintaining realism.
cephron
Messages
123
Reaction score
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
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:
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?
 
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:
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.
 
MOVING CLOCKS In this section, we show that clocks moving at high speeds run slowly. We construct a clock, called a light clock, using a stick of proper lenght ##L_0##, and two mirrors. The two mirrors face each other, and a pulse of light bounces back and forth betweem them. Each time the light pulse strikes one of the mirrors, say the lower mirror, the clock is said to tick. Between successive ticks the light pulse travels a distance ##2L_0## in the proper reference of frame of the clock...

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 8 ·
Replies
8
Views
919
  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 84 ·
3
Replies
84
Views
7K
  • · Replies 9 ·
Replies
9
Views
4K