WorksPhysics and Astronomy
The Influence of Hubble Expansion on the Future Merger of the Milky Way and Andromeda
Abstract
Most existing idealized simulations of galaxy mergers neglect Hubble expansion, as the local Hubble flow is curved by overdensities and the expansion effect is weak at these scales. However, even in the gravity-dominated Local Group (LG), the expansion itself still persists, and it has been shown important in some LG-related studies. Here we take the future merger of the Milky Way (MW) and Andromeda (M31) as a case study to investigate the differences between simulations with and without Hubble expansion. We perform a suite of idealized N-body simulations of the MW–M31 system under pure Newtonian, CDM, and CDM scenarios, testing different masses and proper motions of galaxies informed by current observational constraints. At low M31 tangential velocities, especially in cases where the two galaxies merge within a Hubble time, the expansion effect is negligible; while at high velocities (>66.5 km/s), the CDM simulations introduce a noticeable delay in the merger time compared to the Newtonian ones and may even alter the final fate of the system, but the caveat here is that the isolated-pair idealization and the assumed expansion history break down. The delay is also present but less pronounced in the CDM runs. When M33 and the Large Magellanic Cloud are included, the differences in merger times are reduced. In summary, Hubble expansion can play a noticeable role for galaxy mergers with high tangential velocities, but its actual influence on the MW–M31 merger depends on the precise masses and proper motions to be determined in the future.
Introduction
Almost all numerical simulations of galaxy mergers, including studies on the future merger of the Milky Way (MW) and the Andromeda Galaxy (M31), have not taken Hubble expansion into account [9, 8, 31, 30] (R. P. van der Marel et al. 2012; R. P. van der Marel et al. 2019; H. Wu et al. 2026). This is based on the fact that the overdensity of the Local Group (LG) curves the local Hubble flow [29, 14, 15], or on the assumption that the expansion effect is negligible on the scale of galaxy pairs.
However, the deviation from the Hubble flow within the LG merely means the dominance of gravity on that scale; it does not imply that cosmic expansion is absent. Since G. C. McVittie [20] introduced a spacetime metric describing a point mass embedded in a Friedmann-Lemaître-Robertson-Walker universe, the influence of Hubble expansion on gravitationally bound systems has been widely studied [e.g. 32, 10, 21, 4]. Recent studies I. D. Karachentsev et al. [14]; ); J. Peñarrubia et al. [25]; ); D. Benisty [2]; ); D. Benisty et al. [5]; ); D. Benisty [3] find that considering expansion in the LG is important, because embedding the cosmological constant alone or the full CDM expansion history significantly changes the LG mass predicted by the timing argument [18, 38] (F. D. Kahn & L. Woltjer 1959; Y.-S. Li & D. M. White 2008). In this paper, we aim to investigate whether Hubble expansion can affect the future of the LG. We perform idealized -body simulations including the MW and M31 with or without Hubble expansion, and compare the differences in merger time between them.
Current constraints on the masses of the MW and M31 remain uncertain: MW mass measurements range from to [42], while M31 mass measurements range from a few times to [6]. Furthermore, different studies yield different proper motions for M31 (e.g., [33, 28] (R. P. van der Marel et al. 2019; H. Wu et al. 2025)), corresponding to tangential velocities ranging from to . Here we do not aim to provide the full possible range of solutions for the future of the MW–M31 system, as that would require substantial effort to scan the plausible ranges of parameters such as galaxy masses, positions, and motions, much like what T. Sawala et al. [30]; H. Wu et al. (2026) did. The main purpose of this work is to illustrate the influence of Hubble expansion on the future merger of the MW and M31, and to determine whether it is negligible or not.
The rest of the paper is structured as follows. § 2 describes the method of the idealized simulations, including the -body code we used, the implementation of expansion, the galaxy models, and the simulation setup. The results are shown in § 3. § 4 provides several supplementary simulations that include M33 and the Large Magellanic Cloud (LMC). A brief conclusion is presented in § 5.
Methods
We construct the -body initial conditions for the MW and M31, and then perform idealized simulations both with and without Hubble expansion using the numerical simulation code GADGET-4 [35]. Two different MW masses, two different M31 masses, three different values of M31’s proper motion in the right ascension direction, and three different values of M31’s proper motion in the declination direction are adopted, all within the range of current observational uncertainties. In addition, for the simulations including expansion, we test not only the standard CDM model but also the CDM model favored by recent DESI DR2 results [1].
Simulation Code
GADGET-4 [35] is a massively parallel tree-based -body code that supports a variety of integration modes and boundary conditions. The code can run Newtonian simulations in physical coordinates
with vacuum boundary conditions, which is the classic setup for idealized galaxy encounters.
Alternatively, it can perform cosmological integrations in comoving coordinates while still employing vacuum boundaries rather than periodic boxes. In this mode, GADGET-4 solves the Friedmann equation for a CDM cosmology with parameters , , and specified in the parameter file and evolves particles in comoving coordinates, enabling the study of galaxy evolution with Hubble expansion.
Compared to CDM, results from DESI DR2 [1] favor a dynamical dark energy model (also referred to as CDM), which adopts the parameterization . Therefore, in our simulations with cosmic expansion, we study not only the CDM scenario but also the CDM scenario.
In the source code of GADGET-4, the dimensionless Hubble parameter for a CDM cosmology is implemented as
To describe a CDM cosmology, we modify this expression to (e.g., [1])
In our simulations, the curvature density parameter is (assuming a flat universe). Values of the matter density parameter , the dark energy density parameter , the present-day dark energy equation-of-state parameter , and its time variation are summarized in § 2.4.
Initial Galaxy Models
We construct the initial conditions of the MW and M31 using the method described in [34]. The dark matter halo of each galaxy is modeled as a Hernquist [12] profile matched to a Navarro–Frenk–White (NFW, [22, 23]) profile. We also place a massive black hole (BH) particle at the center of each galaxy, which serves as a convenient marker for the galactic center when computing the separation between the two galaxies.
The fiducial virial masses are for the MW and for M31, and the halo concentrations of them are both close to [16]. Dark matter particles have a mass of , while the central BH particle has a mass of in both galaxies. The total particle numbers are approximately for the MW and for M31. In addition, we constructed a low-mass MW
Notes. For each parameter combination, three simulations (Newtonian, CDM, and CDM) are run separately, resulting in a total of 108 simulations.
model with and a low-mass M31 model with , for which the particle numbers are correspondingly reduced.
T. J. Cox & A. Loeb [8] and R. Schiavi et al. [31] also included an intergalactic medium (IGM) component in their simulations, because early estimates of the LG mass significantly exceeded the sum of the MW and M31. However, as R. P. van der Marel et al. (2012) pointed out, more recent estimates (see also D. Benisty [3]) yield a LG mass nearly equal to the sum of the two galaxies, making the inclusion of IGM less necessary. Furthermore, following similar works (e.g., T. Sawala et al. [30]; H. Wu et al. 2026), we model our galaxies without disk and bulge components, since the merger’s orbital evolution is dominated by the significantly more massive dark matter halos. Through numerical tests including these components, we confirmed that their effect on the merger process reported here is negligible (see Appendix § 7).
Coordinates and Velocities of M31
As mentioned in § 1, the possible range of M31’s proper motion values is wide, and J.-B. Salomon et al. [28] finds that the measurements based on Gaia’s blue and red star samples exhibit large discrepancies. H. Wu et al. (2025) points out that this inconsistency originates from systematic differences between Gaia’s five-parameter (5p) and six-parameter (6p) astrometric solutions, and that the reliability of the 6p solution is limited. After excluding extreme red sources and calibrating the proper motion zero-points separately for 5p and 6p sources, H. Wu et al. (2025) provides a robust Gaia-based result: .
Therefore, based on H. Wu et al. (2025), we adopt , 45.9, and 54.0 and , −20.5, and −13.9 , yielding nine proper-motion combinations in total. For the other parameters of M31, we adopt RA = , Dec = (A. W. McConnachie [19]), a distance of kpc (K. Z. Stanek & P. M. Garnavich [37]), and a line-of-sight velocity of (L. L. Watkins et al. [43]), consistent with H. Wu et al. (2025).
To convert the coordinates and velocities of M31 into the Galactocentric frame for the convenience of the simulation setup, we adopt the Galactocentric distance of the Sun of kpc (GRAVITY Collaboration et al. [11]), the solar motion of (Y. Huang et al. 2015), and the circular speed at the solar position of (Y. Zhou et al. [46]).
Based on the above parameters, the nine proper-motion combinations yield M31 tangential velocities ranging from 6.3 to 71.1 , as listed in the last column of Table 1.
| Label | () | () | () | () | () |
| m80m100_378-271 | 80 | 100 | 37.8 | -27.1 | 26.0 |
| m80m100_378-205 | 80 | 100 | 37.8 | -20.5 | 6.3 |
| m80m100_378-139 | 80 | 100 | 37.8 | -13.9 | 24.6 |
| m80m100_459-271 | 80 | 100 | 45.9 | -27.1 | 44.3 |
| m80m100_459-205 | 80 | 100 | 45.9 | -20.5 | 36.4 |
| m80m100_459-139 | 80 | 100 | 45.9 | -13.9 | 43.5 |
| m80m100_540-271 | 80 | 100 | 54.0 | -27.1 | 71.1 |
| m80m100_540-205 | 80 | 100 | 54.0 | -20.5 | 66.5 |
| m80m100_540-139 | 80 | 100 | 54.0 | -13.9 | 70.6 |
| m80m160_378-271 | 80 | 160 | 37.8 | -27.1 | 26.0 |
| m80m160_378-205 | 80 | 160 | 37.8 | -20.5 | 6.3 |
| m80m160_378-139 | 80 | 160 | 37.8 | -13.9 | 24.6 |
| m80m160_459-271 | 80 | 160 | 45.9 | -27.1 | 44.3 |
| m80m160_459-205 | 80 | 160 | 45.9 | -20.5 | 36.4 |
| m80m160_459-139 | 80 | 160 | 45.9 | -13.9 | 43.5 |
| m80m160_540-271 | 80 | 160 | 54.0 | -27.1 | 71.1 |
| m80m160_540-205 | 80 | 160 | 54.0 | -20.5 | 66.5 |
| m80m160_540-139 | 80 | 160 | 54.0 | -13.9 | 70.6 |
| m100m100_378-271 | 100 | 100 | 37.8 | -27.1 | 26.0 |
| m100m100_378-205 | 100 | 100 | 37.8 | -20.5 | 6.3 |
| m100m100_378-139 | 100 | 100 | 37.8 | -13.9 | 24.6 |
| m100m100_459-271 | 100 | 100 | 45.9 | -27.1 | 44.3 |
| m100m100_459-205 | 100 | 100 | 45.9 | -20.5 | 36.4 |
| m100m100_459-139 | 100 | 100 | 45.9 | -13.9 | 43.5 |
| m100m100_540-271 | 100 | 100 | 54.0 | -27.1 | 71.1 |
| m100m100_540-205 | 100 | 100 | 54.0 | -20.5 | 66.5 |
| m100m100_540-139 | 100 | 100 | 54.0 | -13.9 | 70.6 |
| m100m160_378-271 | 100 | 160 | 37.8 | -27.1 | 26.0 |
| m100m160_378-205 | 100 | 160 | 37.8 | -20.5 | 6.3 |
| m100m160_378-139 | 100 | 160 | 37.8 | -13.9 | 24.6 |
| m100m160_459-271 | 100 | 160 | 45.9 | -27.1 | 44.3 |
| m100m160_459-205 | 100 | 160 | 45.9 | -20.5 | 36.4 |
| m100m160_459-139 | 100 | 160 | 45.9 | -13.9 | 43.5 |
| m100m160_540-271 | 100 | 160 | 54.0 | -27.1 | 71.1 |
| m100m160_540-205 | 100 | 160 | 54.0 | -20.5 | 66.5 |
| m100m160_540-139 | 100 | 160 | 54.0 | -13.9 | 70.6 |
Table 1. 36 different galaxy mass and proper motion value combinations across all 108 MW–M31 merger simulations.
Simulation Settings
The two MW masses and the two M31 masses in § 2.2, together with the nine proper motion values in § 2.3, yield 36 parameter combinations in total (see Table 1). For each combination, we run one Newtonian, one CDM, and one CDM simulation, respectively. The simulations are labelled as, e.g., N_m100m160_540-139, where the leading letter N, L, or W denotes the simulation type (Newtonian, CDM, or CDM), and the rest of the name specifies the galaxy masses and the M31 proper-motion parameters (consistent with Table 1).
(a) Newtonian simulation: Galaxy particles evolve under gravitational force. The simulation is carried out in physical coordinates, starting at and integrating forward in time.
(b) CDM simulation: The cosmological parameters are , , and (Planck Collaboration et al. [27]). In this case, the calculated velocity of M31 in the Galactocentric frame is understood as the total velocity, which consists of a peculiar velocity and a Hubble velocity:
where is naturally accounted for by the expanding background. For example, in N_m100m160_540-139, the position and velocity of M31 are kpc and , respectively. The Hubble velocity is , so the peculiar velocity we set in the initial condition file of L_m100m160_540-139 is . The simulation is carried out in comoving coordinates with vacuum boundary conditions, starting at scale factor and integrating forward.
(c) CDM simulation: The cosmological parameters are , , , , and (M. Abdul Karim et al. [1]). Here, the peculiar velocities in the initial condition files are corrected in the similar way as in the CDM scenario. The simulation is also carried out in comoving coordinates with vacuum boundary conditions.
In all simulations, the integration accuracy and the opening angle are ErrTolIntAccuracy = 0.012 and ErrTolTheta = 0.6, respectively. A constant physical softening length of 0.5 kpc is adopted across all Newtonian, CDM, and CDM simulations. We consider the MW and M31 to be merged when their separation decreases to 10 kpc. All simulations are run at least until the moment of merger (for some CDM simulations in which the galaxies do not merge, the simulation durations are the same as their corresponding Newtonian ones).
In GADGET-4 integrations in comoving coordinates with vacuum boundary conditions, the equation of motion carries a background-density correction term (eq (55) of V. Springel et al. [36]). When the background correction is combined with the term of the Friedmann equation, the matter contributions cancel exactly, and transforming to physical coordinates leaves Newtonian gravity plus a repulsive central acceleration proportional to the distance from the origin, for CDM, or the corresponding time-dependent dark energy term for CDM. The Newtonian, CDM, and CDM simulations, which adopt the same initial conditions, therefore differ from one another by this single central force term only. Its amplitude grows linearly with the pair separation, so qualitatively the term is negligible while the two galaxies are close and becomes important for wide orbits, such as those with high M31 tangential velocities. The quantitative results are presented in § 3.
Results
Figure 1 shows the distance–time curves of 12 selected representative simulations, covering the low, intermediate, and high M31 tangential velocities and illustrating the four main types of outcomes among all 108 simulations. The four panels correspond to four different mass and proper motion combinations, and the three Newtonian, CDM, and CDM simulations in each panel are distinguished using solid, dashed, and dotted line styles. Figure 2 shows the merger time differences between the 36 CDM simulations (or CDM simulations) and their 36 Newtonian counterparts, where darker colors indicate that the merger in the CDM (or CDM) case lags behind the Newtonian case by a larger amount. The time differences in Figure 2 are not necessarily caused by the expansion; they may also
Figure 1. Distance–time curves of 12 selected representative MW–M31 merger simulations. The parameters of the simulations are given in the title and legend of each panel. Line styles distinguish the cosmology: Newtonian (solid), CDM (dashed), and CDM (dotted).

