ansys / pymapdl

Pythonic interface to MAPDL
https://mapdl.docs.pyansys.com
MIT License
423 stars 120 forks source link

When extracting forces using mapdl.flist().to_dataframe() the first row shows an incorrect information (version number insted of node id) #1127

Closed RGPATCHI closed 2 years ago

RGPATCHI commented 2 years ago

Summary If I add some forces to some nodes and try the below, I see that that first row gives incorrect node ID and its actually the version of ANSYS splitted and reported.

print(mapdl.flist().to_dataframe())

Result image

Script to Reproduce

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

_width = 1
_height = 1
_length = 1

mapdl.prep7()
mapdl.mp("EX", 1, 70000)
mapdl.mp("NUXY", 1, 0.3)
mapdl.blc4(0, 0, 0.5, 2, _length)
mapdl.et(1, "SOLID185")

mapdl.esize(1)
mapdl.vmesh("ALL")

mapdl.nsel("s", "loc", "z", 0)
mapdl.d("all", "all", 0)

# arbitrary load
mapdl.nsel("s", "loc", "z", _length)
mapdl.f("all", "fy", 10)
print(mapdl.flist().to_dataframe())
mapdl.exit()
germa89 commented 2 years ago

Hi @RGPATCHI

I'm aware of that bug, and it was fixed in #1055. It is expected to be included in the next release (probably end of week)

In [1]: from ansys.mapdl.core import launch_mapdl                                                                                                                              
   ...:                                                                                                                                                                        
   ...: mapdl = launch_mapdl()                                                                                                                                                 
   ...: print(mapdl)                                                                                                                                                           
   ...:                                                                                                                                                                        
   ...: _width = 1                                                                                                                                                             
   ...: _height = 1                                                                                                                                                            
   ...: _length = 1                                                                                                                                                            
   ...:                                                                                                                                                                        
   ...: mapdl.prep7()                                                                                                                                                          
   ...: mapdl.mp("EX", 1, 70000)                                                                                                                                               
   ...: mapdl.mp("NUXY", 1, 0.3)                                                                                                                                               
   ...: mapdl.blc4(0, 0, 0.5, 2, _length)                                                                                                                                      
   ...: mapdl.et(1, "SOLID185")                                                                                                                                                
   ...:                                                                                                                                                                        
   ...: mapdl.esize(1)                                                                                                                                                         
   ...: mapdl.vmesh("ALL")                                                                                                                                                     
   ...:                                                                                                                                                                        
   ...: mapdl.nsel("s", "loc", "z", 0)                                                                                                                                         
   ...: mapdl.d("all", "all", 0)                                                                                                                                               
   ...:                                                                                                                                                                        
   ...: # arbitrary load                                                                                                                                                       
   ...: mapdl.nsel("s", "loc", "z", _length)                                                                                                                                   
   ...: mapdl.f("all", "fy", 10)                                                                                                                                               
   ...: print(mapdl.flist().to_dataframe())                                                                                                                                    
   ...: mapdl.exit()
Product:             Ansys Mechanical Enterprise
MAPDL Version:       21.2
ansys.mapdl Version: 0.62.dev0

   NODE LABEL  REAL  IMAG
0     7    FY  10.0   0.0
1     8    FY  10.0   0.0
2     9    FY  10.0   0.0
3    10    FY  10.0   0.0
4    11    FY  10.0   0.0
5    12    FY  10.0   0.0
RGPATCHI commented 2 years ago

Hi German,

Perfect. Thank you for letting me know.

Best regards, Rohith