Coder Social home page Coder Social logo

Comments (5)

Adambar24 avatar Adambar24 commented on September 23, 2024 1

Hi, thanks I tried the work around and the paramak.export_brep() method. I then used this file in the Brep-to-h5m to create the h5m file as suggested. Here its easier to add tags to the materials (see below) so its easier to check them later.

brep_to_h5m(
    brep_filename='test.brep',
    material_tags=[
        'Blanket',
        'divertor',
        'tf coil casing',
        'vacuum vessel',
    ],
    h5m_filename='dagmc.h5m',
    min_mesh_size= 5,
    max_mesh_size = 20,
    mesh_algorithm = 1,
)

After which you can use the property material_names found in the openmc.DAGMCUniverse class to print the material names in the set in the .h5m file.

dag_univ = openmc.DAGMCUniverse(filename='dagmc.h5m')
vac_surf = openmc.Sphere(r=10000, surface_id=9999, boundary_type="vacuum")

print(dag_univ.material_names)

This allows you to assign the material names easily for the openmc simulation. I thought I would be explicit if somebody was having similar problems until the dagmc to h5m is fixed. Thanks for your help

from paramak.

shimwell avatar shimwell commented on September 23, 2024

Sorry about this, tracking the volumes through the workflow is tricky stuff. I have a longer term plan to attach meta data to the brep file so that we can track volumes and won't have to search for them using matching parts. This is a while away from being complete but it my current focus to really fixing this problem instead of just patching it up. I can take a look at preproducing this error and see if there are any easy fixes, thanks for reporting and making it easy to reproduce

from paramak.

Adambar24 avatar Adambar24 commented on September 23, 2024

Not a problem, I am just mainly trying to gauge which method is best to use in the future. Since I want to start building some more complex reactors that are likely to reuse some of the parts from the EuDemo reactor. I will try with the cad_to_h5m method to see if I can get that working. If not I will use the stl_to_h5m. The problem with the later is that I dont yet understand how to insure my geometry is not overlapping since I havent tried this method yet. Also it seems the most manual approach so I will try this last.

Though in the future it would be better using dagmc_to_h5m since its open source rather than relying on cubit

from paramak.

shimwell avatar shimwell commented on September 23, 2024

I think I've found the bug. Not fixed but I know what is going wrong.

For some reason the Brep export in the cad-to-dagmc package is not working for this geometry. Oddly enough the paramak.export_brep() method does work. They are quite similar so I should be able to track it down

So perhaps in the meantime you could export the Brep using the paramak then use Brep-to-h5m to export it as a h5m.

Material assignment will be a bit tricky till I can get the cad-to-dagmc brep export function working for this geometry.

from paramak.

shimwell avatar shimwell commented on September 23, 2024

Thanks @Adambar24 and congrats for completing the work around. Posting the example is much appreciated, I'm sure others will find it useful.

by the way I added an automatic bounded_universe method to openmc a while back that you can use to save one line if you are interested.

vac_surf = openmc.Sphere(r=10000, surface_id=9999, boundary_type="vacuum")

dag_univ = openmc.DAGMCUniverse(filename='dagmc.h5m').bounded_universe()

I shall get back to you on this thread when I make progress on fixing the workflow

from paramak.

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.