Open
Description
π Before submitting the issue
- I have searched among the existing issues
- I am using a Python virtual environment
π Description of the bug
I have a question about modelling in py_ansys and py_fluent.
I create my geometry in py_ansys, which is then supposed to be simulated in py_fluent.
In the process, three bodies are created using body.subtract. However, when the exported .pmdb file is loaded into Design Modeler, five bodies are displayed.
Some of these have the same name, which causes problems in Fluent. Fluent refuses to mesh bodies that have the same name.
I have reproduced the issue in a minimal script.
from ansys.geometry.core import launch_modeler, Modeler
from ansys.geometry.core.designer import Design, Body
from ansys.geometry.core.math import Point2D
from ansys.geometry.core.sketch import Sketch
modeler: Modeler = launch_modeler(mode="geometry_service")
design: Design = modeler.create_design("test_domain")
sketch: Sketch = Sketch()
sketch.box(Point2D([0,0]),1,1)
body1: Body = design.extrude_sketch("body1", sketch, 0.1)
sketch: Sketch = Sketch()
sketch.box(Point2D([0,0]),1,0.2)
body2: Body = design.extrude_sketch("body2", sketch, 0.1)
sketch: Sketch = Sketch()
sketch.box(Point2D([0,0.3]),0.2,0.4)
body3: Body = design.extrude_sketch("body3", sketch, 0.1)
body1.subtract(body2, keep_other=True)
body1.subtract(body3, keep_other=True)
design.export_to_pmdb()
for body in design.bodies:
print(f"Body Name: {body.name}")
print(f"Body ID: {body.id}")
print("-" * 40)
modeler.close()
Script output:
Body Name: body1
Body ID: 0:22
----------------------------------------
Body Name: body2
Body ID: 0:85
----------------------------------------
Body Name: body3
Body ID: 0:148
----------------------------------------
Process finished with exit code 0
π Steps to reproduce
Run the script, import the geometry either in Design Modeler or Fluent.
Fluent volume meshing will fail, due to duplicate body names
π» Which operating system are you using?
Windows
π Which ANSYS version are you using?
Ansys 25R2
py_ansys geometry core 0.10.9
π Which Python version are you using?
3.11
π¦ Installed packages
aiohappyeyeballs @ file:///home/conda/feedstock_root/build_artifacts/aiohappyeyeballs_1741775197943/work
aiohttp @ file:///D:/bld/aiohttp_1749048974860/work
aiosignal @ file:///home/conda/feedstock_root/build_artifacts/aiosignal_1734342155601/work
ansys-api-dbu==0.3.22
ansys-api-fluent==0.3.35
ansys-api-geometry==0.4.62
ansys-api-meshing-prime==0.1.4
ansys-api-platform-instancemanagement==1.1.3
ansys-api-tools-filetransfer==0.1.1
ansys-fluent-core==0.33.dev0
ansys-fluent-visualization==0.20.0
ansys-geometry-core==0.10.9
ansys-meshing-prime==0.8.1
ansys-platform-instancemanagement==1.1.2
ansys-tools-filetransfer==0.1.1
ansys-tools-path==0.7.1
ansys-tools-visualization-interface==0.9.2
ansys-units==0.6.0
anyio @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_anyio_1742243108/work
appdirs==1.4.4
argon2-cffi @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi_1749017159514/work
argon2-cffi-bindings @ file:///D:/bld/argon2-cffi-bindings_1725356669592/work
arrow @ file:///home/conda/feedstock_root/build_artifacts/arrow_1733584251875/work
asttokens @ file:///home/conda/feedstock_root/build_artifacts/asttokens_1733250440834/work
async-lru @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_async-lru_1742153708/work
attrs @ file:///home/conda/feedstock_root/build_artifacts/attrs_1741918516150/work
babel @ file:///home/conda/feedstock_root/build_artifacts/babel_1738490167835/work
bcrypt @ file:///D:/bld/bld/rattler-build_bcrypt_1749234584/work
beartype==0.20.2
beautifulsoup4 @ file:///home/conda/feedstock_root/build_artifacts/beautifulsoup4_1744783198182/work
bleach @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_bleach_1737382993/work
Brotli @ file:///D:/bld/brotli-split_1749229870877/work
cached-property @ file:///home/conda/feedstock_root/build_artifacts/cached_property_1615209429212/work
cadquery @ git+https://github.com/CadQuery/cadquery.git@f07e7e0428d07140f3d9fea1c1c51c745f08f2db
casadi==3.7.0
certifi @ file:///home/conda/feedstock_root/build_artifacts/certifi_1749972191589/work/certifi
cffi @ file:///D:/bld/cffi_1725560706917/work
cftime @ file:///D:/bld/cftime_1725400656726/work
charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1746214863626/work
click==8.2.1
colorama @ file:///home/conda/feedstock_root/build_artifacts/colorama_1733218098505/work
comm @ file:///home/conda/feedstock_root/build_artifacts/comm_1733502965406/work
contourpy @ file:///D:/bld/contourpy_1744743081819/work
cryptography @ file:///D:/bld/cryptography-split_1749538506565/work
cycler @ file:///home/conda/feedstock_root/build_artifacts/cycler_1733332471406/work
dataclasses-json==0.6.7
debugpy @ file:///D:/bld/debugpy_1744321277463/work
decorator @ file:///home/conda/feedstock_root/build_artifacts/decorator_1740384970518/work
defusedxml @ file:///home/conda/feedstock_root/build_artifacts/defusedxml_1615232257335/work
Deprecated==1.2.18
docker==7.1.0
exceptiongroup @ file:///home/conda/feedstock_root/build_artifacts/exceptiongroup_1746947292760/work
executing @ file:///home/conda/feedstock_root/build_artifacts/executing_1745502089858/work
ezdxf @ file:///D:/bld/ezdxf_1747590448214/work
fastjsonschema @ file:///home/conda/feedstock_root/build_artifacts/python-fastjsonschema_1733235979760/work/dist
flexcache @ file:///home/conda/feedstock_root/build_artifacts/flexcache_1733663531877/work
flexparser @ file:///home/conda/feedstock_root/build_artifacts/flexparser_1733663506167/work
fonttools @ file:///D:/bld/fonttools_1749228640420/work
fqdn @ file:///home/conda/feedstock_root/build_artifacts/fqdn_1733327382592/work/dist
frozenlist @ file:///D:/bld/frozenlist_1746635344657/work
geomdl==5.4.0
googleapis-common-protos==1.70.0
grpcio==1.73.0
grpcio-health-checking==1.62.3
grpcio-status==1.62.3
h11 @ file:///home/conda/feedstock_root/build_artifacts/h11_1745526374115/work
h2 @ file:///home/conda/feedstock_root/build_artifacts/h2_1738578511449/work
h5py @ file:///D:/bld/h5py_1739952262442/work
hpack @ file:///home/conda/feedstock_root/build_artifacts/hpack_1737618293087/work
httpcore @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_httpcore_1745602916/work
httpx @ file:///home/conda/feedstock_root/build_artifacts/httpx_1733663348460/work
hyperframe @ file:///home/conda/feedstock_root/build_artifacts/hyperframe_1737618333194/work
idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1733211830134/work
imageio==2.37.0
importlib_metadata @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_importlib-metadata_1747934053/work
importlib_resources @ file:///home/conda/feedstock_root/build_artifacts/importlib_resources_1736252299705/work
ipykernel @ file:///D:/bld/ipykernel_1719845595208/work
ipython @ file:///D:/bld/bld/rattler-build_ipython_1748711232/work
ipython_pygments_lexers @ file:///home/conda/feedstock_root/build_artifacts/ipython_pygments_lexers_1737123620466/work
ipywidgets==8.1.7
isoduration @ file:///home/conda/feedstock_root/build_artifacts/isoduration_1733493628631/work/dist
jedi @ file:///home/conda/feedstock_root/build_artifacts/jedi_1733300866624/work
Jinja2 @ file:///home/conda/feedstock_root/build_artifacts/jinja2_1741263328855/work
joblib==1.5.1
json5 @ file:///home/conda/feedstock_root/build_artifacts/json5_1743722064131/work
jsonpointer @ file:///D:/bld/jsonpointer_1725302960531/work
jsonschema @ file:///home/conda/feedstock_root/build_artifacts/jsonschema_1748294245630/work
jsonschema-specifications @ file:///tmp/tmpuvkyqc9y/src
jupyter-events @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_jupyter_events_1738765986/work
jupyter-lsp @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_jupyter-lsp_1748550130/work/jupyter-lsp
jupyter_client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1733440914442/work
jupyter_core @ file:///D:/bld/jupyter_core_1748333031907/work
jupyter_server @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_jupyter_server_1747083217/work
jupyter_server_proxy==4.4.0
jupyter_server_terminals @ file:///home/conda/feedstock_root/build_artifacts/jupyter_server_terminals_1733427956852/work
jupyterlab @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_1748272853841/work
jupyterlab_pygments @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_pygments_1733328101776/work
jupyterlab_server @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_server_1733599573484/work
jupyterlab_widgets==3.0.15
kiwisolver @ file:///D:/bld/kiwisolver_1725459295513/work
loguru @ file:///D:/bld/loguru_1746634725470/work
markdown-it-py @ file:///home/conda/feedstock_root/build_artifacts/markdown-it-py_1733250460757/work
MarkupSafe @ file:///D:/bld/markupsafe_1733219614059/work
marshmallow==3.26.1
matplotlib==3.10.3
matplotlib-inline @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-inline_1733416936468/work
mdurl @ file:///home/conda/feedstock_root/build_artifacts/mdurl_1733255585584/work
meshio @ file:///home/conda/feedstock_root/build_artifacts/meshio_1706720595231/work
mistune @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_mistune_1742402716/work
more-itertools==10.7.0
msgpack @ file:///D:/bld/msgpack-python_1725975250448/work
multidict @ file:///D:/bld/multidict_1747722369820/work
multimethod @ file:///home/conda/feedstock_root/build_artifacts/multimethod_1735317539007/work
munkres==1.1.4
mypy_extensions==1.1.0
nbclient @ file:///home/conda/feedstock_root/build_artifacts/nbclient_1734628800805/work
nbconvert @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_nbconvert-core_1738067871/work
nbformat @ file:///home/conda/feedstock_root/build_artifacts/nbformat_1733402752141/work
nest_asyncio @ file:///home/conda/feedstock_root/build_artifacts/nest-asyncio_1733325553580/work
netCDF4 @ file:///D:/bld/netcdf4_1733253055918/work
nlopt==2.10.0
nltk==3.9.1
notebook @ file:///home/conda/feedstock_root/build_artifacts/notebook_1748278664848/work
notebook_shim @ file:///home/conda/feedstock_root/build_artifacts/notebook-shim_1733408315203/work
numpy @ file:///D:/bld/numpy_1749430510131/work/dist/numpy-2.3.0-cp311-cp311-win_amd64.whl#sha256=cbce3773d67e25a487e4c935da8911f91add9bac284cf2460512a6a0361c7c78
overrides @ file:///home/conda/feedstock_root/build_artifacts/overrides_1734587627321/work
packaging @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_packaging_1745345660/work
pandas==2.2.3
pandocfilters @ file:///home/conda/feedstock_root/build_artifacts/pandocfilters_1631603243851/work
paramiko @ file:///home/conda/feedstock_root/build_artifacts/paramiko_1738679121080/work
parso @ file:///home/conda/feedstock_root/build_artifacts/parso_1733271261340/work
pickleshare @ file:///home/conda/feedstock_root/build_artifacts/pickleshare_1733327343728/work
pillow @ file:///D:/bld/pillow_1746646228195/work
Pint @ file:///home/conda/feedstock_root/build_artifacts/pint_1733663494434/work
pkgutil_resolve_name @ file:///home/conda/feedstock_root/build_artifacts/pkgutil-resolve-name_1733344503739/work
platformdirs @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_platformdirs_1746710438/work
pooch @ file:///home/conda/feedstock_root/build_artifacts/pooch_1733421311631/work
prometheus_client @ file:///home/conda/feedstock_root/build_artifacts/prometheus_client_1748896729786/work
prompt_toolkit @ file:///home/conda/feedstock_root/build_artifacts/prompt-toolkit_1744724089886/work
propcache @ file:///D:/bld/propcache_1744524926447/work
protobuf==4.25.8
psutil @ file:///D:/bld/psutil_1740663127374/work
pure_eval @ file:///home/conda/feedstock_root/build_artifacts/pure_eval_1733569405015/work
pyansys-tools-report==0.8.2
pycparser @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_pycparser_1733195786/work
pygltflib==1.16.4
Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1736243443484/work
PyNaCl @ file:///D:/bld/pynacl_1725739376148/work
pyparsing @ file:///home/conda/feedstock_root/build_artifacts/pyparsing_1743089729650/work
PySide6==6.8.3
PySocks @ file:///D:/bld/pysocks_1733217287171/work
python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1733215673016/work
python-json-logger @ file:///home/conda/feedstock_root/build_artifacts/python-json-logger_1677079630776/work
pytz @ file:///home/conda/feedstock_root/build_artifacts/pytz_1742920838005/work
pyvista @ file:///home/conda/feedstock_root/build_artifacts/pyvista_1747114743331/work
pyvistaqt==0.11.2
pywin32==307
pywinpty @ file:///D:/bld/pywinpty_1738660398038/work/target/wheels/pywinpty-2.0.15-cp311-none-win_amd64.whl#sha256=4b3edd3e28e0295d97879477b00080d2c3d801de92a868576e438cf99e083fe6
PyYAML @ file:///D:/bld/pyyaml_1737454660454/work
pyzmq @ file:///D:/bld/pyzmq_1743831235531/work
QtPy==2.4.3
referencing @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_referencing_1737836872/work
regex==2024.11.6
requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1749498106507/work
rfc3339_validator @ file:///home/conda/feedstock_root/build_artifacts/rfc3339-validator_1733599910982/work
rfc3986-validator @ file:///home/conda/feedstock_root/build_artifacts/rfc3986-validator_1598024191506/work
rich @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_rich_1743371105/work/dist
rpds-py @ file:///D:/bld/bld/rattler-build_rpds-py_1747837737/work
scipy @ file:///C:/bld/scipy-split_1739790799455/work/dist/scipy-1.15.2-cp311-cp311-win_amd64.whl#sha256=7d4ec4c2c958f31576b5ea44433874f567d6f5e65bfcde22e2d960ac86b80515
scooby @ file:///home/conda/feedstock_root/build_artifacts/scooby_1745693061512/work
semver==3.0.4
Send2Trash @ file:///D:/bld/send2trash_1733322089150/work
shapely @ file:///D:/bld/shapely_1747664305591/work
shiboken6==6.8.3
simpervisor==1.0.0
six @ file:///home/conda/feedstock_root/build_artifacts/six_1733380938961/work
sniffio @ file:///home/conda/feedstock_root/build_artifacts/sniffio_1733244044561/work
soupsieve @ file:///home/conda/feedstock_root/build_artifacts/soupsieve_1746563585861/work
stack_data @ file:///home/conda/feedstock_root/build_artifacts/stack_data_1733569443808/work
svgwrite @ file:///home/conda/feedstock_root/build_artifacts/svgwrite_1734380181028/work
terminado @ file:///D:/bld/terminado_1710262761616/work
tinycss2 @ file:///home/conda/feedstock_root/build_artifacts/tinycss2_1729802851396/work
tomli @ file:///home/conda/feedstock_root/build_artifacts/tomli_1733256695513/work
tornado @ file:///D:/bld/tornado_1748003321906/work
tqdm==4.67.1
traitlets @ file:///home/conda/feedstock_root/build_artifacts/traitlets_1733367359838/work
trame==3.10.2
trame-client==3.9.1
trame-common==1.0.0
trame-server==3.4.2
trame-vtk==2.8.17
trame-vuetify==3.0.1
trimesh @ file:///home/conda/feedstock_root/build_artifacts/trimesh_1749690077936/work
types-python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/types-python-dateutil_1747417193651/work
typing-inspect==0.9.0
typing_extensions @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_typing_extensions_1748959427/work
typing_utils @ file:///home/conda/feedstock_root/build_artifacts/typing_utils_1733331286120/work
typish @ file:///home/conda/feedstock_root/build_artifacts/typish_1734445852179/work
tzdata==2025.2
unicodedata2 @ file:///D:/bld/unicodedata2_1736692523011/work
uri-template @ file:///home/conda/feedstock_root/build_artifacts/uri-template_1733323593477/work/dist
urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1744323578849/work
vtk==9.3.1
wcwidth @ file:///home/conda/feedstock_root/build_artifacts/wcwidth_1733231326287/work
webcolors @ file:///home/conda/feedstock_root/build_artifacts/webcolors_1733359735138/work
webencodings @ file:///home/conda/feedstock_root/build_artifacts/webencodings_1733236011802/work
websocket-client @ file:///home/conda/feedstock_root/build_artifacts/websocket-client_1733157342724/work
websockets==15.0.1
widgetsnbextension==4.0.14
win32_setctime @ file:///home/conda/feedstock_root/build_artifacts/win32_setctime_1733752454065/work
win_inet_pton @ file:///D:/bld/win_inet_pton_1733130564612/work
wrapt==1.17.2
wslink @ file:///home/conda/feedstock_root/build_artifacts/wslink_1747717868707/work
yarl @ file:///D:/bld/yarl_1749554833501/work
zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1749421620841/work
zstandard==0.23.0