General-relativistic Radiation Transport Scheme in Gmunu II: Implementation of Novel Microphysical Library for Neutrino Radiation – Weakhub

We introduce Weakhub , a novel neutrino microphysics library that provides opacities and kernels beyond conventional interactions used in the literature. This library includes neutrino-matter, neutrino-photon, and neutrino-neutrino interactions, along with corresponding weak and strong corrections. A full kinematics approach is adopted for the calculations of β -processes, incorporating various weak corrections and medium modifications due to the nuclear equation of state. Calculations of plasma processes, electron neutrino-antineutrino annihilation, and nuclear de-excitation are included. We also present the detailed derivations of weak interactions and the coupling of them to the two-moment based general-relativistic multi-group radiation transport in the G eneral-relativistic mu ltigrid nu merical ( Gmunu ) code. We compare the neutrino opacity spectra for all interactions and estimate their contributions at hydrodynamical points in core-collapse supernova and binary neutron star postmerger remnant, and predict the effects of improved opacities in comparison to conventional ones for a binary neutron star postmerger at a specific hydrodynamical point. We test the implementation of the conventional set of interactions by comparing it to an open-source neutrino library NuLib in a core-collapse supernova simulation. We demonstrate good agreement with discrepancies of less than ∼ 10% in luminosity for all neutrino species, while also highlighting the reasons contributing to the differences. To compare the advanced interactions to the conventional set in core-collapse supernova modelling, we perform simulations to analyze their impacts on neutrino signatures, hydrodynamical behaviors, and shock dynamics, showing significant deviations.


INTRODUCTION
In high-energy astrophysics, copious amounts of neutrinos are emitted when matter reaches high densities and temperatures, particularly in situations where neutrinos play important roles, such as in core-collapse supernovae (CCSNe) and compact binary coalescence.
The explosion mechanisms of CCSNe have been extensively studied in the past, with particular emphasis on neutrino transfer.In the CCSNe scenario, neutrinos are involved in various aspects, including enhancing shock propagation after core-bounce, reviving nghoyin522@gmail.com the shock through neutrino heating, the long-term neutrino cooling and nucleosynthesis of the newly formed proto-neutron star (PNS) following a successful explosion (Wilson 1985;Bethe & Wilson 1985;Bethe 1990;Fischer et al. 2012) (see Janka (2012); Burrows (2013); Janka et al. (2016); Janka (2017) for recent reviews).
The evolution of a long-lived super/hypermassive neutron star remnant formed from a binary neutron star (BNS) merger is primarily governed by turbulence, magnetohydrodynamics instabilities and neutrino effects (Hotokezaka et al. 2013;Fujibayashi et al. 2017;Kiuchi et al. 2018;Radice 2017;Radice et al. 2018).Neutrinos play a critical role in altering the proton fraction of ejected material, contributing to the shedding of matter as a sub-relativistic neutrino-driven wind, as well as facilitating cooling processes (Dessart et al. 2009;Hotokezaka et al. 2013;Metzger & Fernández 2014;Perego et al. 2014;Foucart et al. 2016cFoucart et al. , 2015Foucart et al. , 2016b;;Radice et al. 2016;Fujibayashi et al. 2017).Also, neutrinos may play a role in the surrounding torus of the remnant (if any), and could potentially help power an ultrarelativistic jet as the source of short gamma-ray bursts (Ruffert et al. 1997;Rezzolla et al. 2011;Just et al. 2016).
In Part I of the paper Cheong et al. (2023), we mentioned the formulations of general-relativistic multi-frequency radiation transport module within the General-relativistic multigrid numerical (Gmunu) code (Cheong et al. 2020(Cheong et al. , 2021(Cheong et al. , 2022)), which the code has been widely used in multiple applications (Ho-Yin Ng et al. 2020;Leung et al. 2022;Yip et al. 2023).The module is based on the two-moment general-relativistic multi-frequency radiative transfer scheme (Thorne 1981;Shibata et al. 2011;Cardall et al. 2013a), including the mathematical formulations, numerical methods of the treatment of closure relation, energy-space advection, implicit solver, validity treatment, the results of brenchmark code tests and a test result of a CCSN with an open-sourced library NuLib 1 (O'Connor 2015) which provides tabulated values for a basic set of neutrinomatter interactions.
We present Part II of our work and the primary focus is on the microphysical perspective of neutrino interactions, including neutrino-matter, neutrino-photon and neutrino-neutrino interactions.Our calculations base on the "standard theory" of electroweak interactions, which was originally proposed by Glashow (1961); Weinberg (1967); Salam & Matthews (1969); Quigg (1983), and employ perturbative theory, specifically Feynman diagrams and Feynman rules, for the calculations.In the energy range of neutrinos in high-energy astrophysical events, such as CCSN and compact binary coalescence, we primarily utilize the lowest order Feynman diagrams for the majority of our calculations.Over the past decades, various weak interaction rates of neutrinos have been calculated.Examples include the calculations of neutrino opacities for β-processes and scattering with matter (Bruenn 1985;Burrows et al. 2006), the neutrino production rates of the e − e + pair annihilation and nucleon-nucleon Bremsstrahlung (Bruenn 1985;Pons et al. 1998;Misiaszek et al. 2006;Hannestad & Raffelt 1998).These calculations are applied as the collisional source terms in the Boltzmann equation for different simplified neutrino radiative transfer schemes utilized in the modelling of CCSNe (Bruenn 1985; Rampp 1 NuLib, available at http://www.nulib.org.& Janka 2002;Liebendörfer et al. 2005;Müller et al. 2010;O'Connor 2015;Just et al. 2015;Kuroda et al. 2016) and compact binary coalescence (Ruffert et al. 1997;Sekiguchi et al. 2015;Foucart et al. 2016cFoucart et al. , 2015Foucart et al. , 2016a,b;,b;Radice et al. 2022;Musolino & Rezzolla 2023).
In the majority of these studies, a conventional set of neutrino-matter interactions is employed, which includes interactions (a)-(c), (e), (f), (j)-(k), and (m) as listed in table 1 with different approximations for the opacities and kernels (some studies ignore (c) and (m)).Particularly in simulations of compact binary systems, it is common to utilize energy-averaged and approximated opacities and emissivities from the conventional set of interactions.However, an increasing number of studies have shown that the conventional set of neutrino interactions as well as the current prescription of microphysical matter, fail to provide comprehensive explanation for the observed phenomena in these high-energy astrophysical events.
The first point is that additional interactions should be included, for instance, the neutrino pair production by plasma process and electron neutrino-antineutrino pair annihilation exhibit emissivity comparable to that of electron-positron pair annihilation, as well as nucleon-nucleon bremsstrahlung (Braaten & Segel 1993;Ratković et al. 2003;Buras et al. 2003).Furthermore, in high-density environments, the occurrence of inverse β-decay can be favored over electron antineutrino absorption on proton at low neutrino energies.This is due to the effective increase in the energy difference between neutrons and protons at high density (Lohs 2015;Fischer et al. 2020a).For the electron capture by heavy nuclei which is the dominant process during the collapsing phase of a progenitor, the accuracy of spectrum and rate calculation has been improved over the past decades Fuller et al. (1982); Bruenn (1985); Langanke & Martínez-Pinedo (2000); Langanke et al. (2003); Juodagalvis et al. (2010); Raduta et al. (2017); Nagakura et al. (2019).
The second point is that the correction terms and medium modifications are essential and should be included.Horowitz (2002) investigates the inclusion of weak magnetism effects due to parity violation and recoil effects in the opacity.Weak magnetism and strangequark contributions (Horowitz 2002;Melson et al. 2015), as well as nucleon many-body effects (Burrows & Sawyer 1998), are studied to play roles in the calculations of the neutrino-nucleon scattering opacities.Moreover, Martínez-Pinedo et al. (2012); Guo et al. (2020) demonstrated that the medium modifications due to the strong interactions, approximated at the mean-field level, substantially change the neutrino absorption opac-  1. Weak interactions included in Weakhub and their references.Here we denote ν l and νl are neutrino and antineutrino with lepton flavor l ∈ {e, µ, τ } and l ± is the corresponding (anti)lepton, while ν = νe, νe, ν µ/τ , νµ/τ .N represents the nucleon {n, p}, and A(N, Z) represents a heavy nucleus, with an average neutron number N and an average proton number Z.A light is a light nucleus among the light clusters.γ * T/A/M/L represents a massive photon or plasmon with transverse (T), axial (A), mixed-vector (M), or longitudinal (L) mode.The conventional interactions used in NuLib are denoted by daggers ( †) next to the labels.Additionally, absorption opacities in the conventional set use the elastic approximation and apply only approximated weak magnetism and recoil corrections from Horowitz (2002), and apply an isotropic emissivity form for the pair processes and only for heavy lepton neutrinos ν µ/τ , νµ/τ .ities, leading to different dynamics in CCSN simulations.The further studies on the importance of corrections in β-processes are conducted in Roberts & Reddy (2017); Guo et al. (2020);Fischer et al. (2020b).
The conventional set of neutrino interactions and treatments are insufficient to fully capture the role of neutrinos in different astrophysical systems.Therefore, it is necessary to incorporate additional weak interactions, and introduce corrections to ensure consistency between nuclear equation of state (EOS) and neutrino opacities.These requirements are essential for advancing the state-of-the-art in neutrino microphysics within numerical simulations of CCSNe and compact binary mergers.
In this paper, we present Weakhub, a novel neutrino microphysics library designed to be used with various multi-energy radiative transfer schemes in different highenergy astrophysical phenomena.It offers an enhanced collection of opacities and interaction kernels for neutrino weak interactions, complemented by corresponding weak corrections and modifications resulting from the nuclear EOS at mean field approximation.
The paper is organized as follows.In section 2 we present the coupling of the neutrino source terms to the two-moment based general relativistic multi-frequency radiation transport module.In section 3, we present the calculations and numerical methods for the implementation of the neutrino microphysical source term.In section 4, we present the neutrino opacity spectra of different weak interactions for various neutrino flavors.Additionally, we perform two CCSN simulations.One is to compare Gmunu with neutrino libraries NuLib and Weakhub with conventional set of interactions.Another one compares the results using different sets of interactions in Weakhub.This paper closes with conclusions in section 5.
Unless explicitly stated, we adopt the convention that the speed of light c, gravitational constant G, solar mass M ⊙ are all equal to one.For all sections, Greek indices, running from 0 to 3, are used for 4-quantities while the Roman indices, running from 1 to 3, are used for 3-quantities.For simplicity, we utilize the symbols ν l and νl to represent the neutrino and antineutrino of specific flavors, while ν represents any one of the Ng et al.

FORMULATION
The detailed formalism of the two-moment based radiative transfer scheme is discussed in Part I of the paper by Cheong et al. (2023).In our study, we focus on the neutrino radiation, assuming them to have zero rest mass for all flavors and ignore neutrino oscillation effects.The neutrino energy is observed in the comoving frame of the fluid, represented as ε = ℏω ν , where ℏ is the reduced the Planck constant and ω ν is the angular frequency of neutrino radiation.Within the framework of the two-moment based radiative transfer scheme, the moments in the comoving frame of the fluid from zeroth to third-order are defined as (Shibata et al. 2011;Cardall et al. 2013b;Mezzacappa et al. 2020) where f (x µ , ε, Ω) is the neutrino distribution function, depending on the position x µ , the energy observed in the comoving frame ε, the angular part of the momentumspace coordinates Ω. l α is the unit three-vector tangent to the three-momentum in the comoving frame, satisfying the condition u µ ℓ µ = 0, and u µ is the fluid four velocity.Here, dΩ represents the solid angle in the comoving frame.For notational convenience, we can express quantities without their position dependence, e.g.
For a particular neutrino energy, we define an energymomentum tensor T µν as known as the monochromatic energy-momentum tensor and a third-rank momentum moment where T µν and U µνρ are decomposed with respect to the comoving observer with a four-velocity u µ .The evolution equations of the radiation is given by where ∇ ν is the covariant derivative associated with the metric tensor g µν and S µ rad is the neutrino interaction source terms (radiation four-force).
Next, we follow Bruenn (1985); Shibata et al. (2011) in keeping the zeroth to second order of the neutrino distribution function, which is expressed by f 0 (ε), f µ 1 (ε) and f µν 2 (ε): In both the optically thick and semi-transparent regimes, the distribution function f exhibits minor deviations from isotropy in the fluid comoving frame (Bruenn 1985;Shibata et al. 2011).In contrast, in the optically thin regime, the interactions between neutrinos and matter is assumed to be negligible, and therefore, the degree of anisotropy remains unchanged as neutrinos escape from the neutrinosphere.With the approximated distribution function, we obtain where h µν = g µν + u µ u ν is the projection operator.
In the scenario of high energy phenomena of CCSNe and compact binary mergers, neutrino interactions contain not only emission, absorption and elastic scattering but also neutrino-lepton inelastic scattering, neutrino production by pair processes, and electron neutrinoantineutrino annihilation (see table 1).The resultant neutrino interaction source terms can be separated into the terms of the emission and absorption S µ E/A , elastic scattering S µ ES , inelastic scattering S µ IS , pair processes S µ Pair , and the electron neutrino-antineutrino annihilation S µ NPA .The resultant radiation four-force can be expressed by where the general form for each of the source term is given by Here, B(ε, Ω) is called collision integral, and it differs for each type of interaction.Once the radiation four-force S µ rad is obtained, we can couple it with the hydrodynamical evolution equations, accounting for energy, mo-mentum, and lepton number exchange, following equations (28,29,116) in Cheong et al. (2023).For additional information on coupling source terms to the radiation transfer module, we refer readers to Part I paper Cheong et al. (2023).

NEUTRINO MICROPHYSICS
In this section, our focus lies on the microphysical perspective.Neutrino interactions considered in Weakhub are listed in table 1.We also derive and modify calculations based on previously-listed references in the same table 1.The formats, validity and error handling treatments of the library are discussed in appendix A.
Unless explicitly mentioned, we assume that matter and photons are in a state of local thermoequilibrium (LTE), whereas neutrinos may not necessarily be.Although weak interactions can bring matter deviating from LTE instantly, weak interactions occur over timescales that are dominantly longer than those of strong and electromagnetic interactions, which promptly restore matter and photons to LTE.On the other hand, we assume that matter is in chemical equilibrium with strong and electromagnetic interactions (nuclear statistical equilibrium), while neutrinos may not necessarily be in a state of weak chemical equilibrium (β-equilibrium).

Neutrino Absorption and Emission
The absorption and emission processes are described by the collision integral, as expressed in (Bruenn 1985;Rampp & Janka 2002), given by: where j(ε) and κ a denote the emissivity and absorption opacity (inverse mean free path), [1 − f (ε, Ω)] corresponds to the final state fermion phase space blocking factor.By using the detailed balance relation (Kirchhoff-Planck relation), the absorption opacity corrected for stimulated absorption is introduced as where is the Fermi-Dirac distribution function of the neutrino, T is the temperature, k B is the Boltzmann constant and µ eq ν the chemical potential of the neutrino in β-equilibrium.The chemical potential of electron flavour neutrino and antineutrino in β-equilibrium are µ eq νe = µ p + µ e − − µ n and µ eq νe = −µ eq νe , where µ i is the chemical potential with the particle species i (including the rest mass).The degeneracy of heavy lepton neutrinos are assumed to be zero, i.e. µ eq νx = 0.However, this assumption regarding muon-type (anti)neutrinos may be subject to modification if the muon is considered in the EOS.By plugging equations ( 8) and ( 9) into equation (7), we obtain the radiation four-force for the emission and absorption: where Equation ( 11) considers that the net emission of neutrinos is the difference between the emissivity and absorption.The term J is driven towards J eq , indicating that the source term drives the distribution function towards equilibrium and it eventually becomes zero as a result of the principle of detailed balance.It is important to acknowledge that various factors such as approximations, discretized energy levels, numerical truncation error, and roundoff error, can disrupt the intrinsic relation of zero collisional integral, i.e.B process = 0 when the distribution function achieves equilibrium.Therefore, the role of detailed balance relation is essential for establishing rates that guide the neutrino distribution function towards equilibrium as well as ensuring the conservation of the neutrino number numerically.The total absorption opacity corrected by stimulated absorption, is obtained by summing κ * a of interactions (a)-(d) in table 1.The quantity κ * a has dimensions of length −1 .

β-decay
In Fischer et al. (2020a); Guo et al. (2020), the authors compared the full kinematic approach, considering inelastic contributions, weak magnetism, pseudoscalar, nuclear form factor and medium modifications of β-processes to an elastic approximation supplemented with approximate correction terms from Horowitz (2002).They demonstrated that employing the full kinematic approach results in increased absorption opacity for ν e /ν e (with an even more significant effect for ν µ /ν µ due to the high rest mass of muon).The elastic approach overestimates the luminosities and average energies of ν e /ν e .Furthermore, Fischer et al. (2020a) highlighted the significance of inverse β-decay is not suppressed by an increase in the difference of interaction potentials between nucleons.The inclusion of full kinematic calculations and inverse β-decay lead to a different nucleosynthesis condition for the neutrinodriven wind of the PNS.

Ng et al.
For ensuring accurate neutrino absorption opacities, we implement the full kinematics calculations with various corrections for neutrino absorption on nucleons with all flavors and inverse β-decay, respectively.The general form of the interaction of (anti)neutrino absorption on nucleon for a particular flavor is, where N 1/2 correspond to the initial and final state nucleons, and ν and l are the corresponding (anti)neutrino and (anti)lepton with the flavor of {e, µ, τ } respectively.
In the Glashow-Weinberg-Salam theory, the Lagrangian of a current-current interaction for the energies considered takes the form of: where G F = 8.958 × 10 −44 MeV cm 3 and V ud = 0.97351 are the Fermi constant and the up-down entry of Cabibbo-Kobayashi-Maskawa matrix for the conversion between u and d quarks respectively.The leptonic and hadronic currents are where ψ i is the Dirac spinor with particle species i ∈ {ν, l, 1, 2}, M = (m n + m p )/2 the average nucleon bare mass, q = q ν − p l = p 2 − p 1 the momentum transferred to the nucleon, and is the four-momentum of the nucleon N with the interaction potential U N and the effective mass m * N at the mean-field level.The presence of U N and m * N depend on the entries of a EOS table.
The conservation of the weak vector current requries for weak magnetism and pseudoscalar terms (Fischer et al. 2020a;Guo et al. 2020).The vector, axial vector, weak magnetism as well as pseudoscalar terms, are all characterized by q 2dependent form factors as: where γ p = 2.793 and γ n = −1.913are the anomalous proton/neutron magnetic moments respectively, g V = 1.00 and g A = 1.27 are the values of the coupling constants of vector and axial vector current, M V = 840 MeV c −2 , M A = 1 GeV c −2 , and m π = 139.57MeV c −2 are the vectorial mass, the axial mass, and the charged pion rest mass respectively.The neutrino absorption opacity with stimulated absorption is given by: where the spin-averaged and squared matrix element of neutrino/antineutrino (+/−) is written as: Following the methodology presented in Guo et al. (2020), we perform analytical integration over all angles and employing a 2D integral over energies for implementation.For more comprehensive implementation details, we refer readers to Guo et al. (2020).
Weakhub provides an alternative approach known as the elastic approximation, This approach neglects momentum transfer to nucleons as m N ≫ |⃗ p N |, and it assumes the neutrino momentum is signifcantly smaller than that of other particles owing to the strong degeneracy of nucleons and electrons.Thus, absorption opacity with stimulated absorption is expressed as: where the reference value of cross section is represented as where m l is the rest mass of the (anti)lepton and m e = 0.511 MeV c −2 is the rest mass of electron.
η 12 is the nucleon final state blocking factor with the medium modifications from the EOS (Martínez-Pinedo et al. 2012;Fischer et al. 2020a) given by where n N = ρX N /m ref is the number density of nucleon and ρ is the rest-mass density.The reference nucleon mass m ref depends on the EOS table and mass fraction of nucleon X N .Additionally, φ N = µ N − m * N c 2 − U N is the free Fermi gas chemical potential of nucleon N , and in order to avoid unphysically opacities in the regions with relatively low density and low temperature, η 12 = n 1 is adopted in the non-degeneracy regime with φ 1 − φ 2 < 0.01 MeV (Kuroda et al. 2016).Lastly, Θ(x) is the Heaviside step function, and W CC M,ν and W CC R,ν are the approximated charged-current weak magnetism and recoil correction factors for neutrino species ν respectively employed from equations (A6-A8) in Buras et al. (2006).
For inverse β-decay, the matrix element can be simply expressed by that of the capture processes (Guo et al. 2020): For a full kinematics approach, we integrate over all angles and perform a 2D integration over energies.We refer readers to Guo et al. (2020) for more information of the integrations.
Also, we provide an alternative for the opacity of this process under elastic approximation.The opacity corrected by stimulated absorption is given by: where

Electron-type neutrino absorption on nuclei:
νe Weakhub can interpolate tabulated values obtained from the calculations done by Langanke & Martínez-Pinedo (2000); Langanke et al. (2003); Juodagalvis et al. (2010).These calculations cover a wider range of mass numbers and use more accurate models.In cases where a table is not available, we utilize an approximated description as provided by Bruenn (1985).It is derived from calculations of the 1f 7/2 → 1f 5/2 Gamow-Teller (GT) resonance and is parametrized for mass numbers A = 21 − 60.Hence, the absorption opacity, which incorporates the correction of stimulated absorption is expressed as where Z and N = A − Z represent the average proton number and neutron number, respectively.n H denotes the number density of heavy nuclei excluding light nuclear clusters such as α-particles and deuteron 2 H. Q ′ ≈ µ n − µ p + ∆ corresponds to the mass difference between the initial and the final states, where ∆ ≈ 3 MeV is the energy of the neutron 1f 5/2 state above the ground state, which is assumed to be the same for all nuclei.N p and N h are the number of protons in the single-particle 1f 7/2 level and the number of neutron holes in the singleparticle 1f 5/2 level, respectively, and can be expressed as (25)

Elastic (Isoenergy) Scattering
For neutrino-nucleon and neutrino-nuclei scattering, only neutral currents are involved.Due to the significantly larger rest mass of nucleons and nuclei compared to the energy of neutrinos in CCSNe and compact binaries, we assume zero energy exchange (isoenergy) between neutrinos and nucleons/nuclei.Following Shibata et al. (2011), the collisional integral of elastic scattering is given by where R ES (ε, cos θ) is a function of neutrino energy ε and scattering angle between the ingoing and outgoing neutrino θ.The scattering angle between the ingoing and outgoing neutrinos θ can be expressed as 27) where (µ, φ) and (µ ′ , φ ′ ) are the momentum space coordinates of ingoing and outgoing neutrino.The kernel R ES can be approximated as The corresponding radiation four-force is where the scattering opacity can be expressed as The total scattering opacity is the sum of κ s of interactions (j)-(l) in table 1 and has dimensions of length −1 .

3.2.1.
Neutrino-Nucleon Elastic scattering: Neutrino-nucleon (νN ) scattering plays a central role and it is one of the dominant sources of neutrino opacity.It serves as an effective mechanism for thermalization and equilibration over a wide range of density and temperature, particularly in the context of high-energy phenomena, such as hot neutron stars (Thompson et al. 2000).The differential cross section for νN scattering at the lowest order, incorporating various corrections, is given by: (31) Here, θ is the scattering angle, while S V and S A denote the vector and axial response factors, respectively, which describe the system's response to density fluctuations and spin fluctuations.These response factors are obtained through a parameterization that combines virial expansion at low densities and a random phase approximation model at high densities (Horowitz et al. 2017).However, according to O'Connor et al. ( 2017), the model-independent random phase approximation calculation breaks down at density ρ > 10 12 − 10 13 g cm −3 .We thus set S A = 1 when ρ > 10 12 g cm −3 .W NC M,ν and W NC R,ν are the approximated neutral-current correction factors of weak magnetism and recoil for a particular neutrino flavour ν, respectively Buras et al. (2006).C V and C A are the vector and axial-vector coupling constants shown in table 2, where g s A = −0.1 is the nucleon's strange helicity as the modification of the strange quark to the nucleon spin in which the value is obtained from Hobbs et al. (2016) based on different theoretical and experimental constraints.The corresponding transport 5 + 2 sin 2 θW 0.5 Inelastic scattering νe + e ± ↔ νe + e ± 0.5 + 2 sin 2 θW ∓0.5 νe + e ± ↔ νe + e ± 0.5 + 2 sin 2 θW ±0.5 ν µ/τ + e ± ↔ ν µ/τ + e ± −0.5 + 2 sin 2 θW ±0.5 νµ/τ + e ± ↔ νµ/τ + e ± −0.5 + 2 sin 2 θW ∓0.5 Neutrino-pair processes e − + e + ↔ νe + νe 0.5 + 2 sin 2 θW 0.5 Table 2. Vector and axial-vector coupling constants for different interactions with various flavor where sin 2 θW = 0.22290 and θW is the Weinberg angle cross section is defined as: (32) and therefore, the scattering opacity is The nucleon final state blocking factor η N N takes into account the blocking effect in both degenerate and nondegenerate regimes by Mezzacappa & Bruenn (1993) and is written as with is the Fermi energy of the nucleon.

3.2.2.
Neutrino-heavy nuclei elastic scattering: During the collapse phase of CCSNe and the lepton trapping phase, neutrino-heavy nuclei (νA) scattering is the dominant opacity due to the progenitor rich in heavy nuclei.We adopt the approach employed in Burrows et al. (2006), which incorporates the Coulomb interaction between nuclei, electron polarization effect, and the size of the nuclei.The lowest order differential cross sec-tion for νA scattering is given by: where C FF is called nuclear form factor, C LOS the electron polarization correction, and ⟨S ion (ε)⟩ is the parametrized angle-averaged static structure factor as a function of reduced neutrino energy ε = a ion ε/ℏc.The value of a ion is represented by The Coulomb interaction strength is obtained by Monte Carlo results from Horowitz (1997) as Γ = (Ze) 2 /(4πϵ 0 a ion T ).The angle-averaged static structure factor is written as Horowitz (1997).
The nuclear form factor takes the form of with Furthermore, C LOS is expressed as with the Debye radius where The scattering opacity is where we compute the integral by using 16 points Gauss-Legendre quadrature.

Elastic scattering between neutrino and light nuclear clusters
Light nuclear clusters refer to nuclei with mass numbers A = 2 − 4 and their isotopes, such as α particles and 2 H).We have considered not only the neutrinoα scattering but also the scattering processes involving other types of light clusters, if they are available in the given EOS.For the elastic scattering between neutrinos and light clusters, we employ an approximate form as described in Ardevol-Pulpillo et al. (2019): (42) where C V and C A are shown in table 2, therefore, the scattering opacity is

Inelastic Neutrino-Lepton Scattering
Inelastic neutrino-lepton scattering has a form of collisional integral as (Shibata et al. 2011) where R in/out IS is the in/out beam neutrino-lepton scattering kernel as a function of the scattering angle between the ingoing and outgoing neutrino θ, the energy of the ingoing neutrino ε and that of the outgoing neutrino ε ′ .The kernel is approximated by expanding them to the linear order in cos θ and then representing them as a Legendre series by following Bruenn (1985).The expansion is given by inelastic scattering S µ IS (ε) can be defined as (46) For the reasons mentioned in section 3.1 to ensure the detailed balance, the kernels of inelastic scattering has a detailed balance relation given by and follow the symmetry Cernohorsky (1993).
The total kernels of inelastic neutrino-lepton scattering R in/out IS,n are obtained by summing the kernels of neutrino-electron and neutrino-positron scattering, and Φ in/out IS,n have dimensions of length 3 time −1 .

3.3.1.
Inelastic neutrino-electron/positron scattering: Neutrino-electron (νe − ) scattering is one of the important interactions in facilitating energy exchange between matter and neutrinos, allowing neutrinos to escape more easily from the core through down-scattering.Especially during the deleptonization phase of the collapse, it serves as an effective process to thermalize and equilibrate neutrinos and matter, thus enhancing the deleptonization in the core (Mezzacappa & Bruenn 1993;Thompson et al. 2000).By assuming extremely relativistic electrons, we can express the Legendre coefficients of the outgoing beam for νe − scattering as follows (48) with where the functions H I n and H II n are given by Mezzacappa & Bruenn (1993).The coupling constants C V and C A are shown in table 2. We also include the kernels for neutrino-positron (νe + ) scattering, the kernel coefficients are obtained by using equation ( 48) with the substitution of µ e − by µ e + .The integral is calculated by 24 points Gauss-Laguerre quadratures (Mezzacappa & Bruenn 1993).

Neutrino Pair (Thermal) Processes
For the production of neutrino-antineutrino (ν ν) pairs, the collision integral B Pair and the source term S µ Pair , which contain the kernels R p/a Pair expanded as a Legendre series Φ p/a Pair,n in the same approach as equation (45), are expressed as: where the barred quantities denote the quantities of ν and the kernel of R p/a Pair is a function of θ, the scattering angle between ν and ν, ε, the energy of the outgoing ν and ε ′ , the energy of the outgoing ν.
Due to the numerical concerns discussed in section 3.1, it is necessary to ensure detailed balance for all pair pro-cesses.Except plasma process, the relationship between the production and the annihilation kernels for pair processes is given by Since for the plasma process, the specific detailed balance condition is different and it is described in section 3.4.3,we store both of the total production and annihilation kernels which are the sums of all pair processes excluding electron neutrino-antineutrino annihilation (see section 3.4.5).The kernel coefficients Φ p/a Pair,n has dimensions of length 3 time −1 .
In O'Connor (2015), they approximated e − e + annihilation kernels as an isotropic emissivity and absorption opacity to achieve 7% deviation in neutrino luminosity in CCSN compared to the kernel approach for e − e + annihilation.However, this deviation can subject to different systems or different stages of the CCSN and such an approach cannot account for neutrino blocking for different flavors of neutrinos.Additionally, if we adopt kernel approach for pair processes, we can describe different other pair processes by simply summing up their kernel coefficients as mentioned above.Electron-positron (e − e + ) pair annihilation is the dominant process to produce neutrino pair where the plasma is in high temperature and high abundance of positron.
For the e − e + production/annihilation, the Legendre coefficients are written as Where J I n and J II n are provided by Bruenn (1985), and the coupling constants C V and C A are shown in table 2 and we employ 24 points Gauss-Legendre quadrature to compute the integral.Since Pair,n (ε, ε ′ ) for ν.

Production and absorption of neutrino-antineutrino by nucleon-nucleon bremsstrahlung
Nucleon-nucleon (N -N ) bremsstrahlung is a crucial process occurring at the core of a PNS in CCSNe as well as in hypermassive neutron stars with high densities.This process dominates due to the abundance of Pauli-unblocked nucleon pairs and the insensitivity to electron fraction in these systems.It is a much more effective process than e − e + pair annihilation at equilibrating the neutrino density and spectra, as important as νN scattering in high density regions (Hannestad & Raffelt 1998).By following Hannestad & Raffelt (1998), we approximate the kernel to be isotropic and the zeroth order Legendre coefficient of absorption (annihilation) kernel is expressed as where Ψ D,i Brem and Ψ ND,i Brem are the kernels produced by a nucleon pair i = (nn, pp, np) in degenerate and nondegenerate limit of free nucleons respectively, and they are given by: We use the following factors for the nucleon-nucleon bremsstrahlung processes: , and α π ≈ 13.69 represents the pionnucleon coupling constant.β is a parameter associated with the dot product of the unit momentum vectors between the ν and ν pair.In the n-n or p-p bremsstrahlung, nucleon pair remains identical in both initial and final states, resulting in a statistical factor of 1/4 less than n-p bremsstrahlung (Thompson et al. 2000).In n-p bremsstrahlung, a charged pion mediates the nucleon exchange, increasing the matrix element of the process by a factor of ∼ 7−2β 3−β , where β = 0 for the degenerate nucleon limit and β = 1.0845 for the nondegenerate limit (Brinkmann & Turner 1988;Thompson et al. 2000).

Production and annihilation of neutrino-antineutrino by plasma process
Electromagnetic waves in a plasma exhibit coherent vibrations of both the electromagnetic field and charged particle density.These waves interact with e − e + pairs, giving photons an effective mass and quantizing them as massive spin-1 particles known as "photons" (transverse mode) and "plasmons" (longitudinal mode) Braaten & Segel (1993); Ratković et al. (2003).The decay of massive photons and plasmons into ν ν pairs is called plasma process and it is very efficient at high temperature and not very high density regions.Plasma process dominates in some particular astrophysical systems, such as red giants cores, type Ia supernovae, cooling of white dwarfs, neutron star crusts as well as massive star, and it may be a subdominant process in CCSNe and compact binary merger systems.However, this process was excluded and not thoroughly studied in CCSNe simulations due to complex calculations and implementation.Hence, we provide detailed equations and implementation here.By following Ratković et al. (2003), the Legendre coefficients of the production kernel of plasma process emitted by a massive photon with the transverse T, axial A, mixed vector-axial M modes are given by: where we define ι = [(ℏck) 2 − ε 2 − ε ′2 ]/2εε ′ , and f BE (ω) = 1/[e ℏω/k B T − 1] is the Bose-Einstein distribution function for photons or plasmons with ℏω T = ε + ε ′ as the energy of the massive photon.The dispersion relation of the photon is expressed as a function of the wavenumber k and the polarization function of transverse mode Π T shown as Where the polarization function of transverse mode is given by (59) In equation ( 57), the parameters including the typical electron velocity v * , residue factor Z T , energy space transformation Jacobian J T , axial polarization function Π A (ω T , k), and plasma frequency ω p , are given in Ratković et al. (2003).The vector and axial coupling constants C V and C A are listed in table 2. The Legendre coefficient of the production kernel of the longitudinal channel is written as (60) where the kernel vanishes when ck max < ω L or 4εε ′ < is the lightcone limit for the longitudinal plasmon (Braaten & Segel 1993).The angular frequency of the plasmon ω L obeys the dispersion relation given by: where the polarization function for the longitudinal component is written as (62) The dispersion relations of the longitudinal plasmon and transverse photon depend on the wavenumber k for a given angular frequency ω.The literature lacks sufficient mentions of the iterative method employed to solve for k using the given dispersion relations.Various issues arise when solving these dispersion relations, such as the recursive relation between ω and the polarization functions Π, unphysical constraints imposed by logarithm functions within the polarization functions Π T and Π L , and differing physical bounds on the root limit.
We propose an approach that we rearrange the dispersion relations into master functions for the massive photon and the plasmon.The master function for the massive photon is given by: Using the Brent root-finding method, we iterate within the interval k ∈ [0, ω T /v * ).The upper bound ensures the avoidance of unphysical values in the logarithmic function of equation ( 59), while the lower bound helps bracket the root within the Brent method.When k = 0, we set Π T = ω 2 p to avoid unphysical values, and hence, Π T ≥ ω 2 p is ensured for every iteration.For the master function of the plasmon, solving the root of the original form of the dispersion relation equation ( 61) could be challenging in many cases.We rearrage the dispersion relation and Π L to eliminate the logarithm factor in order to extend the range of the root brackets during iteration.The master function is thus expressed as (64) We iterate within the interval k ∈ (0, k max ).In some cases, when ε 1 + ε 2 ≈ ω p , the root cannot be bracketed using this master function.To fix this, we set the kernels to zero, given that the contributions are negligible when In equations (57,60), we use 24 points Gauss-Laguerre quadratures to compute the integration quantities, such as ω p .As ω p is the lower limit for the effective mass of photon/plasmon, we first verify if ℏω = ε + ε ′ < ω p before calculating the kernel coefficients.if ℏω = ε + ε ′ < ω p is satisfied, we set Φ p/a n = 0 without further calculations.Unlike the other pair processes, plasma process has a detailed balance relation given by where the value of spin summation factor is ξ = 2 for T, A and M modes, and ξ = 1 for L mode.Nuclear de-excitation process has been shown that it is the major process for producing νe , ν µ/τ and νµ/τ prior to the core bounce during the collapse of a CCSN (Fischer et al. 2013).This process involves the production of ν ν pairs with various flavors when a highly excited heavy nucleus de-excites from an energy level of E f + ε + ε ′ to the ground state E f through the emission of a Z 0 boson.The emission strength is determined by Gamow-Teller transitions and forbidden transitions (Fischer et al. 2013).The kernels, under the assumption of no contribution from light clusters, are as follows: where n H,i is the number density of heavy nuclei with species i, S p/a i the corresponding production/absorption strength function which can be separated into allowed and first-forbidden contributions, and they have differ-ent angular dependence (Fischer et al. 2013) given by (67) where P A (cos θ) = 1 − 1 3 cos θ and P F (cos θ) = 1.In Fischer et al. (2013), the total allowed and forbidden strength function for the absorption are approximated by Gauss-distributions characterized by a set of parameters and neglecting the temperature and nuclei species dependence.They can be written as The production coefficients is obtained by the detailed balance relation in equation ( 52)).

Production and absorption of heavy lepton
neutrino-antineutrino by electron neutrino-antineutrino pair: νe + νe ↔ ν µ/τ + νµ/τ The annihilation of pairs of electron neutrinoantineutrino (ν e νe ) is studied that it is more important than e − e + annihilation to produce ν µ/τ and νµ/τ in the core of the star (Buras et al. 2003).Trapped pairs of ν e and νe are assumed to be in LTE with matter, while we do not assume ν µ/τ in LTE.We introduce a cutoff density ρ cut , above which the kernels remain non-zero (for more details on the cutoff density, refer to appendix B).This imposition ensures the validity of the LTE condition when the density exceeds ρ cut .The Legendre coefficients of the annihilation kernel for ν µ/τ and νµ/τ are obtained simply by the replacement of f FD (E e − , µ e − ) → f FD (E νe , µ eq νe ) and νe ) in equation (53), along with the corresponding replacement of coupling constants as shown in table 2. For the distribution functions of ν µ/τ and νµ/τ in the calculation of equation ( 50), we adopt the evolved distribution functions f ν µ/τ (ε, Ω) and f νµ/τ (ε, Ω), respectively.
Unlike other pair processes, this interaction involves different neutrino flavors in both the initial and final states.It is crucial to note that energy and momentum are exchanged among neutrinos of different flavors

Ng et al.
and it is required to ensure energy and momentum conservation for all participating neutrinos.The Legendre coefficients cannot be simply added up to the kernels of pair processes.As a result, we isolate the radiation four-force of the ν e νe pair annihilation as S NPA .The source term of ν µ/τ and νµ/τ are calculated using the equation ( 51) with the kernels of this interaction, while that of ν e and νe is approximately expressed as to ensure the conservation of energy and momentum exchanged between the initial and final neutrino pairs.Here, we approximately assume S NPA,νe = S NPA,νe , and the pairs of neutrinos in initial and final states have the same energy bin.For further details on the effects of this approximated conservation treatment, we refer to Appendix B.

Opacity Spectra of Weak Interactions
We initially concentrate on comparing the neutrino opacity spectra of each process to the existing literature, and provide some of the different spectra as references for others.We assume that the final state occupancy of the neutrinos is zero and the opacities are defined as follows (71) where all opacities are in units of cm −1 .We follow the definition equation ( 4) of (Fischer et al. 2020b) for the opacities derived from the kernel R (ε, ε ′ , cos θ) given by: where R = R out is for inelastic scattering and R = R p is for pair processes (an effective opacity for production rates).It is important to note that the opacities obtained using the R out and R p kernels are twice as large as those defined in equation ( 139) of Kuroda et al. (2016).Also, all absorption opacities of (anti)neutrino absorption on nucleons and inverse β-decay are calculated using a full kinematics approach with medium modifications mentioned in section 3.1.1.The scattering opacity spectra for elastic scattering incorporate all the corrections mentioned in section 3.2.We examine three thermodynamic points under different conditions, and the corresponding quantities are shown in table . 3. Figures 1, 2 and 3 illustrate the opacity of each interaction as a function of neutrino energy ε ∈ [0, 300 MeV] for (ν e , νe , ν µ , νµ ) at these three points respectively.Different interactions are represented by distinct linestyles within each type of interaction.Specifically, we use red for β-processes, blue for pair processes, green for elastic scattering, and orange for inelastic scattering.Since the opacity spectra of τ (anti)neutrino share the same values as those for µ (anti)neutrino in elastic scattering, inelastic scattering, and pair processes, and the β-processes of τ (anti)neutrino are neglected, they are not included for simplicity.
The first point (I) corresponds to the central region of s15s7b2 star in Woosley & Weaver (1995) with LS220 EOS (Lattimer & Swesty 1991).Figure 1 shows the opacities at this thermodynamic point.We rescale opacities by multiplying 10 8 for νe + inelastic scattering, 10 10 for e − e + annihilation, 10 15 for N -N bremsstrahlung, 10 7 for plasma process, and 10 6 for nuclear de-excitation process, respectively.By comparing with figure 17 in Kuroda et al. (2016), the spectra of N -N bremsstrahlung, e − e + annihilation and νe − inelastic scattering demonstrate a good agreement, taking into account the factor of 2 adjustment resulting from differences in opacity definitions.Absorption and elastic scattering opacities do not deviate significantly from the basic treatments they used, as the corrections we adopted are not substantial enough in low temperature and low-density regime.Inverse β-decay is completely inhibited by the high electron degeneracy.Since the density does not reach the threshold for ν e and νe in LTE, ν e νe annihilation is suppressed.In constrast, the nuclear de-excitation process and the plasma process are the primary and secondary dominant channels, respectively, for producing ν µ/τ /ν µ/τ over the whole range, and lowenergy νe , while νe absorption on proton dominates the high-energy νe .This result reinforces the conclusion as stated in (Fischer et al. 2013) that the dominance of ν µ/τ /ν µ/τ produced by the nuclear de-excitation process prior to core bounce remains unchanged when the plasma process is considered.
The second thermodynamic point (II) considers a certain fraction of muons (Y µ = 0.05) in the matter, corresponding to the occurrence of neutrino trapping and thermalization of ν µ and ν τ during the post-bounce Table 3.The values of the thermodynamical quantities for three selected points.First four quantities are the input of a particular EOS, while the later are the output of it.Xi is the mass fraction of the given particle species, and A and Z denote the average mass number and proton number, respectively.Chemical potentials µ are defined with the inclusion of the rest mass.
Figure 1.Spectra of neutrino opacities defined in equation ( 71) as a function of neutrino energy ε of the weak interactions included in Weakhub at thermodynamic point (I) in table 3, which corresponds to the central region of s15s7b2 in Woosley & Weaver (1995).Note that the absorption opacities are computed using the full kinematics approach and all available corrections, and the scattering opacities incorporate all the corrections as mentioned.Absorption processes, elastic scattering, inelastic scattering and pair processes are represented in the colors red, green, orange and blue, respectively.We rescale opacities by multiplying 10 8 for νe + inelastic scattering, 10 10 for e − e + annihilation, 10 15 for N -N bremsstrahlung, 10 7 for plasma process, and 10 6 for nuclear de-excitation process, respectively.
phase (Fischer et al. 2020b).This condition is computed using DD2 EOS (Typel et al. 2010).We validate our implementation for calculating absorption opacities by comparing with figure 1 in Fischer et al. (2020b) for ν µ /ν µ absorption on nucleons, and figure 2 demonstrates a good agreement across the entire range of neutrino energies with their results.When comparing the opacities of pair processes without rescaling, N -N bremsstrahlung is the most dominant pair process in producing neutrinos in all flavours and across the entire range of neutrino energies due to the high nuclear density.On the other hand, the nuclear de-excitation process is the second dominant production process in the low to intermediate energy range despite the presence of a small fraction of heavy nuclei mass X H .  3, which corresponds to the central region of a hot PNS after core-bounce with a tiny fraction of muon fraction, where the neutrino trapping and thermalization of νµ and ντ occur.
Here, the opacities are without rescaling.
The third thermodynamic point (III) corresponds to the hot ring region near the core of a hypermassive neutron star of a BNS merger system (Loffredo et al. 2022), and an extremely small fraction of muons is assumed.We computed this point using DD2 EOS.The opacity spectra is shown in figure 3.At point (III), a minuscule small fraction of muons Y µ = 0.0001 with µ µ = 4.57 MeV is adopted, while at point (II), Y µ = 0.05 with µ µ = 132 MeV is employed.At point (II), the opacity of ν µ absorption on neutron exhibits a significantly higher value compared to that of νµ absorption by proton.This implies that a net production of µ − could occur if the incoming ν µ has energies greater than 20 MeV.Furthermore, at point (III), the opacity of ν µ absorption on neutron is broader, and the opacity of νµ absorption by proton is lower.Inverse β-decay is not suppressed at point (III) due to the significantly increased electron energy resulting from differences in interaction potentials and effective masses between nucleons (see equation ( 23)).Since the value of U n − U p in point (II) is larger than that at point (III), the νe opacity at point (II) is higher.This process contributes additionally to the νe opacity below ε ∼ 30 MeV and fills the forbidden region of νe absorption on proton.Except the contribution of the nuclear de-excitation process, at points (II) and (III), the dominant contribution among pair processes is from N -N bremsstrahlung, followed by ν e νe annihilation and e − e + annihilation.The plasma process, in contrast, only has a slight contribution in the very low range of ε at both points (II) and (III).
Our results indicate that the plasma process may not be a significant source for neutrino production during the post-bounce phase of a CCSN or the postmerger phase of BNS merger, despite potentially being the stronger source among the pair processes in regions with relatively low-density and high electron degeneracy shown by Ratković et al. (2003).In all the points examined, the pair processes and inelastic scattering exhibit negligible differences between ν and their ν, except for a noticeable distinction in the spectra of ν e and νe due to the presence of high electron degeneracy (Burrows et al. 2006).Finally, νe + scattering are negligible compared to νe − scattering at all points.
. Same as figure 1 but at thermodynamic point (III) in table 3, which corresponds to the hot ring region near the core of a hypermassive neutron star remnant formed from a BNS merger system, with consideration of a tiny muon fraction.Here, the opacities are without rescaling.
cent BNS simulations have been performed with these opacities (Foucart et al. 2016c(Foucart et al. , 2015;;Radice et al. 2022;Musolino & Rezzolla 2023).Specifically, the energyaveraged absorption opacity is determined by averaging an energy-dependent neutrino distribution function (assuming in LTE) with the energy-dependent opacity, which is calculated under elastic approximation and without any corrections (see equation (B13) in Ardevol-Pulpillo et al. ( 2019)).However, the opacities can be significantly modified by weak and strong corrections within consistent calculations in this high-temperature and high-density regime.Within the scope of this subsection, we emphasize that there is a large range of improvements for the realistic neutrino opacities.
Figure 4 shows the comparison of neutrino opacity spectra among different approaches, without and with corrections, in the region of a BNS postmerger (point (III)).Each color corresponds to a distinct type of weak interaction, and the solid lines represent opacities derived using a more accurate approach.Absorption opacities calculated under elastic approximation, with the approximated factors of weak magnetism and recoil used in Horowitz (2002), are only shown for ν e and νe .Without medium modifications, the absorption opacity obtained under elastic approximation and that corrected by the factors of weak magnetism and recoil do not demonstrate a significant deviation for both ν e and νe , except that the correction factors bend the νe opacity downward at high neutrino energy ε.
The absorption opacity is calculated using the full kinematics approach, which considers phase space contributions (recoil effects) consistently and includes weak magnetism (WM), pseudoscalar (PS), nuclear form factor (FF), and medium modifications (MM) at the meanfield level.For ν e in the energy range of ε ∈ [1,150] MeV, its absorption opacity is increased by one (three) order(s) of magnitude compared to the case with (without) medium modifications, which is calculated under elastic approximation.For νe , the suppression threshold occurs at ε = 2 MeV, 17 MeV, and 34 MeV for the cases of elastic approximation without medium modifications, full kinematics approach, and elastic approximation with medium modifications, respectively.Despite the presence of a small fraction of muons (Y µ = 0.0001), the full kinematics approach for ν µ absorption on neutrons results in a significant decrease in the suppression threshold from ε ≈ 100 MeV to 6 MeV.Similarly, for νµ , the suppression threshold decreases from ε ≈ 100 MeV to 50 MeV, and the value is reduced by up to an order of magnitude for ε > 200 MeV.In the case of inverse .Spectra of neutrino opacities for ν l (ν l ) absorption on neutrons (protons), inverse β-decay, and νN elastic scattering under various approaches, with and without different modifications, at a thermodynamic point in the hot ring region near the core of a BNS postmerger (point (III) in table 3).The opacities of absorption by nucleons, inverse β-decay and elastic scattering are represented in the colors red, blue and green, respectively, while various line styles are used to represent the opacities with or without corrections and different treatments of calculations.The abbreviations WM, PS, FF, MM, Elastic, Rec and Strange correspond to weak magnetism, pseudoscalar, form factor, medium modifications, elastic approximation, approximated recoil and strange quark contributions, respectively.The opacities of ν l (ν l ) absorption by nucleons, calculated using the full kinematics approach and incorporating all available corrections, are two to three orders of magnitude higher than those computed using the elastic approximation with approximated corrections from Horowitz (2002).The opacity of inverse β-decay is activated due to the medium modifications.
β-decay, two difference calculation approaches do not make a significant difference, however, the absence of medium modifications leads to complete suppression.
When comparing the cases with and without medium modifications under elastic approximation, the meanfield modification values of the lepton (antilepton) energy, i.e.
decrease) with density.The inclusion of medium modifications leads to an exponential increase (decrease) in opacity for ν l (ν l ) (Martínez-Pinedo et al. 2012).These modifications also activate the inverse β-decay process for the electron energy.The full kinematics approach significantly enhances the absorption opacity for all flavors of neutrinos compared to the cases calculated under elastic approximation, with or without medium modifications.This indicates that the elastic approximation fails to compute the correct absorption opacities.Several factors can explain this.Firstly, the opacity is greatly increased by the inclusion of inelastic contributions, result-ing from the increased magnitude of energy-momentum transfer, i.e. q * = p * 2 − p * 1 , in this high-density and temperature regime.This effect is magnified for ν µ and νµ due to a high rest mass of the muon.Secondly, the approximated factors of weak magnetism and recoil ignore the final state blocking effect and assume an initial neutron at rest, rendering them invalid in the high-density region (Lohs 2015).However, the self-consistent weak magnetism corrections enhance (reduce) the opacities for neutrinos (antineutrinos) (Guo et al. 2020).A larger difference in absorption opacity between ν l and νe can potentially result in a stronger boost in lepton fraction Y l (where l ∈ {e, µ}), thus leading to a distinct lepton fraction profile in BNS postmerger.Particularly for those of ν µ and νµ , it could lead to a stronger muonization to bring uncertain effects of muons.Futhermore, figure 4 shows that the absorption opacity of ν e and νe are both increased after full kinematics treatment compared to conventional approach.This improvement can shift the location of energy-averaged neutrinospheres, intensifying the effects of trapped neutrinos, and subsequently reducing the cooling rate through neutrino transfer (with enhanced reabsorption of neutrinos as well).
Figure 4 also illustrates the effects of corrections considered in νp and νn elastic scattering.The cumulative differences induced by all corrections are not significant for ν.In contrast, for ν, the opacities exhibit a larger and continuous decrease with ε, with the decrease being more pronounced in νn scattering compared to νp scattering.It can be accounted for the fact that weak magnetism increases (decreases) the opacity of ν (ν), while recoil reduces the opacities of both ν and ν.Additionally, the strange quark contribution can increase the opacity for νp and decrease it for νn (Melson et al. 2015).However, we emphasize that the elastic scattering opacity without corrections is already accurate.
While our pinpoint opacity analysis may differ from conclusions drawn using arbitrary neutrino distribution functions in fully consistent simulations, we emphasize the necessity for future studies to incorporate corrected opacities.

Core collapse of a 15 M ⊙ star in one dimension
with the set of conventional interactions 4.2.1.Numerical setup We conducted a simulation replicating the corecollapse of a 15 M ⊙ progenitor named s15s7b2, using the LS180 EOS (Lattimer & Swesty 1991), as described in section 5.2 of the Part I paper Cheong et al. (2023).This simulation aimed to test the implementation of conventional weak interactions in Weakhub and compare it to the results obtained using NuLib.We simulate the system under spherical symmetry with the conventional set of weak interactions including (a)-(c), (e), (f), (j), (k), and (m) of table 1. Interaction (c) utilizes an approximated expression with equation (24), while (e) and (f) employ an isotropic emissivity/absorption opacity approach (Burrows et al. 2006), allowing only emit/absorb ν µ/τ and νµ/τ due to the missing neutrino blocking factors.The elastic approximation is used for absorption opacities in both libraries, and no corrections are applied to absorption and scattering opacities, except for the νA scattering, where electron polarization, nuclear form factor, and Coulomb interaction corrections are considered.
Simulations are performed with Harten, Lax and van Leer (HLL) Riemann solver (Harten et al. 1983), 2-nd order Minmod limiter (Roe 1986) and IMEX-SSP2 (2,2,2) as the time integrator (Pareschi & Russo 2005).To minimize computational costs, the setup described in section 5.2.1 of Cheong et al. ( 2023) is adopted for the numerical treatments during different phases of a CCSN, the modes of radiation-interaction source terms treatment, the refinement setup, and the adjustment of the Courant-Friedrichs-Lewy (CFL) factor to control the timestep.The computational domain extends to 10 4 km in the radial direction, with a resolution of N r = 128 and a maximum refinement level of l max = 12 (Resolution in the highest refinement level is ∆r max ≈ 0.038 km).The simulation involves only three species of neutrinos, i.e. ν e , νe , and ν x .
In Weakhub, we aim to replicate a similar energy spacing as used in NuLib.For NuLib, the energy space is discretized into 18 logarithmic bins, with the first bin centered at 1 MeV and a width of 2 MeV, while the largest bin is centered at 280.5 MeV with a width of 55.2 MeV.For Weakhub, the energy space is also discretized into 18 bins logarithmically, with the first bin centered at 1 MeV and a width of 1.9 MeV, while the largest bin is centered at 291 MeV with a width of 57.6 MeV.For the format and resolution of tables in Weakhub, we refer readers to appendix A.

Results
Core bounce is defined as the moment when the specific entropy s (entropy per baryon) reaches or exceeds 3k B /baryon.When using NuLib and Weakhub, core bounce occurs at t = 176 ms and t = 191 ms, respectively.Figure 5 presents radial slices of various quantities against the isotropic radial coordinate r at the moment of core bounce for both libraries.These quantities include rest-mass density ρ, radial velocity v r /c, specific entropy s, temperature T , electron fraction Y e , and the root mean squared neutrino energy observed in the fluid comoving frame ⟨ϵ 2 ν l ⟩.The root mean squared neutrino energy observed in the fluid comoving frame is defined as where dV ε = 4πε 2 dε represents the volume element in energy space.In comparing both libraries, it is observed that they agree very well for all quantities despite some insignificant deviations.Weakhub (Con) (Weakhub with a conventional set of interactions) exhibits higher values of T , s, ⟨ϵ 2 νe ⟩, and ⟨ϵ 2 νx ⟩ in regions with higher density, and it has higher Y e values in the region outside the newly born PNS.
In terms of evolution, figure 6 shows the root mean squared neutrino energies and luminosities observed in the fluid comoving frame at 500 km obtained by these two libraries.The far-field luminosities observed in the Ng et al.Comparison of the radial profiles of several quantities against the isotropic radial coordinate r between Weakhub (Con) and NuLib at the moment of core bounce of a 15 M⊙ star.The dashed lines and solid lines correspond to the results obtained by Gmunu with NuLib and Weakhub (Con) (Weakhub with a conventional set of interactions), respectively.The profiles include rest mass density ρ, radial velocity v r /c, matter temperature T , entropy per baryon s, neutrino root mean squared energy observed in the fluid comoving frame ⟨ϵ 2 ν l ⟩, and electron fraction Ye.The results obtained by using Weakhub (Con) are quantitatively agreeing with the results using NuLib.
fluid frame is defined as where ψ is called conformal factor.With both libraries, their values of L fluid νe and L fluid νe agree very well during the shock-breakout phase and exhibit very similar values in the first 50 ms after core bounce.However, in the later evolution, their values in Weakhub (Con) are lower beyond 120 ms after bounce.The values of L fluid νx in the Weakhub (Con) case are consistently lower than that in the NuLib throughout the post-bounce phase, indicating lower temperature profiles after bounce.Overall, the root mean squared energies and luminosities values for all neutrino species exhibit a high degree of agreement between the two libraries when employing a conventional set of interactions, with discrepancies of less than approximately 10%.The results obtained with Weakhub (Con) and NuLib libraries are in good agreement with both the radial profiles at the moment of core bounce and the neutrino signatures during postbounce evolution and prove our correct implementation of conventional interactions.However, we need to explain their differences, attributing them to three main reasons.
In Part I of the paper Cheong et al. (2023), we discussed the numerical differences that led to discrepancies between Gmunu and other reference codes.However, in the current case, the only independent variable is the neutrino library.The first reason is related to the νN scattering in NuLib, which does not account for the final state blocking factor in equation ( 34) (1 ≥ η N N ≥ 0).There is an overestimated scattering opacity in highdensity regions when nucleons are (semi-)degenerate.As (right panel ) measured by an observer comoving with the fluid at 500 km of a collapsing 15 M⊙ star.The solid lines and dashed lines represent the results obtained by Weakhub (Con) (Weakhub with a conventional set of interactions) and NuLib, respectively.The results obtained using Weakhub (Con) agrees well with those using NuLib, with discrepancies of less than ∼ 10% in root mean squared energies and luminosities for all neutrino species.a result, in NuLib case, the neutrinos of all species are more difficult to escape from the nuclear matter.Secondly, NuLib adopts inaccurate blocking factors in the absorption opacities for intermediate to low density regions, in which the blocking factors assume to be used in degenerate and high-temperature regimes.This results in unphysical opacities in regions with low temperatures and densities ρ < 10 11 g cm −3 .This observation was also reported by Schianchi et al. (2023).
Figure 5 provides evidence for the first issue.In the Weakhub (Con) case, the core of the star undergoes faster deleptonization due to lower νN scattering opacity when nuclear matter is formed, leading to a delayed trapping phase of ν e and consequently a later core bounce.The enhanced emission of ν e in the newly formed nuclear matter during the trapping phase, along with a longer time for the star to collapse, strengthens the contraction of matter.This results in a slightly increased temperature and specific entropy at the moment of core bounce, as shown in the figure .Regarding the post-bounce evolution, for the first 70 ms, Weakhub (Con) exhibits higher L fluid νe and L fluid νe due to the lower scattering opacity, leading to enhanced cooling of the PNS and the surrounding matter.The matter reaches a lower temperature, resulting in reduced neutrino emission during later evolution, as evident from the lower values of L fluid νx .It is expected that these differences become more significant with a longer evolution.
There are also subdominant effects arising from differences between both libraries, including energy bin discretization, the resolution of table dependencies, bounds of tables, and numerical integration methods.Notably, when applying centroid or centered values for energy bins in the neutrino library, we have found no noticeable difference.Despite numerous differences between the two libraries, the simulation results exhibit remarkable similarity, indicating the consistency of the conventional set of interactions in Weakhub. Figure 7.Comparison of the radial profiles of several quantities against the isotropic radial coordinate r at the moment of core bounce of a collapsing 20 M⊙ star, with three sets of interactions in Weakhub.The dashed-dotted lines, dashed lines and solid lines correspond to the results with interactions of conventional set (Con), advanced set (I) (Adv.I) and advanced set (II) (Adv.II), respectively.The profiles include rest mass density ρ, matter temperature T , electron fraction Ye and neutrino root mean squared energy observed in the fluid comoving frame ⟨ϵ2 ν l ⟩.All results quantitatively agree well with discrepancies of less than 5%, except for the approximately 28% and 40% higher values of ⟨ϵ 2 νe ⟩ and ⟨ϵ 2 νx ⟩, respectively, outside the shocked region for the case of Adv.II.
genitor star with solar metallicity as the initial data 2 (Woosley & Heger 2007) and the SFHo EOS (Steiner et al. 2013).For calculating advanced sets of interactions, we utilize another version of the SFHo EOS table available in CompOSE format 3 , as it provides essential additional quantities, such as single-particle potentials, effective masses of nucleons, and mass fractions of light clusters.
The simulations are performed under spherical symmetry and take a radial extent of the domain to be 10 4 km, with a resolution of N r = 128 and a maximum refinement level of l max = 10 (Resolution in the highest refinement level is ∆r max ≈ 0.153 km).For the ) for the neutrino species [νe, νe, νx] when compared to the results of Con.
The numerical schemes, treatments of phases, refinement conditions, and energy space discretization in this study are identical to those used in section 4.2.1.However, we have made some modifications to the setup.Specifically, in the refinement setup, we enforce the highest refinement level within r < 100 km.To avoid an extremely slow simulation, we have adopted mode 3 (single-species single-group) for the radiationinteraction source terms treatment in all phases of the CCSN.This mode only implicitly treats the emission/absorption and elastic scattering source terms, which are monochromatic, while explicitly treating the source terms containing species or phase space couplings (Cheong et al. 2023).For the adjustment of the CFL factor, we modified particularly for advanced sets of interactions.The adoption of the advanced sets of interactions leads to a significant increase (decrease) in the absorption opacity κ a of ν e (ν e ) due to the full kinematics approach and medium modifications.Since, in our approach, the primitive variables are kept fixed in each step of the implicit solver, when employing a relatively large timestep, the large difference between κ νe and κ νe can result in a rapid change in electron fraction, which can sometimes be unphysical or drive its value to the lower bound of the EOS table, leading to a crash.In Part I, the CCSN simulations were designed to monitor the changes in electron fraction and scales down the CFL factor by multiplying it by 0.9 when the relative difference in electron fraction exceeds 10 −3 (see section 5.2.1.in Cheong et al. (2023)).However, this condition may "freeze" the simulation with an extremely small CFL factor.Therefore, we have set a minimum value of 0.03 for the CFL factor to prevent excessively slow simulations.

Results
Core bounce occurs at three similar moments: t = 329.1 ms, t = 329.0ms, and t = 329.0ms for simulations employing the conventional interaction set, advanced set (I), and advanced set (II), respectively, abbre- .Time evolution of the radius of PNS (dashed lines), which is defined as the radius for ρ > 10 11 g cm −3 and the shock radius (solid lines), which is defined as the radius from the center to the position where the velocity is minimum.Lines with blue, red and black colors represent the radii of the simulations of Con, Adv.I and Adv.II, respectively.Results of Adv.II exhibit the shortest shock radius and PNS radius, primarily because of the rapid cooling of external νx emissions through νe νe pair annihilation and the kernel forms of other pair processes.viated as Con, Adv.I, and Adv.II.The radial profiles at the core bounce instant are presented in Figure 7. Excellent agreement is observed among the hydrodynamical quantities, as the dominant interactions are ν e absorption on heavy nuclei, νN , and νA scatterings.Consistent ν e absorption on heavy nuclei and νA scattering is maintained across all simulations.Although Adv.I and Adv.II introduce corrections in νN scattering and other β-processes, these corrections are deemed negligible at the density and temperature range during the moment of core bounce As a result, core bounce timings remain similar, and hydrodynamical profiles are comparable.In the case of Adv.II, slightly elevated values of ⟨ϵ 2 νe ⟩ and ⟨ϵ 2 νx ⟩ outside the shock are attributed to nuclear de-excitation and plasma processes.
Figure 8 illustrates the evolutions of far-field neutrino root mean squared energies observed in the fluid comoving frame ⟨ϵ ν l 2 ⟩ and luminosities L Euler ν l measured by an Eulerian observer for the three cases.The far-field luminosity observed in the Eulerian frame is defined as where F i is the first order moment observed in Eulerian frame.
Figure 9 illustrates the time evolution of the PNS radius (defined as the radius where ρ > 10 11 g cm −3 ) and the shock radius (defined as the distance from the center to the point where the velocity is at a minimum).Initially, all cases have similar shock and PNS radii.However, after the shock-breakout phase around t − t bounce = 20 ms, discrepancies progressively increase.Adv.II shows the most significant deviations.The peaks of shock radius of simulations of Con, Adv.I and Adv.II are located at t − t bounce = [91, 83, 68] ms with the values of [172.7, 155.3, 143.1]In all three cases, discrepanices arise from modifications in opacities/kernels, distinct calculation approaches, and the inclusion of additional interactions.We examine the impacts of these modified or added interactions in terms of their contributions.The observed differences, such as the 10 − 20% (1% − 10%) increase in L Euler νx ( ⟨ϵ νx 2 ⟩) in Adv.I compared to the case of Con, can be attributed to differences in utilizing the kernel approach and the approximate emissivity approach for the e − e + pair process and N -N bremsstrahlung pair process.The kernel approach allows for the production and annihilation of ν e and νe in these processes, but not in emissivity approach, thereby contributing to the increased L Euler νe/νe and ⟨ϵ νe/νe 2 ⟩ in the early stage of the simulation (before t − t bounce = 200 ms).Additionally, in Adv.II, primarily ν e νe pair annihilation, followed by nuclear de-excitation and plasma processes, accounts for an additional 20% − 30% increase in the values of L Euler νx .These pair processes are inefficient in heating the relatively low-density outer layer due to their inverse processes and the significant emission of ν x from the dense regions of the PNS.As a result, the advanced sets exhibit a smaller shock radius and PNS radius due to enhanced cooling and the lack of neutrino reabsorption in the envelope behind the shock front, leading to more pronounced contractions and reheating of the PNS.When the silicon-oxygen interface accretes through the shock, the luminosities of ν e and νe experience a sudden decrease.This phenomenon occurs earliest in the case of Adv.II, specifically at approximately t − t bounce = 105 ms.In constrast, this occurs for the other two cases around t−t bounce = 160 ms with the absence of ν e νe pair annihilation.After the silicon-oxygen interface accretes through the shock, the differences in L Euler νx , shock radius and PNS radius converge to similar values, indicating that the approximated emissivity approach can yield similar ν x luminosities as well as shock radius and PNS radius compared to the realistic kernels approach.Nevertheless, we emphasize that this may only be evident in spherically symmetric simulations, as in any one-dimensional cases, the shock returns to similar position due to the inefficient revival of the shock and the limited extent of the development of instabilities.In multi-dimensional simulations, variations in early-stage shock radius, shocked area, temperature profiles, and the efficiency of neutrino reabsorption lead to larger extents of instabilities (e.g., standing accretion shock in-stability and Rayleigh-Taylor instability), convections, and the size of gain regions, resulting in different subsequent evolutions.While the absorption opacities are significantly modified with the full kinematics approach and realistic corrections in regions where the density is larger than 10 12 g cm −3 (within the first 20 − 40 km inside the PNS), their impact on the emission of ν e and νe are of secondary importance in comparison to the additional pair processes facilitated by the kernel approach.More pronounced differences arise due to the modified absorption opacities, along with the contribution of inverse β-decay when t − t bounce extends up to seconds (Martínez-Pinedo et al. 2012;Fischer et al. 2020a).The is especially notable in the PNS cooling phase, where the composition in the neutrino-driven wind and nucleosynthesis will be affected (Martínez-Pinedo et al. 2012).One seldom-discussed difference in the literature is the single-peak feature for ν e luminosity (neutronization peak) observed in simulations utilizing the full kinematics approach with different corrections for ν e and νe absorption on nucleons, as well as the use of the kernel approach for pair processes.In contrast, simulations using the conventional set of interactions exhibit a double-peak feature.Further investigations are needed in the future to discern the changes in microphysics responsible for the formation of the double-peak feature.
The inclusion of advanced set interactions reveals significant differences compared to using the conventional set of interactions in terms of neutrino signatures, shock dynamics, and properties of the PNS, such as radius, temperature, and density before approximately t − t bounce = 250 ms.Subsequently, these differences diminish with time after the silicon-oxygen interface accretes through the shock.However, the exploration of multi-dimensional simulations with advanced set interactions requires additional investigation, which is beyond the scope of this paper.

CONCLUSIONS
We present Weakhub, a neutrino microphysics library that includes new interactions, various weak corrections, and medium modifications in strongly coupling matter, and incorporates novel approaches for calculating neutrino opacities and kernels along with corresponding numerical methods.These advanced weak interactions are coupled into the two-moment based multi-frequency general-relativistic radiation hydrodynamics module in our code Gmunu.
The neutrino opacity spectra of each weak interaction are demonstrated at various hydrodynamical points.We compare certain spectra with those studied in previous literature and provide new spectra for some specific interactions.Several weak and strong corrections and the full kinematics approach have been examined to understand the changes in opacities at a hydrodynamical point located in the hot ring of the star's core within a BNS postmerger remnant.Our implementation of the conventional set of interactions has been tested by comparing it with an open-source library NuLib in a CCSN test, and we provide reasons for the deviations of outcomes between the two libraries.
To explore the impacts of newly introduced weak interactions and associated corrections, we perform comprehensive simulations of CCSN utilizing a 20 M ⊙ progenitor.These simulations cover the evolution of core bounce, shock-breakout, and post-bounce accretion.We compare the outcomes using the conventional set of interactions with those employing advanced sets of interactions.When comparing the results obtained from conventional interactions to those simulated with the inclusion of advanced set interactions, primarily contributed by improved pair processes and absorption opacities, we observe distinct differences in neutrino luminosities, root mean squared energy for all species, as well as a shorter shock and PNS radius, along with a denser and hotter PNS.In multi-dimensional simulations, changes such as PNS oscillations, mass accretion rates, the potential for shock revival, non-radial hydrodynamical instabilities, and the presence of gravitational wave signals, may be arised.Therefore, it is worth studying these changes in multi-dimensional simulations.
In the future, two main aspects need improvement in our modeling.Firstly, the radiation transfer module should be enhanced to ensure a more stable and accurate evolution, particularly when timesteps are not small enough.This improvement will prevent unphysical solutions of electron fraction due to the large difference in absorption opacity between ν e and νe in high-density regions with different corrections.A more robust implicit solver and time integrator, or even a full implicit treatment, with reasonable computational cost should be implemented.Secondly, the neutrino microphysics should be further improved.For example, muonic interactions (Bollig et al. 2017;Fischer et al. 2020b), accurate modified URCA processes (Suleiman et al. 2023), inelastic neutrino-nucleon scattering (Duan & Urban 2023), and the interactions associated with pions (Fore & Reddy 2020) should be included.
Additionally, as matter reaches densities within 2 − 40 times nuclear saturation density, the medium modifications for opacities introduce uncertainties in strongly interacting QCD matter.The correlators of weak interactions depend on the uncertain EOS, making it essential to explore alternative approaches, such as those provided by Järvinen et al. (2023).Incorporating more accurate microphysics in future applications will enable us to unveil a clearer picture of high-energy astrophysical systems, particularly in terms of matter evolution, composition, nucleosynthesis, and detectable neutrino signatures.On-the-fly calculations for neutrino opacities/kernels can be extremely expensive, involving numerous numerical integrations and root-findings, even though the on-the-fly approach ensures continuous values of source terms and saves memory.To address this challenge, Weakhub employs two different approaches for providing neutrino opacities and kernels: the table approach and the hybrid approach.
The table approach involves generating pre-calculated tables with hydrodynamical input quantities.We extract discrete tabulated values through multi- Table 4.
Information on opacity and kernel tables with given dimensions (Dim.), resolution nD, and range RD of each dependence.The quantities with subscripts of max and min correspond to the table bounds of the equation of state.ηe ≡ µe/T is called degeneracy parameter.ρmax, Tmax and Yp,max denote the maximum bound of density, temperature and proton fraction of the EOS table, while Tmin and Yp,min are the lower bound of temperature and proton fraction of it.The dependencies of ρ, T and ηe are logarithmically distributed, whereas Yp is distributed on a uniform scale.Note that if muon fraction is included for muonic interactions as an additional dependency to each table, muon fraction will be distributed on a logarithmic scale instead of a uniform scale.
dimensional linear interpolation.However, this method has limitations, as tabulated values might be constrained by table bounds and resolutions, and numerical errors can accumulate and disrupt the intrinsic relations for opacities or kernels.
To overcome these limitations, the hybrid approach combines on-the-fly calculations for interactions with analytical expressions and utilizes tabulated values for interactions requiring costly root-finding or numerical integrations.For instance, when dealing with βprocesses under elastic approximation, the hybrid approach computes these opacities with on-the-fly calculations during the simulation, while employing tabulated values for other computationally expensive interactions.This strategy ensures robust opacities for any input values, reduces the need for interpolations of tabulated values, and minimizes memory usage for storing 3D/4D opacity tables within the simulation.However, we report that the performance and results of the two approaches do not exhibit noticeable differences in our CCSN simulations.
As each of the interactions depends on a different number of hydrodynamical inputs, the format of neutrino tables, as shown in table 4, includes information about the input dependencies, resolutions, and ranges of the corresponding inputs.The resolutions and ranges are selected to strike a balance between memory consumption and capturing essential physics in different regions.For a stable simulation, ensuring the validity and handling errors is important when extracting values from tables or coupling them to the radiation transfer module.For example, unphysical values could lead to over/underflow problems in the implicit solver of the radiation transfer module.Thus, we list the following scenarios, along with their error handling treatments: 1. ρ, T or η e exceed the upper bound: Set ρ, T or η e to be the upper bound value.
2. ρ, T or η e fall below the lower bound: Set the corresponding table's opacity or kernel to zero and skip the interpolation.6. ρ < ρ atmo , ρ < ρ ν,min or r > r ν,max , where ρ atmo , ρ ν,min and r ν,max are the atmospheric density threshold, minimum density threshold for neutrino source terms and the maximum radius from the center of star for neutrino source terms, respectively.: Set all opacities and kernels are zero.

B. COMPARISON OF TREATMENTS OF ELECTRON NEUTRINO-ANTINEUTRINO ANNIHILATION
For ν e νe pair annihilation, it is assumed that ν e νe pair is in LTE with matter.In section 4.3, we have demonstrated that this interaction significantly contributes to the luminosity of ν x in CCSNe.Buras et al. (2003) ensures the validity of assuming the emission of ν x in the deeper layers of a stellar collapse model, where its impact is significant.However, this assumption loses its validity in regions of relatively lower density.For example, in semi-transparent and free-streaming regions, the process may lead to unphysical emission of ν x .Here, we discuss the cutoff density for approximately assuming the regions for ν e νe pair to be in LTE with matter and above it, the kernels of the process remain nonzero.Here, we discuss the cutoff density for making an approximate assumption about the regions in which the ν e νe pairs are in LTE with matter.Below this is the magnitude of the three-momentum transfer, α s = 1/137 the fine-structure constant, n e the number density of electron.p F,e = ℏ(3π 2 n e ) 1/3 and E F,e = (p F,e c) 2 + (m e c 2 ) 2 − m e c 2 are the electron Fermi momentum and Fermi energy, respectively.
45) where P n is the Legendre polynomial of degree n and Φ in/out IS,n is the Legendre coefficient of the kernel of in/out beam scattering.The source term of neutrino-lepton Ng et al.

3. 4 . 4 .
Production and absorption of neutrino-antineutrino pair by nuclear de-excitation A * ↔ A + ν + ν 68) where S A = 5, µ A = 9 MeV and σ A = 5 MeV are chosen based on the value measured for nuclei in the iron region, and S F = 7, µ F = 22 MeV and σ F = 7 MeV are based on the random phase approximation calculations.The absorption (annihilation) kernel coefficients are given by

Figure 2 .
Figure 2. Same as figure 1 but at thermodynamic point (II) in table3, which corresponds to the central region of a hot PNS after core-bounce with a tiny fraction of muon fraction, where the neutrino trapping and thermalization of νµ and ντ occur.Here, the opacities are without rescaling.

4. 1 . 1 .
Predicting the effects of realistic neutrino opacities in a binary neutron star postmerger Typical neutrino opacities utilized for cooling and nucleosynthesis in BNS postmerger systems are energyaveraged and primarily based on the calculations ofRuffert et al. (1996) andArdevol-Pulpillo et al. (2019).Re-

Figure 4
Figure4.Spectra of neutrino opacities for ν l (ν l ) absorption on neutrons (protons), inverse β-decay, and νN elastic scattering under various approaches, with and without different modifications, at a thermodynamic point in the hot ring region near the core of a BNS postmerger (point (III) in table3).The opacities of absorption by nucleons, inverse β-decay and elastic scattering are represented in the colors red, blue and green, respectively, while various line styles are used to represent the opacities with or without corrections and different treatments of calculations.The abbreviations WM, PS, FF, MM, Elastic, Rec and Strange correspond to weak magnetism, pseudoscalar, form factor, medium modifications, elastic approximation, approximated recoil and strange quark contributions, respectively.The opacities of ν l (ν l ) absorption by nucleons, calculated using the full kinematics approach and incorporating all available corrections, are two to three orders of magnitude higher than those computed using the elastic approximation with approximated corrections fromHorowitz (2002).The opacity of inverse β-decay is activated due to the medium modifications.
Figure 5.Comparison of the radial profiles of several quantities against the isotropic radial coordinate r between Weakhub (Con) and NuLib at the moment of core bounce of a 15 M⊙ star.The dashed lines and solid lines correspond to the results obtained by Gmunu with NuLib and Weakhub (Con) (Weakhub with a conventional set of interactions), respectively.The profiles include rest mass density ρ, radial velocity v r /c, matter temperature T , entropy per baryon s, neutrino root mean squared energy observed in the fluid comoving frame ⟨ϵ 2 ν l ⟩, and electron fraction Ye.The results obtained by using Weakhub (Con) are quantitatively agreeing with the results using NuLib.

Figure 6 .
Figure 6.Time evolution of far-field neutrino root mean squared energies ⟨ϵν l 2 ⟩ (left panel ) and luminosities L fluid ν l

4. 3 .
Core collapse of a 20 M ⊙ star in one dimension with advanced interactions 4.3.1.Numerical setupIn this section, we perform another CCSN simulation by utilizing a 20 M ⊙ zero-age main sequence mass pro-

Figure 8 .
Figure 8.Time evolution of far-field neutrino root mean squared energies observed in the fluid comoving frame ⟨ϵν l 2 ⟩ (left panel ) and luminosities L Euler ν l (right panel ) measured by an Eulerian observer at 500 km of a collapsing 20 M⊙ star.The dashed-dotted lines, dashed lines and solid lines correspond to the results of Con, Adv.I, and Adv.II, respectively.The neutrino luminosities and root mean squared energy values in Adv.I and Adv.II show significant differences compared to Con.For instance, at a time of t − t bounce = 70 ms, the results of Adv.II have relative differences of [+5.7%, +12.7%, +7.8%] ([+7.9%,+13.1%, +47.8%]) in the values of ⟨ϵν l 2 ⟩ (L Euler ν l Figure9.Time evolution of the radius of PNS (dashed lines), which is defined as the radius for ρ > 10 11 g cm −3 and the shock radius (solid lines), which is defined as the radius from the center to the position where the velocity is minimum.Lines with blue, red and black colors represent the radii of the simulations of Con, Adv.I and Adv.II, respectively.Results of Adv.II exhibit the shortest shock radius and PNS radius, primarily because of the rapid cooling of external νx emissions through νe νe pair annihilation and the kernel forms of other pair processes.

3 .
Y p < Y p,min or Y p > Y p,max : A fatal error, terminate the code.4. Exponential calculations (e.g. e −(ε+ε ′ )/T ) are limited to powers within the range [−300, 300] to prevent arithmetic under/overflow.5. Compute opacities and kernels in CGS units and convert to code units (c = G = M ⊙ = k B = 1), ensuring their values lie within the range [10 −250 , 10 300 ] before coupling to the radiation transfer module to prevent arithmetic under/overflow. Table Adv.I and Adv.II demonstrate similar values for L Euler νe and L Euler νe compared to those of Con.At that moment, L Euler νe in Adv.I and Adv.II exhibit a significantly higher value than that of Con, featuring a single-peak with values of 6.20×10 53 erg s −1 and 6.17×10 53 erg s −1 , respectively.It is noteworthy that L Euler νe in Con has a doublepeak feature, with peaks located at t − t bounce = 4 ms and t−t bounce = 5.5 ms with values of 4.91×10 53 erg s −1 and 5.47 × 10 53 erg s −1 , respectively.Throughout this period, all three cases maintain similar values of ⟨ϵ ν l 2 ⟩ across all neutrino species.During the early post-bounce accretion phase (approximately 30 − 100 ms after the core bounce), Adv.I and Adv.II exhibit relative differences in the values of L Euler +47.8%], respectively, at t − t bounce = 70 ms.However, after t − t bounce = 100 ms, Adv.II show a significant decrease in the values of L Euler for all three simulations become plateaus after t − t bounce = 280 ms.At t − t bounce = 480 ms, with respect to Con, Adv.I and Adv.II have relative differences in the luminosities of [−2.5%, +3.0%, +5.8%] and [−9.8%, −5.3%, +15.0%], respectively.Adv.II has the lowest L Euler Values of ⟨ϵ ν l 2 ⟩ from Adv.I and Adv.II exceed those of Con from t − t bounce = 7 ms.Adv.I and Adv.II have, on average, approximately km, respectively.At about t − t bounce = 200 ms, Adv.II has the largest relative differences of −48.2%, −17.6% in shock radius and PNS radius with respect to Con, respectively.Simi-lar to L Euler ν l , shock radius and PNS radius between three cases become closer after around t − t bounce = 240 ms.By the time t − t bounce = 480 ms, the shock radius (PNS radius) is 85.2 km (35.2 km) for Con, 74.9 km (33.1 km) for Adv.I, and 70.1 km (32.2 km) for Adv.II.