Skip to content

convert_to_multigroup to accept numbers for groups #3524

@jon-proximafusion

Description

@jon-proximafusion

Description

currently the model.convert_to_multigroup accepts an arguement for groups

It accepts strings and makes use of pre defined group structures. It defaults to use CASMO-2

I was wondering if we could also allow a list of numerical values directly?

I typically want to put a single bin ([0.0, 100e6]) in and there is not a predefined group structure for a single bin.

current

model.convert_to_multigroup(
        method="stochastic_slab",
        nparticles=10000,
        groups="CASMO-2",  # this is the default but can be changed to any other group structure
)

proposed option

model.convert_to_multigroup(
        method="stochastic_slab",
        nparticles=10000,
        groups=[0, 100e6]
)

Let me know if this would be an acceptable change

Alternatives

Keeping the code as it and perhaps add a single bin group structure.

Compatibility

It can continue to work in the same way and have the same default

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions