ansys/pymapdl-reader

Fluid elements plotting incorrectly as triangle instead of line

giiyms opened this issue ยท 1 comments

๐Ÿ” Before submitting the issue

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

๐Ÿž Description of the bug

Hello,

When creating a FLUID116 element, it creates a triangular cell instead of a line cell
image
Shouldn't the element only have 2 points?

print(grid.cell_points(0))

array([[0.        , 0.        , 1.        ],
        [0.33333333, 0.        , 1.        ],
        [0.        , 0.        , 1.        ]])

๐Ÿ“ Steps to reproduce

from ansys.mapdl.core import launch_mapdl
import os

curdir = os.getcwd()
mapdl = launch_mapdl(override=True, run_location=curdir, verbose=True, 
                     cleanup_on_exit=True)

mapdl.clear()
mapdl.prep7()
mapdl.shpp('on')

# Create fluid line type
mapdl.et(1,'FLUID116',1,1)
mapdl.type(1)

# Create start finish for line
mapdl.k(0,0,0,1)
mapdl.k(0,1,0,1)
mapdl.klist()

# Create real constant for fluid1516
mapdl.r(1,1,1,1)
mapdl.rmore(0,0,'',1,'',)
mapdl.rmore('')
mapdl.rmore('',0,1)
mapdl.real(1)

# Create line and mesh
mapdl.l(1,2)
mapdl.lmesh(1)
mapdl.esll()
mapdl.cm('FL1_E','ELEM')

mapdl.eplot()

# Why does this plot a strange triangle?

grid = mapdl.mesh._grid.copy()
print(grid)

# Get first cell which should be a line
print(grid.cell_points(0))

# array([[0.        , 0.        , 1.        ],
#        [0.33333333, 0.        , 1.        ],
#        [0.        , 0.        , 1.        ]])

# BUG: Why is a line element plotted as a triangle?

mapdl.exit()

๐Ÿ’ป Which operating system are you using?

Windows

๐Ÿ Which Python version are you using?

3.10

๐Ÿ“ฆ Installed packages

ansys-api-fluent==0.3.5
ansys-api-mapdl==0.5.1
ansys-api-platform-instancemanagement==1.0.0b3
ansys-dpf-core==0.6.0
ansys-dpf-gate==0.2.1
ansys-dpf-gatebin==0.3.0
ansys-dpf-post==0.2.5
ansys-fluent-core==0.11.0
ansys-grantami-bomanalytics==1.0.1
ansys-grantami-bomanalytics-openapi==1.0.0
ansys-grpc-dpf==0.7.0
ansys-mapdl-core==0.63.2
ansys-mapdl-reader==0.52.6
ansys-openapi-common==1.1.1
ansys-platform-instancemanagement==1.0.2
appdirs==1.4.4
cachetools==5.2.1
certifi==2022.12.7
cffi==1.15.1
charset-normalizer==2.1.1
clr-loader==0.2.5
colorama==0.4.6
contourpy==1.0.6
cryptography==39.0.0
cycler==0.11.0
fonttools==4.38.0
geomdl==5.3.1
google-api-core==2.10.1
google-api-python-client==2.71.0
google-auth==2.15.0
google-auth-httplib2==0.1.0
googleapis-common-protos==1.56.4
grpcio==1.51.1
h5py==3.7.0
httplib2==0.21.0
idna==3.4
imageio==2.24.0
importlib-metadata==6.0.0
kiwisolver==1.4.4
matplotlib==3.6.2
ntlm-auth==1.5.0
numpy==1.24.1
packaging==23.0
pandas==1.5.2
Pillow==9.4.0
plumbum==1.8.1
pooch==1.6.0
protobuf==3.20.1
protoc-gen-swagger==0.1.0
psutil==5.9.4
pyaedt==0.6.3
pyansys==2023.1.1
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.21
pyiges==0.2.1
pyparsing==3.0.9
pypiwin32==223
python-dateutil==2.8.2
pythonnet==3.0.0rc6
pytz==2022.7
pyvista==0.37.0
pywin32==305
requests==2.28.1
requests-negotiate-sspi==0.5.2
requests-ntlm==1.1.0
rpyc==5.0.1
rsa==4.9
scipy==1.10.0
scooby==0.7.0
six==1.16.0
tqdm==4.64.1
uritemplate==4.1.1
urllib3==1.26.13
vtk==9.2.5
zipp==3.11.0

moving this issue to pyansys/pyansys as this package might be depreciated.