| Summary: | Implement exact density effect calculation | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Matthew Strait <straitm> |
| Component: | materials | Assignee: | Vladimir.Ivantchenko |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | Marc.Verderi, resnegfk |
| Priority: | P4 | ||
| Version: | other | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
Patch implementing the described improvements. See also https://github.com/Geant4/geant4/pull/5
Improved patch 3rd version of this patch, with conditional warnings |
||
|
Description
Matthew Strait
2019-01-19 00:32:39 CET
Dear Matthew, Sorry, but Geant4 is using this ( Atom. Data Nucl. Data Tabl. 30 (1984) 261-271) parametrization since 2009 - see G4DensityEffectData class. VI Hi Vladimir,
Please take a closer look. My patch does not implement the parameterization from the 1984 paper. It implements the full calculation that the paramterization approximates. That is, it is not a way to find the values {x0, x1, k, C, delta0}, but rather it calculates the exact value of delta at any energy without using those parameters at all.
Thanks,
Matthew
Created attachment 537 [details]
Improved patch
This improved patch fixes two bugs in the previous version and gives a more informative error message if the calculation fails.
* Zero out the sternf array before using it. Otherwise we're adding to uninitialized values.
* Don't divide by Z when counting the number of electrons. This is already taken into account so was leading to wrong values (sometimes subtle, sometimes obvious -- my earlier test cases were in the subtle category).
* Give a better message when calculation fails. One failure mode that can be reproduced by hand is if the density of a substance is arbitrarily increased. This raises the plasma energy until Sternheimer 1984 Eq (8) has no solution. Pure hydrogen at several g/cc is such a case.
Created attachment 556 [details]
3rd version of this patch, with conditional warnings
Wrap the warnings that the new exact calculation of the Fermi density effect can print in checks for the value of G4NistManager::Instance()->GetVerbose() so that it is possible for the user to suppress them.
The first implementation of this proposal is included in the 10.5ref08. We can close this ticket. |