openmc icon indicating copy to clipboard operation
openmc copied to clipboard

Feature Request: Enrichment of elements with >2 isotopes

Open Allentro opened this issue 2 years ago • 7 comments

Looking to implement enrichment for more than 2 isotopes.

Currently thinking you could choose to bias high or low, to a certain percent on the highest or lowest mass isotope. For diffusion or centrifugal you can use the difference in mass of the other isotopes to determine the distribution spread. Laser enrichment being far more selective wouldn't give the same distribution.

I'm thinking potentially a function which takes in a parameter for the type of enrichment, percentage bias and high or low mass?

Wondering if anybody has any advice or thoughts?

Allentro avatar Dec 09 '22 18:12 Allentro

Interesting question, but can clarify how you want to use this in OpenMC? Is it that you want OpenMC to automatically calculate the composition of a material with multiple isotopes by just providing the enrichment of a key isotope? Or are you more generally asking how to calculate this so that you can provide this information manually as part of your OpenMC input file?

gonuke avatar Dec 09 '22 20:12 gonuke

Interesting question, but can clarify how you want to use this in OpenMC? Is it that you want OpenMC to automatically calculate the composition of a material with multiple isotopes by just providing the enrichment of a key isotope? Or are you more generally asking how to calculate this so that you can provide this information manually as part of your OpenMC input file?

I was thinking the former. To implement this as a function in OpenMC.

Allentro avatar Dec 09 '22 23:12 Allentro

My thoughts are that this would not be particularly robust or accurate, and may be misleading in some cases.

gonuke avatar Dec 31 '22 23:12 gonuke

I tend to agree with @gonuke. I'm not sure there is any established method for handling this that would be general enough to warrant inclusion in OpenMC.

paulromano avatar Jan 02 '23 03:01 paulromano

Hi all, I totally agree that there is not an established method for handling the relative levels of depletion of other isotopes.

However ....

I am often asked to enrich isotopes for studies and need a "best guess" so I tend to deplete proportionally to the nuclides natural abundances. I then state this method in any subsequent reporting to be clear about how the enrichment was done (possibly incorrectly) but so far I've not been offered a better or preferred enrichment profile to substitute.

from openmc.data import NATURAL_ABUNDANCE
import re

def enrich_nuclide(enrichment_target: str, enrichment:float):
    """Enrich a specific nuclide within the material and deplete the others.

    The non enriched nuclides will be depleted proportionally to their natural
    abundance (atom fraction).

    Parameters
    ----------
    enrichment : float, optional
        Enrichment of an enrichment_target nuclide in percent (ao).
    enrichment_target: str, optional
        Single nuclide name to enrich from a natural composition (e.g., 'Li6')

    returns
    -------

    Nuclides and with their new relative abundances in atom fractions: dict
    """

    if enrichment < 0:
        raise ValueError('enrichment must be greater than or equal to 0')
    if enrichment > 100:
        raise ValueError('enrichment must be less than or equal to 100')
    if enrichment_target not in NATURAL_ABUNDANCE.keys():
        msg = f'enrichment_target must be one of the naturally occurring nuclides {NATURAL_ABUNDANCE.keys()}'
        raise ValueError(msg)

    element_name = re.split(r'\d+', enrichment_target)[0]
    
    natural_isotopes = {}
    for k, v in NATURAL_ABUNDANCE.items():
        if re.match(r'{}\d+'.format(element_name), k):
            natural_isotopes[k] = v
    
    sum_of_non_enriched_nuclides = 0
    for k, v in natural_isotopes.items():
        if k != enrichment_target:
            sum_of_non_enriched_nuclides += v

    depleted_nuclides_amounts = {}
    for k, v in natural_isotopes.items():
        if k == enrichment_target:
            depleted_nuclides_amounts[k]=enrichment/100
        else:
            depleted_value =  ((1-(enrichment/100))/sum_of_non_enriched_nuclides)*v
            depleted_nuclides_amounts[k]=depleted_value
    
    return depleted_nuclides_amounts   


print(enrich_nuclide(enrichment_target= 'Sm152', enrichment=0), '\n')
print(enrich_nuclide(enrichment_target= 'Sm152', enrichment=50), '\n')
print(enrich_nuclide(enrichment_target= 'Sm152', enrichment=100), '\n')
print(enrich_nuclide(enrichment_target= 'Li6', enrichment=40), '\n')

shimwell avatar Jan 23 '24 12:01 shimwell

I am often asked to enrich isotopes for studies and need a "best guess" so I tend to deplete proportionally to the nuclides natural abundances

Understood -- what is wrong with having your own code to do this though? I don't see a compelling reason why this should be part of OpenMC itself when it is not likely to be used by many users and can definitely cause confusion given that there is no "established method" for doing this.

paulromano avatar Jan 23 '24 13:01 paulromano

Indeed, @shimwell's approach doesn't match the OP's use case of simulating the enrichment process.

gonuke avatar Jan 24 '24 04:01 gonuke