openmsr / CAD_to_OpenMC

code to target the conversion from a step-file to a h5m-geometry for neutronics
MIT License
25 stars 16 forks source link

Installation of CAD_to_OpenMC #73

Closed Sabyaro closed 7 months ago

Sabyaro commented 7 months ago

Screenshot from 2023-11-16 14-43-27 I am some issues while installing the program. Can you please help me?

ebknudsen commented 7 months ago

Hi @Sabyaro, That's unfortunate that you have problems. I'd be happy to help you out. Am I right in guessing that you tried to build CAD_to_OpenMC with cmake?

If so - then that is not something we support (at least not yet). CAD_to_OpenMC is written purely in python and can be installed using the python utility pip. We are working on a conda-package as well but that's not done yet. As such the preferred way of installing CAD_to_OpenMC is to use a python virtual environment:

python -m venv cadToOpenMC source cadToOpenMC/bin/activate pip install CAD_to_OpenMC

This will install version 0.2.5 of CAD_to_OpenMC in the virtual python environment called cadToOpenMC, along with all the necessary dependencies. To step out from the virtual environment simply do deactivate.

If you prefer, you can install the development version by checking out the source code, move to that directory and replace the last line with pip install .

Also there is a new version 0.2.6 out very soon - Most likely Monday in fact. We are running tests right now.

Sabyaro commented 7 months ago

Thanks a lot for reply... I will apply the method

ebknudsen commented 7 months ago

Excellent - please let me know if you run into any other problems.

Sabyaro commented 7 months ago

Thank you Erik, your suggestion worked well. But I have a problem in creating tetrahedral mesh for openmc as it has to be converted into h5m file. Can I do that using this program? And if possible then what tutorial should I follow?

ebknudsen commented 7 months ago

Great that it worked. For the latter I am not entirely sure I understand what you mean. If you have a step-file of the geometry you wish to simulate, CAD_to_OpenMC can help you generate a h5m-description of that geometry, by generating a surface mesh on that geometry. If you have a tetrahedral mesh description already then you have two options: Either perform a skinning of that description in order to create a surface mesh, or you simply create a h5m-file directly from that mesh. The second procedure will likely be very slow to do transport calculations on but will work. But I should say that neither of these two is not what CAD_to_OpenMC is designed to do, and would require quite some work to allow for. It can certainly be done, but not without some effort.

ebknudsen commented 7 months ago

@Sabyaro I will close this issue now - If you need any more help please don't hesitate to reach out.

Sabyaro commented 7 months ago

Thanks a lot. It helps me a lot