Replies: 5 comments 10 replies
-
There are currently no MOND models implemented in import numpy
from galpy.potential import DissipativeForce, evaluateRforces, evaluatezforces, evaluatephitorques, _isNonAxi
from galpy.util import conversion
class MondForce(DissipativeForce.DissipativeForce):
def __init__(self,amp=1.,baryon_force=None,a0=0.612,ro=8.,vo=220.):
DissipativeForce.DissipativeForce.__init__(self,amp=amp,ro=ro,vo=vo)
self._a0= conversion.parse_force(a0,ro=ro,vo=vo)
self._baryon_force= baryon_force
self.isNonAxi= _isNonAxi(self._baryon_force)
def _calc_abar(self,R,z,t,phi):
return numpy.sqrt(evaluateRforces(self._baryon_force,R,z,t=t,phi=phi,use_physical=False)**2.
+evaluatephitorques(self._baryon_force,R,z,t=t,phi=phi,use_physical=False)**2./R**2.
+evaluatezforces(self._baryon_force,R,z,t=t,phi=phi,use_physical=False)**2.)
def _Rforce(self,R,z,t=0.,phi=0.,v=None):
abar= self._calc_abar(R,z,t,phi)
return 0.5*(abar+numpy.sqrt(abar**2.+4.*self._a0*abar))*evaluateRforces(self._baryon_force,R,z,t=t,phi=phi,use_physical=False)/abar
def _phitorque(self,R,z,t=0.,phi=0.,v=None):
abar= self._calc_abar(R,z,t,phi)
return 0.5*(abar+numpy.sqrt(abar**2.+4.*self._a0*abar))*evaluatephitorques(self._baryon_force,R,z,t=t,phi=phi,use_physical=False)/abar
def _zforce(self,R,z,t=0.,phi=0.,v=None):
abar= self._calc_abar(R,z,t,phi)
return 0.5*(abar+numpy.sqrt(abar**2.+4.*self._a0*abar))*evaluatezforces(self._baryon_force,R,z,t=t,phi=phi,use_physical=False)/abar then you can for example plot the rotation curve of a from galpy.potential import MWPotential2014, plotRotcurve
import matplotlib.pyplot as plt
MondMWPotential2014= MondForce(baryon_force=MWPotential2014[:2],a0=1.*1e-10*u.m/u.s**2)
plotRotcurve(MWPotential2014[:2],ro=8.,vo=220.,label=r'MWPotential2014: baryons')
plotRotcurve(MWPotential2014,ro=8.,vo=220.,label=r'MWPotential2014: baryons+DM',overplot=True)
rs= numpy.linspace(0.,40.,101)*u.kpc
plt.plot(rs,u.Quantity([numpy.sqrt(-r*evaluateRforces(MondMWPotential2014,r,0.,v=[0.,0.,0.],ro=8.,vo=220.,quantity=True)) for r in rs]).to(u.km/u.s),
label=r'MWPotential2014: baryons+MOND')
plt.ylim(0.,370.)
plt.legend(frameon=False,fontsize=15.) This is only a simple example and it makes an assumption about how the 3D MOND force emerges from the 1D MOND equation (i.e., that the 1D MOND equation relates the magnitude of the acceleration to the magnitude of the baryonic acceleration and that the acceleration points in the same direction as the baryonic acceleration). If there is serious interest in using MOND with |
Beta Was this translation helpful? Give feedback.
-
My goal is verify orbital integrations of ultra-faint dwarf galaxies and their uncertainty. |
Beta Was this translation helpful? Give feedback.
-
Yes, you can use this to do orbit integrations, although it will be quite slow, because it's not using the C back-end (since this new force isn't implemented in C). But this works: from galpy.orbit import Orbit
o= Orbit()
ts= numpy.linspace(0.,1.,1001)*u.Gyr
o.integrate(ts,MWPotential2014)
o.plot(label=r'MWPotential2014: baryons+DM')
o.integrate(ts,MondMWPotential2014)
o.plot(overplot=True,label=r'MWPotential2014: baryons+MOND')
plt.xlim(7.7,9.5)
plt.ylim(-0.2,0.2)
plt.legend(frameon=False,fontsize=16.) |
Beta Was this translation helpful? Give feedback.
-
It answerd all the questions! I'll certainly study more this code and the basic MoND theories. All this answers arrived from one question, which I never imagined that you would make a MoND potential. I am still learning many topics in astrophysics, and hope to learn more. |
Beta Was this translation helpful? Give feedback.
-
Dear Jo Bovy, |
Beta Was this translation helpful? Give feedback.
-
Is it possible to use MOND theories within Galpy?
Beta Was this translation helpful? Give feedback.
All reactions