This repository contains code to demonstrate the use of weaklib opacity tables.
The driver, named wlInterpolationTest, reads a matter profile; i.e., radius, mass density, temperature, and electron fraction from a snapshot of a core-collapse supernova simulation. It generates an energy grid similar to that used in multigroup neutrino transport simulations.
Neutrino opacities due to emission/absorption and iso-energetic scattering on nucleons and nuclei for electron neutrinos and antineutrinos are computed by interpolation of the opacity tables located in wl-Op-SFHo-15-25-50-AbIs.h5. The interpolated opacities are written to an HDF5 file (OpacityProfiles.h5), and can be plotted with the MATLAB script PlotInterpolatedOpacities.m.
Neutrino opacities due to emission/absorption and iso-energetic scattering on nucleons and nuclei for electron neutrinos and electron antineutrinos are computed by interpolation of the opacity tables located in wl-Op-SFHo-15-25-50-AbIs.h5.
The interpolated opacities are written to an HDF5 file (OpacityProfiles.h5), and can be plotted with the MATLAB script PlotInterpolatedOpacities.m.
To compile and run the code you need a Fortran compiler, hdf5, mpi, and a copy of weaklib (available upon request).
To compile, specify the location of weaklib by setting the enviroment variable WEAKLIB_DIR in the Makefile. You also need to specify the location of hdf5 by setting LIB_HDF5 and INC_HDF5 appropriately. Sucessful compilation of the code will generate the executable wlInterpolationTest_exe.
To compile, specify the location of weaklib by setting the enviroment variable WEAKLIB_DIR in the Makefile.
You also need to specify the location of hdf5 by setting LIB_HDF5 and INC_HDF5 appropriately.
Sucessful compilation of the code will generate the executable wlInterpolationTest_exe.
Before runnig the code, link in the opacity table and the equation of state table to weaklib_tables/microphysics/InterpolationTest; e.g.,