feat(neutrino): Started framework for neutrino loss

Neutrino loss is essential for neutrino cooling. Started adding
framework to track this. Reaclib reactions use a simple heuristic where
electron capture reactions loss 100% of their energy to neutrinos
whereas beta decay reactions loose 50% of their energy to neutrinos
This commit is contained in:
2025-11-27 14:34:20 -05:00
parent 7b67f3064a
commit 05175ae87c
13 changed files with 259 additions and 119 deletions

View File

@@ -54,6 +54,9 @@ namespace gridfire::engine {
std::map<fourdst::atomic::Species, T> dydt{}; ///< Derivatives of abundances (dY/dt for each species).
T nuclearEnergyGenerationRate = T(0.0); ///< Specific energy generation rate (e.g., erg/g/s).
std::map<fourdst::atomic::Species, std::unordered_map<std::string, T>> reactionContributions{};
T neutrinoEnergyLossRate = T(0.0); // (erg/g/s)
T totalNeutrinoFlux = T(0.0); // (neutrinos/g/s)
StepDerivatives() : dydt(), nuclearEnergyGenerationRate(T(0.0)) {}
};

View File

@@ -778,6 +778,7 @@ namespace gridfire::engine {
const double Na = Constants::getInstance().get("N_a").value; ///< Avogadro's number.
const double c = Constants::getInstance().get("c").value; ///< Speed of light in cm/s.
const double kB = Constants::getInstance().get("kB").value; ///< Boltzmann constant in erg/K.
const double MeV_to_erg = Constants::getInstance().get("MeV_to_erg").value; ///< Conversion factor from MeV to erg.
};
enum class JacobianMatrixState {