-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate ESTAR density effect corrections into EGSnrc #888
base: develop
Are you sure you want to change the base?
Conversation
This will be merged in |
Is there an option in the integrated estar code to compute density corrections for a density that is different from the bulk density, e.g., for the grain density in graphite? Perhaps we can have inputs for |
I like your suggestion, yes we could add those options. Currently |
I'm also planning to change the I-value to be specified in MeV, like all other energy parameters.. |
914a03a
to
ec0edbb
Compare
…n. Density correction factors are printed when running application. ESTAR can be used only with applications which use egs_advancedapplication class for now
…rs and other importrant media properties
…h pegs4_routines.mortran without the use of density correction files
… factors from estar
…If no I-value is given, I-value found by ESTAR will be used
…ity correction tables
…using make command
…sity correction factors
Fix a typo in the makefile for compiling the Mortran applications. Also switch the flag to use the new root finding method in the density correction algorithm.
ec0edbb
to
f21697d
Compare
@rtownson What is the status of this draft? Should I start working on this branch towards merging, or should I hold off? |
I think hold off, I'm planning to add a few more features. |
Note that I started cleaning up this branch on the side on branch https://github.com/nrc-cnrc/EGSnrc/compare/estar-cpp-integration..cleanup-estar-cpp-integration |
Currently the
Is there a reason that the density itself is not just immediately modified after arguments are read in? For the ESTAR implementation, this would mean that the density change from gas pressure is not considered in the density corrections (just like it is ignored when you use a density correction file). Since a user can just modify the density directly in-line, why have the gas pressure separated? |
This PR is ready for review / testing :) |
There seems to be an outstanding bug where |
I'm guessing this is fixed by #1182 |
@rtownson, I think so. |
The ESTAR fortran code from NIST has been translated into C++ and integrated into EGSnrc, so that density effect corrections are now calculated on-the-fly during the initialization of a simulation. Materials can be defined directly in the input file, so .pegs4dat and .density (density correction files) are no longer needed.
Example:
For mixtures of compounds:
For comparison, there's an option to output a density file when the simulation is run.
This adds the options for bulk and local densities to be specified separately. The
bulk density
is the density used for transport, and thelocal density
is used for the density effect corrections (when a density file is not provided). Density correction files, if provided, will always override these inputs. If thelocal density
is not provided,bulk density
(orrho
) is used for everything. The oldrho
input is still accepted, and if provided is used both as the bulk and local density.Thanks to our co-op student @Sehmimul for this significant contribution!