wiki:u/erica/CoreCollapseBlog

Version 43 (modified by Erica Kaminski, 7 years ago) ( diff )

4/15/18

Fixed the AMR criteria so that just the inner regions of the sphere are refined and moved to modeling the collapse in 3D, beginning with just an octant. Running the code for a freefall time using the density of the inner region (~100 milliseconds) required extremely small initial time steps to avoid high cfls and nans. Kept increasing the initial max speed to get around this. Once the simulation got past a few frames, noticed strange behavior along the boundary, which looked like a pile up of mass there. The boundary conditions are currently set to outflow only on the faces of the cube, and the Poisson BC's to multipole…

Looking at Phi along the faces of the boundary at the first frame showed unexpected behavior — spheres of hi Phi centered on the outer faces of the cube, but no longer on the high density core. Switching

Was noticing strange behavior along the boundary, which looked like a pile up of material there.

3/15/ 18

Running the same setup but at 8x higher resolution gives profiles that more closely match the input progenitor density:

and a zoom-in:

Am moving onto 3D now and exploring if the code can handle this setup over a couple of freefall times. However, need to adjust the refinement criteria as currently, the entire domain is being resolved to the maximum level.

Here are pressure, density, and temperature color plots:

I think the rings in the above image may be plotting artifacts, as the difference in color bands isn't that great compared to those in density and pressure…

I also might need to adjust in these simulations to more closely match the progenitor peak temperature of T=7e+9. in this simulation setup.

3/15/18

Have a working 2D solution on the grid —

As shown in Figure 1, Astrobear interpolates the progenitor density profile (red diamonds, Fig. 1) onto arbitrary positions of the mesh (i.e. cell centers, blue curve).


Figure 1. A comparison of the interpolated density profile from the HSE self gravity module in Astrobear (blue) to the supplied progenitor density profile (red).

Feeding the (pre-interpolated) progenitor density profile through the HSE numerical integrator (to compute an HSE pressure profile for specified progenitor density profile and external pressure) results in an HSE pressure profile that is then interpolated onto cell centers (Fig. 2). The values of the ambient medium are just the constant progenitor profiles beyond a radius containing 3 solar masses ().


Figure 2. A comparison of the interpolated pressure profile from the HSE self gravity module in Astrobear (blue) to the supplied progenitor pressure profile (red).

Note, Astrobear’s output doesn't line up exactly with the input progenitor profiles towards the center of the core. I suspect this has to do with interpolation — for instance, the average density calculated for the cell centers should be resolution dependant (to maintain a constant enclosed mass irrespective of resolution), which would move the density profiles away from each other in Fig. 1. The steeper the gradient, the greater this deviation, which explains why the profiles differ more closer to the origin. This effect would translate to the pressure profile, given the relationship between pressure and density in this simulation (a gamma-law EOS).

Figures 3 & 4 are zoom-ins of the density and pressure profiles between the innermost zone (located at dx=5.6e+7 cm) and the radius at which the profiles begin to noticeably deviate. Note the progenitor profile has data sampling down to radius of r=7.84e+5 cm, so about 2 orders of magnitude finer resolution than in this example simulation.


Figure 3. Zoom-in of density profiles described in text.


Figure 4. Zoom-in of pressure profiles described in text.

In addition to the given input progenitor profile (red curve) and the lineout from the simulation (blue curve), I’ve plotted two additional profiles in these figures (accidentally their colors are swapped in the different plots). The first is the initial profile 'object' (populated with the progenitor input values). This is just the input progenitor values after they have been read into a readable format for astrobear’s HSE solver (i.e. a “profile object”).

The second is the profile object after it has been sent through the HSE solver. Note, although it can’t be seen here, the initial and final density profile objects are exactly identical and they perfectly line up with the progenitor density profile, but the initial and final pressure profiles are marginally different (~<1%) near the center of the core, with the initial pressure profile curve being identical to the progenitor pressure profile. This is because the HSE solver calculates what the pressure profile should be in HSE, given the input density profile (and external pressure). Since the input and output pressure profiles deviate slightly indicates that the initial progenitor profile wasn’t exactly in HSE (to within numerical uncertainty). Again, the larger deviation of the blue curves is due to interpolation onto the coarser grid of this simulation.

