Internal G=1 unit conversion/systems for simulation timestepping

AI Thread Summary
The discussion revolves around determining the correct timestep for an N-body simulation using an internal gravitational constant of G = 1. The user initially struggles with conflicting units of mass, length, and velocity, specifically with a mass of 2.3e9 solar masses and a velocity of 100 km/s. After clarification, it is established that the mass unit must be corrected, and the relationship between units shows that the time unit can be derived from the given parameters. Ultimately, the correct timestep is calculated to be approximately 9.78 million years based on the specified units. The conversation highlights the importance of consistency in unit conversions when simulating gravitational interactions.
mdemone
Messages
5
Reaction score
0
Hey everyone,

I'm knocking my head against something and for some reason I can't get it to work out -- I'm running an N-body simulation which uses an internal gravitational constant of 1, meaning that the timestep used is a function of the units of mass, length, and velocity.

But I don't know the relation that allows me to solve for the timestep, e.g. if I am working in a system of unit mass M = 2.3e9 M_sol = 4.6e39 kg, and unit length L = 1 kpc, and unit velocity V = 100 km/s, what is my unit of time for G = 1?

Can anybody help me out real quick? This is a very *duh* moment for me...
 
Last edited:
Space news on Phys.org
mdemone said:
Hey everyone,

I'm knocking my head against something and for some reason I can't get it to work out -- I'm running an N-body simulation which uses an internal gravitational constant of 1, meaning that the timestep used is a function of the units of mass, length, and velocity.

But I don't know the relation that allows me to solve for the timestep, e.g. if I am working in a system of unit mass M = 2.3e9 M_sol = 4.6e33 kg, and unit length L = 1 kpc, and unit velocity V = 100 km/s, what is my unit of time for G = 1?

Can anybody help me out real quick? This is a very *duh* moment for me...

It looks to me as if you have two contradictory solutions.
On the one hand, if you have a mass unit and a length unit, then setting G = 1 will immediately determine a time unit!

but on the other hand, if you have a length unit and a speed unit THIS will automatically determine a time unit. The two time units will be in conflct.

To make it worse, If you ignore your length unit, then your speed unit together with mass and G = 1 will determine a time unit. And this will not agree with the other two.

=============
first of all, check that you have your mass unit right.

You claim that 2.3E9 solar masses = 4.6 E33 kilogram
but I think you are off by 6 orders of magnitude.
==============
once you have your mass unit correct, multiply it by G and you will get
3.05257453 E20 m^3 / s^2

THIS MUST EQUAL ONE IN YOUR UNITS

but you have declared that the speed of E5 meter/second also equals one!

therefore you can divide the above expression by the square of that speed and get

3.05257... E10 meters this must also equal one in your units, to be consistent

If you divide this length unit by the speed unit of E5 meter/second, you will get the time unit.

In other words your time unit must equal 3.05...E5 seconds
this is about 1/100 of a year.
=======================

now this is just as I understand what you are saying. Maybe I don't understand what you are doing.
But you said you want your mass unit to be that huge mass M
and you want your speed unit to be E5 m/s
As I understand units, if you then say that G = 1 you have no more choice.
You length and time units are then locked in.
 
Last edited:
I should have better said: my set units are velocity and length (100 km/s and 1 kpc, respectively), as drawn from Widrow et al. 2003's disk/bulge/halo models for M31 (see note A on pg.22 here). The authors state that setting G=1 implies a mass unit of 2.3e9 M_sol (though there is an unfortunate typo in that number's exponent).

So how did they come to that conclusion and what was the timestep that must have been used?

Also, my solar mass-in-kilograms reference was wrong (how terrible!), although the one right next to it in grams was correct (it is of course 2e30 kg = 2e33 g). Thanks for pointing that out.

Edit: You added more while I was posting. Let me fiddle with it and see what I get...
 
Last edited:
So obviously if Widrow et al. have V = 100 km/s and L = 1 kpc, then the time unit is T = 3.09e19/1e5 = 3.09e14 seconds = 9.78 Myr.

Then that gives us GM/V^2 = (6.67e-11 * 4.6e39) / (1e5)^2 = 3e19 meters =1 kpc, if we are given our mass unit first, and rearranging solves for the mass unit if necessary.

Okay, excellent. I gotcha now...thanks for the pointer! I hate it when I can't do something I feel is so simple, then I just get frustrated and it makes the mental block worse.

marcus said:
It looks to me as if you have two contradictory solutions.
But you said you want your mass unit to be that huge mass M
and you want your speed unit to be E5 m/s
As I understand units, if you then say that G = 1 you have no more choice.
You length and time units are then locked in.

Of course they are. I just wasn't thinking. This is what happens when I'm doing unit conversion on a Saturday night!
 
Last edited:
Good! I am glad it is straightened out.
 
https://en.wikipedia.org/wiki/Recombination_(cosmology) Was a matter density right after the decoupling low enough to consider the vacuum as the actual vacuum, and not the medium through which the light propagates with the speed lower than ##({\epsilon_0\mu_0})^{-1/2}##? I'm asking this in context of the calculation of the observable universe radius, where the time integral of the inverse of the scale factor is multiplied by the constant speed of light ##c##.
Why was the Hubble constant assumed to be decreasing and slowing down (decelerating) the expansion rate of the Universe, while at the same time Dark Energy is presumably accelerating the expansion? And to thicken the plot. recent news from NASA indicates that the Hubble constant is now increasing. Can you clarify this enigma? Also., if the Hubble constant eventually decreases, why is there a lower limit to its value?
Back
Top