Skip to content

Erick/scattering - #129

Open
erickurquilla wants to merge 50 commits into
developmentfrom
erick/scattering
Open

Erick/scattering#129
erickurquilla wants to merge 50 commits into
developmentfrom
erick/scattering

Conversation

@erickurquilla

Copy link
Copy Markdown
Collaborator

draft of scattering implementation

erickurquilla and others added 30 commits August 3, 2026 12:32
…imulations. Multi energy scatterings will be implemented later when monocromatic scattering works.
…ering: a single beam along the x directions that will be isotropized
… in reality number of particles per energy bin per cell when dividing the scattering integral term
@erickurquilla
erickurquilla marked this pull request as ready for review August 10, 2026 20:11
@erickurquilla
erickurquilla requested a review from srichers August 10, 2026 20:11
Comment thread sample_inputs/inputs_coll_equi_test Outdated
Comment thread sample_inputs/inputs_monocromatic_isotropic_scattering_test Outdated
Comment thread Scripts/initial_conditions/st12_monocromatic_isotropic_scattering_test.py Outdated
nu_taubar = 6e32 # 1/ccm

# Energy bin size
energy_bin_size_MeV = 0.8339001570751987 # Energy in Mev

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter seems redundant with that defined in the input file

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Scripts/tests/coll_mono_isot_scat_test.py Outdated
Comment thread Source/Evolve.cpp Outdated
Real Ye_pp = 0;
Real rho_pp = 0; // g/ccm

// Isotropic in-scattering interpolated to the particle (IMFP_method==1).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be scripted as with other quantities

Comment thread Source/Evolve.cpp Outdated
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).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be scripted as with other quantities.

Comment thread Source/Evolve.H Outdated
// 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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be scripted, as with other components

Comment thread Source/FlavoredNeutrinoContainerInit.cpp Outdated
lines = [sympy.cxxcode(sympy.simplify(e)) for e in self.expressions()]
return lines

def code_accumulate(self):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

…t paramter that now is given to the code in the particles.dat file
…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
…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.
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants