Git Product home page Git Product logo

Comments (3)

shimwell avatar shimwell commented on June 7, 2024

Ah yes this one requires more than a string.

As the density is temperature dependent it needs an openmc material or neutronics material maker object passing in

import neutronics_material_maker as nmm
my_mat = nmm.Material.from_library(name='FLiBe', temperature=600, enrichment=60)
my_mat.openmc_material 

Then pass in my_mat to the correspondence_dict
This also gives the opportunity to enrich the Li6 content

from openmc-dagmc-wrapper.

RemDelaporteMathurin avatar RemDelaporteMathurin commented on June 7, 2024

Ah yes sorry

My workaround was:

import openmc
import openmc_dagmc_wrapper as odw
import neutronics_material_maker as nmm


# could set to dagmc.h5m if the imprinted and merged geometry is preferred
my_h5m_filename = "dagmc_not_merged.h5m"

# this links the material tags in the dagmc h5m file with materials.
# these materials are input as strings so they will be looked up in the
# neutronics material maker package
material_tag_to_material_dict = {
    "lead": "Lead",
    "flibe": nmm.Material.from_library(name="FLiBe", temperature=650+273.15, pressure=10.1e5, temperature_to_neutronics_code=False),
    "inner_tank_wall": "eurofer",
}

materials = odw.Materials(
    h5m_filename=my_h5m_filename,
    correspondence_dict=material_tag_to_material_dict,
)

I didn't use the .openmc_material attribute though and it worked!

from openmc-dagmc-wrapper.

shimwell avatar shimwell commented on June 7, 2024

I guess it works with or without the openmc_material attribute

from openmc-dagmc-wrapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.