When we are talking overall differences of ~ in the density profile, perhaps this relatively small discrepancy shouldn’t be worried about too much… Although, it is curious. I am going to run a simulation with a finer resolution to compare to these results here.

The run files used to produce this simulation are attached as "*.*_mar15"

3/5/18

The HSE module takes as input:

-Pout (ambient pressure that the HSE module integrates inward from)
-Starting density profile that the HSE module uses when solving the discretized HSE equation in spherical coords (and then interpolates along with the density profile onto the grid)

An initial run was producing weird results near the boundary between the clump and the ambient medium, and this had to do with commenting out the smoothing of the profiles in clump.f90 (should not comment these out if you want no smoothing of the clump outer boundary into the ambient medium!! instead you should set your smoothing length to 0 in the clumpdef).

2/28/18

To get the progenitor profiles from excel into a fortran readable format for astrobear, open the desired sheet and go to save as. Select “MS-DOS formatted text (.txt)”.

The input file for the code needs to have the number of entries as a header, the next line specifies column values and units, and the following nentries lines have the values of the progenitor separated by spaces. (See example attached to this page).

2/26/18

The Lane Emden equation non-dimensionalizes the HSE equation in an attempt to find analytic solutions. However, analytic solutions only exist for certain values of the polytropic index. Thus, if we are looking for numerical solutions, we can instead just start with the equation of HSE in spherical coordinates and discretize it:

The order of accuracy of this discretization depends on the way M_enc is calculated (see Jonathans description on the wiki). Since there might be some undesirable error depending on how M_enc is calculated, might be worthwhile to see how Liu’s approximate analytic solution for a gamma=5/3 sphere compares to the numerically integrated solution found by this method.

What this discretization gives us then is (for an arbitrary gamma law EOS), the pressure at each zone of a spherical mass distribution in HSE. However, note this method requires a boundary condition (the starting pressure, ) and the density profile (). As written, the algorithm takes the starting pressure to be the external pressure, and using the density profile integrates this equation inwards to the center of the sphere. Eventually then, the inner pressure should match the one from the profiles Chris sent me, if that thing is in or near HSE as he says it is.

Note, if we were to chose to integrate in the opposite direction then we would instead have to define a cut-off radius to the integration, which would yield the outer pressure of a sphere in HSE given a particular density profile and specified inner pressure boundary condition.

The algorithm that performs the above described operation in AstroBEAR is called the ‘HSE self-gravity profiles object’. This object interpolates (using cubic spline) the density profile of the polytrope for arbitrary resolution given a finite, discrete set of density profile points. Using this interpolated function, the pressure at each cell center is then calculated using the above function (M_enc is calculated inside this object).

2/7/18

Fryer sent progenitor data. The density, pressure, temperature, and velocity profiles of this progenitor look like:

The goal is to get these profiles initialized on an Eulerian grid in astrobear and to make sure the solution can be numerically stable over multiple dynamical times. The question of stability is interesting and something we will turn to next.

The pressure and density profiles of a polytropic sphere in hydrostatic equilibrium (HSE) are given by the Lane-Emden equation. This equation is derived by combining the equation of HSE with Poisson’s equation for gravity and the pressure/density relationship of a polytrope:

where is the polytropic index. Note the polytropic index is related to the adiabatic index () through the equation:

Exact analytic solutions of the Lane-Emden equation exist only for certain values of . These are:

However, for other values of the Lane-Emden must be numerically integrated.

In astrobear, I have written a solver for which corresponds to the Isothermal limit (). In principle, we would be able to initialize an isothermal sphere on the grid using the inner and outer density of the sphere and its radius, but given the density contrast here is >> than the critical value of 14.1, this sphere would be highly gravitationally unstable — I imagine its evolution would be close to that of the singular isothermal sphere.

Thus, we need an alternative solution to modeling the progenitor.

I could easily modify the algorithm I have for setting up a polytropic sphere in HSE for (which corresponds to an adiabatic sphere of ). This would add a new approximate analytic solution to the module for this new value of . However, first will explore using the code's prebuilt routines for numerically integrating the equation of HSE.

2/5/18

We would like to model the progenitor of a core collapse supernova in astrobear. The project will be a parameter study to explore the role of magnetic fields and turbulent perturbations on the collapsing core.

Attachments (25)

Note: See TracWiki for help on using the wiki.