Figure 2. Upper four panels: The merger time differences between the 36 CDM simulations and their 36 Newtonian counterparts. The title of each sub-panel gives the galaxy masses, and the first row and the first column give the adopted M31 proper motions, while the remaining nine cells show the results. In each result cell, the three rows show, from top to bottom, the merger time of the Newtonian simulation ; the merger time difference between the CDM and Newtonian simulations, ; and the M31 tangential velocity of the simulation, respectively. The value indicates that the MW and M31 do not merge in the CDM simulation of that cell. The background colors from light to dark correspond to Gyr, Gyr Gyr, Gyr Gyr, Gyr Gyr, and Gyr. Lower four panels: The merger time differences between the 36 CDM simulations and their 36 Newtonian counterparts.
arise from noise. To provide a noise floor, we first read off the merger-time differences resulting from different resolutions (see Figure A3), which is less than 0.2 Gyr. Next, by changing the merger criterion from 10 kpc to 20 kpc, we find that the time differences in all simulations change by less than 0.3 Gyr (except for the special case mentioned at the end of point (1) in § 3.2). Therefore, we conservatively regard 0.3 Gyr as the noise floor of the merger-time differences in Figure 2.
Figure A3. A comparison between two original simulations and their corresponding runs with lower mass resolution and larger softening length.
The First Pericenter
In all simulations, the first pericenter occurs at approximately 4–5 Gyr (see Figure 1). Owing to the expansion effect, the CDM and the CDM simulations reach the first pericenter slightly later, which is more clearly shown in the upper-left panel of Figure 1 because of its smaller horizontal-axis range. In the upper two panels of Figure 1, since the M31 tangential velocity is not very high, the first pericenter distance is small, and thus the energy dissipation caused by dynamical friction before the first pericenter is relatively significant. Because the CDM and CDM simulations reach the first pericenter later, their energy dissipation accumulates more, leading to a slightly smaller first pericenter distance than in the Newtonian simulations. In contrast, in the lower two panels, the first pericenter distance is larger and the energy dissipation effect is not so significant, so owing to the expansion effect the first pericenter distances in the CDM and CDM simulations are slightly larger than in the Newtonian ones.
The Final Merger Time
As for the differences in the final merger time between the simulations with and without expansion, the results can be divided into the following four categories.
The expansion effect is negligible, and the merger time in the CDM (or CDM) scenario shows only a barely noticeable delay relative to the Newtonian one.
The upper-left panel of Figure 1 serves as an example. Because of its low M31 tangential velocity, the separation between the MW and M31 decreases rapidly to small values, causing the expansion effect to be strongly suppressed, and the differences between the Newtonian and CDM (or CDM) simulations at the first pericenter are subsequently erased by the later dynamical evolution. However, we note that Figure 2 shows that in this example the merger time of the CDM simulation is 0.9 Gyr earlier than that of the Newtonian one. This is simply because, for this set of orbital parameters, the first pericenter distance is very close to the merger distance criterion (10 kpc), and the galaxies are identified as merged once their separation happens to fall below this criterion.
(2) The expansion effect is negligible, and the merger time in the CDM (or CDM) scenario is slightly earlier than in the Newtonian one. The upper-right panel of Figure 1 serves as an example. This seemingly counterintuitive conclusion can be explained by our previous discussion of the first pericenter (see § 3.1). Since the expansion delays the time of the first pericenter, the galaxies remain near the pericenter for longer time than in the Newtonian simulations, and their energy is more strongly dissipated by dynamical friction. As a result, the distance at the next apocenter is smaller than in the Newtonian scenario, which in turn leads to an earlier final merger time.
(3) The expansion effect is not negligible, and the merger time in the CDM (or CDM) scenario shows a noticeable delay relative to the Newtonian one. The lower-left panel of Figure 1 serves as an example. In these simulations with high M31 tangential velocities, the separation rebounds to a significant value after the first pericenter, reaching kpc. The larger separation leads to a larger Hubble velocity, and the longer orbital timescale allows the expansion effect to accumulate more sufficiently. Figure 2 shows that in this example the merger time in the CDM (CDM) scenario is 1 Gyr (0.6 Gyr) later than in the Newtonian one.
(4) The expansion effect is not negligible, and the MW and M31 eventually separate in the CDM scenario. The lower-right panel of Figure 1 serves as an example. This example demonstrates a qualitatively new result, showing that for low masses and high tangential velocities, the fate of the galaxy pair may be completely different depending on whether cosmic expansion is included or not. We see from the panel that in the Newtonian simulation the post-pericenter apocenter is about 800 kpc, a substantial fraction of the de Sitter radius Mpc, a scale above which dark energy dominates. Therefore, from an analytic point of view, the initial parameters of this example sit right at a watershed. In addition, we acknowledge the limitation that the isolated pair idealization is no longer clearly valid after the separation exceeds 1.2 Mpc, since the surrounding large-scale structure is not accounted for.
In summary, for low and intermediate M31 tangential velocities, Hubble expansion has little effect on the MW-M31 merger. However, for high M31 tangential velocities, Hubble expansion introduces a noticeable delay in the merger time relative to the Newtonian case and can even alter the final fate of the system. Current constraints on the galaxy masses and proper motions are still insufficient to fully determine the exact influence of Hubble expansion on the MW-M31 merger, and future more precise measurements are needed.
The above conclusions can be explained by the competition between the gravitational term , the centrifugal term (or equivalently, ), and the dark energy repulsive term (or equivalently, ) ([38] (D. Tanoglidis et al. 2015)). The gravitational term is proportional to the mass and inversely proportional to the square of the distance, whereas the dark energy repulsive term is proportional to the distance. Therefore, the effect of expansion is more pronounced for lower mass and higher tangential velocity (i.e., larger post-pericenter apocenter). For example, the post-pericenter apocenter in the upper right panel of Figure 1 is kpc, for which the ratio of the dark energy repulsive term to the gravitational term is computed to be only , so the effect of the expansion is limited; in the lower right panel, the post-pericenter apocenter (in the Newtonian case) is kpc, for which the ratio is computed to be , so the expansion significantly affects the outcome.
Differences Between Two Expansion Models
The CDM simulations (with high tangential velocities) also exhibit a delay in the merger time relative to the Newtonian ones, but the delay is less pronounced than in the CDM scenario. In particular, for the lower right panel of Figure 1, the MW and M31 do not separate but instead still merge in the CDM simulation.
For the adopted parameters (, ), the equation of state increases with time and crosses zero at . Beyond this point, the dark energy density, which scales as , decays at least as fast as the matter density, and the dark-energy-driven acceleration therefore shuts off rapidly. As a result, the expansion decelerates at late times, and the CDM simulations apapproach the Newtonian ones, consistent with the results described above.
There is a prominent caveat that the CDM model we apply is a phenomenological fit calibrated to observational data at , and its extrapolation forward by several tens of Gyr has no observational support. The late-time suppression of dark energy, and hence the eventual merger of the MW and M31 in this scenario, is therefore a property of the adopted parametrization.
Supplementary Simulations Including M33 and the LMC
R. P. van der Marel et al. (2019) and T. Sawala et al. [30] have shown that M33 and the LMC can significantly affect the MW–M31 orbit. Therefore, we rerun the three simulations shown in the lower left panel of Figure 1 with M33 and the LMC included, in order to test the influence of the satellite galaxies on the results.
Although the masses and proper motions of M33 and the LMC also have some uncertainties, our purpose here is only to illustrate the influence of the satellite galaxies, rather than to provide the full possible range of solutions for the future of the LG system. We therefore adopt only one parameter combination for the two satellite galaxies as an example. The adopted parameters are as follows. M33: [30], RA = , Dec = [19], (J.-Y. Ou et al. 2023), [19], , and [7] (H. Wu et al. 2025); LMC: [30], RA = , Dec = [19], [26], [19], , and [13]. M33 and the LMC are modeled as Hernquist halos matched to the NFW profile with concentration .
The distance–time curves of the three simulations are shown in Figure 3. Compared with the lower left panel of Figure 1, the inclusion of the two satellite galaxies delays the time of the first pericenter and reduces the first pericenter distance, consistent with R. P. van der Marel et al. (2019). In addition, as described by T. Sawala et al. [30], the presence of M33 and the LMC advances the MW–M31 merger time.
Figure 3. Distance–time curves of the three simulations including M33 and the LMC.
In the simulations including satellite galaxies, the differences in the final merger time among the Newtonian, CDM, and CDM scenarios are reduced. On one hand, this is because the post-pericenter apocenter and the merger time are reduced, which is unfavorable for the expansion to manifest its effect. On the other hand, it is also because the lower pericenter distance makes the MW and M31 suffer stronger energy dissipation by dynamical friction near the first pericenter, and the dissipation is even stronger in the CDM (or CDM) simulations because their pericenter passage occurs later (see point (2) of § 3.2). Here, the merger time of the CDM simulation is indeed slightly earlier than that of the Newtonian one, just like the example in point (2) of § 3.2 (the upper right panel of Figure 1).
These three simulations serve only as an example to illustrate the effect of the satellite galaxies; the extent to which the influence of the Hubble expansion on the merger timescale is affected by the satellite galaxies depends on the actual measurements of the galaxy masses and motions.
Conclusion
We study the differences between galaxy merger simulations with and without Hubble expansion, using the MW–M31 merger as an example.
We first perform controlled idealized simulations containing only the MW and M31, adopting or , or , proper motion value (along the right ascension direction) of , , and , and proper motion value (along the declination direction) of , , and . All adopted values lie within current observational uncertainties. Each simulation setup is run with GADGET-4 [35] under Newtonian, CDM, and CDM scenarios, respectively. Then, we perform several simulations including M33 and the LMC to test whether the presence of satellite galaxies can obscure the expansion effect.
Based on our simulation results, we draw the following conclusions:
(1) Hubble expansion causes a delay of the first pericenter passage. For orbits with a large first pericenter distance, it also delays the final merger time; however, for orbits with a small first pericenter distance, it instead advances the final merger time, because of the more prolonged dynamical friction near the first pericenter.
(2) For simulations containing only the MW and M31, the effect of Hubble expansion is negligible at low M31 tangential velocities, especially in cases where the two galaxies merge within a Hubble time. However, at the high tangential velocity (), the CDM runs introduce a noticeable delay in the merger time compared to the Newtonian ones; in the low galaxy mass cases, the expansion even prevents the two galaxies from merging. But it should be noted that in the simulations where Hubble expansion has a significant effect, the isolated-pair idealization and the assumed expansion history both break down.
(3) The dynamical dark energy model (CDM), which is favored by recent DESI DR2 results, also leads to a delay in the merger time relative to the Newtonian case, but the delay is less pronounced than in the CDM model.
(4) When M33 and the LMC are included, the differences in the MW–M31 merger time between the Newtonian simulations and the CDM (or CDM) simulations are reduced, owing to the decreases in the first pericenter distance and the merger time.
In summary, Hubble expansion can play a noticeable role for galaxy mergers with high tangential velocities (and especially low masses), but current constraints on galaxy masses and proper motions are insufficient to determine its importance in the MW–M31 merger. More precise measurements in the future will help establish whether the expansion effect is negligible or not in this problem.
ACKNOWLEDGMENTS
We thank Volker Springel for his help regarding the implementation of Hubble expansion in GADGET-4, and we also thank Adam Riess and Xuandong Jia for their help in our understanding of the concept of Hubble expansion. We thank Till Sawala for helpful discussions. We thank the anonymous referee for their helpful comments and suggestions. This work is supported by the National Natural Science Foundation of China (grant 12225302) and the Fundamental Research Funds for the Central Universities (grant KG202502). Tianchi Zhang acknowledges support from the National Natural Science Foundation of China (Grants No. 12403008), the Young Data Scientist Program of the China National Astronomical Data Center (Grants No. NADC2024YDS-03), and the science platform of China National Astronomical Data Center. Shihong Liao acknowledges support by the NSFC grant (Nos. 12588202 and 12473015).
Software: GADGET-4 (V. Springel et al. [35])
Robustness tests of the long integrations
Among our 108 MW–M31 merger simulations, the longest one runs for Gyr. To demonstrate the robustness of the long integrations, we perform the following tests.
(1) We evolve the fiducial MW and M31 models in isolation for 60 Gyr in both the Newtonian and the CDM setups. Figure A1 shows that the density profiles and the Lagrangian radii are stable at the adopted resolution and softening.
Figure A1. Isolated evolution and stability test of the two fiducial galaxy models in the Newtonian and CDM cases. Upper panels: dark matter distribution of galaxies at 0 and 60 Gyr, and the legends give the fitting results of the scale length for the NFW model. Lower panels: time evolution of the Lagrangian radii (10%-mass, half-mass, and 80%-mass radii) of galaxies.
(2) Our simulations are dark matter only, so here we instead model the MW and M31 with exponential disks and Hernquist bulges ([16]) and rerun one simulation. The MW has a virial mass , halo concentration , disk mass , bulge mass , disk scale length kpc, disk scale height kpc, and bulge scale length kpc. M31 has , , , , disk scale length kpc, kpc, and kpc. The stellar particle mass and softening length are and 0.5 kpc, respectively. Although the stellar components can affect the central density profile and therefore the efficiency of orbital decay, Figure A2 shows that the two simulations differ only at the final stages, and the overall outcomes are not affected.
Figure A2. A comparison between a dark-matter-only simulation and its corresponding simulation including the stellar disk and bulge components.
(3) Our fiducial particle mass and softening length are and 0.5 kpc; here we rerun two simulations with a particle mass and a softening length of and 2.0 kpc. Figure A3 shows that the simulation results are converged.
(4) For one set of initial orbital parameters, we treat the MW and M31 as point masses and perform direct two-body integrations using an eighth-order Runge–Kutta method, for the pure Newtonian case and for the case including the dark energy repulsive term, respectively. Figure A4 shows that the gadget-4 results agree with the two-body results before the separation drops to kpc, where the dark matter halos start to overlap and the two-body assumption is no longer valid.
Figure A4. A comparison between two original GADGET-4 simulations and their corresponding direct two-body integrations.
(5) We use a black hole particle, whose mass is 100 times the dark matter particle, to mark the galactic center, but it may random walk relative to the true density peak. So we also try to use the center of mass of all dark matter particles of each galaxy to mark the center, and the resulting separations agree with those based on the black hole before the galaxies merge. In addition, we have checked that the black hole particles indeed track the density peak, as shown in Figure A5.
Figure A5. Visualization of the dark matter (blue) and the black hole particle (white cross) in the snapshots at 0 and 40 Gyr of the Newtonian and CDM simulations in the lower right panel of Figure 1.
References
- [1]Abdul Karim, M., Aguilar, J., Ahlen, S., et al. 2025, PhRvD, 112, 083515, doi: 10.1103/tr6y-kpc6
- [2]Benisty, D. 2021, A&A, 656, A129, doi: 10.1051/0004-6361/202142096DOI
- [3]Benisty, D. 2024, A&A, 689, L1, doi: 10.1051/0004-6361/202449884DOI
- [4]Benisty, D. 2025, PhRvD, 112, 083557, doi: 10.1103/qsm l-5dy9
- [5]Benisty, D., Vasiliev, E., Evans, N. W., et al. 2022, ApJL, 928, L5, doi: 10.3847/2041-8213/ac5c42DOI
- [6]Bhattacharya, S. 2025, in IAU Symposium, Vol. 379, Dynamical Masses of Local Group Galaxies, ed. P. Bonifacio, M.-R. Cioni, F. Hammer, M. S. Pawlowski, & S. Taibi, 92–100, doi: 10.1017/S1743921323001291
- [7]Brunthaler, A., Reid, M. J., Falcke, H., Greenhill, L. J., & Henkel, C. 2005, Science, 307, 1440, doi: 10.1126/science.1108342DOI
- [8]Cox, T. J., & Loeb, A. 2008, MNRAS, 386, 461, doi: 10.1111/j.1365-2966.2008.13048.xDOI
- [9]Dubinski, J., Mihos, J. C., & Hernquist, L. 1996, ApJ, 462, 576, doi: 10.1086/177174DOI
- [10]Faraoni, V., & Jacques, A. 2007, PhRvD, 76, 063510, doi: 10.1103/PhysRevD.76.063510DOI
- [11]GRAVITY Collaboration, Abuter, R., Amorim, A., et al. 2018, A&A, 615, L15, doi: 10.1051/0004-6361/201833718
- [12]Hernquist, L. 1990, ApJ, 356, 359, doi: 10.1086/168845DOI
- [13]Kallivayalil, N., van der Marel, R. P., Besla, G., Anderson, J., & Alcock, C. 2013, ApJ, 764, 161, doi: 10.1088/0004-637X/764/2/161DOI
- [14]Karachentsev, I. D., Kashibadze, O. G., Makarov, D. I., & Tully, R. B. 2009, MNRAS, 393, 1265, doi: 10.1111/j.1365-2966.2008.14300.xDOI
- [15]Karachentsev, I. D., Makarov, D. I., & Kaisina, E. I. 2013, AJ, 145, 101, doi: 10.1088/0004-6256/145/4/101DOI
- [16]Klypin, A., Zhao, H., & Somerville, R. S. 2002, ApJ, 573, 597, doi: 10.1086/340656DOI
- [18]Lynden-Bell, D. 1981, The Observatory, 101, 111
- [19]McConnachie, A. W. 2012, AJ, 144, 4, doi: 10.1088/0004-6256/144/1/4DOI
- [20]McVittie, G. C. 1933, MNRAS, 93, 325, doi: 10.1093/mnras/93.5.325DOI
- [21]Nandra, R., Lasenby, A. N., & Hobson, M. P. 2012, MNRAS, 422, 2945, doi: 10.1111/j.1365-2966.2012.20617.xDOI
- [25]Peñarrubia, J., Ma, Y.-Z., Walker, M. G., & McConnachie, A. 2014, MNRAS, 443, 2204, doi: 10.1093/mnras/stu879DOI
- [26]Pietrzyński, G., Graczyk, D., Galle nne, A., et al. 2019, Nature, 567, 200, doi: 10.1038/s41586-019-0999-4DOI
- [27]Planck Collaboration, Aghanim, N., Akrami, Y., et al. 2020, A&A, 641, A6, doi: 10.1051/0004-6361/201833910
- [28]Salomon, J.-B., Ibata, R., Reylé, C., et al. 2021, MNRAS, 507, 2592, doi: 10.1093/mnras/stab2253DOI
- [29]Sandage, A. 1986, ApJ, 307, 1, doi: 10.1086/164387DOI
- [30]Sawala, T., Delhomelle, J., Deason, A. J., et al. 2025, Nature Astronomy, 9, 1206, doi: 10.1038/s41550-025-02563-1DOI
- [31]Schiavi, R., Capuzzo-Dolcetta, R., Arca-Sedda, M., & Spera, M. 2020, A&A, 642, A30, doi: 10.1051/0004-6361/202038674DOI
- [32]Sereno, M., & Jetzer, P. 2007, PhRvD, 75, 064031, doi: 10.1103/PhysRevD.75.064031DOI
- [33]Sohn, S. T., Anderson, J., & van der Marel, R. P. 2012, ApJ, 753, 7, doi: 10.1088/0004-637X/753/1/7DOI
- [34]Springel, V., Di Matteo, T., & Hernquist, L. 2005, MNRAS, 361, 776, doi: 10.1111/j.1365-2966.2005.09238.xDOI
- [35]Springel, V., Pakmor, R., Zier, O., & Reinecke, M. 2021, MNRAS, 506, 2871, doi: 10.1093/mnras/stab1855DOI
- [36]Springel, V., Yoshida, N., & White, S. D. M. 2001, NewA, 6, 79, doi: 10.1016/S1384-1076(01)00042-2DOI
- [38]Strigari, L. E. 2025, ARA&A, 63, 431, doi: 10.1146/annurev-astro-121024-051405DOI
- [42]Wang, W., Han, J., Cautun, M., Li, Z., & Ishigaki, M. N. 2020, Science China Physics, Mechanics, and Astronomy, 63, 109801, doi: 10.1007/s11433-019-1541-6DOI
- [43]Watkins, L. L., Evans, N. W., & van de Ven, G. 2013, MNRAS, 430, 971, doi: 10.1093/mnras/sts634DOI
- [46]Zhou, Y., Li, X., Huang, Y., & Zhang, H. 2023, ApJ, 946, 73, doi: 10.3847/1538-4357/acadd9DOI






