ansys / pymapdl

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

Node components from input file #1070

Closed SairamPrabhakar closed 1 year ago

SairamPrabhakar commented 2 years ago

When I read a .inp input file with mapdl.input( ), I get the mesh. But mapdl.mesh.node_components is null. If however, I use the ansys.mapdl.reader.Archive( ) function, I get the mesh along with node_components. Is this expected behavior? It looks to me that in both cases the same gRPC mesh is being queried for node components?

Observed in MAPDL Version: 21.2 ansys.mapdl Version: 0.61.1

Thanks Sairam

germa89 commented 2 years ago

Hi @SairamPrabhakar ,

Could you provide some minimum working example to do our test with?

Kind regards,

mikerife commented 2 years ago

Hi @germa89 & @SairamPrabhakar Here is an example. This caught my attention as the PyMAPDL docs do not shown an example of this; rather the "Reader" is used. I took that to mean that node and element component listing is not yet in the mapdl.mesh class (MeshGrpc class?). I went poking around the files and did not see the functions defined in mesh_grpc.py like they are in /mapdl/reader/mesh.py . NodeComponents.zip

Product:             Ansys Mechanical Enterprise
MAPDL Version:       22.1
ansys.mapdl Version: 0.61.3

-------------------------------------------------------------------------------
PyMAPDL Software and Environment Report
-------------------------------------------------------------------------------
  Date: Tue Apr 26 13:33:44 2022 Mountain Daylight Time

                OS : Windows
            CPU(s) : 16
           Machine : AMD64
      Architecture : 64bit
               RAM : 63.2 GiB
       Environment : Jupyter
       File system : unknown
NVIDIA Corporation : GPU Vendor
NVIDIA RTX A2000 Laptop GPU/PCIe/SSE2 : GPU Renderer
4.5.0 NVIDIA 472.88 : GPU Version

  Python 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit
  (AMD64)]

        matplotlib : 3.5.1
             numpy : 1.22.0
           pyvista : 0.33.2
           appdirs : 1.4.4
              tqdm : 4.62.3
            pyiges : 0.2.1
             scipy : 1.7.3
              grpc : 1.43.0
ansys.api.mapdl.v0 : 0.4.1
ansys.mapdl.reader : 0.51.10
   google.protobuf : 3.19.3
-------------------------------------------------------------------------------

Ansys Installation
******************
Version   Location
------------------
212       C:\Program Files\ANSYS Inc\v212
221       C:\Program Files\ANSYS Inc\v221

Ansys Environment Variables
***************************
ANSYS212_DIR                   C:\Program Files\ANSYS Inc\v212\ANSYS
ANSYS221_DIR                   C:\Program Files\ANSYS Inc\v221\ANSYS
ANSYS221_PRODUCT               ' '
ANSYSCLOUDCLI_ROOT             C:\Program Files\ANSYS Inc\ANSYS Cloud\ANSYS Cloud CLI\
ANSYSELECTRON_ROOT             C:\Program Files\ANSYS Inc\ANSYS Cloud\ANSYS Electron\
ANSYSLIC_DIR                   C:\Program Files\ANSYS Inc\Shared Files\Licensing
AWP_LOCALE212                  en-us
AWP_LOCALE221                  en-us
AWP_ROOT212                    C:\Program Files\ANSYS Inc\v212
AWP_ROOT221                    C:\Program Files\ANSYS Inc\v221
CADOE_LIBDIR212                C:\Program Files\ANSYS Inc\v212\CommonFiles\Language\en-us
CADOE_LIBDIR221                C:\Program Files\ANSYS Inc\v221\CommonFiles\Language\en-us