ansys / pyprimemesh

Pythonic Meshing Client for Ansys Prime Server
https://prime.docs.pyansys.com/
MIT License
19 stars 9 forks source link

PyPrime stacker is failing #727

Closed giovannipappalardiansys closed 6 months ago

giovannipappalardiansys commented 6 months ago

šŸ” Before submitting the issue

šŸž Description of the bug

The CAD edges are correctly projected onto the base face. When surface-meshing the base face: the script crashes with the following error:

_Traceback (most recent call last): File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\core\surfer.py", line 60, in mesh_topo_faces return surfer.mesh_topo_faces(topo_faces, params) File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\autogen\surfer.py", line 103, in mesh_topo_faces result = self._comm.serve(self._model, command_name, self._object_id, args=args) File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\internals\error_handling.py", line 510, in wrapper_error_code result = func(*args, *kwargs) File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\internals\error_handling.py", line 465, in wrapper_handle_errors func_result = func(args, kwargs) File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\internals\grpc_communicator.py", line 159, in serve message = get_response(response, '') File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\internals\grpc_communicator.py", line 45, in get_response return separator.join(response.data for response in get_response_messages(response_iterator)) File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\internals\grpc_communicator.py", line 45, in return separator.join(response.data for response in get_response_messages(response_iterator)) File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\internals\grpc_communicator.py", line 36, in get_response_messages for response in response_generator: File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\grpc_channel.py", line 541, in next return self._next() File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\grpc_channel.py", line 967, in _next raise self grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "Connection reset" debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"Connection reset", grpc_status:14, created_time:"2024-02-21T08:00:40.2451551+00:00"}"

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "c:\Users\gpappala\OneDrive - ANSYS, Inc\Documents\WIP\ST\TRR-57952\2024_02_20_int\PyPrimeMesh_Stacker.py", line 81, in mesh_util_controls = mesh_util.surface_mesh_with_size_controls( File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\lucid\mesh_util.py", line 578, in surface_mesh_with_size_controls self.surface_mesh_on_active_sf(generate_quads=generate_quads, scope=scope) File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\lucid\mesh_util.py", line 315, in surface_mesh_on_active_sf surfer.mesh_topo_faces(part_id=part_id, topo_faces=topofaces, params=params) File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\core\surfer.py", line 59, in mesh_topo_faces with _Surfer(model=self._model, part_id=part_id) as surfer: File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\autogen\surfer.py", line 32, in exit self._comm.serve(self._model, command_name, self._object_id, args={}) File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\internals\error_handling.py", line 510, in wrapper_error_code result = func(*args, *kwargs) File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\internals\error_handling.py", line 465, in wrapper_handle_errors func_result = func(args, kwargs) File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\internals\grpc_communicator.py", line 159, in serve message = get_response(response, '') File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\internals\grpc_communicator.py", line 45, in get_response return separator.join(response.data for response in get_response_messages(response_iterator)) File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\internals\grpc_communicator.py", line 45, in return separator.join(response.data for response in get_response_messages(response_iterator)) File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\ansys\meshing\prime\internals\grpc_communicator.py", line 36, in get_response_messages for response in response_generator: File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\grpc_channel.py", line 541, in next return self._next() File "C:\Users\gpappala.ansys_python_venvs\PyAnsys_venv\lib\site-packages\grpc_channel.py", line 967, in _next raise self grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50055: Connection refused" debug_error_string = "UNKNOWN:failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50055: Connection refused {grpc_status:14, createdtime:"2024-02-21T08:00:42.2761546+00:00"}"

šŸ“ Steps to reproduce

Contact Giovanni Pappalardi to get the appropriate files to reproduce the bug

šŸ’» Which operating system are you using?

Windows

šŸ“€ Which ANSYS version are you using?

24.1.0

šŸ Which Python version are you using?

3.10

šŸ“¦ Installed packages

aiohttp==3.9.3
aiosignal==1.3.1
ansys-api-dbu==0.2.2
ansys-api-fluent==0.3.20
ansys-api-geometry==0.3.5
ansys-api-meshing-prime==0.1.2
ansys-api-platform-instancemanagement==1.0.0
ansys-dpf-core==0.10.1
ansys-fluent-core==0.19
ansys-geometry-core==0.4.8
ansys-meshing-prime==0.5.0
ansys-platform-instancemanagement==1.1.2
ansys-tools-path==0.4.1
appdirs==1.4.4
asttokens==2.4.0
async-timeout==4.0.3
attrs==23.2.0
backcall==0.2.0
beartype==0.16.4
cachetools==5.3.2
certifi==2023.7.22
cfgv==3.4.0
cftime==1.6.3
charset-normalizer==3.2.0
click==8.1.7
colorama==0.4.6
comm==0.1.4
contourpy==1.1.0
cycler==0.11.0
debugpy==1.8.0
decorator==5.1.1
distlib==0.3.7
docker==6.1.3
exceptiongroup==1.1.3
executing==2.0.0
filelock==3.12.4
fonttools==4.42.1
frozenlist==1.4.1
google-api-core==2.17.0
google-api-python-client==2.118.0
google-auth==2.27.0
google-auth-httplib2==0.2.0
googleapis-common-protos==1.62.0
grpcio==1.58.0
grpcio-health-checking==1.48.2
h5py==3.9.0
httplib2==0.22.0
identify==2.5.30
idna==3.4
imageio==2.28.0
imageio-ffmpeg==0.4.9
importlib-metadata==6.8.0
ipykernel==6.25.2
ipython==8.16.1
jedi==0.19.1
jupyter_client==8.4.0
jupyter_core==5.4.0
kiwisolver==1.4.5
lxml==4.9.3
markdown-it-py==3.0.0
matplotlib==3.7.3
matplotlib-inline==0.1.6
mdurl==0.1.2
meshio==5.3.5
multidict==6.0.4
nest-asyncio==1.5.8
netCDF4==1.6.5
nodeenv==1.8.0
numpy==1.26.2
packaging==23.1
pandas==2.1.0
parso==0.8.3
pickleshare==0.7.5
Pillow==10.0.0
Pint==0.23
platformdirs==3.10.0
pooch==1.7.0
pre-commit==3.5.0
prompt-toolkit==3.0.39
protobuf==3.20.3
psutil==5.9.5
pure-eval==0.2.2
pyasn1==0.5.1
pyasn1-modules==0.3.0
Pygments==2.16.1
pyparsing==3.1.1
python-dateutil==2.8.2
pytz==2023.3.post1
pyvista==0.38.2
pywin32==306
PyYAML==6.0.1
pyzmq==25.1.1
requests==2.31.0
rich==13.7.0
rsa==4.9
scipy==1.12.0
scooby==0.7.2
six==1.16.0
stack-data==0.6.3
tornado==6.3.3
tqdm==4.66.2
traitlets==5.11.2
typing_extensions==4.9.0
tzdata==2023.3
uritemplate==4.1.1
urllib3==2.0.4
virtualenv==20.24.6
vtk==9.2.2
wcwidth==0.2.8
websocket-client==1.6.3
wslink==1.12.4
yarl==1.9.4
zipp==3.16.2
giovannipappalardiansys commented 6 months ago

This was solved using proximity refinement between the edges of the base face

giovannipappalardiansys commented 6 months ago

No longer a bug