This project creates XML files of data from pre-supernova and post-supernova models by Rauscher et al. The output from the XML files may then be extracted by NucNet Tools routines. Please note the authors request that you contact them before using their data in your publications.
If you have not previously done so, install the necessary [libraries]. Next, if you have not previously done so, create a projects directory:
** mkdir projects**
Change into the projects directory:
** cd projects **
Now you can checkout the project:
** svn checkout svn://svn.code.sf.net/p/nucnet-projects/code/trunk/projects/rauscher_xml **
Change into the project directory:
** cd rauscher_xml **
and compile the codes:
** ./project_make **
The project compiled successfully if you see Make succeeded. Otherwise, please submit a Ticket or make a post to the Discussion board (see links above).
To get an XML file of a pre-supernova model, type, for example
** ./make_presn.sh s15 a28 a29**
Here you are choosing an initially 15 solar mass model with rate set a28 used for the model and rate set a29 used for the composition. The models are described in some detail at 2sn.org. If you have trouble with downloading the files because of an untrusted certificate, try setting the environment variable WG_OPT by typing (in a bash environment)
** export WG_OPT=--no-check-certificate**
and then running make_presn.sh again.
For this calculation, the output is the file s15a28a29_presn.xml in the directory ../nucnet-tools-code/data_pub. We can then analyze this code with the usual NucNet Tools analysis codes. To do so, we change into the NucNet Tools analysis directory
** cd ../nucnet-tools-code/examples/analysis**
and make the analysis codes
** make all_analysis**
As examples of what we can do with the XML file, we can print all the properties in the first zone by typing
** ./print_zone_properties ../../data_pub/s15a28a29_presn.xml "[position() = 1]"**
We can print a property in all zones. For example, we can print the mass below (in grams) in all zones:
** ./print_properties ../../data_pub/s15a28a29_presn.xml "mass below"**
We can also print the mass fractions of various species in the zones:
** ./print_mass_fractions_in_zones ../../data_pub/s15a28a29_presn.xml h1 he4 c12 o16**
This blog post shows how to make plots with output from these routines. For example, plot the third column of the output from the ./print_mass_fractions_in_zones command versus the second column of the ./print_properties command above to get a graph of the mass fraction of 4He versus the interior mass coordinate (in grams).
To get an XML file of a post-explosion model, type, for example
** ./make_post.sh s25 a28 d**
This is for the explosive yields of an initially 25 solar mass model using rate set a28 and explosion sentinel d. See 2sn.org for choices of the models. Again, as described above, set the WG_OPT environment variable if the script fails because of an untrusted certificate.
The calculation produces two files in ../nucnet-tools-code/data_pub. The first is s25a28d_expl_full.xml. The first file includes the "zones" called "wind" and "total". "wind" denotes the matter ejected by the star in the form of a wind before the explosion. "total" denotes the total mass ejected.
The second is s25a28d_expl.xml. It does not include the zones "wind" and "total". It is therefore useful for making plots of mass fraction versus interior mass coordinate.
These two XML files can be analyzed with the NucNet Tools analysis routines.
It is possible to create new xml files that contain a subset of the nuclei, reactions, and/or zones in the parent pre-supernova or post-supernova file. This is done with libnucnet example codes. For ease of use, we have written a script to streamline running these codes. To extract a file with nuclei with atomic number less than or equal to 30 in all zones from the parent post-supernova s25a28d_expl.xml file, I type (on one line) in the projects/rauscher_xml directory:
** ./extract_subset.sh ../nucnet-tools-code/data_pub/s25a28d_expl.xml "[z <= 30]" "" "" ../nucnet-tools-code/data_pub/s25a28d_expl_z30.xml**
The output file is s25a28_expl_z30.xml in ../nucnet-tools-code/data_pub. To create a file that selects out zones 500 and larger and nuclides with atomic number less than or equal to 45 from the pre-supernova file s15a28a29_presn.xml, I type (on one line):
** ./extract_subset.sh ../nucnet-tools-code/data_pub/s15a28a29_presn.xml "[z <= 45]" "" "[@label1 >= '500']" ../nucnet-tools-code/data_pub/s15a28a29_presn_500_z45.xml**
The output is s15a28a29_presn_500_z45.xml in ../nucnet-tools-code/data_pub.
To create a file that selects out zones 500 to 700, nuclides with atomic number less than or equal to 35, and only weak decay reactions from the pre-supernova file s15a28a29_presn.xml, I type (on one line):
./extract_subset.sh ../nucnet-tools-code/data_pub/s15a28a29_presn.xml "[z <= 35]" "[(count(reactant) = 1) and (product[contains(.,'neutrino')])]" "[@label1 >= '500' and @label1 <= '700']" ../nucnet-tools-code/data_pub/s15a28a29_presn_500_700_weakonly_z35.xml
You may find it desirable to create multiple xml files at one time. For example, you may wish to create multiple post-supernova xml files. To do so, you can download the script many_exec.sh to your rauscher_xml directory. Make sure the script is executable by typing
** chmod +x many_exec.sh**
Now edit the script to change the line
EXECUTABLE=./the_executable
to
EXECUTABLE=./make_post.sh
Now create a file input.txt with lines like
s15 a28 c
s19 a28 g
s20 a28 n
s21 a28 g
s25 a28 d
s30 a28 A
s35 a28 A
s40 a28 A
Execute the script by typing
./many_exec.sh input.txt
This will execute make_post.sh once for each line in input.txt using the input in each line as the input arguments to make_post.sh. If you use an input.txt created as suggested above, upon successful completion, you will have eight _expl.xml and eight _expl_full.xml files in your ../nucnet-tools-code/data_pub directory. You can similarly run the make_presn.sh script multiple times by appropriately changing EXECUTABLE and the input file and then running many_exec.sh.
Wiki: Home
Wiki: libraries
Wiki: nuclear_decay
Wiki: simple_snII