ansys / pyfluent

Pythonic interface to Ansys Fluent
https://fluent.docs.pyansys.com
MIT License
254 stars 42 forks source link

PyFluent Error #1572

Closed schrummy14 closed 1 year ago

schrummy14 commented 1 year ago

🔍 Before submitting the issue

🐞 Description of the bug

Ubuntu Docker Image of Ansys 2023R1 Shows the error: sh: 1: /usr/ansys_inc/v231/commonfiles/CPython/3_7/linx64/Release/Ansys/TGrid/runCADReaders.csh: not found but file is at the location ls /usr/ansys_inc/v231/commonfiles/CPython/3_7/linx64/Release/Ansys/TGrid/runCADReaders.csh /usr/ansys_inc/v231/commonfiles/CPython/3_7/linx64/Release/Ansys/TGrid/runCADReaders.csh

📝 Steps to reproduce

Download the fluent mixing elbow example https://fluent.docs.pyansys.com/dev/examples/00-fluent/mixing_elbow.html#sphx-glr-download-examples-00-fluent-mixing-elbow-py

export PYFLUENT_FLUENT_ROOT=/usr/ansys_inc/v231/fluent

NOTE: AWP_ROOT231 is not working for me.

run python3 mixing_elbow.py

💻 Which operating system are you using?

Linux

📀 Which ANSYS version are you using?

2023R1

🐍 Which Python version are you using?

3.8

📦 Installed packages

ansys-api-fluent==0.3.12
ansys-api-mapdl==0.5.1
ansys-api-meshing-prime==0.1.1
ansys-api-platform-instancemanagement==1.0.0b3
ansys-corba==0.1.1
ansys-dpf-core==0.6.0
ansys-dpf-gate==0.2.1
ansys-dpf-gatebin==0.3.1
ansys-dpf-post==0.2.5
ansys-fluent-core==0.11.0
ansys-fluent-parametric==0.5.0
ansys-fluent-visualization==0.5.0
ansys-grantami-bomanalytics==1.0.1
ansys-grantami-bomanalytics-openapi==1.0.0
ansys-grpc-dpf==0.7.1
ansys-mapdl-core==0.63.2
ansys-mapdl-reader==0.52.0
ansys-meshing-prime==0.2.0
ansys-openapi-common==1.1.1
ansys-platform-instancemanagement==1.0.2
ansys-seascape==0.2.0
anyio==3.6.2
appdirs==1.4.4
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
arrow==1.2.3
asttokens==2.2.1
attrs==23.1.0
backcall==0.2.0
beautifulsoup4==4.12.2
bleach==6.0.0
blinker==1.4
cachetools==5.3.0
certifi==2019.11.28
cffi==1.15.0
chardet==3.0.4
charset-normalizer==3.1.0
clr-loader==0.2.5
comm==0.1.3
contourpy==1.0.7
cryptography==2.8
cupshelpers==1.0
cycler==0.11.0
dbus-python==1.2.16
debugpy==1.6.7
decorator==5.1.1
defer==1.0.6
defusedxml==0.7.1
distro==1.4.0
distro-info===0.23ubuntu1
dotnetcore2==3.1.23
entrypoints==0.3
executing==1.2.0
fastjsonschema==2.16.3
fonttools==4.39.3
fqdn==1.5.1
geomdl==5.3.1
google-api-core==2.10.1
google-api-python-client==2.86.0
google-auth==2.17.3
google-auth-httplib2==0.1.0
googleapis-common-protos==1.56.4
grpcio==1.54.0
h5py==3.8.0
httplib2==0.22.0
idna==2.8
imageio==2.28.0
importlib-metadata==4.13.0
importlib-resources==5.12.0
ipycanvas==0.13.1
ipyevents==2.0.1
ipykernel==6.22.0
ipython==8.12.0
ipython-genutils==0.2.0
ipyvtklink==0.2.3
ipywidgets==7.7.5
isoduration==20.11.0
jedi==0.18.2
Jinja2==3.1.2
jsonpointer==2.3
jsonschema==4.17.3
jupyter==1.0.0
jupyter-console==6.6.3
jupyter-events==0.6.3
jupyter_client==8.2.0
jupyter_core==5.3.0
jupyter_server==2.5.0
jupyter_server_terminals==0.4.4
jupyterlab-pygments==0.2.2
jupyterlab-widgets==1.1.4
keyring==18.0.1
kiwisolver==1.4.4
language-selector==0.1
launchpadlib==1.10.13
lazr.restfulclient==0.14.2
lazr.uri==1.0.3
macaroonbakery==1.3.1
MarkupSafe==2.1.2
matplotlib==3.7.1
matplotlib-inline==0.1.6
mistune==2.0.5
nbclassic==0.5.5
nbclient==0.7.4
nbconvert==7.3.1
nbformat==5.8.0
nest-asyncio==1.5.6
notebook==6.5.4
notebook_shim==0.2.3
numpy==1.24.3
oauthlib==3.1.0
packaging==23.1
pandas==2.0.1
pandocfilters==1.5.0
parso==0.8.3
pbr==5.11.1
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.5.0
pkgutil_resolve_name==1.3.10
platformdirs==3.4.0
plumbum==1.8.1
pooch==1.7.0
prometheus-client==0.16.0
prompt-toolkit==3.0.38
protobuf==3.20.1
protoc-gen-swagger==0.1.0
psutil==5.9.5
ptyprocess==0.7.0
pure-eval==0.2.2
pyaedt==0.6.3
pyansys==2023.1.3
pyasn1==0.5.0
pyasn1-modules==0.3.0
pycairo==1.16.2
pycparser==2.21
pycups==1.9.73
Pygments==2.15.1
PyGObject==3.36.0
pyiges==0.2.1
PyJWT==1.7.1
pymacaroons==0.13.0
PyNaCl==1.3.0
pyparsing==3.0.9
pyRFC3339==1.1
pyrsistent==0.19.3
PySide6==6.5.0
PySide6-Addons==6.5.0
PySide6-Essentials==6.5.0
pyspnego==0.8.0
python-apt==2.0.1+ubuntu0.20.4.1
python-dateutil==2.8.2
python-json-logger==2.0.7
pythonnet==3.0.0rc6
pytwin==0.2.0
pytz==2023.3
pyvista==0.38.5
pyvistaqt==0.10.0
PyYAML==6.0
pyzmq==25.0.2
qtconsole==5.4.2
QtPy==2.3.1
requests==2.29.0
requests-ntlm==1.2.0
requests-unixsocket==0.2.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpyc==5.0.1
rsa==4.9
scipy==1.10.1
scooby==0.7.1
SecretStorage==2.3.1
Send2Trash==1.8.0
shiboken6==6.5.0
simplejson==3.16.0
six==1.14.0
sniffio==1.3.0
soupsieve==2.4.1
ssh-import-id==5.10
stack-data==0.6.2
systemd-python==234
terminado==0.17.1
testresources==2.0.1
tinycss2==1.2.1
tornado==6.3.1
tqdm==4.65.0
traitlets==5.9.0
typing_extensions==4.5.0
tzdata==2023.3
unattended-upgrades==0.1
uri-template==1.2.0
uritemplate==4.1.1
urllib3==1.25.8
vtk==9.2.6
wadllib==1.3.3
wcwidth==0.2.6
webcolors==1.13
webencodings==0.5.1
websocket-client==1.5.1
widgetsnbextension==3.6.4
zipp==3.15.0
seanpearsonuk commented 1 year ago

CAD readers will not be found without the AWP env var. The Fluent-specific env var you are using doesn't resolve that because the CAD readers are outside Fluent. Your AWP env var would point to /usr/ansys_inc/v231. Does that not work?

schrummy14 commented 1 year ago

Hello, Correct, the AWP variable does not work when installing via pip install pyansys[all] (installs pyfluent 0.11)

I have tried using only the pyfluent install with visualization and parametric. Here the AWP variable works but I get the same error.

The other two examples did run without issue.

Please let me know if there is anything you would like me to pull from the install environment. I will be out next week.

dnwillia-work commented 1 year ago

When you log in to your running container and spin up a virtual environment what's the value, or values, of AWP_ROOT<ver> you have configured? These need to be set in the running environment. It's documented on the README page:

https://github.com/pyansys/pyfluent#launching-fluent

I don't know why we documented this PYFLUENT_FLUENT_ROOT variable, probably the language there that says "or set ..." should be removed or just remove the documentation entirely. This variable is meant for internal development so that developers working on the server code can point PyFluent at a local Fluent build. I'd actually leave this unset entirely and just stick with AWP_ROOT<ver>

schrummy14 commented 1 year ago

Hello, I have tried the following: export AWP_ROOT231=/ansys_inc/v231 (which is a sym link to /usr/ansys_inc/v231) export AWP_ROOT231=/usr/ansys_inc/v231

Does this need to be set before ansys is installed?

seanpearsonuk commented 1 year ago

No, typically it would not be set before installation. On Windows, the installer sets it for you, while on Linux, it's a manual step that can be completed afterwards.

schrummy14 commented 1 year ago

That's what I figured as everything else has been working so far. I use a script to start my Jupyter notebook and before Jupyter starts, I set the AWP_ROOT231 variable as above.

schrummy14 commented 1 year ago

Is there anything else you would like me to provide or test?

schrummy14 commented 1 year ago

Hello, I have tried again using 232 and am getting the same issue with the mixing elbow example. https://fluent.docs.pyansys.com/version/stable/examples/00-fluent/mixing_elbow.html

sh: 1: /usr/ansys_inc/v232/commonfiles/CPython/3_10/linx64/Release/Ansys/TGrid/runCADReaders.csh: not found
schrummy14 commented 1 year ago

I am using the AWP_ROOT environment variable.

export AWP_ROOT232=/usr/ansys_inc/v232

I am now using Ubuntu 20.04 instead of CentOS 7.

Below is the Jupyter logs during start up.

[I 2023-08-08 20:38:31.445 ServerApp](B Package notebook took 0.0000s to import
[I 2023-08-08 20:38:31.452 ServerApp](B Package jupyter_lsp took 0.0069s to import
[W 2023-08-08 20:38:31.452 ServerApp](B A `_jupyter_server_extension_points` function was not found in jupyter_lsp. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-08-08 20:38:31.456 ServerApp](B Package jupyter_server_terminals took 0.0034s to import
[I 2023-08-08 20:38:31.456 ServerApp](B Package jupyterlab took 0.0000s to import
[I 2023-08-08 20:38:31.480 ServerApp](B Package notebook_shim took 0.0000s to import
[W 2023-08-08 20:38:31.480 ServerApp](B A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-08-08 20:38:31.480 ServerApp](B jupyter_lsp | extension was successfully linked.
[I 2023-08-08 20:38:31.482 ServerApp](B jupyter_server_terminals | extension was successfully linked.
[W 2023-08-08 20:38:31.483 LabApp](B 'token' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-08-08 20:38:31.484 LabApp](B 'base_url' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-08-08 20:38:31.486 ServerApp](B ServerApp.token config is deprecated in 2.0. Use IdentityProvider.token.
[I 2023-08-08 20:38:31.486 ServerApp](B jupyterlab | extension was successfully linked.
[I 2023-08-08 20:38:31.488 ServerApp](B notebook | extension was successfully linked.
[I 2023-08-08 20:38:31.489 ServerApp](B Writing Jupyter server cookie secret to /tmp/.ephemeral-home/.local/share/jupyter/runtime/jupyter_cookie_secret
[I 2023-08-08 20:38:31.636 ServerApp](B notebook_shim | extension was successfully linked.
[I 2023-08-08 20:38:31.652 ServerApp](B notebook_shim | extension was successfully loaded.
[I 2023-08-08 20:38:31.655 ServerApp](B jupyter_lsp | extension was successfully loaded.
[I 2023-08-08 20:38:31.655 ServerApp](B jupyter_server_terminals | extension was successfully loaded.
[I 2023-08-08 20:38:31.656 LabApp](B JupyterLab extension loaded from /usr/local/lib/python3.8/dist-packages/jupyterlab
[I 2023-08-08 20:38:31.656 LabApp](B JupyterLab application directory is /usr/local/share/jupyter/lab
[I 2023-08-08 20:38:31.657 LabApp](B Extension Manager is 'pypi'.
[I 2023-08-08 20:38:31.659 ServerApp](B jupyterlab | extension was successfully loaded.
[I 2023-08-08 20:38:31.661 ServerApp](B notebook | extension was successfully loaded.
[I 2023-08-08 20:38:31.661 ServerApp](B Serving notebooks from local directory: /data
schrummy14 commented 1 year ago

Problem has been solved. On Ubuntu 20.04 (haven't tested for RHEL based OSs nor newer versions of Ubuntu), you need to install the tcsh package. This package is missing from the Ansys installation docs.