[MOAB-dev] MOAB Mesh Generation and Conversion

Vijay S. Mahadevan vijay.m at gmail.com
Mon Jun 27 16:50:46 CDT 2022


> Perhaps the quickest way to get you up to speed with what I am doing is to link to the forum thread I opened on this topic in the application I am using it in (OpenMC): https://openmc.discourse.group/t/intended-workflow-to-generate-superimposed-moab-meshes/2143
>
> Long story short though, I want to run OpenMC tallies on unstructured (first-order) TET meshes so I can output the flux on discretized geometries. I would actually like to run on HEX meshes, but it looks like the application does not support HEX elements on imported meshes at this time.

Thanks. That is helpful to understand the context.

> I am curious to get your opinion on my last question in that thread though: would there be any negative points to using Exodus meshes here if the results are functionally identical? Not that I don’t trust that a lot of work has gone into the mbconvert tool, but if I can verify for myself that the geometry was meshed correctly in a file type I am familiar with and use throughout my organization already, I’d like to avoid unnecessarily needing to convert if I can.

If I understand your question correctly, you were able to run OpenMC
with MOAB backend directly with the exodus mesh, without conversion,
and got identical (visual norm) tally results as compared to the
converted MOAB h5m workflow? If that is the case, then it just means
that MOAB did not have any issues with the exodus file and there was a
one-to-one conversion (as we always expect) between formats. As far as
OpenMC is concerned, both mesh files represent the same topology and
so the resultant solution is "functionally identical".

If this workflow is fine for you, sure go ahead with running the
exodus files directly. There are some caveats, however. MOAB h5m
format is the only fully parallel format supported by MOAB. This means
that a fully parallel I/O workflow will not be available if you are
using exodus. This will be important at scale when you run with a
larger number of particles and cycles to reduce your uncertainties.
You can of course always load it on a subset of processes, or serial
on root task and then broadcast, partition/distribute etc without a
full parallel read. And depending on the application implementation
and workflow all of those may be worthwhile approaches. Hope that
helps.

Best,
Vijay

On Mon, Jun 27, 2022 at 2:09 PM James Tompkins <james at radiantnuclear.com> wrote:
>
> All,
>
> Thank you for your response!
>
> Perhaps the quickest way to get you up to speed with what I am doing is to link to the forum thread I opened on this topic in the application I am using it in (OpenMC): https://openmc.discourse.group/t/intended-workflow-to-generate-superimposed-moab-meshes/2143
>
> Long story short though, I want to run OpenMC tallies on unstructured (first-order) TET meshes so I can output the flux on discretized geometries. I would actually like to run on HEX meshes, but it looks like the application does not support HEX elements on imported meshes at this time.
>
> I am curious to get your opinion on my last question in that thread though: would there be any negative points to using Exodus meshes here if the results are functionally identical? Not that I don’t trust that a lot of work has gone into the mbconvert tool, but if I can verify for myself that the geometry was meshed correctly in a file type I am familiar with and use throughout my organization already, I’d like to avoid unnecessarily needing to convert if I can.
>
> Your thoughts would be appreciated!
> -James
>
> From: Mahadevan, Vijay S. <mahadevan at anl.gov>
> Date: Monday, June 27, 2022 at 8:53 AM
> To: Grindeanu, Iulian R. <iulian at mcs.anl.gov>, James Tompkins <james at radiantnuclear.com>
> Cc: moab-dev at mcs.anl.gov <moab-dev at mcs.anl.gov>
> Subject: Re: MOAB Mesh Generation and Conversion
> James,
>
> > I recently began working with an application that requires MOAB mesh files, but my background is in MOOSE;
>
> Always good to know the application that someone is working on to provide context. Can you tell us more about what physics you are solving using MOAB mesh? Neutronics, CFD, and/or mechanics? And what kind of meshes you are generating here. First/second order, unstructured, HEX/TET?
>
> > I wanted to ask about how I could either convert existing ExodusII (.e) meshes to MOAB (H5M) or directly generate MOAB files.
>
>
> If you want to use MOAB as a converter, you can use one of multiple options. You can use conda [1] (probably quickest) or the Docker image [2] to get started since these will have the pre-built tools. MOAB README.md [3] file should provide all of this documentation. If these are not clearly visible, or insufficient for a new user like you to get started, then we can improve it.
>
> > I believe the traditional wisdom for mesh-to-mesh conversion would be to use meshio
>
> Nico has been a MOAB contributor in the past and meshio should be able to do this as well. In terms of its installation issues, I’m afraid I can’t help you there.
>
> > I have looked around a bit and found a few different resources related to MOAB meshes, but support doesn’t seem particularly robust for new users (at least from what I’ve found)
>
> Again, this is what we want to rectify. Let us know where you checked and what was insufficient. We will try to fix those issues.
>
> > Convert existing ExodusII mesh files to the MOAB file format
>
> Once you have MOAB using conda or installed from source or if you are just using the Docker image, then you can use the “mbconvert” tool to convert the format from netcdf/exodus to MOAB h5m format. This requires that MOAB is configured with both netcdf and hdf5 obviously. The command is simple.
>
> mbconvert input.exo output.h5m
>
> The MOAB mailing list is at moab-dev at mcs.anl.gov<mailto:moab-dev at mcs.anl.gov> in case you want to direct further questions there.
>
> Thanks,
> Vijay
>
> [1] https://anaconda.org/conda-forge/moab<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fanaconda.org%2Fconda-forge%2Fmoab&data=05%7C01%7Cjames%40radiantnuclear.com%7Cc2f8c1dd15fe4d1c0f8108da585525a4%7Cddada404ac9343899e72d392ed9395fd%7C0%7C0%7C637919419995484413%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=SfW5ecFye%2BRENMc7jHMgQOnCsjrvm2DmzLGRAWdf5tA%3D&reserved=0>
> [2] docker pull vijaysm/moab-root:latest
> [3] https://bitbucket.org/fathomteam/moab/src/master
>
>
> From: Grindeanu, Iulian R. <iulian at mcs.anl.gov>
> Date: Monday, June 27, 2022 at 11:36 AM
> To: James Tompkins <james at radiantnuclear.com>
> Cc: Mahadevan, Vijay S. <mahadevan at anl.gov>
> Subject: Re: MOAB Mesh Generation and Conversion
> Hello, James
> I am not sure why you need to convert to h5m format, but the easiest way is to use mbconvert tool
> You will need to have MOAB compiled with netcdf and hdf5 support, at least (exodus needs netcdf, and h5m is moab HDF5 format)
>
> You can use conda to install everything, or spack. Or build from scratch, with autotools or cmake
>
> Iulian
>
> ________________________________________
> From: James Tompkins <james at radiantnuclear.com>
> Sent: Monday, June 27, 2022 10:15 AM
> To: Grindeanu, Iulian R.; Jain, Rajeev
> Subject: MOAB Mesh Generation and Conversion
>
> Hello,
>
> My name is James Tompkins, and I am a nuclear engineer with Radiant, a company developing a portable, high-temperature, gas-cooled microreactor (https://radiantnuclear.com/, we also have a YouTube video that demonstrates our engineering approach to reactor development here that is a bit more informative than the website for now: https://www.youtube.com/watch?v=9cc1j-MbVVA)<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9cc1j-MbVVA)&data=05%7C01%7Cjames%40radiantnuclear.com%7Cc2f8c1dd15fe4d1c0f8108da585525a4%7Cddada404ac9343899e72d392ed9395fd%7C0%7C0%7C637919419995484413%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ETmyCX9e9sXicoJUraF%2FUqnsgxX48pLfPQAWY7oBon8%3D&reserved=0>.
>
> I recently began working with an application that requires MOAB mesh files, but my background is in MOOSE; so, I am much more familiar with generating meshes either directly in MOOSE or by using Cubit for more complex geometries. I asked about MOAB resources in the LibMesh channel of the MOOSE Developer’s Slack, and folks directed me to you guys. I wanted to ask about how I could either convert existing ExodusII (.e) meshes to MOAB (H5M) or directly generate MOAB files.
>
> I believe the traditional wisdom for mesh-to-mesh conversion would be to use meshio, but I haven’t been able to get it to work. I have looked around a bit and found a few different resources related to MOAB meshes, but support doesn’t seem particularly robust for new users (at least from what I’ve found). I was wondering if you could point me to some resources to either
>
>
>   1.  Convert existing ExodusII mesh files to the MOAB file format OR
>   2.  Getting set up with an editor such that I can create geometry and directly export h5m files.
>
> Any help you can provide would be greatly appreciated!
> P.S. I apologize if you guys aren’t who I should be talking to. If this is the case, please let me know if there is someone else that would be able to help!
>
> Thanks!
> -James
>
> --
> James B. Tompkins
> Nuclear Engineer
> Radiant
> Phone: 424.405.6123
> james at radiantnuclear.com<mailto:james at radiantnuclear.com>
> [Logo, company name  Description automatically generated]


More information about the moab-dev mailing list