Repository navigation
Conversation
9098ec3 to
8ab32d7
Compare
Photon heating is scored from the energy balance of each collision and credited to the element that was struck. With multiply_density off it therefore scored zero where the nuclide is absent, and the density was already included where it is present, so apply_virtual_material gave wrong answers for the photon part of a dose. Nuclide bins of a photon heating tally with multiply_density off are now scored as the flux times a per-element photon heating cross section, as neutron heating is with KERMA coefficients. The cross section is computed when the simulation starts, for the elements such tallies need, as the expectation of the transport energy balance from the photon interaction data and settings: Doppler broadened incoherent scattering, photoelectric absorption and pair production, less fluorescence from atomic relaxation, annihilation photons and thick-target bremsstrahlung for the pure element. These tallies keep the tracklength estimator; the analog one is rejected. The thick-target bremsstrahlung table construction is moved out of Material into free functions so it can be built for a single element, and the pair production screening data is shared with the sampling routine. Transport results are unchanged. The unused heating dataset is no longer read from photon libraries. Co-authored-by: jon-proximafusion <174589458+jon-proximafusion@users.noreply.github.com>
8ab32d7 to
1f86de3
Compare
|
Rebased onto the current head of openmc-dev#4131 ( Since the first version, develop has gained openmc-dev#4157 (positrons below the cutoff annihilate) and openmc-dev#4158 (atomic relaxation emissions below the photon cutoff are skipped). Both change the collision energy balance that this heating cross section reproduces. So I checked the rebased branch both as it is and merged with current develop ( Tests. Validation table rerun on the develop merge. Same protocol as the table above: heating from the cross section over energy balance heating, pure element spheres, ENDF/B-VIII.1, 50k particles x 10 batches.
This matches the original table to about 0.1%, and the rebased branch without the develop merge gives the same numbers. So openmc-dev#4157 and openmc-dev#4158 don't change the agreement: this PR already assumed that annihilation photons always carry away the rest mass energy, and already left out relaxation emissions below the cutoff. A stricter check: first collisions only. I also compared only the collisions of uncollided photons, using a narrow energy bin at the source energy and 200k x 10 particles. Every element and energy then sits about 0.1 to 0.2% high. At 10 MeV, Fe and Pb are 0.5% high and W is 0.75% high. With Still to do: point this at develop once openmc-dev#4131 merges. Separately, the |
Description
Photon heating is scored from the energy balance of each collision and credited to the element that was struck. That makes
multiply_density=FalseplusTally.apply_virtual_materialwrong for the photon part of a dose:This PR scores photon heating in nuclide bins with
multiply_density=Falseas the flux times a per element photon heating cross section, the same way neutron heating uses KERMA coefficients. The silicon dose example in the user guide (and the workshop notebook that currently works around this with NIST mu_en) then works for gammas too.Depends on openmc-dev#4131, which provides the nuclide to element mapping and the photon cache refresh for absent nuclides. This PR is based on the
upstream-pr-4131branch, a copy of that PR, so only the new commit shows here.The heating cross section
Computed in C++ when the simulation starts, only for the elements such tallies need, from data already in every photon library, so no library regeneration is needed. It is the expectation of the transport energy balance under the same settings:
compton_dopplersamples it (shell weight, accessible profile mass, E'/E acceptance), integrated in the same cumulative variable the sampler invertspair_productionsamples, with the annihilation photons removed through QThe density effect in the pure element bremsstrahlung tables is evaluated at a reference 1 g/cm3. Cost is about 0.5 s for W.
Other changes
Material::collision_stopping_powerandinit_bremsstrahlungmoved into free functions so TTB tables can be built for a single element; Material calls them unchangedconstoverload ofParticle::photon_xs(scoring holds aconst Particle&)heatingdataset (MCNP-style ACE heating numbers) is no longer readmultiply_densitydocstringValidation
Heating from the cross section (isotope bins, tracklength,
apply_virtual_materialwith the material itself) over energy balance heating in pure element spheres, ENDF/B-VIII.1, 50k particles x 10 batches (statistical uncertainty about 0.05 to 0.1%):The 10 MeV W/Pb residual is the reference density of the density effect: at W's real density it goes from 1.0042 to 0.9986. A 10 g/cm3 reference fixes W/Pb but moves C/Si to -0.25%, so 1 g/cm3 was kept. With relaxation and bremsstrahlung both off (pure Compton kinematics) W 1.25 MeV is 1.0004 +/- 0.0004 and C 20 keV 0.9987 +/- 0.0008.
The uncollided heating over flux agrees with NIST mu_en to about 1% below 1.25 MeV. The larger difference at 10 MeV in high Z (up to 5%) is OpenMC's photon physics versus NIST and is the same for energy balance heating.
Transport results are bit for bit identical to the openmc-dev#4131 branch (10 MeV photons in W, heating/total/pair production tallies, strict FP build).
Found along the way, not changed here
The pair production screening radius table has 99 entries for Z = 1 to 99 but is indexed with
r[Z_], so each element uses the value for Z + 1 and Z = 99 reads past the end. The heating calculation shares the table with sampling so the two stay consistent when that is fixed separately.Checklist