ansys / pydpf-core

Data Processing Framework - Python Core
http://dpf.docs.pyansys.com/
MIT License
67 stars 25 forks source link

compute_total_strain_X #1174

Open mcMunich opened 12 months ago

mcMunich commented 12 months ago

Before submitting the issue

Description of the bug

I am looking at available results (trying to do some automation) and in the I found a few that cause issues. compute_total_strain_X is one of them.

If I try to plot it using:

t = 1
time_sets_scoping = dpf.time_freq_scoping_factory.scoping_by_sets([t])
i = 'compute_total_strain_X'
resOp = getattr(dpf.operators.result, i)(data_sources=model1, time_scoping = time_sets_scoping)
resOpFieldContainer = resOp.outputs.fields_container()[0]
model1.metadata.meshed_region.plot(resOpFieldContainer,text =   i)

I get: ValueError: Only elemental, nodal or faces location are supported for plotting.

But the same documentation exists for compute_total_strain_1,2,3 and those work/plot

elastic_strain_eqv has the same issue.

Steps To Reproduce

Run script above with structural model result.

Which Operating System causes the issue?

Windows

Which DPF/Ansys version are you using?

Ansys 2023 R2

Which Python version causes the issue?

3.11

Installed packages

C:\spyderEnv\Scripts>python -m pip list Package Version


aiohttp 3.8.4 aiosignal 1.3.1 alabaster 0.7.13 ansi2html 1.8.0 ansys-api-mapdl 0.5.1 ansys-api-mechanical 0.1.0 ansys-api-meshing-prime 0.1.1 ansys-api-platform-instancemanagement 1.0.0b3 ansys-dpf-core 0.9.0 ansys-dpf-gate 0.4.1 ansys-dpf-gatebin 0.4.1 ansys-dpf-post 0.5.0 ansys-grpc-dpf 0.7.1 ansys-mapdl-core 0.66.0 ansys-mapdl-reader 0.52.20 ansys-math-core 0.1.3 ansys-mechanical-core 0.10.2 ansys-meshing-prime 0.4.0 ansys-platform-instancemanagement 1.1.1 ansys-pythonnet 3.1.0rc1 ansys-tools-path 0.3.1 anyio 3.7.1 appdirs 1.4.4 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 arrow 1.2.3 astroid 2.15.6 asttokens 2.2.1 async-lru 2.0.4 async-timeout 4.0.2 atomicwrites 1.4.1 attrs 23.1.0 autopep8 2.0.2 Babel 2.12.1 backcall 0.2.0 bcrypt 4.0.1 beautifulsoup4 4.12.2 binaryornot 0.4.4 black 23.7.0 bleach 6.0.0 cachetools 5.3.1 certifi 2023.5.7 cffi 1.15.1 chardet 5.1.0 charset-normalizer 3.2.0 click 8.1.4 cloudpickle 2.2.1 clr-loader 0.2.6 colorama 0.4.6 comm 0.1.3 contourpy 1.1.0 cookiecutter 2.2.3 cryptography 41.0.2 cycler 0.11.0 dash 2.13.0 dash-core-components 2.0.0 dash-html-components 2.0.0 dash-table 5.0.0 debugpy 1.6.7 decorator 5.1.1 defusedxml 0.7.1 diff-match-patch 20230430 dill 0.3.6 docstring-to-markdown 0.12 docutils 0.20.1 easygui 0.98.3 executing 1.2.0 fastjsonschema 2.17.1 flake8 6.0.0 Flask 2.2.5 fonttools 4.41.0 fqdn 1.5.1 frozenlist 1.4.0 geomdl 5.3.1 google-api-core 2.11.1 google-api-python-client 2.93.0 google-auth 2.22.0 google-auth-httplib2 0.1.0 googleapis-common-protos 1.59.1 grpcio 1.56.0 httplib2 0.22.0 idna 3.4 imageio 2.31.3 imagesize 1.4.1 importlib-metadata 6.8.0 inflection 0.5.1 intervaltree 3.1.0 ipykernel 6.24.0 ipython 8.14.0 ipython-genutils 0.2.0 ipywidgets 8.0.7 isoduration 20.11.0 isort 5.12.0 itsdangerous 2.1.2 jaraco.classes 3.3.0 jedi 0.18.2 jellyfish 1.0.0 Jinja2 3.1.2 json5 0.9.14 jsonpointer 2.4 jsonschema 4.18.2 jsonschema-specifications 2023.6.1 jupyter_client 8.3.0 jupyter_core 5.3.1 jupyter-events 0.7.0 jupyter-lsp 2.2.0 jupyter_server 2.7.0 jupyter_server_terminals 0.4.4 jupyterlab 4.0.3 jupyterlab-pygments 0.2.2 jupyterlab_server 2.24.0 jupyterlab-widgets 3.0.8 keyring 24.2.0 kiwisolver 1.4.4 lazy-object-proxy 1.9.0 MarkupSafe 2.1.3 matplotlib 3.7.2 matplotlib-inline 0.1.6 mccabe 0.7.0 mistune 3.0.1 more-itertools 9.1.0 multidict 6.0.4 mypy-extensions 1.0.0 nbclient 0.8.0 nbconvert 7.6.0 nbformat 5.9.1 nest-asyncio 1.5.6 notebook_shim 0.2.3 numpy 1.25.1 numpydoc 1.5.0 overrides 7.3.1 packaging 23.1 pandas 2.1.0 pandocfilters 1.5.0 paramiko 3.2.0 parso 0.8.3 pathspec 0.11.1 pexpect 4.8.0 pickleshare 0.7.5 Pillow 10.0.0 pip 23.2.1 platformdirs 3.8.1 plotly 5.15.0 pluggy 1.2.0 pooch 1.7.0 prometheus-client 0.17.1 prompt-toolkit 3.0.39 protobuf 3.20.3 protoc-gen-swagger 0.1.0 psutil 5.9.5 ptyprocess 0.7.0 pure-eval 0.2.2 pyansys-tools-versioning 0.4.0 pyasn1 0.5.0 pyasn1-modules 0.3.0 pycodestyle 2.10.0 pycparser 2.21 pydocstyle 6.3.0 pyflakes 3.0.1 Pygments 2.15.1 pyiges 0.3.1 pylint 2.17.4 pylint-venv 3.0.2 pyls-spyder 0.4.0 PyNaCl 1.5.0 pyorbital 1.8.0 pyparsing 3.0.9 PyQt5 5.15.9 PyQt5-Qt5 5.15.2 PyQt5-sip 12.12.1 PyQtWebEngine 5.15.6 PyQtWebEngine-Qt5 5.15.2 python-dateutil 2.8.2 python-json-logger 2.0.7 python-lsp-black 1.3.0 python-lsp-jsonrpc 1.0.0 python-lsp-server 1.7.4 python-slugify 8.0.1 pytoolconfig 1.2.5 pytz 2023.3.post1 pyvista 0.40.1 pywin32 306 pywin32-ctypes 0.2.2 pywinpty 2.0.11 PyYAML 6.0 pyzmq 25.1.0 QDarkStyle 3.1 qstylizer 0.2.2 QtAwesome 1.2.3 qtconsole 5.4.3 QtPy 2.3.1 referencing 0.29.1 requests 2.31.0 retrying 1.3.4 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rope 1.9.0 rpds-py 0.8.10 rsa 4.9 Rtree 1.0.1 scipy 1.11.1 scooby 0.7.2 Send2Trash 1.8.2 setuptools 65.5.0 six 1.16.0 sniffio 1.3.0 snowballstemmer 2.2.0 sortedcontainers 2.4.0 soupsieve 2.4.1 Sphinx 7.0.1 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 spyder 5.4.5 spyder-kernels 2.4.4 stack-data 0.6.2 tenacity 8.2.2 terminado 0.17.1 text-unidecode 1.3 textdistance 4.5.0 three-merge 0.1.1 tinycss2 1.2.1 tomli 2.0.1 tomlkit 0.11.8 tornado 6.3.2 tqdm 4.65.0 traitlets 5.9.0 trame 3.2.5 trame-client 2.10.0 trame-components 2.1.1 trame-deckgl 2.0.2 trame-markdown 2.0.2 trame-matplotlib 2.0.2 trame-plotly 2.1.1 trame-rca 0.3.1 trame-router 2.0.2 trame-server 2.11.7 trame-simput 2.3.2 trame-vega 2.0.3 trame-vtk 2.5.4 trame-vuetify 2.2.4 typing_extensions 4.7.1 tzdata 2023.3 ujson 5.8.0 uri-template 1.3.0 uritemplate 4.1.1 urllib3 1.26.16 vtk 9.2.6 watchdog 3.0.0 wcwidth 0.2.6 webcolors 1.13 webencodings 0.5.1 websocket-client 1.6.1 Werkzeug 2.2.3 whatthepatch 1.0.5 widgetsnbextension 4.0.8 wrapt 1.15.0 wslink 1.11.1 yapf 0.40.1 yarl 1.9.2 zipp 3.16.1

mcMunich commented 12 months ago

came up with a work around to avoid results that are not plottable.

PProfizi commented 12 months ago

Hi @mcMunich thank you for the issue, glad to hear you have a workaround. It seems to me there is no reason this result could not be plot, I will look into this.