import argparse
import os
from collections import defaultdict
from particles import Particle
from library.SM import particles as SMP, interactions as SMI
from library.NuMSM import particles as NuP, interactions as NuI
from evolution import Universe
from common import UNITS, Params, utils
parser = argparse.ArgumentParser(description='Run simulation for given mass and mixing angle')
parser.add_argument('--mass', required=True)
parser.add_argument('--theta', required=True)
parser.add_argument('--comment', default='')
args = parser.parse_args()
mass = float(args.mass) * UNITS.MeV
theta = float(args.theta)
folder = utils.ensure_dir(os.path.split(__file__)[0],
"mass={:e}_theta={:e}".format(mass / UNITS.MeV, theta)
+ args.comment)
T_initial = 100. * UNITS.MeV
T_final = 0.0008 * UNITS.MeV
params = Params(T=T_initial,
dy=0.025)
universe = Universe(params=params, folder=folder)
photon = Particle(**SMP.photon)
electron = Particle(**SMP.leptons.electron)
muon = Particle(**SMP.leptons.muon)
neutrino_e = Particle(**SMP.leptons.neutrino_e)
neutrino_mu = Particle(**SMP.leptons.neutrino_mu)
neutrino_tau = Particle(**SMP.leptons.neutrino_tau)
sterile = Particle(**NuP.dirac_sterile_neutrino(mass))
sterile.decoupling_temperature = T_initial
neutrino_e.decoupling_temperature = 10 * UNITS.MeV
neutrino_mu.decoupling_temperature = 10 * UNITS.MeV
neutrino_tau.decoupling_temperature = 10 * UNITS.MeV
universe.add_particles([
photon,
electron,
muon,
neutrino_e,
neutrino_mu,
neutrino_tau,
sterile,
])
thetas = defaultdict(float, {
'electron': theta,
})
universe.interactions += (
SMI.neutrino_interactions(
leptons=[electron],
neutrinos=[neutrino_e, neutrino_mu, neutrino_tau]
) + NuI.sterile_leptons_interactions(
thetas=thetas, sterile=sterile,
neutrinos=[neutrino_e, neutrino_mu, neutrino_tau],
leptons=[electron, muon]
)
)
universe.init_kawano(electron=electron, neutrino=neutrino_e)
if universe.graphics:
from plotting import RadiationParticleMonitor, MassiveParticleMonitor, AbundanceMonitor
universe.graphics.monitor([
(neutrino_e, RadiationParticleMonitor),
(neutrino_mu, RadiationParticleMonitor),
(neutrino_tau, RadiationParticleMonitor),
(sterile, MassiveParticleMonitor),
(sterile, AbundanceMonitor)
])
universe.evolve(T_final)