Running a network calculation at constant entropy

In my last post and the one before, I showed how to invert the entropy equation to compute, for a given entropy, the density for a set temperature and electron fraction or the temperature for a set density and electron fraction. In this post, I will show how to run a network calculation at constant entropy by inverting the entropy at each time step to obtain the proper temperature.

I begin by changing into the examples/network directory by typing

cd nucnet-tools-code/examples/network

To run the network at constant entropy per nucleon, I use the code run_constant_entropy.cpp. This code starts the network in NSE (nuclear statistical equilibrium) and then allows the material to expand according to the prescribed hydrodynamics. I will choose an exponential expansion of the density with e-folding timescale τ = 0.1 seconds. To do this, I type

make clean

I then set the hydro environment variable by typing (since I am in a bash shell)

export NNT_HYDRO_CODE=exponential_expansion

or, since the exponential expansion is the default, I can simply type

unset NNT_HYDRO_CODE

If you are in a different shell, you will need to adjust your setting of the environment variable accordingly. I now compile the necessary code by typing

./examples_make

Once the code has compiled successfully, I ensure I have the necessary data by typing

make data

I then edit the ../../data_pub/zone.xml file until it looks like

<?xml version="1.0" encoding="UTF-8"?>

<zone_data>

  <zone>

<optional_properties>

  <property name="entropy per nucleon">50.</property>
  <property name="t9">10.</property>
  <property name="Ye">0.5</property>
  <property name="tend">100.</property>
  <property name="steps">5</property>
  <property name="time">0.</property>
  <property name="tau">0.1</property>
  <property name="dt">1.e-5</property>

</optional_properties>

<mass_fractions/>

  </zone>

</zone_data>

With this input, I will run a network calculation at constant entropy per nucleon of 50 (in units of Boltzmann's constant k). Such a high entropy might be found in winds from proto-neutron stars. The calculation will start in NSE at T9 = 10 and electron fraction Ye = 0.5. The code will find the density such that this NSE gives the appropriate entropy per nucleon of 50 k. The calculation will then have the density decline exponentially with time on a time scale τ = 0.1 seconds.

The run_constant_entropy code works by finding the density a time t + Δt, where Δt is the time step. The code then evolves the abundances from t to t + Δt with the current guess for the temperature T(t + Δt). It then computes the total entropy per nucleon with the abundances at t + Δt and compares to the input entropy. It then adjusts the guess for T(t + Δt). It repeats this procedure until the computed entropy agrees with the input entropy. This iteration procedure is done as a one-dimensional root finding.

To run the code, I type

./run_constant_entropy ../../data_pub/my_net.xml ../../data_pub/zone.xml out_50.xml "[z <= 60]"

Due to the repeated calls to the network evolution at each time step, this calculation takes a while (~1-2 hours) to run. Once it finishes, I compute the entropy per nucleon during the calculation by typing

cd ../thermo

./examples_make

cd ../network

../thermo/compute_thermo_quantity out_50.xml "baryon entropy per nucleon" "electron entropy per nucleon" "photon entropy per nucleon" "total entropy per nucleon" > entropy_50.txt

I get the temperature as a function of time step by typing

cd ../analysis

./examples_make

cd ../network

../analysis/print_properties out_50.xml t9 > t9_50.txt

By plotting the second through fifth columns of entropy_50.txt versus the second column of t9_50.txt, I get this figure:

entropy_50

From this figure, I see that the entropy per nucleon is indeed a constant 50 k throughout the expansion. The entropy per nucleon is roughly shared equally among the constituents at the beginning (T9 = 10), but, as the temperature falls, the nucleons assemble into heavier nuclei, which shifts entropy from the baryons into the electron-position pairs and the photons. Later, the electron-positron pairs annihilate and shift entropy into the photons. Below T9 = 1, the entropy in photons starts to shift back into the baryons (nucleons and nuclei) and the residual electrons (that survived the annihilation of the electron-positron pairs). The reason for this is that, were the entropy in the now "classical" electrons and baryons constant, the density would be proportional to T3/2. In contrast, if the photons completely dominated the entropy, the density would be proportional to T3. In this way, the expansion at later times has ρ ∝ Tb, where b is between 3/2 and 3. At each step of the expansion, then, the temperature will be a little less than it would have been if b = 3. This means the photon entropy will have dropped. To accommodate this, entropy must shift into the electrons and baryons.

The following movie shows the evolution of the elemental abundances during the calculation compared to equilibrium abundances. Since the entropy of the calculation is high, the abundances start in light particles at the beginning and the final abundances show a large number of alpha particles.

For contrast, I now try a calculation at the low entropy 1 k. This is matter much more characteristic of that that would be found in a thermonuclear supernova than of that that found in a core-collapse supernova. I edit the ../../data_pub/zone.xml file so that the entropy per nucleon is 1. This means I change the zone.xml file to have the line

<property name="entropy per nucleon">1.</property>

I rerun the calculation by typing

./run_constant_entropy ../../data_pub/my_net.xml ../../data_pub/zone.xml out_1.xml "[z <= 60]"

Once the calculation is done, I make the entropy graph from the appropriate output of out_1.xml. My graph is this:

entropy_1

Here I see that the electrons and baryons completely dominate the entropy throughout the expansion of the matter. Entropy does shift from the baryons to the electrons and photons as nucleosynthesis occurs, but once nucleosynthesis has stopped and the photon entropy has become completely negligible, the entropy in the various components remains unchanged for the rest of the expansion.

This movie shows the elemental abundances evolution for this s/k = 1 calculation. In contrast to the s/k = 50 calculation, this calculation starts with a large abundance of heavy nuclei. It ends with no light particles (nucleons and alpha particles), which is in keeping with the low entropy.

Posted by Bradley S. Meyer 2016-02-20


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks