Skip to content

Bigash94/ppn_Monte_Carlo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ppn_Monte_Carlo

Files and scripts for MC reaction rate uncertainty simulations


HOW TO PREPARE AND RUN MC SIMULATIONS FOR A REACTION-RATE UNCERTAINTY STUDY


  1. Start by copying the files and folders from here to the ppn run directory.

    Prepare a list (the text file "reaction_factors.txt") of isotopes whose (n,g), (a,n), or (n,p) reaction rates are to be varied with their maximum variation factors in the last columns in the following format:

    C   13   1.190476190   (a,n)
    N   14   1.067216981   (n,p)
    PROT   1.078740157   (n,g)
    H     2   1.066666667   (n,g)
    C   12   1.064935065   (n,g)

    (n,g) reactions can easily be replaced with other reactions, e.g. (p,g), etc. Use the reaction list order found in the networksetup file.

  2. The python program "prep_mc_network.py" located in MC_setup uses this list to generate a large number (say, "nmc=10000") of "networksetup_imc.txt" files, where "imc=1,nmc", with randomly selected multiplication factors for the listed reaction rates from a "networksetup.txt" file that is used in the benchmark model.

    Don't forget to copy networksetup.txt to networksetup_0.txt AFTERWARDS!

    This program also generates text file "reaction_factors_multi.txt" that contains arrays of the applied variation factors for each of the MC runs.

  3. Run the shell script onezone_MC_sims.sh that cycles over "imc=1,nmc" to copy the generated "networksetup_imc.txt" files one after another to your ppn run directory and starts the runs.

    The file ppn_physics.input must have ININET=3, so that ppn.exe uses the current file networksetup.txt.

    Check the content of onezone_MC_sims.sh to see if the names of the run and result directories are correct.

  4. Then use a jupyter notebook to read the MC simulation data and analyze them.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published