amuse icon indicating copy to clipboard operation
amuse copied to clipboard

Eggleton IMF in amuse ?

Open teuben opened this issue 9 months ago • 7 comments

One of my users in NEMO was noticing that in Aarseth's NBODY4 code a possibly minor typo slipped in, as explained in their PR:

https://github.com/teuben/nemo/pull/181

I don't have access to the quoted book, but in section 1.6 Eggletons IMF (is this used anywhere in AMUSE?) is 0.3 (u / (1-u))**0.5 instead of 0.3 u / (1-u)**0.5 used in Sverre's code.

Any opinions on this?

teuben avatar Apr 14 '25 23:04 teuben

I don’t think this formula is used in AMUSE, but this looks like a very easy mistake to make when coding an expression.

Stephen L. W. McMillan Emeritus Professor of Physics, Drexel University

stevemcmillan avatar Apr 15 '25 03:04 stevemcmillan

For me it's still between Sverre and Peter.... so we need another reference where Peter published this perhaps?

Not knowing how many have used this IMF in nbody4, another option could be to allow both by extending Sverre's KZ(20), so it's "backwards" compatible.

teuben avatar Apr 15 '25 03:04 teuben

There were only 20 in NBODY4? I think by NBODY5 it went up to 50. But I’m not sure that adding an option to support an incorrect formula is a great idea.

Stephen L. W. McMillan Emeritus Professor of Physics, Drexel University

stevemcmillan avatar Apr 15 '25 03:04 stevemcmillan

my version of nbody4 (which is from Sverre's website) counts to KZ(40).

I also just noted sverre was using ZM = 0.3D0*XX/(1.D0 - XX)**0.55, note the power 0.55, whereas 0.5 was claimed. I don't have the book and our library doesn't seem to have it.

teuben avatar Apr 15 '25 04:04 teuben

so probing the community again, i still am unclear if I should Eggleton's book or Aarseth's code. Given I don't have access to E's book, I'm leaving this open.

teuben avatar May 09 '25 20:05 teuben

Hi Peter, to add to the confusion - I looked up the 1989 Eggleton, Fitchet & Tout paper where I found this formula (Eq 5)

Image

(I hope the screenshot expands correctly : it's 0.2 mu / ( [ 1 -mu ]**0.75 + 0.032 [1 - mu ]**0.25 ) with mu : [0,1]. )

Could it be that the simplest thing is to plot the distributions and compare them with a Chabrier / Kroupa / Maschberger profiles ?

christianboily avatar Jun 14 '25 08:06 christianboily

Expanding on savchenkoyana's plot, here's a comparison of the three. This IMF is of course a whole cottage industry. But the plot suggests that although they all agree at the high end, the book misses the low mass end, and nbody4 and EFC (also called Scalo in nbody4 it seems) agree with each other.

Image

teuben avatar Jun 17 '25 13:06 teuben

my version of nbody4 (which is from Sverre's website) counts to KZ(40).

I also just noted sverre was using ZM = 0.3D0*XX/(1.D0 - XX)**0.55, note the power 0.55, whereas 0.5 was claimed. I don't have the book and our library doesn't seem to have it.

I checked the book, it says (1.17) $M_1 = 0.3 \left(\frac{X_1}{1-X_1}\right)^{0.55}$.

(edits to reproduce the representation of the equation more precisely)

rieder avatar Aug 25 '25 08:08 rieder

oh darn, the issue in NEMO was amended later with a screenshot of that formulae. So you both agree, no more confusion. We'll fix up Sverre's code in a backward compatible way, so the old mode gives the old wrong IMF.

So the proposal is to keep KZ(20)=3 returning the wrong IMF, and KZ(20)=33 would return the correct IMF.

teuben avatar Aug 25 '25 13:08 teuben

This seems to be resolved, and is off-topic anyway, so I'm closing it.

LourensVeen avatar Nov 25 '25 10:11 LourensVeen