Hi everybody!
I’ve been having some difficulties getting the flux values.
I was reading the discussion: https://groups.google.com/forum/#!searchin/openmc-users/units$20fission$20tally|sort:relevance/openmc-users/r5JtjyH9BIM/uzxIlCphwY0J,
but i still don’t understand how to get the correct units.
Specifically, i have two questions:
-
How to calculate the volume of the cells? (I see there is a parameter in the settings class, but i don’t know how to use it)
I also don’t understand which volume i have to calculate. (I’m trying to model a reactor and i used a mesh tally to measure the flux)
-
How to calculate the normalising factor Pnu/(Qk)? I guess P and Q i should know and k is calculated automatically, how about nu?
I’m a beginner so i apologise if the answer to these questions is obvious.
Thanks to everyone
Hi Juan,
If your cell is simple enough, I would recommend just calculating the volume by hand. In the case of a mesh, determining the volume is also trivial since you know the dimensions of each mesh element. For more complicated cells where calculating the volume by hand might be cumbersome, we recently introduced an option to stochastically determine volume, i.e. it can estimate the volume of a cell +/- some uncertainty. This can be done as follows from the Python API:
c = openmc.Cell(…)
…
lower_left = [-10, -10, -10]
upper_right = [10, 10, 10]
vol_calc = openmc.VolumeCalculation(domains=[c], samples=100000, lower_left, upper_right)
settings = openmc.Settings()
settings.volume_calculations = [vol_calc]
…
A few things to note here:
- This capability is not available in the 0.8.0 release (only available in the ‘develop’ branch)
- You as the user generally need to give the lower-left and upper-right coordinates of a box that encompasses the cell. It’s ok if it’s too big, but if it’s too small the answer will be incorrect.
- If the reported uncertainty is too high, use more samples.
- You can have multiple volume calculations within a single run (hence why settings.volume_calculations is a list)
To get a global nu value, I would just create a tally with no filters and only two scores, nu-fission and fission. The ratio of these will give you nu.
Best regards,
Paul
Hi!
Thank you for the answer.
What’s confusing me is when i use a 2D mesh. Let’s say i have a cube 5x5x5 and i want to measure the flux. i create a 2D mesh (100*100), make the tally,etc. Now, is the volume of one mesh cell (5/100) * (5/100) *5? What bothers me is the third coordinate (i don’t specify it with the mesh so i’m not sure what value to use).
Best regards,
Juan
The volume of a 2D mesh cell in a 3D geometry is the 2D area times the length of the geometry in the third dimension (i.e., wherever there could be a flux of neutrons). So, your calculation of (5/100) * (5/100) * 5 seems to be correct.
Best,
Paul
Thank you for clearing that up!
Best regards,
Juan