ansys / pyfluent

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

root object solution.run_calculation.interrupt doesn't work #1963

Closed Boo-Ya-z closed 1 year ago

Boo-Ya-z commented 1 year ago

πŸ” Before submitting the issue

🐞 Description of the bug

solver.tui.solve.dual_time_iterate(2000,20),fluent is calculating. but i want stop calculating with settings objects solver.solution.run_calculation.interrupt(end_of_timestep=False) ,it doesn't work...

πŸ“ Steps to reproduce

By using the Python web framework, place pyfluent inside this, use HTTP requests to control fluent, send tui to the app, and execute tui using the python exec function . exec("fl.Fluent."+tui) fl.Fluent is Solver Session object and tui is tui string

πŸ’» Which operating system are you using?

Windows

πŸ“€ Which ANSYS version are you using?

ansys 2023R1

🐍 Which Python version are you using?

3.10

πŸ“¦ Installed packages

abaqus-parse==0.1.3
abqpy==2023.4.2
accessible-pygments==0.0.4
alabaster==0.7.13
altgraph==0.17.3
aniso8601==9.0.1
ansys-api-fluent==0.3.12
ansys-api-platform-instancemanagement==1.0.0b3
ansys-corba==0.1.0
ansys-fluent-core==0.15.0
ansys-platform-instancemanagement==1.1.1
ansys-sphinx-theme==0.9.8
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==22.2.0
auto-all==1.4.1
auto-py-to-exe==2.36.0
autodocsumm==0.2.10
autopep8==2.0.1
Babel==2.12.1
backcall==0.2.0
beautifulsoup4==4.11.1
bleach==5.0.1
blinker==1.6.2
bottle==0.12.25
bottle-websocket==0.2.9
cachetools==5.3.0
calfem-python==3.6.3
cattrs==22.2.0
certifi==2022.12.7
cffi==1.15.1
charset-normalizer==3.1.0
click==8.1.3
colorama==0.4.6
comm==0.1.2
contourpy==1.0.7
cryptography==38.0.1
cycler==0.11.0
darkdetect==0.7.1
debugpy==1.6.5
decorator==5.1.1
defusedxml==0.7.1
Deprecated==1.2.13
distlib==0.3.6
docutils==0.19
Eel==0.16.0
entrypoints==0.4
esbonio==0.16.1
et-xmlfile==1.1.0
exceptiongroup==1.1.1
executing==1.2.0
fastjsonschema==2.16.2
filelock==3.12.0
Flask==2.3.2
Flask-Cors==3.0.10
Flask-RESTful==0.3.9
fonttools==4.38.0
fqdn==1.5.1
fracture-fea-laf==0.1.1
future==0.18.3
gevent==22.10.2
gevent-websocket==0.10.1
gmsh==4.11.1
google-api-core==2.11.0
google-auth==2.17.3
googleapis-common-protos==1.59.0
greenlet==2.0.2
grpcio==1.54.0
h5py==3.8.0
idna==3.4
imageio==2.24.0
imagesize==1.4.1
importlib-metadata==6.6.0
interchange==2021.0.4
ipykernel==6.20.2
ipython==8.8.0
ipython-genutils==0.2.0
ipywidgets==8.0.4
isoduration==20.11.0
itsdangerous==2.1.2
jedi==0.18.2
Jinja2==3.1.2
jsonpointer==2.3
jsonschema==4.17.3
jupyter==1.0.0
jupyter-console==6.4.4
jupyter-events==0.6.3
jupyter-sphinx==0.4.0
jupyter_client==7.4.9
jupyter_core==5.1.3
jupyter_server==2.1.0
jupyter_server_terminals==0.4.4
jupyterlab-pygments==0.2.2
jupyterlab-widgets==3.0.5
kiwisolver==1.4.4
lsprotocol==2023.0.0a1
lxml==4.9.2
MarkupSafe==2.1.2
matplotlib==3.6.3
matplotlib-inline==0.1.6
mistune==2.0.4
monotonic==1.6
more-itertools==9.0.0
msgpack-python==0.5.6
nbclassic==0.4.8
nbclient==0.7.2
nbconvert==7.2.8
nbformat==5.7.3
nest-asyncio==1.5.6
notebook==6.5.2
notebook_shim==0.2.2
numpy==1.24.3
numpydoc==1.5.0
openpyxl==3.0.10
packaging==21.3
pandas==2.0.1
pandocfilters==1.5.0
pansi==2020.7.3
parso==0.8.3
pdfminer==20191125
pdfminer.six==20220524
pdfplumber==0.7.4
pefile==2023.2.7
pickleshare==0.7.5
Pillow==9.2.0
pipenv==2023.4.20
platformdirs==3.2.0
plotly==5.12.0
ply==3.11
pooch==1.6.0
prometheus-client==0.15.0
prompt-toolkit==3.0.36
protobuf==3.20.3
protoc-gen-swagger==0.1.0
psutil==5.9.4
pure-eval==0.2.2
py2neo==2021.2.3
pyahocorasick==1.4.4
pyasn1==0.5.0
pyasn1-modules==0.3.0
pybaqus==0.2.9
pycodestyle==2.10.0
pycparser==2.21
pycryptodome==3.15.0
pydata-sphinx-theme==0.13.3
pyerz==1.0.2
pyfluent==0.2.1
pygls==1.0.1
Pygments==2.15.1
pyinstaller==5.10.1
pyinstaller-hooks-contrib==2023.2
PyMuPDF==1.20.2
PyOpenGL==3.1.6
pyparsing==3.0.9
PyPDF2==2.10.9
PyQt5==5.15.7
PyQt5-Qt5==5.15.2
PyQt5-sip==12.11.0
pyqtdarktheme==2.1.0
pyrsistent==0.19.3
PySide2==5.15.2.1
pyspellchecker==0.7.1
python-dateutil==2.8.2
python-docx==0.8.11
python-json-logger==2.0.4
pytz==2023.3
pyvista==0.37.0
PyVTK==0.5.18
pywin32==304
pywin32-ctypes==0.2.0
pywinpty==2.0.10
PyYAML==6.0
pyzmq==25.0.0
qt-material==2.14
qtconsole==5.4.0
QtPy==2.3.0
requests==2.30.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rsa==4.9
scandir==1.10.0
scipy==1.10.0
scooby==0.7.0
Send2Trash==1.8.0
shiboken2==5.15.2.1
six==1.16.0
sniffio==1.3.0
snowballstemmer==2.2.0
soupsieve==2.3.2.post1
Sphinx==6.2.0
sphinx-autodoc-typehints==1.23.0
sphinx-copybutton==0.5.2
sphinx-gallery==0.13.0
sphinx-notfound-page==0.8.3
sphinxcontrib-applehelp==1.0.4
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sphinxemoji==0.2.0
stack-data==0.6.2
tabulate==0.9.0
tenacity==8.1.0
terminado==0.17.1
tinycss2==1.2.1
toml==0.10.2
tomli==2.0.1
tornado==6.2
tqdm==4.64.0
traitlets==5.8.1
typeguard==2.13.3
typing_extensions==4.4.0
tzdata==2023.3
uri-template==1.2.0
urllib3==2.0.2
vecmaths==0.1.6
vedo==2023.4.3
virtualenv==20.22.0
virtualenv-clone==0.5.7
visvis==1.14.0
vtk==9.2.5
Wand==0.6.10
wcwidth==0.2.6
webcolors==1.12
webencodings==0.5.1
websocket-client==1.4.2
Werkzeug==2.3.3
whichcraft==0.6.1
widgetsnbextension==4.0.5
wrapt==1.14.1
zipp==3.15.0
zope.event==5.0
zope.interface==6.0
Boo-Ya-z commented 1 year ago

image It seems to be blocked

seanpearsonuk commented 1 year ago

@hpohekar please can you triage this just to see if it's reproducible. Ignore the details about when. Just do a straightforward PyFluent-based test.

hpohekar commented 1 year ago

@seanpearsonuk Yes, solver.solution.run_calculation.interrupt(end_of_timestep=False) is not working.

hpohekar commented 1 year ago

We are able to interrupt iterations through GUI mode as follows for now.

image

We don't have a way to execute settings API commands in non-waiting mode.

We will discuss this with settings API team.

Boo-Ya-z commented 1 year ago

look this ,Integrate it into a web service application and control Fluent through web requests image