Skip to content
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

Removing MultiMaterial class #134

Open
shimwell opened this issue Apr 14, 2021 · 1 comment
Open

Removing MultiMaterial class #134

shimwell opened this issue Apr 14, 2021 · 1 comment

Comments

@shimwell
Copy link
Collaborator

shimwell commented Apr 14, 2021

Chatting with @eepeterson and perhaps the MultiMaterial class should be removed

Everything should just be a Material class as this a simpler and more predictable approach

Perhaps mixed materials can still be made like this.

This follows a design similar to the OpenMC approach so it must be the right way to do it

mat_1 = nmm.Material(elements={'Li', 1}, density=2)   # user made material
mat_2 = nmm.Material().from_library(name='eurofer', library='pnnl')  # material from reference
mat_3 = nmm.Material().from_mixture(materials=[mat_1, mat_2], fracts=[0.5, 0.5]) # mixed material
@eepeterson
Copy link

@shimwell I think that makes sense although the from_library and from_mixture functions should be class methods so you don't need the parentheses i.e. mat_3 = nmm.Material.from_mixture(materials=[mat_1, mat_2], fracts=[0.5, 0.5]) # mixed material

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants