Erick/scattering - #129
Conversation
…imulations. Multi energy scatterings will be implemented later when monocromatic scattering works.
…s to store scattering integrals
… modify with the propre integral equations
…t initial conditions
…ering: a single beam along the x directions that will be isotropized
in the simulation time
…opic component of the scattering kernel
…d different that one
… in reality number of particles per energy bin per cell when dividing the scattering integral term
…c scattering test script
| nu_taubar = 6e32 # 1/ccm | ||
|
|
||
| # Energy bin size | ||
| energy_bin_size_MeV = 0.8339001570751987 # Energy in Mev |
There was a problem hiding this comment.
This parameter seems redundant with that defined in the input file
There was a problem hiding this comment.
The input parameter delta_E is actually unused. This phase space volume is now defined in the script that generates the particles (this one). I have deleted delta_E from the input parameter file and will keep it only here.
| Real Ye_pp = 0; | ||
| Real rho_pp = 0; // g/ccm | ||
|
|
||
| // Isotropic in-scattering interpolated to the particle (IMFP_method==1). |
There was a problem hiding this comment.
should be scripted as with other quantities
| Ye_pp += vol * sarr(i, j, k, GIdx::Ye); | ||
| rho_pp += vol * sarr(i, j, k, GIdx::rho); | ||
|
|
||
| // Mesh C_in_scat_* exist only for IMFP_method==1 (see GIdx::ncomp). |
There was a problem hiding this comment.
should be scripted as with other quantities.
| // Isotropic in-scattering collision term (complex Hermitian). Layout matches | ||
| // N/Fx/... blocks and PIdx::offset: diagonal _ii_Re only; off-diagonal | ||
| // _ij_Re then _ij_Im; then antineutrino counterparts with Rebar/Imbar. | ||
| #if NUM_FLAVORS == 2 |
There was a problem hiding this comment.
should be scripted, as with other components
| lines = [sympy.cxxcode(sympy.simplify(e)) for e in self.expressions()] | ||
| return lines | ||
|
|
||
| def code_accumulate(self): |
There was a problem hiding this comment.
I'm not sure I understand why these functions are necessary. Not saying they're not, but we already do accumulation with the existing code, right?
…s input parameter
…t paramter that now is given to the code in the particles.dat file
…o improve mantainability
…flavors, number of particles, volumes of cells and total domain directory from particle data instead of setting it as input
…mber of energies that are given in the particles.dat file given as initial conditions in simulations
…another file for better code organization
…acities. The energy bin number will be used to indetify mesh variable of scattering corresponding to the energy of the particle
…ical potential in function that use Nulib and SFHo to interpolate. This will be used in the scattering deposition since only scattering opacity is needed.
…c scattering kernel test
bbd5cb4 to
3d14a4d
Compare
…t not be the same. This offset will be used to identify mesh parameters for scattering opacity. Also adding parameters to attenuate scattering and absoption opacities. This will be used to isolate absorption and scattering.
draft of scattering implementation