Skip to content

Issue to run scheme command with PyFluent #3960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
derfmy opened this issue Apr 25, 2025 · 0 comments · Fixed by #3963
Closed
2 tasks done

Issue to run scheme command with PyFluent #3960

derfmy opened this issue Apr 25, 2025 · 0 comments · Fixed by #3963
Assignees
Labels
bug Issue, problem or error in PyFluent

Comments

@derfmy
Copy link

derfmy commented Apr 25, 2025

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

I run a complex scheme command with meshing_session.scheme_eval.scheme_eval , but I get an error.

The issue is due to a conflicting requirement. While executing a remote call from PyFluent we suppress all UI prompts, but this implementation of the Scheme function meshing-wf-api-generate-refinement-offsets relies on a prompt input. The current workaround is to add the following line in a .cortex file in your home directory:

(set! suppress-all-warning-error-yes-no-dialog (lambda args ()))

and use the correct command from my previous mail.

Setting that to the .cortex file may give unexpected behaviour in some other PyFluent calls, so the workaround is applicable only for the current script. I don't have a function level workaround as remotely setting that function (suppress-all-warning-error-yes-no-dialog) doesn't work.

Please file a defect for this issue in PyFluent repo. We cannot change the default behaviour as PyFluent relies on it, but we'll look into how to make it configurable for PyFluent calls.

📝 Steps to reproduce

The following scheme command fails without the workaround

meshing_session.scheme_eval.scheme_eval(r'''(meshing-wf-api-generate-refinement-offsets '(
(object-list (list "%s"))
(flow-direction (0 0 -1))
(offset-name "boi-wake")
(defeaturing-size %d)
(bl-height %d)
(bl-levels 1)
(wake-growth-factor %d)
(wake-levels 2)
(upstream-growth-factor 1.2)
(cross-wake-growth-factor 1.2)
))''' % (obj_name, defsizeboi, heightsizeboi, wakegrowthfactor))

The following fails with the workaround:

meshing_session.scheme_eval.scheme_eval(r'''(ti-parallel-mesh-agglomerate)''')

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

2025R2

🐍 Which Python version are you using?

3.10

📦 Installed packages

Package                               Version
------------------------------------- --------------
aiohappyeyeballs                      2.6.1
aiohttp                               3.11.16
aiosignal                             1.3.2
annotated-types                       0.7.0
ansys-acp-core                        0.1.0
ansys-additive-core                   0.19.1
ansys-additive-widgets                0.2.1
ansys-api-acp                         0.2.0
ansys-api-additive                    2.2.1
ansys-api-dbu                         0.3.13
ansys-api-dyna                        0.4.2
ansys-api-edb                         1.0.10
ansys-api-fluent                      0.3.35
ansys-api-geometry                    0.4.42
ansys-api-mapdl                       0.5.2
ansys-api-mechanical                  0.1.2
ansys-api-meshing-prime               0.1.4
ansys-api-modelcenter                 0.3.1
ansys-api-platform-instancemanagement 1.1.2
ansys-api-pyensight                   0.4.7
ansys-api-sherlock                    0.1.35
ansys-api-systemcoupling              0.2.0
ansys-api-tools-filetransfer          0.1.1
ansys-api-workbench                   0.2.0
ansys-conceptev-core                  0.8
ansys-dpf-composites                  0.6.2
ansys-dpf-core                        0.13.4
ansys-dpf-post                        0.9.2
ansys-dyna-core                       0.7.1
ansys-dynamicreporting-core           0.9.0
ansys-edb-core                        0.1.9
ansys-engineeringworkflow-api         0.1.0
ansys-fluent-core                     0.31.dev0
ansys-fluent-visualization            0.20.dev1
ansys-geometry-core                   0.9.1
ansys-grantami-bomanalytics           2.2.0
ansys-grantami-bomanalytics-openapi   3.1.0
ansys-grantami-jobqueue               1.1.0
ansys-grantami-recordlists            1.3.0
ansys-grantami-serverapi-openapi      4.0.0
ansys-hps-client                      0.9.1
ansys-mapdl-core                      0.68.6
ansys-mapdl-reader                    0.54.2
ansys-math-core                       0.2.2
ansys-mechanical-core                 0.11.13
ansys-mechanical-env                  0.1.9
ansys-mechanical-stubs                0.1.6
ansys-meshing-prime                   0.7.0
ansys-modelcenter-workflow            0.1.1
ansys-motorcad-core                   0.7.0
ansys-openapi-common                  2.2.2
ansys-optislang-core                  0.9.4
ansys-platform-instancemanagement     1.1.2
ansys-pyensight-core                  0.9.10
ansys-pythonnet                       3.1.0rc6
ansys-rocky-core                      0.3.2
ansys-seascape                        0.2.0
ansys-sherlock-core                   0.8.2
ansys-simai-core                      0.2.6
ansys-sound-core                      0.1.3
ansys-systemcoupling-core             0.8.0
ansys-tools-filetransfer              0.1.1
ansys-tools-local-product-launcher    0.1.1
ansys-tools-path                      0.7.1
ansys-tools-visualization-interface   0.8.3
ansys-turbogrid-api                   0.4.4
ansys-turbogrid-core                  0.4.1
ansys-units                           0.4.0
ansys-workbench-core                  0.8.0
anyio                                 4.9.0
appdirs                               1.4.4
argon2-cffi                           23.1.0
argon2-cffi-bindings                  21.2.0
arrow                                 1.3.0
asgiref                               3.8.1
asttokens                             3.0.0
async-timeout                         5.0.1
attrs                                 24.2.0
backoff                               2.2.1
bcrypt                                4.3.0
beartype                              0.19.0
beautifulsoup4                        4.13.3
bleach                                6.2.0
bokeh                                 3.4.3
build                                 1.2.2.post1
cachetools                            5.5.2
certifi                               2025.1.31
cffi                                  1.17.1
charset-normalizer                    3.4.1
click                                 8.1.8
clr_loader                            0.2.7.post0
cmocean                               4.0.3
colorama                              0.4.6
colorcet                              3.1.0
comm                                  0.2.2
contourpy                             1.3.1
cryptography                          44.0.2
cycler                                0.12.1
dataclasses-json                      0.6.7
debugpy                               1.8.14
decorator                             5.2.1
defusedxml                            0.7.1
Deprecated                            1.2.18
dill                                  0.3.9
Django                                4.2.20
django-guardian                       2.4.0
djangorestframework                   3.16.0
docker                                7.1.0
elementpath                           4.8.0
exceptiongroup                        1.2.2
executing                             2.2.0
fabric                                3.2.2
fastjsonschema                        2.21.1
filelock                              3.18.0
flexcache                             0.3
flexparser                            0.4
fonttools                             4.57.0
fpdf2                                 2.8.2
fqdn                                  1.5.1
frozenlist                            1.5.0
geomdl                                5.3.1
google-api-core                       2.24.2
google-api-python-client              2.166.0
google-auth                           2.38.0
google-auth-httplib2                  0.2.0
googleapis-common-protos              1.69.2
grpcio                                1.67.1
grpcio-health-checking                1.62.3
grpcio-status                         1.62.3
h11                                   0.14.0
hollerith                             0.6.0
httpcore                              1.0.7
httplib2                              0.22.0
httpx                                 0.28.1
idna                                  3.10
imageio                               2.37.0
importlib_metadata                    8.6.1
invoke                                2.2.0
ipykernel                             6.29.5
ipython                               8.35.0
ipywidgets                            8.1.6
isoduration                           20.11.0
jedi                                  0.19.2
Jinja2                                3.1.6
joblib                                1.4.2
jsonpointer                           3.0.0
jsonschema                            4.23.0
jsonschema-specifications             2024.10.1
jupyter_client                        8.6.3
jupyter_core                          5.7.2
jupyter-events                        0.12.0
jupyter_server                        2.15.0
jupyter_server_proxy                  4.4.0
jupyter_server_terminals              0.5.3
jupyterlab_pygments                   0.3.0
jupyterlab_widgets                    3.0.14
kiwisolver                            1.4.8
linkify-it-py                         2.0.3
lxml                                  5.3.2
Markdown                              3.7
markdown-it-py                        3.0.0
MarkupSafe                            3.0.2
marshmallow                           3.26.1
marshmallow-oneofschema               3.1.1
matplotlib                            3.10.1
matplotlib-inline                     0.1.7
mdit-py-plugins                       0.4.2
mdurl                                 0.1.2
meshio                                5.3.5
mistune                               3.1.3
more-itertools                        10.6.0
msal                                  1.32.0
msal-extensions                       1.3.1
msgpack                               1.1.0
multidict                             6.4.3
mypy-extensions                       1.0.0
nbclient                              0.10.2
nbconvert                             7.16.6
nbformat                              5.10.4
nest-asyncio                          1.6.0
networkx                              3.4.2
nltk                                  3.9.1
numpy                                 2.2.4
overrides                             7.7.0
packaging                             24.2
pandas                                2.2.3
pandocfilters                         1.5.1
panel                                 1.4.4
param                                 2.2.0
paramiko                              3.5.1
parso                                 0.8.4
patsy                                 1.0.1
pillow                                11.1.0
Pint                                  0.24.4
pip                                   25.0.1
platformdirs                          4.3.7
plumbum                               1.9.0
pooch                                 1.8.2
prometheus_client                     0.21.1
prompt_toolkit                        3.0.50
propcache                             0.3.1
proto-plus                            1.26.1
protobuf                              4.25.6
psutil                                7.0.0
pure_eval                             0.2.3
pyaedt                                0.15.0
pyansys                               2025.1.3
pyansys-tools-report                  0.8.2
pyansys-tools-variableinterop         0.1.1
pyansys-tools-versioning              0.6.0
pyasn1                                0.6.1
pyasn1_modules                        0.4.2
pycparser                             2.22
pydantic                              2.10.6
pydantic_core                         2.27.2
pyedb                                 0.37.0
pygltflib                             1.16.3
Pygments                              2.19.1
pygranta                              2025.1.0
pyiges                                0.3.1
PyJWT                                 2.10.1
PyNaCl                                1.5.0
pyparsing                             3.2.3
pypiwin32                             223
pypng                                 0.20220715.0
pyproject_hooks                       1.2.0
Pyro5                                 5.15
PySide6                               6.8.3
PySide6_Addons                        6.8.3
PySide6_Essentials                    6.8.3
pyspnego                              0.11.2
python-dateutil                       2.9.0.post0
python-dotenv                         1.1.0
python-json-logger                    3.3.0
python-pptx                           0.6.19
pytwin                                0.7.0
pytz                                  2025.2
pyvista                               0.44.2
pyvistaqt                             0.11.2
pyviz_comms                           3.0.4
pywin32                               310
pywinpty                              2.0.15
PyYAML                                6.0.2
pyzmq                                 26.4.0
QtPy                                  2.4.3
referencing                           0.35.1
regex                                 2024.11.6
requests                              2.32.3
requests-negotiate-sspi               0.5.2
requests_ntlm                         1.3.0
requests-toolbelt                     1.0.0
rfc3339-validator                     0.1.4
rfc3986-validator                     0.1.1
rich                                  14.0.0
rpds-py                               0.24.0
rpyc                                  6.0.1
rsa                                   4.9
rtree                                 1.4.0
scikit-learn                          1.6.1
scikit-rf                             1.6.2
scipy                                 1.15.2
scooby                                0.10.0
semver                                3.0.4
Send2Trash                            1.8.3
serpent                               1.41
setuptools                            78.1.0
shiboken6                             6.8.3
simpervisor                           1.0.0
six                                   1.17.0
sniffio                               1.3.1
soupsieve                             2.6
sqlparse                              0.5.3
sseclient-py                          1.8.0
sspilib                               0.3.0
stack-data                            0.6.3
statsmodels                           0.14.4
tabulate                              0.9.0
terminado                             0.18.1
threadpoolctl                         3.6.0
tinycss2                              1.4.0
toml                                  0.10.2
tomli                                 2.2.1
tomli_w                               1.2.0
tornado                               6.4.2
tqdm                                  4.67.1
traitlets                             5.14.3
trame                                 3.8.2
trame-client                          3.7.1
trame-server                          3.4.0
trame-vtk                             2.8.15
trame-vuetify                         2.9.0
transformations                       2025.1.1
truststore                            0.10.1
types-python-dateutil                 2.9.0.20241206
typing_extensions                     4.13.2
typing-inspect                        0.9.0
tzdata                                2025.2
tzlocal                               5.3.1
uc-micro-py                           1.0.3
uri-template                          1.3.0
uritemplate                           4.1.1
urllib3                               2.4.0
usd-core                              24.8
vtk                                   9.3.1
wakepy                                0.10.1
wcwidth                               0.2.13
webcolors                             24.11.1
webencodings                          0.5.1
websocket-client                      1.8.0
websockets                            15.0.1
widgetsnbextension                    4.0.14
WMI                                   1.5.1
wrapt                                 1.17.2
wslink                                2.3.3
XlsxWriter                            3.2.2
xmlschema                             3.4.5
xyzservices                           2025.1.0
yarl                                  1.19.0
zipp                                  3.21.0
@derfmy derfmy added the bug Issue, problem or error in PyFluent label Apr 25, 2025
@mkundu1 mkundu1 self-assigned this Apr 25, 2025
@mkundu1 mkundu1 linked a pull request Apr 25, 2025 that will close this issue
@mkundu1 mkundu1 linked a pull request Apr 25, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue, problem or error in PyFluent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants