Hello, I am trying to create a material, which is a combination of several molecules, think e.g. 20% LiF and 80% BeF2. This is my attempt:
from openmc import Material as OmcMat
lif_omc = OmcMat()
lif_omc.add_element("Li", 1)
lif_omc.add_element("F", 1)
bef2_omc = OmcMat()
bef2_omc.add_element("Be", 1)
bef2_omc.add_element("F", 2)
flibe_openmc = OmcMat.mix_materials([lif_omc, bef2_omc], [0.2, 0.8], 'ao', name="FLiBe")
The resulting material, upon printing, has the following fractions of individual elements:
Li : Be : F = 3/30 : 8/30 : 19/30
However, if I do the addition myself (or with e.g. PyNe), the effective number of atoms per molecule is 2.8 (0.2 * 2 + 0.8 * 3) and the expected fractions of the elements are:
Li : Be : F = 2/28 : 8/28 : 18/28
I.e. the expected mixture is different than what OpenMC does. I presume that this is because of how mix_materials
works by pre-normalizing the compositions of LiF and BeF2 to 1 effective atom and forgetting about the effective number of atoms per molecule, since e.g. for Be it would be true that 8/30 = 0.8 * 1/3.
Am I missing something or doing something wrong?
Hi A.Bohemian,
I think the problem is that you didn’t declare the atomic density of both materials, so openmc thinks that the material density is equal to the sum of each nuclide composition, the same as if you use .set_density(units=‘sum’).
Then, when using mix_materials, openmc calculates the atomic density of each nuclide/isotope in the mixture which of course affected by the total volume of the mixture.
But You just consider the number of atoms in the mixture without talking about the final volume of the mixture, so it is not a density and that makes both parameters are different.
I hope this notebook helps you to understand what my point is.
mininotebook.ipynb (6.2 KB)
Wahid
Thanks for the reply and the notebook! I do understand your point but I can also say that adding the line
lif_omc.set_density("atom/b-cm", 2)
and similar for BeF2 does not affect the output of the python snippet I sent.
That’s right because .set_density just emphasizes the total atomic density of the material. Also, the value is incorrect since solid LiF has around 2.6gr/cc density while BeF2 is around 1.9gr/cc, so the atom density of LiF and BeF2 will not be 2 atom/barn-cm and 3 atom/barn-cm respectively.
The point is, that you want to calculate the atom while openmc calculates atom density. That’s 2 different parameters and if you want to check, the ratio of LiF and BeF2 atomic density in the mixture will same as the ratio that you declare, 1:4.
In another hand, if you want the nuclide ratio to become F:Li:Be = 9:1:4, or molecule ratio of LiF:BeF2 = 1:4, then the atomic density ratio will be (2×1):(3×4) = 1:6.
You can try it as mix material ratio, LiF:BeF2 =(1/7):(6/7) and the F:Li:Be will be 9:1:4
So do I understand it correctly that, in order to get the result I want, I need to mix the materials according to different ratios?
Since openmc is a tool, then how you use it depends on what goals you want to achieve. If you want to use the ratio of molecules as you wanted before, then the atomic fraction (ao) should be modified since from what I know right now, openmc mix material uses atomic fraction, not molecule fraction. Sorry if this didn’t satisfy your expectation.
If anybody has other information on this part, then I am glad to hear that, I am open for any corrections.
Great, thank you for clarification!
1 Like