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

eplot error for CPT212 element #1562

Closed
3 tasks done
Artyom-K opened this issue Oct 19, 2022 · 6 comments
Closed
3 tasks done

eplot error for CPT212 element #1562

Artyom-K opened this issue Oct 19, 2022 · 6 comments

Comments

@Artyom-K
Copy link

Artyom-K commented Oct 19, 2022

Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment
  • I have a fully updated virtual environment (i.e. pip install --upgrade --upgrade-strategy eager ansys-mapdl-core)

Description of the bug

If I use eplot() for a model consisting of CPT212 elements then I get this error:

  File "C:\ProgramData\Anaconda3\envs\ansys\lib\site-packages\spyder_kernels\py3compat.py", line 356, in compat_exec
    exec(code, globals, locals)

  File "d:\answork\pymapdl\test.py", line 19, in <module>
    mapdl.eplot()

  File "C:\ProgramData\Anaconda3\envs\ansys\lib\site-packages\ansys\mapdl\core\mapdl.py", line 1309, in eplot
    esurf = self.mesh._grid.linear_copy().extract_surface().clean()

  File "C:\ProgramData\Anaconda3\envs\ansys\lib\site-packages\pyvista\core\pointset.py", line 1651, in linear_copy
    vtk_cell_type = _vtk.numpy_to_vtk(self.GetCellTypesArray(), deep=True)

  File "C:\ProgramData\Anaconda3\envs\ansys\lib\site-packages\vtkmodules\util\numpy_support.py", line 146, in numpy_to_vtk
    vtk_typecode = get_vtk_array_type(z.dtype)

  File "C:\ProgramData\Anaconda3\envs\ansys\lib\site-packages\vtkmodules\util\numpy_support.py", line 70, in get_vtk_array_type
    'Could not find a suitable VTK type for %s' % (str(numpy_array_type)))

TypeError: Could not find a suitable VTK type for object 

At least CPT215 elements are also affected, didn't check others from CPT family.

Steps To Reproduce

from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl()

mapdl.finish()
mapdl.clear()
mapdl.prep7()
mapdl.blc4(0, 0, 1, 1)
mapdl.et(1, ename='cpt212')
mapdl.amesh('all')
mapdl.eplot()

Which Operating System are you using?

Windows

Which Python version are you using?

3.7

PyMAPDL Report

Show the Report!
PyMAPDL Software and Environment Report


Packages Requirements
*********************

Core packages
-------------
ansys.mapdl.core    : 0.63.3
numpy               : 1.21.5
appdirs             : 1.4.4
scipy               : 1.7.3
grpc                : Package not found
ansys.api.mapdl.v0  : Package not found
ansys.mapdl.reader  : 0.52.2
google.protobuf     : Package not found

Optional packages
-----------------
matplotlib          : 3.5.2
pyvista             : 0.36.1
pyiges              : 0.2.1
tqdm                : 4.64.1
ansys_corba         : 0.1.0


Ansys Installation
******************
Version   Location
------------------
195       D:\Program Files\ANSYS Inc\v195
212       D:\Program Files\ANSYS Inc\v212


Ansys Environment Variables
***************************
ANSYS195_DIR                   D:\Program Files\ANSYS Inc\v195\ANSYS
ANSYS212_DIR                   D:\Program Files\ANSYS Inc\v212\ANSYS
ANSYS_SYSDIR                   winx64
ANSYS_SYSDIR32                 win32
AWP_LOCALE195                  en-us
AWP_LOCALE212                  en-us
AWP_ROOT195                    D:\Program Files\ANSYS Inc\v195
AWP_ROOT212                    D:\Program Files\ANSYS Inc\v212
CADOE_LIBDIR195                D:\Program Files\ANSYS Inc\v195\CommonFiles\Language\en-us
CADOE_LIBDIR212                D:\Program Files\ANSYS Inc\v212\CommonFiles\Language\en-us

Installed packages

Show the installed packages!

# PASTE HERE THE OUTPUT OF `python -m pip freeze` here

@germa89
Copy link
Collaborator

germa89 commented Oct 19, 2022

At the moment, those elements are not supported in PyMAPDL interative plotting (vtk=True). You should still able to get an MAPDL image using vtk=False in mapdl.eplot.

Sorry about it!

@germa89
Copy link
Collaborator

germa89 commented Oct 28, 2022

This should probably be fixed in pymapdl-reader. I'm going to keep this here until I get time to work on it and port it.

@Artyom-K
Copy link
Author

I suppose I can't get strains and stresses with pydpf-post also because these elements are not supported there. Should I create an issue there or there is no point in it?

@germa89
Copy link
Collaborator

germa89 commented Nov 17, 2022

I dont think open an issue is ever pointless. It will help to drive work in that direction. Please do it.

@germa89
Copy link
Collaborator

germa89 commented Sep 18, 2023

Closing when ansys/pymapdl-reader#320 is merged.

@germa89
Copy link
Collaborator

germa89 commented Sep 18, 2023

This will be fixed in PyMAPDL-Reader 0.52.21 or superior

@germa89 germa89 closed this as completed Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants