ansys / pyfluent

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

set-injection-properties RuntimeError #1897

Open millerj97 opened 1 year ago

millerj97 commented 1 year ago

šŸ” Before submitting the issue

šŸž Description of the bug

When using

session.tui.define.injections(
    "set-injection-properties", ....)

in pyfluent the following error is given, whilst the command runs without error in pyconsole

image

The below command causes the error

session.tui.define.injections(
    "set-injection-properties",
    "injection-0",
    "injection-0",
    "no",
    "no",
    "no",
    "inlet",
    "()",
    "no",
    "yes",
    "yes",
    "yes",
    10,
    0.15,
    "no",
    "no",
    "no",
    "no",
    5e-6,
    1.13,
    0.05)

šŸ“ Steps to reproduce

solver.tui.file.read_case("oil_separator.msh.h5")

solver.tui.define.operating_conditions.gravity("Yes", 0, -9.81, 0) solver.tui.define.models.viscous.ke_realizable("yes") solver.tui.solve.set.p_v_coupling(20)

solver.tui.define.injections( "create-injection", "injection-0", "no", "yes", "surface", "no", "inlet", "()", "no", "yes", "yes", "yes", 10, 0.15, "no", "no", "no", "no", 0.0001, 1, 0.2, )

solver.tui.define.injections( "set-injection-properties", "injection-0", "injection-0", "no", "no", "no", "inlet", "()", "no", "yes", "yes", "yes", 10, 0.15, "no", "no", "no", "no", 5e-6, 1.13, 0.05)


### šŸ’» Which operating system are you using?

Windows

### šŸ“€ Which ANSYS version are you using?

241

### šŸ Which Python version are you using?

3.10

### šŸ“¦ Installed packages

```shell
absl-py==1.4.0
ansi2html==1.8.0
ansys-api-fluent==0.3.15
ansys-api-platform-instancemanagement==1.0.0
-e git+https://github.com/pyansys/pyfluent.git@1aef1fff898e7accca708ad9a9348b00bd834f24#egg=ansys_fluent_core
-e git+https://github.com/ansys/pyfluent-visualization.git@2543ceae90aa42ed6625845946190f027fd472f5#egg=ansys_fluent_visualization
ansys-platform-instancemanagement==1.1.2
asttokens==2.2.1
astunparse==1.6.3
backcall==0.2.0
bcrypt==4.0.1
cachetools==5.3.1
certifi==2023.7.22
cffi==1.15.1
charset-normalizer==3.2.0
click==8.1.6
colorama==0.4.6
contourpy==1.1.0
cryptography==41.0.3
cycler==0.11.0
dash==2.12.0
dash-bootstrap-components==1.4.2
dash-core-components==2.0.0
dash-html-components==2.0.0
dash-table==5.0.0
decorator==5.1.1
docker==6.1.3
et-xmlfile==1.1.0
executing==1.2.0
Flask==2.2.5
flatbuffers==23.5.26
fonttools==4.42.0
gast==0.4.0
google-auth==2.22.0
google-auth-oauthlib==1.0.0
google-pasta==0.2.0
grpcio==1.57.0
h5py==3.9.0
idna==3.4
imageio==2.31.1
importlib-metadata==6.8.0
ipython==8.14.0
itsdangerous==2.1.2
jedi==0.19.0
Jinja2==3.1.2
joblib==1.3.2
kaleido==0.2.1
keras==2.13.1
kiwisolver==1.4.4
libclang==16.0.6
lxml==4.9.3
Markdown==3.4.4
MarkupSafe==2.1.3
matplotlib==3.7.2
matplotlib-inline==0.1.6
nest-asyncio==1.5.7
numpy==1.24.3
oauthlib==3.2.2
openpyxl==3.1.2
opt-einsum==3.3.0
packaging==23.1
pandas==2.0.3
paramiko==3.3.1
paramiko-expect==0.3.5
parso==0.8.3
pickleshare==0.7.5
Pillow==10.0.0
platformdirs==3.10.0
plotly==5.16.0
pooch==1.7.0
prompt-toolkit==3.0.39
protobuf==3.20.3
psutil==5.9.5
pure-eval==0.2.2
pyasn1==0.5.0
pyasn1-modules==0.3.0
pycparser==2.21
Pygments==2.16.1
PyNaCl==1.5.0
pyparsing==3.0.9
PySide6==6.5.2
PySide6-Addons==6.5.2
PySide6-Essentials==6.5.2
python-dateutil==2.8.2
python-pptx==0.6.21
pytz==2023.3
pyvista==0.41.1
pyvistaqt==0.11.0
pywin32==306
PyYAML==6.0.1
QtPy==2.3.1
requests==2.31.0
requests-oauthlib==1.3.1
retrying==1.3.4
rsa==4.9
scikit-learn==1.3.0
scipy==1.11.1
scooby==0.7.2
seaborn==0.12.2
shiboken6==6.5.2
six==1.16.0
stack-data==0.6.2
tenacity==8.2.3
tensorboard==2.13.0
tensorboard-data-server==0.7.1
tensorflow==2.13.0
tensorflow-estimator==2.13.0
tensorflow-intel==2.13.0
tensorflow-io-gcs-filesystem==0.31.0
termcolor==2.3.0
threadpoolctl==3.2.0
traitlets==5.9.0
typing_extensions==4.5.0
tzdata==2023.3
urllib3==1.26.16
vtk==9.2.6
wcwidth==0.2.6
websocket-client==1.6.1
Werkzeug==2.2.3
wrapt==1.15.0
xgboost==1.7.6
XlsxWriter==3.1.2
zipp==3.16.2
seanpearsonuk commented 1 year ago

@millerj97 Presumably this is possible through the solver settings API? To verify, we can try running it in PyConsole with journaling on. This will help us to prioritise the issue.

@mkundu1 it there some kind of generic issue here?

millerj97 commented 1 year ago

@seanpearsonuk bug has been reported for tui injection commands not being converted to py commands. Will update this issue once the defect has been resolved.

seanpearsonuk commented 10 months ago

@millerj97 any update on this?

millerj97 commented 10 months ago

@seanpearsonuk the defect reported for this issue is still active with some updated comments, I will forward to you separately

seanpearsonuk commented 10 months ago

812899 on the fluent side

seanpearsonuk commented 4 months ago

Fluent issue remains open as of now