Geometry generation in PyMAPDL for use in other PyAnsys modules (e.g. PyFluent) #2158
-
Hello! First I would like to give you a brief description on what I am trying to do before I specify the problem I am having: I would like to perform multiple analyses with different sets of various parameters, as well as with different geometries (same shape, just different dimensions - similar to scripting parameters in Ansys Discovery). In other words, for each geometry, I need to test different sets of parameters and find the optimal combination. The problem I am having is with geometry generation part. Because I am solving fluid dynamics problem, I will of course need to use PyFluent for numerical simulations, but first, I need to somehow generate the geometry. When searching for PyAnsys module for automatic geometry generation, it always brings me to PyMAPDL module. I already checked multiple examples on PyMAPDL documentation page (link), but I cannot find any option to effectively transfer the geometry to other PyAnsys modules, for example PyFluent. I only found Now, the main question/problem: Is it possible to generate geometry with PyMAPDL and use it directly in other PyAnsys modules like PyFluent? If not, can you at least save/export it as a file/database and import it right away? (More general question): If that is not possible at all, is there any other (Py)Ansys related module for automatic geometry generation, or should I just use other Python modules for CAD modeling to prepare geometries separately? Thank you very much for the help/answers! Best, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @blazvelkavrh The second answer is wait for other PyAnsys modules to be released. I cannot comment on the timeframe but some kind of PyGeometry/PyDiscovery will be released to the public. Mike |
Beta Was this translation helpful? Give feedback.
Hi @blazvelkavrh
There are several answers to your question. Please see the CDWRITE command for exporting IGES format geometry from PyMAPDL.
https://mapdl.docs.pyansys.com/version/stable/mapdl_commands/prep7/_autosummary/ansys.mapdl.core.Mapdl.cdwrite.html#cdwrite
The second answer is wait for other PyAnsys modules to be released. I cannot comment on the timeframe but some kind of PyGeometry/PyDiscovery will be released to the public.
Mike