Exporting elements ID of contact region
Hello, I am trying to print element ids of the contact region but it gives an error that "CONTACT_01" (name of contact region is not defined., even though I have created a contact with this name and same is present in the .inp file. Below is the code I am using. Pls give suggestions if any.
from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl()
mapdl.input("model1_input4.inp")
mapdl.cmsel('S', 'CONTACT_01')
element_ids = mapdl.cmlist("ELEM")
print(element_ids)
Thanks
Answers
-
Can you confirm you can select the component if you simply issue the APDL commands as text like:
Mapdl.input_strings("CMSEL,S,CONTACT_01")
Also, is the component a nodal or element component? Seems from context it should be elemental?
0 -
Hello, Thanks for your reply
I tried using the above command but it still showing the same error.
The exact error msg is -----------"Error in instance GRPC_127.0.0.1:50052
SELECT COMPONENT CONTACT_01
*** ERROR *** CP = 0.859 TIME= 09:29:52
Component CONTACT_01 is not defined."----------And the component is element component and I am trying to get element ids.
0