Issue |
A&A
Volume 689, September 2024
|
|
---|---|---|
Article Number | A96 | |
Number of page(s) | 17 | |
Section | Numerical methods and codes | |
DOI | https://doi.org/10.1051/0004-6361/202450040 | |
Published online | 06 September 2024 |
Local spherical collapsing box in ATHENA++: Numerical implementation and benchmark tests
1
Univ Lyon, Univ Lyon 1, ENS de Lyon, CNRS, Centre de Recherche Astrophysique de Lyon UMR5574,
69230
Saint-Genis-Laval,
France
e-mail: elliot.lynch@ens-lyon.fr
2
Center for Star and Planet Formation, GLOBE Institute, University of Copenhagen,
Øster Voldgade 5–7,
1350
Copenhagen,
Denmark
e-mail: ziyan.xu@sund.ku.dk
Received:
20
March
2024
Accepted:
23
June
2024
We implement a local model for a spherical collapsing or expanding gas cloud in the ATHENA++ magnetohydrodynamic code. This local model consists of a Cartesian periodic box with time-dependent geometry. We present a series of benchmark test problems, including nonlinear solutions and linear perturbations of the local model, confirming the code’s desired performance. During a spherical collapse, a horizontal shear flow is amplified, corresponding to angular momentum conservation of zonal flows in the global problem; wave speed and the amplitude of sound waves increase in the local frame, due to the reduction in the characteristic length scale of the box, which can lead to an anisotropic effective sound speed in the local box. Our code conserves both mass and momentum-to-machine precision. This numerical implementation of the local model has potential applications to the study of local physics and hydrodynamic instabilities during protostellar collapse, providing a powerful framework for better understanding the earliest stages of star and planet formation.
Key words: hydrodynamics / methods: numerical / stars: formation
© The Authors 2024
Open Access article, published by EDP Sciences, under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
This article is published in open access under the Subscribe to Open model. Subscribe to A&A to support open access publication.
1 Introduction
Star formation has been studied over decades both theoretically and numerically on large spatial scales, the key motivation being to determine how global redistribution of angular momentum results in the formation of stars, disks, or jets and set the initial conditions for planet formation (see Larson 1969; Penston 1969 and e.g., Pattle et al. 2023; Pineda et al. 2023; Tsukamoto et al. 2023 for recent reviews). The field has been stimulated by instruments capable of resolving the largest scales of these young stellar systems in ever-finer detail in several wavelength domains, such as the Atacama Large Millimeter Array (ALMA), the Very Large Telescope (VLT) or the James Webb Space Telescope (JWST). The importance of these questions has perhaps overshadowed that of the physical processes taking place simultaneously on a small scale. One question, for example, is whether it is possible for dust to start concentrating as soon as the cloud collapses, thereby promoting highly efficient planet formation later on.
The local box formalism provides a simple treatment of the hydrodynamics of a spherically symmetric system undergoing contraction. The global effects of curvature and acceleration due to collapse are consistently incorporated into the local treatment of the problem by source terms that can be time-dependent, while allowing for the adoption of periodic boundaries as the system is spatially homogeneous. Numerical simulations using the local approximation approach play an important role in the study of local gas dynamics and instabilities in astrophysics. The best-known example is the rediscovery of the magnetorotational instability (MRI) with the local shear box approximation, which was first applied to magnetohydrodynamic (MHD) simulations by Hawley et al. (1995). Local models have been used for (isotropic) cosmological collapses (Robertson & Goldreich 2012). Anisotropy in collapse and expansion was taken into account in the study of starless molecular core collapse (Toci et al. 2018), solar winds (Velli et al. 1992; Grappin et al. 1993; Grappin & Velli 1996; Tenerani & Velli 2017; Shi et al. 2020; Squire et al. 2020) (among which Tenerani & Velli 2017 also consider nonuniform expansion), anisotropy-driven plasma kinetic instabilities (Sironi & Narayan 2015; Bott et al. 2021), and the cosmic ray pressure anisotropy instability (Sun & Bai 2023).
Recently, Lynch & Laibe (2023) (hereafter LL23) developed a new local model for the spherical collapse or expansion problem, allowing for a nonuniform collapse or expansion. This model considers a radially varying flow, as in Tenerani & Velli (2017), but also allows for the time-dependence of the background flow. It also uses a different treatment of pressure gradient than the expanding box models, in an approach that is more similar to the distorted shearing box models of Ogilvie & Latter (2013); Ogilvie & Barker (2014). This avoids spurious instabilities from the inclusion of formally subdominant terms (Latter & Papaloizou 2017), allowing for the application of periodic or shear-periodic boundary conditions with a Cartesianlike geometry. In this study, we incorporate LL23’s model into ATHENA++, a high-order Godunov MHD code (Stone et al. 2020). Other local models have already been implemented in ATHENA++, including Squire et al. (2020) for the (uniformly) expanding box, and MHD-PIC (Sun & Bai 2023), also allowing for an anisotropic collapse or expansion. However, most of these previous numerical implementations focus on the study of MHD properties and magnetized waves, in the context of stellar winds or cosmic rays, and the hydrodynamic properties of the expanding or collapsing box have not been comprehensively tested so far. Here, we aim to incorporate the local model of LL23, with benchmark tests to thoroughly investigate and validate the hydrodynamic properties therein.
This article is organized as follows. We first describe the formulation of the local model for the collapsing box in Sec. 2. In Sect. 3, we describe the numerical implementation, especially the modification of the Riemann solver in order to incorporate the local model. We then conduct a series of test cases including nonlinear solutions and linear perturbations in Sec. 4, as well as numerical studies. We further discuss possible applications and perspectives, and give future perspectives in Sec. 5. We summarize and conclude in Sec. 6.
2 Equations of the local model
We started by considering an axisymmetric spherical gas cloud collapsing or expanding with a purely radial velocity, Ubg(r, t), that varies with both radius, r, and time, t. We then considered a local neighborhood of a reference point located at a radius, ℛ(t), in the spherical gas cloud, described by a local Cartesian coordinate system comoving with the background flow. The local coordinates are given by
(1)
where ϕ and θ are the longitude and latitude on the reference sphere of radius, ℛ, and r − ℛ(t) is the local radial distance relative to the global, ℛ(t), of the reference frame. We note that x, y, z have dimensions of angles in this formalism, and that they denote two azimuthal and radial directions, respectvely. Lz is a characteristic vertical length scale that is set by the background flow profile, which can be approximated by
(2)
The Lagrangian time derivative in the local model is
(3)
while the divergence of the velocity of the radial background flow is
(4)
The flow within the local box model represents local, nonlinear perturbations to the background flow. Following the derivation in Sect. 2 of LL23, in the local frame, the continuity, momentum, and energy equations are given in the stretched Cartesian coordinate system by
(5)
(6)
(7)
(8)
(9)
where ρ is the density of the gas, υi is the relative velocity field in the local frame1, p is the pressure of the gas, and rell is the energy density of the relative motion in this system, (re-)defined as
(10)
which is the sum of the kinetic energy density of relative motion in the local frame, , and the specific internal energy, ϵ, determined by the equation of state (EoS). For an isothermal EoS,
, where cs is the sound speed, and the energy Eq. (9) is dropped from the system. For an adiabatic EoS,
, where γ is the ratio of specific heats, assumed to be constant.
The right-hand side of Eqs. (6)–(8) can be interpreted as an anisotropic sound speed in the local coordinate. We define two rescaled sound speeds in the horizontal and vertical directions separately: cs,H ≡ cs/ℛ and cs,V = cs/Lz.
Equations (5)–(9) can be written in a compact form,
(11)
where the vector, q, of conservative variables is defined according to
(12)
f, g, and h are the fluxes of the associated conservative variables in the x, y, and z directions, respectvely:
(13)
(14)
The vector of source terms, denoted as S, is
(15)
Again, for an isothermal EoS, the fifth component of the vectors q, f, g, h, and S are dropped, as the energy equation is not solved for this case.
A more intuitive illustration of the local model geometry is presented in Fig. 1. As the collapse proceeds, the local domain is compressed in volume, leading to an increase in gas density. This is reflected in the source term in the continuity Eq. (5). The angular momentum conservation law leads to amplification of horizontal flow velocity in the local frame during the collapse, which is represented by the source terms in the momentum equations on the horizontal directions (Eqs. (6) and (7)). These features along with other characteristic behaviors of the local model are further illustrated and tested in Sec. 4.
![]() |
Fig. 1 Cartoon illustration of the local collapsing box model. On the left, the global geometry depicts a domain moving radially due to background flow. The volume of the domain varies as it approaches the center of the spherical cloud, leading to changes in density. A compressing domain leads to a density increase, as is shown by the progressively darker blue color in the sequence. The horizontal domain size is proportional to ℛ(t), establishing the horizontal length scale in the local model (middle panel). The vertical length scale, Lz (t), is determined by the distance between the domain’s inner and outer radial boundaries, which is set by the background flow. Inside each box, a waveform signal illustrates how certain physical quantities evolve in the local model. The width of the waveform represents quantities that remains fixed in the local frame (e.g., wavelength). The amplitude of the waveform represents specific physical quantities that are expected to be constant in the global geometry throughout the collapse (e.g., angular momentum, isothermal physical sound speed). In the local reference frame (right), the corresponding quantities such as the shear flow velocity or the effective sound speed are amplified as the collapse proceeds and the length scale shrinks in the domain, while quantities such as the wavelength remain the same. This phenomenon is visually demonstrated by the vertically stretched waveforms in the sequence. For a more accurate and detailed understanding of this process, one should refer to the equations in Sec. 2. |
3 Numerical implementation
We next translated the local model of Sec. 2 into a Godunov scheme, and implemented it in the numerical code ATHENA++. Finite volume discretization of the compact form of the hydro-dynamic equations Eq. (11) gives the time integration step as a set of ordinary differential equations,
(16)
where subscript indices (i, j, k) denote numerical cells centered at positions (xi, yj, zk), superscripts, n, denotes the index for discrete time, δx, δy, and δz are discrete grid sizes, and δt is the time step. The vectors and
correspond to volume-averaged q and S over the numerical cells. The vectors
, and
correspond to time-averaged f, g, and h, respectvely. The half-integer subscripts on the flux vectors refer to the edges of computational cells, while the half-integer superscripts denote the time average between tn and tn+1.
denotes the vector of conservative variables after flux integration.
Except for the pressure gradient term of the momentum equation, which was treated during the calculation of numerical fluxes in ATHENA++, all source terms in the continuity, momentum, and energy equations can be added explicitly with an operator-splitting method, following the standard ATHENA++ approach. However, examining the source term vector in Eq. (15), all of the components in the source term, S, can be integrated analytically. Thus, instead of following the standard explicit approach, we incorporated the source terms by updating the conservative variables with the analytical solutions at tn+1; namely,
(17)
with the Jacobian determinant in the local coordinate system, and
(19)
the kinetic energy density of relative motion at tn+1. This approach of analytical integration of the source term significantly enhances the numerical accuracy, and ensures that the conservation laws are fully obeyed (see Sec. 4.3). The method we used to integrate the source term is first-order in time. While higher-order methods have been explored, they are not as efficient within the current framework. We further discuss the impact of the treatment of the source term on numerical accuracy in Sec. 4.4.
The flux integration (or the time-averaged numerical fluxes) mentioned above were computed depending on different time-integrating methods (see Sect. 3.2.3 of Stone et al. 2020, for details). To explain the core of the algorithm, we present hereafter the flux calculation in the x direction only as an example, dropping the subscripts j and k for simplicity. For a time integrator with a stage number of Nstage in each time step, for each stage was updated with fluxes
and
, which were computed with a Riemann solver. In ATHENA++, various solvers were implemented, including Roe’s linearized solver (Roe 1981), as well as the Harten–Lax–van Leer (HLL) approximated Riemann solvers (Harten et al. 1983). These approximate Riemann solvers provide an estimate of the fluxes. As was discussed above, pressure gradient terms in the momentum equation were integrated during the calculation of fluxes in ATHENA++. Since the corresponding terms in the local model (the right-hand side of Eqs. (6)–(8)) can be interpreted as an anisotropic sound speed, we modified the Riemann solver, which incorporates the anisotropic effective sound speed by rescaling the wave speed during flux calculation. We applied this modification in Roe’s solver, the Harten–Lax–van Leer–Einfeldt (HLLE) solver, and the Harten–Lax–van Leer–Contact (HLLC) solver, the latter being recommended for adiabatic hydrodynamics. The basic introduction of these Riemann solvers can be found in Toro (1999), so will not be introduced in detail.
For the flux, , at the cell interface, xi−1/2, the Roe’s solver and HLLE solver provide the estimated flux,
and
, separately. The Roe’s flux is
(20)
The HLLE flux at the interface, xi−1/2, is
(21)
In both cases, the subscripts L and R denote the left and right states of each variable at the interface, and fL,i−1/2 = f(qL,i−1/2) and fR,i−1/2 = f (qR,i−1/2) are the fluxes evaluated using the left and right states of the conserved variables.
For Roe’s solver, λα denotes the α-th eigenvalue of the Roe’s matrix in the conserved variables (see e.g. Sect. 4.3.2 and Appendix B of Stone et al. 2008), and
(22)
where the ℒα and ℛα are the αth left and right eigenvectors of Roe’s matrix, which corresponds to λα. ℒα and ℛα are also rows and columns of the left and right eigenmatrices, ℒ and ℛ. For isothermal hydrodynamics, the eigenvalues of Roe’s matrix are
(23)
where C is the (effective) sound speed. The left and right eigenmatrices are
(24)
Here, we rescaled the effective sound speed with a scaling factor, l, so that C = cs/l, with cs the isothermal or adiabatic sound speed. In the x and y directions, we chose l = ℛ so that C = cs,H; in the z direction, l = Lz so we have C = cs,V. We note that when l = 1, we returned to the original eigenvalues and eigenvectors given in Stone et al. (2008). For adiabatic hydrodynamics, the eigenvalues and the eigenmatrice are a bit more complicated than the isothermal case as the (modified) energy equation is also solved. The corresponding quantities are shown in Appendix A.
Similarly, for the HLLE solver,
(26)
Here, λM and λ0 denote the maximum and minimum eigenvalues of Roe’s matrix given above, υx,L and υx,R are the velocity component normal to the interface in the left and right states, respectvely, and CL = cs,L/l, CR = cs,r./l are the effective sound speed computed from the left and right states. For the HLLC solver, the middle contact wave is also included. To compute the fastest wave speed including the middle wave, the rescaled sound speeds, CL and CR, were also used to estimate the pressure in the intermediate states. In the middle wave speed estimation processes, the pressure terms, p*, that originate from the momentum equations were replaced with p*/l2.
The spatial reconstruction makes use of the left and right eigenmatrices of the Roe’s matrix in the primitive variables, and was modified accordingly. For isothermal hydrodynamics, the eigenmatrices are identical to the original ones presented in Appendix B of Stone et al. (2008), with the isothermal sound speed replaced by the effective sound speed, C, in our case, as was illustrated previously. For adiabatic hydrodynamics, the eigenmatrices are again in a different form, and are shown in Appendix A. We implemented this modification for both piecewise linear (PLM) and piecewise parabolic (PPM) spatial reconstructions.
Rescaling the sound speed implies the modification of the Courant–Friedrichs–Lewy (CFL) condition. We further considered the effect of the time-varying sound speed on the stability condition, by applying the leapfrog finite difference equation (FDE) to a harmonic oscillator with a time-varying frequency. Our new CFL condition is thus given by
(27)
where C∘ is the CFL number2, and the original physical sound speed has been replaced by the effective sound speeds, cs,H and cs,V. The effect of the time-varying sound speed is reflected in υ(βx), υ(βy), and υ(βz), with βx = βy = − U0/cs, and βz = − Ur0 Lz/cs. Both β and υ(β) are dimensionless. For a collapsing system (β > 0), which is the focus of this work, we have
(28)
For a static system, β = 0, we have υ(β → 0) = 1, which goes back to the original CFL condition, but with rescaled sound speeds. The case of the expanding system (β < 0), as well as the derivation of the new CFL condition, are described in Appendix B.
This local model is physically meaningful with periodic boundary conditions. Further extension of the shear-periodic boundary condition (local model with weak rotation) will be considered in future work.
4 Numerical tests
In this section, we present benchmark tests of the local box for nonlinear solutions (Sec. 4.1) and linear waves (Sec. 4.2). Fiducially, we used Roe’s solver with the van Leer integrator (VL2) and PPM spatial reconstruction for our showcase tests, with an isothermal EoS. Other parameters of simulation setups, including simulation box sizes and resolutions, are described in each subsection (Sects. 4.1, 4.2, and 4.3) for each individual tests. Additionally, we present convergence studies in Sec. 4.4, examining both Roe and HLL solvers, considering various time integrators including VL2, second- and third-order Runge–Kutta (RK2, RK3) integrators, with both PPM and PLM reconstructions, and both isothermal and adiabatic EoSs (with γ = 1.4) tested. The CFL number was set to C∘ = 0.4 for shear flow tests (Sec. 4.1) and C∘ = 0.2 for wave tests (Sec. 4.2). We set the code unit with an initial background (unperturbed) gas density of ρ0 = 1 and a physical sound speed of cs0 = 1. The length unit of the code, L0 = 1, was set by the unit of the local coordinate system defined in Eq. (1) (see also the right panel of Fig. 1). We also defined the initial values of the length scales in the local model, R0 ≡ ℛ(0), Lz0 ≡ Lz(0), for convenience. For each numerical test, we compared our numerical results with analytical solutions to validate the accuracy and robustness of our implementation. We briefly summarize the analytical solutions corresponding to the tests in each subsections separately. Details of the analytical solutions are presented in LL23.
4.1 Nonlinear solutions
4.1.1 Horizontal shear flows
Consider a local model with a spatially homogeneous density, ρ = ρ(t), and a purely horizontal velocity field,
(29)
(30)
(31)
This is a horizontal shear flow that varies only in the vertical direction. Without loss of generality, we can set A(0) = 1, and the solution to this local model is given with the evolution of the flow amplitude, A,
(32)
yielding the following velocity field at time, t,
(33)
(34)
In global geometry, this growth in the horizontal flow velocity is a byproduct of the conservation of angular momentum during the spherical collapse.
We tested this solution by setting a local model of uniform collapse, with R0 = 10.0L0, U0 = −1.0cs0, Lz0 = 10.0L0, and UR0 = 0.0. The initial flow structure was set with υx0 = 0.025cs0, υy0 = 0.0125cs0, and kz = 4π. The simulation box size was set with Lx,sim = Ly,sim = 0.5L0, Lz,sim = 1.0L0, with a resolution of 128 cells per unit length. We note that our choice of simulation box size quickly becomes too large to be physically meaningful; however, this is irrelevant to numerically testing the local model. The initial distribution of this velocity field is shown in the upper panel of Fig. 2, presenting a 3D visualization of the simulation box. Arrows mark the direction of the velocity vectors, while colors mark the velocity magnitude.
The middle panel of Fig. 2 present the simulation result with the peak shear velocity as a function of ℛ, where the peak shear velocity is measured by the maximum value of the horizontally averaged flow velocity. As was expected, the shear flow is amplified as the collapse proceeds, in excellent agreement with the analytical solution. We further defined the relative error with L2 norm of each variable, ,
(35)
where N is the total cell number, i denotes each cell, and i and
i,exact are the numerical result and analytical solution for
, respectvely. We used the maximum absolute value of the analytical solution over the domain,
max,exact = max(|
i,exact|), to normalize the relative error, in order to avoid meaninglessly large relative errors when the analytical solution is zero or a small number. The time evolution of err(υx) is displayed in the lower panel of Fig. 2, showing that our result matches the analytical solution to machine precision.
4.1.2 Elevator flows
We considered a second class of nonlinear flows in the local model, with a spatially homogeneous density, ρ = ρ(t), and a purely vertical velocity field,
(36)
(37)
This vertical “elevator flow” has a solution with a temporally evolving flow amplitude,
(38)
if without loss of generality we set B(0) = 1. This leads to a flow velocity of
(39)
These elevator flows can only occur with vertically periodic boundary condition, and could be an artifact of periodic boundaries.
To test the solution of these elevator flows, we set the local model with R0 = 10.0L0, U0 = 0.0, Lz0 = 10.0L0, and UR0 = −0.1cs0L0. The flow structure was initialized with υz0 = 0.05cs0 and kx = 8π. We chose a 2D simulation box with Lx,sim = 0.5L0 and Lz,sim = 1.0L0, and a resolution of 256 cells per unit length. This initial flow structure is displayed in the upper panel of Fig. 3.
The middle panel of Fig. 3 presents the simulation result of the peak flow velocity as a function of Lz. The peak flow velocity was obtained by the maximum value of the vertically averaged flow velocity. The elevator flow grows with time, closely matching the analytical expectation. We further measured the relative error, err(υz), defined in Eq. (35). The lower panel of Fig. 3 of the time evolution of err(υz) shows that our result matches the analytical solution to machine precision.
![]() |
Fig. 2 Test case of horizontal shear flows. Upper panel: 3D visualization of the initial spatial distribution of the shear flow in our simulation. Arrows mark the direction of shear flow, and the total flow velocity magnitude is mapped to colors (see the color bar). Middle panels: solid red line shows υx/υx0 vs. R, i.e., normalized shear velocity as a function of global radius of the local box, showing growth of shear velocity as collapse proceeds, closely matches the analytical expectation (dashed black lines). The result of υy is identical to that of υx and is not shown here. Lower panel: time evolution of relative error err(υx). |
4.1.3 Diagonal flows
We next considered a class of local models with a spatially homogeneous density of ρ = ρ(t) and nonzero horizontal and vertical velocities. The solution for these diagonal flows combines A = (ℛ/R0)−2 of the horizontal shear flows and B = (Lz/R0)−2 of the elevator flows such that
(40)
(41)
where, without loss of generality, we have aligned the diagonal flow with the x axis. In the global picture, these diagonal flows can be interpreted as a spiral with the pitch angle evolving over time as the collapse proceeds, since the horizontal and vertical components of the flow velocity change independently.
We tested this solution by setting up a local model with R0 = 10.0L0, U0 = −1.0cs0, Lz0 = 10.0L0, and UR0 = −0.1cs0/L0, with an initial flow structure of υx0 = 0.025cs0, υz0 = 0.05cs0, and ky = 8π. The simulation box was set with a box size of Lx,sim = Ly,sim = 0.5L0, Lz,sim = 1.0L0, and a resolution of 128 cells per unit length. Figure 4 presents the flow structure at the beginning of the simulation (ℛ = R0), as well as later on at ℛ = 0.3R0. Variation in the flow direction is observed as the collapse proceeds. As U0 > UR0Lz, the horizontal flow component grows faster than the vertical component, causing the flow orientation to evolve toward the horizontal direction. The time evolution of flow amplitude closely matches the analytical solution in both the horizontal and vertical directions. The results are largely similar to those shown in Sects. 4.1.1 and 4.1.2, and are not presented here.
4.2 Linear perturbation (waves)
We examined the properties of linear perturbations in the local model (for details of the linear wave solutions refer to Sect. 4 and Appendix B of LL23; these are briefly summarized here). The density and velocity perturbations, δρ and δv, of a diagonally propagating sound wave can be written as
(42)
(43)
(44)
where the (complex) wave amplitudes (X, Π) fulfill
(45)
(46)
Here, we have introduced the sound wave frequency
(47)
Without loss of generality, we aligned the wave propagating direction with the x − z plane so that δυy = 0.
The behavior of the wave is characterised by two regimes, depending on the value of the ratio between the wave period and the evolution timescale of the background flow, . For a slowly varying background flow with ωtbg ≫ 1, the wave is described well by a Wentzel–Kramers–Brillouin (WKB) approximation. The WKB approximation for the density and velocity perturbations, δρ and δν, of a diagonally propagating sound wave is
(48)
(49)
(50)
where X± is some (complex) constant.
For a more general test, the exact solution for the sound waves can be obtained for a given collapse profile. One defines a length scale of reference L = L(t), and adopts
(51)
where b = Lz/ℛ is the aspect ratio of the local reference frame, and the subscription “0” denotes the initial values. This length scale of reference can be equal to the global radius of the cloud, L = ℛ, which can be achieved by adopting L0 = ℛ0, and which can have either b = b0 (constant aspect ratio) or kz = 0 (purely horizontal waves). If we consider a collapse profile in the form of L = L0 (1 − t/tc)β, where tc denotes the collapse timescale, this profile includes two typical types of collapse profiles; namely, uniform collapse (L = L0 + U0t) where β = 1, and a free-fall profile where β = 2/3. For uniform collapse, the exact solution for density and velocity is
(52)
(53)
(54)
Here, we have introduced , and |k0| is the initial amplitude of k.
For a general power law profile with β ≠ 1, the exact solution can be written as
(55)
(56)
(57)
and Jν and Yν correspond to Bessel functions of the first and second kinds, respectvely, with an order of ν = 1/ (2|1 − β|).
Additionally, given the relation , the collapsing system can evolve from the WKB regime (ωtbg ≫ 1) to the freeze-out regime (ωtbg ≲ 1), where the wave has a longer period than the background flow timescale, and can thus show a roughly static pattern. The corresponding length scale at freeze-out can be obtained by setting ωtbg = 1:
(59)
For a diagonally propagating sound wave, if the aspect ratio b ≠ 1, the sound wave generates a shear flow perpendicular to the wave propagation direction in the local reference frame. This shear flow can be characterized by
(60)
For a constant aspect ratio, b, this shear flow is not a physical phenomenon, but rather simply a consequence of the choice of a spatially anisotropic reference frame. However, with a varying aspect ratio during the collapse, the shear flow generated by the sound wave has a physical origin, as it cannot be removed by a time-independent rescaling of the anisotropic reference frame.
These aforementioned wave properties in the local model deserve careful testing numerically. Here, we tested the solutions for a horizontal sound wave with both a uniform and a general power law collapse profile separately, as well as the solution for diagonal sound waves.
![]() |
Fig. 3 Same as Fig. 2, but for the test case of elevator flows. The vertical flow velocity grows as the simulation box collapses, closely matching the analytical expectation. |
![]() |
Fig. 4 3D visualization of the spatial distribution of the diagonal flow test. Arrows mark the direction of the flow, and the total flow velocity magnitude is mapped to colors (see the color bar). Left panels are the initial setup (ℛ = ℛ0); right panels are at ℛ = 0.3R0. Flow direction varies as the collapse proceeds. |
4.2.1 Horizontal sound waves with uniform collapse
We first considered a purely horizontally propagated traveling wave with a uniform collapse profile. This can also provide a comprehensive view of the wave behavior in the local box. We set up the following perturbation:
(61)
(62)
(63)
where A0 is some (real) constant, and cs,H0 = cs0/R0 is the initial value of the effective horizontal sound speed defined in Sec. 2. This perturbation corresponds to wave amplitudes of (X, Π) = .
For the numerical test of the local model, we chose a collapse profile with R0 = 10.0L0, U0 = 1.0cs0, Lz0 = 1.0L0, and UR0 = 0, with a perturbation amplitude of A0 = 10−6, kx = 16π. The simulation box size was set as Lx,sim = 0.5L0, Lz,sim = 1.0L0, with a resolution of 256 cells per unit length.
The relative amplitude of gas density perturbation, δρ/ρ, was measured with respect to the background gas density, ρ, at each time point, which was obtained by averaging the gas density over the domain. The space–time plot of the vertically averaged value of δρ/ρ presented in the upper panel of Fig. 5 shows the evolution of the wave pattern. The wave propagates rightward with a time-varying effective sound speed, cs,H = cs0/ℛ. As the collapse proceeds, the wave propagation is accelerated as ℛ decreases, matching the overlaid curves of theoretical phase shift profiles over time. This time-varying effective sound speed is not physical in the global picture, but is instead due to our choice of a time-dependent reference frame in the local model.
Our choice of collapse profile results in the wave operating in the WKB regime. It is thus appropriate to compare the evolution of the wave amplitude to that expected from the WKB approximation solution. The lower panel of Fig. 5 shows this comparison of the relative amplitude of density perturbation, Aρ; = max (δρ/ρ). The numerical result of the Aρ evolution agrees well with the WKB approximation solution, Aρ = Aρ,0ℛ−1/2.
Similarly, fora purely vertical sound wave, the corresponding length scale becomes Lz instead of ℛ. We have also numerically tested the vertical sound wave and found that the effective vertical sound speed evolves following cs,H = cs0/Lz, and the relative amplitude of δρ follows , which aligns with the theoretical expectations.
4.2.2 Horizontal waves with nonuniform collapse
We next tested the horizontal sound waves with a more general power law collapse profile. In order to compare with the exact solution Eqs. (55)–(57), we considered a collapse profile with β = 1/2 and tc = 1, i.e., ℛ = R0(1 − t)1/2, and correspondingly initiated the perturbation of velocity and density as
(64)
(65)
(66)
where according to Eq. (58), s0 = s(0) = (tc/t0)1−β, and t0 can again be obtained from Eq. (58). A0 is some real constant, and this perturbation corresponds to A = 0, B = A0/2 in Eqs. (55)–(57). For the numerical test, we set R0 = 1.0L0, Lz0 = 1.0L0, UR0 = 0, with a perturbation of A0 = 10−5, kx = 2π, and a simulation box size of Lx,sim = 2.0L0, Lz,sim = 1.0L0, with a resolution of 256 cells per unit length.
Similar to Sect. 4.2.1, the relative amplitude of the gas density perturbation, δρ/ρ, was measured at each time point, where ρ was obtained by averaging the gas density over the domain. The space–time plot of the vertically averaged relative gas density, δρ/ρ, displayed in the upper panel of Fig. 6 shows that this perturbation leads to a horizontal standing wave. This wave exhibits phase reversal with each half wave period. We further measured the relative amplitude of the density perturbation by performing a Fourier transform to the wave pattern, and identified the amplitude of the dominant frequency component. The time evolution of the relative amplitude, δρ/ρ, is shown in the lower panel of Fig. 6, with the length scale corresponding to the freeze-out regime, Lfreezeout (see Eq. (59)), marked with a vertical dotted line. The result is in good agreement with the analytical solution in both the WKB regime (ℛ > Lfreezeout) and the freeze-out regime (ℛ < Lfreezeout). The L2 norm of the relative error for the relative amplitude, err(δρ/ρ), defined in Eq. (35) is on the order of 10−5 when the absolute value of the amplitude solution is much larger than 0. When the solution of the amplitude is close to 0 (i.e., close to the period of phase reversal), the relative error, err(δρ/ρ), can be up to the order of 10−2, partly due to the division of a small analytical solution value, and partly due to inherent limitations and numerical inaccuracies that can arise near the phase reversal period. The slightly diffused wave pattern during the phase reversal can also be seen in Fig. 6.
![]() |
Fig. 5 Test case of purely horizontal sound wave with uniform collapse. Upper panel: space–time plot for vertically averaged relative density variation. Dashed lines show the theoretical expectation for phase evolution, in good agreement with the numerical results. Lower panel: relative amplitude of perturbation, δρ/ρ, as a function of R from the simulation (solid red line). The wave operates under the WKB regime, and is closely consistent with the theoretical expectation from the WKB approximation solution (dashed black line). The wiggles in the simulation results are not present in the WKB solution, but are consistent with the exact solution presented in Eq. (54). |
![]() |
Fig. 6 Test case of purely horizontal sound wave with a nonuniform collapse profile. Upper panel: space-time plot for vertically averaged relative density variation. Lower panel: relative amplitude of perturbation, δρ/ρ, as a function of R from the simulation (solid red line), consistent with the analytical solution (dashed black line). The vertical dotted line marks the length scale, Lfreezeout, corresponding to the freeze-out regime. |
4.2.3 Diagonal sound waves
Diagonally propagating sound waves may introduce numerical complexities, as they generate shear flows perpendicular to the direction of wave propagation. This is illustrated in the upper panel of Fig. 4, with the wave pattern characterized by the density.
We tested diagonal sound waves by generating density and velocity perturbations of
(67)
(68)
(69)
(70)
where A0 is some (real) constant. This perturbation corresponds to an initial wave amplitude of (X0, Π0) = . Recalling Eqs. (45), (46), and (60), this pure diagonal sound wave generates a shear flow that can be characterized by
(71)
(72)
and the dynamics of the system of (X, Π) can be obtained from Eqs. (45) and (46). Thus, the amplitude X can be obtained by solving the equation
(73)
where the wave frequency, ω, is given in Eq. (47).
We numerically tested the diagonal sound wave by setting R0 = 1.0L0, U0 = 1.0cs0, Lz0 = 1.0L0, and UR0 = 0, with a perturbation of A0 = 10−5, kx = 2π, kz = 4π, and a simulation box of Lx,sim = 2.0L0, Lz,sim = 1.0L0, with a resolution of 512 cells per unit length.
In the lower panel of Fig. 7, we compare the amplitude of the shear flow generated by the diagonal sound wave in the numerical simulation with the analytical solution. The numerical result is obtained by calculating the shear flow, δυshear, in each grid, and performing a 2D Fourier transform of the shear flow map, followed by identifying the amplitude of the dominant frequency component. The analytical solution of the shear flow amplitude, 2csℛ−2kxkz (1 − b−2)X, was obtained by numerically solving for the wave amplitude, X, at each time step according to Eq. (73), with the explicit Runge–Kutta integration method of order 5(4) (Dormand & Prince 1980). The numerical result and analytical solution of the shear flow amplitude are in good agreement. We further measured the L2 norm of the relative error for the shear strength, δυshear, in each grid, and got err(δυshear) as defined in Eq. (35) of the order of 10−6.
![]() |
Fig. 7 Test case for diagonal sound wave. Upper panel: illustration of the diagonal sound wave and the shear flow generated. Lower panel: amplitude of the shear flow generated by the wave as a function of R. The numerical result (solid red line) closely matches the analytical solution (dashed black line). |
4.3 Conservation laws
The continuity equation of the local model, Eq. (5), gives the conservation law for the total mass,
(74)
where J ≡ ℛ2 Lz is the Jacobian determinant in the local coordinate system.
The momentum equation of the local model, Eqs. (6)–(8), gives the conservation law for the total momenta,
(75)
where is the covariant velocity component in each direction,
(76)
Another conserved quantity in the local model is the kinetic helicity, Hk, of the relative flow, which is a quantity associated with the vorticity. It is defined as
(77)
where ωi is the fluid (contravariant) vorticity,
(78)
and ϵijk is the volume element of the local model. Details and derivations of the conservation laws in the local model are discussed in Sect. 2.5 of LL23.
In order to validate these conservation laws in the local box, we performed a simulation run with a uniform background density, ρ0 = 1, introducing white noise perturbations in the velocity field, υx, υy, and υz, with a relative amplitude of 10−6. We chose a collapse profile with R0 = 10.0, U0 = −1.0cs0, Lz0 = 10.0, and UR0 = −0.1, and set the simulation box size as Lx,sim = Ly,sim = 0.5, Lz,sim = 1.0, with a resolution of 32 cells per unit length. This test run is labeled as “WN.” For comparison, we also performed a simulation with the same setup for the white noise, but without collapse (i.e., U0 = UR0 = 0), which is labeled as “WN0”. In addition, the result of the horizontal shear flow test (see Sect. 4.1.1) was also used to examine the conservation laws.
We measured the volume-averaged density, , total momenta, Π, and kinetic helicity, Hk, in the simulations, and present in Fig. 8 the normalized variation in
, Π, and Hk as a function of time. Our results demonstrate that the modified mass conservation law (
) and the conservation law for total momenta (Πi) are both satisfied to machine precision. The kinetic helicity conservation, although preserved to machine precision for the shear flow test, exhibits significant deviation for the white noise simulations. This discrepancy persists in both WN and WN0 cases, suggesting that the lack of conservation is not a consequence of the integration of the collapsing box. Instead, it is likely due to intrinsic characteristics of the ATHENA++ framework, which in certain situations is not strictly vorticity conserving, likely because the higher-order Godunovscheme generally introduces a degree of numerical diffusion (see e.g. Seligman & Laughlin 2017). In the white noise case in which vorticity is dominated by fine-scale structures, there is increased numerical dissipation at small scales because the slope limiter is expected to lead to the nonconservation of Hk. For an adiabatic EoS, the entropy conservation law is also validated; this is further presented in Appendix C.
4.4 Convergence study
We performed a convergence study with the diagonal wave (Sect. 4.2.3) test, as it shows the maximum possible error. Basic simulation setups such as wave properties and box sizes are the same as presented before. Fiducially, simulations were performed with Roe’s solver, the VL2 integrator, PPM reconstruction, and an isothermal EoS. The CFL number in the convergence study was fixed to 0.2. However, we validated the numerical stability of our code for CFL numbers up to 0.4 for VL2 and 0.8 for RK3. We further explored the effects of different Riemann solvers, time integrators, spatial reconstruction methods, and the EoS on the numerical performance of the code. We also varied the spatial resolution of our simulation in units of cells per unit length. The simulation setups for test runs that we performed for the convergence study are presented in Table 1. Figure 9 shows the time-averaged L2 relative error, err(δυshear), as a function of resolution.
Our results demonstrate that our code generally achieves convergence between the first and second orders for the diagonal wave test. The performances for test cases HLLE and RK3 remain generally similar to the fiducial case, while a lower order of spatial reconstruction (PLM) leads to a lower accuracy at lower resolutions. These tests with an isothermal EoS achieve second-order convergence at lower resolutions, with a tentative trend toward the first order at high resolutions. This trend is likely attributed to time-dominated errors at higher resolutions, as our source term incorporation is first-order in time. We also explored the higher-order method to integrate source terms with the VL2 integrator, which was not as efficient as our first-order method, showing a comparable or slightly higher error, and reduced stability for adiabatic flows. Therefore, we chose to use our first-order method. The source term can also be incorporated into higher-order methods with Runge–Kutta integrators. We leave the development of higher-order methods to future work.
The simulation runs with the adiabatic EoS (for both the Roe and the HLLC solvers) exhibit systematically higher (~ an order of magnitude) error levels, with first-order convergence. This pattern is likely attributed to the complexities that the adiabatic EoS introduces to the system, including the additional energy equation to be solved. Additionally, we note that our simulations may encounter stability issues in scenarios involving supersonic adiabatic flows with added perturbations (white noise). Future work will address these challenges and improve the handling of adiabatic processes within our simulations.
![]() |
Fig. 8 Conservation laws for tests of horizontal shear flow (left) and of white noise in the velocity field (right). For each case, the normalized variation in |
Simulation setup for the convergence study.
![]() |
Fig. 9 Time-averaged L2 norm relative error for diagonal sound wave test, as a function of simulation resolution (cells per unit length). Overall, convergence between the first and second orders is achieved (see the dashed lines for reference). |
5 Discussion
The complete series of tests presented in Sec. 4, including the challenging diagonal wave test that induces shear flows, demonstrates the robustness and stability of our ATHENA++ code implementation, confirming its capability to handle complex local model simulations effectively. ATHENA++ has also been used to incorporate similar local models; namely, the uniform expanding box for studying stellar winds (Squire et al. 2020) and the anisotropic expanding box implemented in the MHD-PIC module (Sun & Bai 2023). These previous numerical implementations have concentrated on investigating MHD characteristics and the behavior of magnetized waves. Our study focuses on a comprehensive examination of the hydrodynamic aspects of the expanding and collapsing box. Moreover, while our code is adaptable to scenarios akin to the aforementioned expanding cases, here we focus on collapsing systems. This is motivated not only by our interest in probing protostellar collapse, but also by the fact that collapsing environments – with their intrinsic amplification of density, velocity, vorticity, and energy – are potentially more abundant in instabilities. Indeed, our observations of the growth of shear flows and wave-induced shear underline the possibility of hydrodynamic instabilities during protostellar collapse. Moreover, related previous work (Robertson & Goldreich 2012) also presented an increase in turbulent velocities (“adiabatic heating”) of contracting gas. It is thus both numerically and scientifically important to conduct a thorough investigation and validation of this local collapsing box model before delving into MHD studies.
The magnetic field plays an important role in protostellar collapse, as the core must lose angular momentum during the collapse (see e.g. review of McKee & Ostriker 2007), and magnetic braking has been considered as one of the main mechanisms driving angular momentum transfer during core collapse and forming protoplanetary disks with realistic properties (e.g. Allen et al. 2003; Price & Bate 2007; Hennebelle & Fromang 2008; Commerçon et al. 2011; Masson et al. 2016; Machida et al. 2016; Wurster et al. 2016; Hennebelle et al. 2020, etc.). The extension to MHD for the theoretical model of the expanding or collapsing box will likely follow a similar approach to the MHD eccentric shearing box (Ogilvie & Barker 2014). The numerical implementation will presumably be similar to the approach described in this paper. However, magnetic fields in collapse processes may break spherical symmetry (Galli & Shu 1993; Hennebelle 2001; Galli et al. 2006), and thus may require further modifications of the local model. One should also be careful with the treatment of the background magnetic field gradient, in order to avoid spurious instabilities (Latter & Papaloizou 2017).
The local deviation from the spherical symmetry, such as that caused by the magnetic field discussed above, leads to the need for further generalization of this local box toward more realistic collapse profiles. A weak rotation in the global picture can be incorporated by simply using shear-periodic boundary conditions, whereas a strong rotation requires modification of the local model. Another factor to be considered is physical collapse profiles. As is shown in Sect. 4.2.2, a time-dependent collapse profile can transition between different regimes, including from subsonic to supersonic flows, or from WKB to freeze-out wave regimes. It is thus necessary to study the effect of various collapse profiles, such as the typical profile of Shu (1977).
Dust grains are the building blocks of planets. Recent surveys of protoplanetary disks across different stages of disk evolution (e.g. Pascucci et al. 2016; Barenfeld et al. 2016; Ansdell et al. 2018; Long et al. 2018; Cieza et al. 2019; Tychoniec et al. 2020; Tobin et al. 2020; van der Marel & Mulders 2021) show that the available solid mass to form planets is rapidly depleted during the early stage of disk evolution, likely indicating an early start of planet formation. Observational (Pagani et al. 2010; Kataoka et al. 2015; Galametz et al. 2019; Valdivia et al. 2019) and theoretical (e.g. Ormel et al. 2009; Hirashita & Yan 2009; Guillet et al. 2020; Bate 2022, etc.) works both suggest that dust grains are growing in collapsing protostellar cores, significantly prior to the protoplanetary disk phase. With further incorporation of dust, our local collapse simulation will be capable of resolving and investigating dust dynamics and their interactions with gas, especially with potential instabilities and other local phenomena, which have a rich potential to concentrate dust during the collapse. Moreover, the interaction between dust and gas drag force might give rise to additional dust-related instabilities. One example, the streaming instability (Youdin & Goodman 2005), has already been proven to be a promising avenue for planetesimal formation in protoplanetary disks, and has recently been extended to a family of instability caused by dust-gas interaction (resonance drag instability, Squire & Hopkins 2018), which could potentially operate to concentrate dust in the context of protostellar collapse. These dust concentration mechanisms in the initial collapse phase might significantly expedite the onset of planet formation, potentially starting before the complete disk formation. This aligns with the aforementioned observational indicators of early planet formation in very young stellar systems. The implementation of dust for the current model is likely similar to the method presented in this paper. However, the relative drift between the background flows of gas and dust has to be implemented in an ad hoc way, similar to the approach of the shearing box (e.g., Bai & Stone 2010).
6 Conclusion
We implemented the local collapsing box model of LL23 into ATHENA++, and performed benchmark tests for the behavior of nonlinear and linear solutions in the local model. This model features a spatially uniform time-dependent Cartesian geometry, allowing (shear-)periodic boundary conditions. The key points of this study are:
We numerically implemented the local model by modifying the Riemann solver with a rescaled anisotropic effective sound speed and an adapted energy equation, together with operator split-source terms;
Our benchmark test of horizontal shear flow shows that the shear is amplified as the collapse proceeds, in agreement with the analytical solution to machine precision. This corresponds to a zonal flow in the global picture, and the flow amplification reflects angular momentum conservation. Similar phenomena are verified with tests of the elevator flow and the diagonal flow, which also have corresponding physical interpretations;
Our benchmark tests of sound waves match the theoretical predictions of wave speed and amplitude evolution over time in the local model, for both uniform and general power-law collapse profiles. Additionally, a diagonal wave generates a shear flow, which could pose numerical challenges that are well handled by our implementation. The growth and evolution of this shear flow are also rigorously tested in our simulation, with a typical relative error level of 10−4−10−6;
The density, momentum, and vorticity in the local model increase as the collapse proceeds. The corresponding (modified) conservation laws for mass and total momenta are validated in our code;
Our code generally achieves convergence between the first and second orders for the diagonal wave-generated shear flow test. Further improvement in performance with an adiabatic EoS is necessary for future work.
This local collapsing box implementation in ATHENA++ is not only crucial for probing the local phenomena and hydrodynamic instabilities of protostellar collapse, but also holds potential for future adaptations to include MHD processes and dust dynamics with more realistic collapse profiles. Its ability and potential to simulate local behaviors and instabilities and the interplay of various physical factors positions it as a valuable tool for advancing studies of protostellar collapse and disk formation, as well as the earliest stages of planet formation. The code will be available upon request for collaboration and will be publicly released shortly after additional benchmark tests and improvements.
Acknowledgements
We thank Francesco Lovascio, Benoît Commerçon, Xuening Bai, Xiaochen Sun, and Lile Wang for constructive discussions. We thank the anonymous referee for a thorough and helpful report. Z.X., E.L. and G.L. acknowledge the support of the European Research Council (ERC) CoG project PODCAST No. 864965.
Appendix A Adiabatic equation of state
The eigenvalues and eigenmatrices in the conserved variables with an adiabatic EoS are needed to construct the fluxes of the conserved variables in the Roe’s solver. These quantities are provided hereafter
(A.1)
(A.2)
(A.3)
where Na ≡ 1/ (2C2) and γ′ = γ − 1. In addition, in the local model we have redefined
(A.4)
(A.5)
The subscripts 1,2,3 in L1,L2,L3 and υ1, υ2, υ3 denote the corresponding quantities along the three axes of a Cartesian coordinate system, with an order that respects the right-hand orientation, i.e., in the order of (x, y, z), (y, z, x), or (z, x, y). L1, L2, L3 are the characteristic length scales on the corresponding directions, which is ℛ on x and y directions, and Lz on the z direction.
The eigenvalues and eigenmatrices in the primitive variables are needed for the reconstruction algorithm. These quantities are
(A.7)
(A.8)
(A.9)
Appendix B Derivation of the CFL condition
In addition to the standard CFL condition, we further consider the effect of the time-varying sound speed on the stability condition. Consider a harmonic oscillator equation
(B.1)
with a time-varying frequency ω (t) = ω0 (1 + δΔt), where ω0 is the initial frequency, and . Applying leapfrog FDE
(B.2)
and look for solutions of the form , leading to
(B.3)
This yields solutions of
(B.5)
and the stability condition is thus
(B.6)
Let , the stability condition then becomes
(B.7)
For β = 0, the stability condition becomes x < 2, i.e., , which goes back to the original CFL condition. It is convenient to write the CFL condition in the form of
, where υ(β) the additional “correction” term that reflects the time-varying sound speed, and here we have υ(β) = 1.
For β > −1/8, the stability condition eq. (B.7) yields
(B.8)
For β < −1/8, the stability condition eq. (B.7) yields
(B.10)
Appendix C Conservation of entropy
For an adiabatic EoS in the absence of shocks, the local model leads to the conservation law for the following quantity
(C.1)
For a system with uniform density, this leads to conservation for the following quantity related to the entropy
(C.2)
where M is the total mass in the system, and
(C.3)
the total internal energy in the system is thus Uint/ J.
In order to validate the conservation law of entropy in the local collapsing box, we present the results for the horizontal shear flow test runs (see Sect. 4.1.1) with adiabatic EoS, using Roe and HLLC solvers, for examining the conservation law. These runs are marked with the same labels as in Table 1.
For both the Roe and HLLC solvers, K is conserved to the order of 10−10.
![]() |
Fig. C.1 Conservation law of entropy with adiabatic EoS for tests of horizontal shear flow. For each case, the normalized variation of K are presented as a function of time. The results with the Roe’s solver are presented with red curves, while the results with the HLLC solver are presented in blue. The conservation law for entropy is satisfied to the order of 10−10. |
References
- Allen, A., Li, Z.-Y., & Shu, F. H. 2003, ApJ, 599, 363 [NASA ADS] [CrossRef] [Google Scholar]
- Ansdell, M., Williams, J. P., Trapman, L., et al. 2018, ApJ, 859, 21 [NASA ADS] [CrossRef] [Google Scholar]
- Bai, X.-N., & Stone, J. M. 2010, ApJS, 190, 297 [NASA ADS] [CrossRef] [Google Scholar]
- Barenfeld, S. A., Carpenter, J. M., Ricci, L., & Isella, A. 2016, ApJ, 827, 142 [Google Scholar]
- Bate, M. R. 2022, MNRAS, 514, 2145 [CrossRef] [Google Scholar]
- Bott, A. F. A., Arzamasskiy, L., Kunz, M. W., Quataert, E., & Squire, J. 2021, ApJ, 922, L35 [NASA ADS] [CrossRef] [Google Scholar]
- Cieza, L. A., Ruíz-Rodríguez, D., Hales, A., et al. 2019, MNRAS, 482, 698 [Google Scholar]
- Commerçon, B., Hennebelle, P., & Henning, T. 2011, ApJ, 742, L9 [CrossRef] [Google Scholar]
- Dormand, J., & Prince, P. 1980, J. Computat. Appl. Math., 6, 19 [CrossRef] [Google Scholar]
- Galametz, M., Maury, A. J., Valdivia, V., et al. 2019, A&A, 632, A5 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
- Galli, D., & Shu, F. H. 1993, ApJ, 417, 220 [NASA ADS] [CrossRef] [Google Scholar]
- Galli, D., Lizano, S., Shu, F. H., & Allen, A. 2006, ApJ, 647, 374 [NASA ADS] [CrossRef] [Google Scholar]
- Gottlieb, S., Ketcheson, D. I., & Shu, C.-W. 2009, J. Sci. Comput., 38, 251 [Google Scholar]
- Grappin, R., & Velli, M. 1996, J. Geophys. Res., 101, 425 [NASA ADS] [CrossRef] [Google Scholar]
- Grappin, R., Velli, M., & Mangeney, A. 1993, Phys. Rev. Lett., 70, 2190 [NASA ADS] [CrossRef] [Google Scholar]
- Guillet, V., Hennebelle, P., Pineau des Forêts, G., et al. 2020, A&A, 643, A17 [EDP Sciences] [Google Scholar]
- Harten, A., Lax, P. D., & Leer, B. v. 1983, SIAM Rev., 25, 35 [CrossRef] [Google Scholar]
- Hawley, J. F., Gammie, C. F., & Balbus, S. A. 1995, ApJ, 440, 742 [Google Scholar]
- Hennebelle, P. 2001, A&A, 378, 214 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
- Hennebelle, P., & Fromang, S. 2008, A&A, 477, 9 [CrossRef] [EDP Sciences] [Google Scholar]
- Hirashita, H., & Yan, H. 2009, MNRAS, 394, 1061 [Google Scholar]
- Hennebelle, P., Commerçon, B., Lee, Y.-N., & Charnoz, S. 2020, A&A, 635, A67 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
- Kataoka, A., Muto, T., Momose, M., et al. 2015, ApJ, 809, 78 [Google Scholar]
- Larson, R. B. 1969, MNRAS, 145, 271 [Google Scholar]
- Latter, H. N., & Papaloizou, J. 2017, MNRAS, 472, 1432 [CrossRef] [Google Scholar]
- Long, F., Pinilla, P., Herczeg, G. J., et al. 2018, ApJ, 869, 17 [Google Scholar]
- Lynch, E. M., & Laibe, G. 2023, MNRAS, 524, 1710 [NASA ADS] [CrossRef] [Google Scholar]
- Machida, M. N., Matsumoto, T., & Inutsuka, S.-i. 2016, MNRAS, 463, 4246 [Google Scholar]
- Masson, J., Chabrier, G., Hennebelle, P., Vaytet, N., & Commerçon, B. 2016, A&A, 587, A32 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
- McKee, C. F., & Ostriker, E. C. 2007, ARA&A, 45, 565 [Google Scholar]
- Ogilvie, G. I., & Barker, A. J. 2014, MNRAS, 445, 2621 [NASA ADS] [CrossRef] [Google Scholar]
- Ogilvie, G. I., & Latter, H. N. 2013, MNRAS, 433, 2403 [NASA ADS] [CrossRef] [Google Scholar]
- Ormel, C. W., Paszun, D., Dominik, C., & Tielens, A. G. G. M. 2009, A&A, 502, 845 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
- Pagani, L., Steinacker, J., Bacmann, A., Stutz, A., & Henning, T. 2010, Science, 329, 1622 [Google Scholar]
- Pascucci, I., Testi, L., Herczeg, G. J., et al. 2016, ApJ, 831, 125 [Google Scholar]
- Pattle, K., Fissel, L., Tahani, M., Liu, T., & Ntormousi, E. 2023, in Protostars and Planets VII, eds. S. Inutsuka, Y. Aikawa, T. Muto, K. Tomida, & M. Tamura, Astronomical Society of the Pacific Conference Series, 534, 193 [Google Scholar]
- Penston, M. V. 1969, MNRAS, 144, 425 [NASA ADS] [CrossRef] [Google Scholar]
- Pineda, J. E., Arzoumanian, D., Andre, P., et al. 2023, in Protostars and Planets VII, eds. S. Inutsuka, Y. Aikawa, T. Muto, K. Tomida, & M. Tamura, Astronomical Society of the Pacific Conference Series, 534, 233 [NASA ADS] [Google Scholar]
- Price, D. J., & Bate, M. R. 2007, Ap&SS, 311, 75 [NASA ADS] [CrossRef] [Google Scholar]
- Robertson, B., & Goldreich, P. 2012, ApJ, 750, L31 [Google Scholar]
- Roe, P. L. 1981, J. Computat. Phys., 43, 357 [NASA ADS] [CrossRef] [Google Scholar]
- Seligman, D., & Laughlin, G. 2017, ApJ, 848, 54 [NASA ADS] [CrossRef] [Google Scholar]
- Shi, C., Velli, M., Tenerani, A., Rappazzo, F., & Réville, V. 2020, ApJ, 888, 68 [Google Scholar]
- Shu, F. H. 1977, ApJ, 214, 488 [Google Scholar]
- Sironi, L., & Narayan, R. 2015, ApJ, 800, 88 [NASA ADS] [CrossRef] [Google Scholar]
- Squire, J., & Hopkins, P. F. 2018, MNRAS, 477, 5011 [Google Scholar]
- Squire, J., Chandran, B. D. G., & Meyrand, R. 2020, ApJ, 891, L2 [Google Scholar]
- Stone, J. M., Gardiner, T. A., Teuben, P., Hawley, J. F., & Simon, J. B. 2008, ApJS, 178, 137 [NASA ADS] [CrossRef] [Google Scholar]
- Stone, J. M., Tomida, K., White, C. J., & Felker, K. G. 2020, ApJS, 249, 4 [NASA ADS] [CrossRef] [Google Scholar]
- Sun, X., & Bai, X.-N. 2023, MNRAS, 523, 3328 [NASA ADS] [CrossRef] [Google Scholar]
- Tenerani, A., & Velli, M. 2017, ApJ, 843, 26 [Google Scholar]
- Tobin, J. J., Sheehan, P. D., Megeath, S. T., et al. 2020, ApJ, 890, 130 [CrossRef] [Google Scholar]
- Toci, C., Galli, D., Verdini, A., Del Zanna, L., & Landi, S. 2018, MNRAS, 474, 1288 [CrossRef] [Google Scholar]
- Toro, E. F. 1999, Riemann Solvers and Numerical Methods for Fluid Dynamics (Berlin, Heidelberg: Springer) [CrossRef] [Google Scholar]
- Tsukamoto, Y., Maury, A., Commercon, B., et al. 2023, in Astronomical Society of the Pacific Conference Series, 534, eds. S. Inutsuka, Y. Aikawa, T. Muto, K. Tomida, & M. Tamura, 317 [Google Scholar]
- Tychoniec, Ł., Manara, C. F., Rosotti, G. P., et al. 2020, A&A, 640, A19 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
- Valdivia, V., Maury, A., Brauer, R., et al. 2019, MNRAS, 488, 4897 [NASA ADS] [CrossRef] [Google Scholar]
- van der Marel, N., & Mulders, G. D. 2021, AJ, 162, 28 [NASA ADS] [CrossRef] [Google Scholar]
- Velli, M., Grappin, R., & Mangeney, A. 1992, in Electromechanical Coupling of the Solar Atmosphere, eds. D. S. Spicer, & P. MacNeice, American Institute of Physics Conference Series, 267, 154 [NASA ADS] [Google Scholar]
- Wurster, J., Price, D. J., & Bate, M. R. 2016, MNRAS, 457, 1037 [Google Scholar]
- Youdin, A. N., & Goodman, J. 2005, ApJ, 620, 459 [Google Scholar]
The velocities here are the contravariant components of the velocity. In this article, we use subscript indices to denote the spatial dimensions (e.g., υi) for convenience, as opposed to superscript indices (e.g., υi) as is conventionally used. We also apply Einstein summation throughout this paper, where repeated indices (subscript or superscript) are implicitly summed over.
Time discretization in ATHENA++ was performed following the method of lines, for which the stability condition depends on both the number of dimensions and the integration method. In a 1D problem, or in multi-dimensional problems with a strong-stability preserving integrator (e.g. second- and third- order Runge–Kutta, Gottlieb et al. 2009), the stability condition is generally C∘ ≤ 1. However, for a 2D or 3D van Leer integrator, the condition is C∘ ≤ 1/2.
All Tables
All Figures
![]() |
Fig. 1 Cartoon illustration of the local collapsing box model. On the left, the global geometry depicts a domain moving radially due to background flow. The volume of the domain varies as it approaches the center of the spherical cloud, leading to changes in density. A compressing domain leads to a density increase, as is shown by the progressively darker blue color in the sequence. The horizontal domain size is proportional to ℛ(t), establishing the horizontal length scale in the local model (middle panel). The vertical length scale, Lz (t), is determined by the distance between the domain’s inner and outer radial boundaries, which is set by the background flow. Inside each box, a waveform signal illustrates how certain physical quantities evolve in the local model. The width of the waveform represents quantities that remains fixed in the local frame (e.g., wavelength). The amplitude of the waveform represents specific physical quantities that are expected to be constant in the global geometry throughout the collapse (e.g., angular momentum, isothermal physical sound speed). In the local reference frame (right), the corresponding quantities such as the shear flow velocity or the effective sound speed are amplified as the collapse proceeds and the length scale shrinks in the domain, while quantities such as the wavelength remain the same. This phenomenon is visually demonstrated by the vertically stretched waveforms in the sequence. For a more accurate and detailed understanding of this process, one should refer to the equations in Sec. 2. |
In the text |
![]() |
Fig. 2 Test case of horizontal shear flows. Upper panel: 3D visualization of the initial spatial distribution of the shear flow in our simulation. Arrows mark the direction of shear flow, and the total flow velocity magnitude is mapped to colors (see the color bar). Middle panels: solid red line shows υx/υx0 vs. R, i.e., normalized shear velocity as a function of global radius of the local box, showing growth of shear velocity as collapse proceeds, closely matches the analytical expectation (dashed black lines). The result of υy is identical to that of υx and is not shown here. Lower panel: time evolution of relative error err(υx). |
In the text |
![]() |
Fig. 3 Same as Fig. 2, but for the test case of elevator flows. The vertical flow velocity grows as the simulation box collapses, closely matching the analytical expectation. |
In the text |
![]() |
Fig. 4 3D visualization of the spatial distribution of the diagonal flow test. Arrows mark the direction of the flow, and the total flow velocity magnitude is mapped to colors (see the color bar). Left panels are the initial setup (ℛ = ℛ0); right panels are at ℛ = 0.3R0. Flow direction varies as the collapse proceeds. |
In the text |
![]() |
Fig. 5 Test case of purely horizontal sound wave with uniform collapse. Upper panel: space–time plot for vertically averaged relative density variation. Dashed lines show the theoretical expectation for phase evolution, in good agreement with the numerical results. Lower panel: relative amplitude of perturbation, δρ/ρ, as a function of R from the simulation (solid red line). The wave operates under the WKB regime, and is closely consistent with the theoretical expectation from the WKB approximation solution (dashed black line). The wiggles in the simulation results are not present in the WKB solution, but are consistent with the exact solution presented in Eq. (54). |
In the text |
![]() |
Fig. 6 Test case of purely horizontal sound wave with a nonuniform collapse profile. Upper panel: space-time plot for vertically averaged relative density variation. Lower panel: relative amplitude of perturbation, δρ/ρ, as a function of R from the simulation (solid red line), consistent with the analytical solution (dashed black line). The vertical dotted line marks the length scale, Lfreezeout, corresponding to the freeze-out regime. |
In the text |
![]() |
Fig. 7 Test case for diagonal sound wave. Upper panel: illustration of the diagonal sound wave and the shear flow generated. Lower panel: amplitude of the shear flow generated by the wave as a function of R. The numerical result (solid red line) closely matches the analytical solution (dashed black line). |
In the text |
![]() |
Fig. 8 Conservation laws for tests of horizontal shear flow (left) and of white noise in the velocity field (right). For each case, the normalized variation in |
In the text |
![]() |
Fig. 9 Time-averaged L2 norm relative error for diagonal sound wave test, as a function of simulation resolution (cells per unit length). Overall, convergence between the first and second orders is achieved (see the dashed lines for reference). |
In the text |
![]() |
Fig. C.1 Conservation law of entropy with adiabatic EoS for tests of horizontal shear flow. For each case, the normalized variation of K are presented as a function of time. The results with the Roe’s solver are presented with red curves, while the results with the HLLC solver are presented in blue. The conservation law for entropy is satisfied to the order of 10−10. |
In the text |
Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.