Skip to content
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

Bug when running User Guide graphics example #261

Open
2 tasks done
PProfizi opened this issue May 10, 2023 · 3 comments
Open
2 tasks done

Bug when running User Guide graphics example #261

PProfizi opened this issue May 10, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@PProfizi
Copy link

🔍 Before submitting the issue

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

🐞 Description of the bug

Hi!
When running the examples found here with an Ansys 2023R2 install dating from 2023-01-13:

import ansys.fluent.core as pyfluent
from ansys.fluent.core import examples
from ansys.fluent.visualization import set_config
from ansys.fluent.visualization.matplotlib import Plots
from ansys.fluent.visualization.pyvista import Graphics

set_config(blocking=True, set_view_on_display="isometric")

import_case = examples.download_file(
    filename="exhaust_system.cas.h5", directory="pyfluent/exhaust_system"
)

import_data = examples.download_file(
    filename="exhaust_system.dat.h5", directory="pyfluent/exhaust_system"
)

solver_session = pyfluent.launch_fluent(precision="double", processor_count=2, mode="solver")

solver_session.tui.file.read_case(import_case)
solver_session.tui.file.read_data(import_data)

graphics = Graphics(session=solver_session)

# Display y-coordinate iso-surface
surf_outlet_plane = graphics.Surfaces["outlet-plane"]
surf_outlet_plane.surface.type = "iso-surface"
iso_surf1 = surf_outlet_plane.surface.iso_surface
iso_surf1.field = "y-coordinate"
iso_surf1.iso_value = -0.125017
surf_outlet_plane.display("window-2")

results in:

Traceback (most recent call last):
  File "D:\ANSYSDev\Sandbox\pydpf-post\temp\pyfluent\pyfluent_display.py", line 26, in <module>
    surf_outlet_plane.surface.type = "iso-surface"
  File "D:\temp\pydpf-core\232_CFF\lib\site-packages\ansys\fluent\core\meta.py", line 279, in wrapper
    return object.__getattribute__(self, name)
AttributeError: 'Surface' object has no attribute 'surface'

📝 Steps to reproduce

See above.

Would that be a problem with my Ansys install?

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

232 build from 2023-01-13

🐍 Which Python version are you using?

3.10

📦 Installed packages

Package                               Version    Editable project location
------------------------------------- ---------- -----------------------------------------
ansys-api-fluent                      0.3.12
ansys-api-platform-instancemanagement 1.0.0b3
ansys-dpf-core                        0.7.5.dev0 D:\ANSYSDev\Sandbox\pydpf-core
ansys-dpf-gate                        0.3.2.dev0
ansys-dpf-gatebin                     0.3.2.dev0
ansys-dpf-post                        0.3.1.dev0 D:\ANSYSDev\Sandbox\pydpf-post
ansys-dpf-server-2023-2-pre2          2023.2rc2  d:\ansysdev\dpf_standalone\cff_fixes\v232
ansys-fluent-core                     0.14.dev1
ansys-fluent-visualization            0.7.1
ansys-grpc-dpf                        0.7.2.dev0
ansys-platform-instancemanagement     1.1.1
appdirs                               1.4.4
attrs                                 22.2.0
black                                 23.1.0
cachetools                            5.3.0
certifi                               2022.12.7
charset-normalizer                    3.1.0
chevron                               0.14.0
click                                 8.1.3
colorama                              0.4.6
contourpy                             1.0.7
coverage                              7.2.1
cycler                                0.11.0
exceptiongroup                        1.1.1
fonttools                             4.39.2
google-api-core                       2.11.0
google-api-python-client              2.82.0
google-auth                           2.16.2
google-auth-httplib2                  0.1.0
googleapis-common-protos              1.59.0
grpcio                                1.51.3
h5py                                  3.8.0
httplib2                              0.21.0
idna                                  3.4
imageio                               2.26.1
importlib-metadata                    6.1.0
iniconfig                             2.0.0
kiwisolver                            1.4.4
lxml                                  4.9.2
matplotlib                            3.7.1
mypy-extensions                       1.0.0
numpy                                 1.24.2
packaging                             23.0
pandas                                1.5.3
pathspec                              0.11.1
Pillow                                9.4.0
pip                                   21.3.1
platformdirs                          3.1.1
pluggy                                1.0.0
pooch                                 1.7.0
protobuf                              3.20.3
protoc-gen-swagger                    0.1.0
psutil                                5.9.4
pyasn1                                0.4.8
pyasn1-modules                        0.2.8
pyparsing                             3.0.9
PySide6                               6.5.0
PySide6-Addons                        6.5.0
PySide6-Essentials                    6.5.0
pytest                                7.2.1
pytest-cov                            4.0.0
zipp                                  3.15.0
@PProfizi PProfizi added the bug Something isn't working label May 10, 2023
@PProfizi
Copy link
Author

From debugging, it seems that it should be:

surf_outlet_plane.definition.type = "iso-surface"
iso_surf1 = surf_outlet_plane.definition.iso_surface

@seanpearsonuk
Copy link
Collaborator

@ajain-work do we need a doc update?

@seanpearsonuk
Copy link
Collaborator

@prmukherj please could you check that the referenced documentation has been correctly updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

4 participants