-
-
December 7, 2024 at 9:44 pm
cma6301
SubscriberHello,
I wish to export my simulation contact properties such as the coordinates, overlap, tangential and normal forces. I havn't seen any script to do that. I tried modifying the particle_infomation_script, I get this error that says "GetCollectContactData() take 1 position argument but two were given. Any help on this I will appreciate.
Â
Best regards,
Â
Ayuk
-
December 11, 2024 at 2:26 pm
Lucas Bertollo Baggio
Ansys EmployeeHello Ayuk,
Â
You might check the PrePost Scripting manual here for more information on each class or method.
The .GetCollectContactsData() will return if the contact collection is enabled or not. (as follows from the manual)
Â
Â
To get properties from Particles and/or Contacts, you might use
.GetGridFunction('property name')
save it in an array and export using python.
Â
best regards,
Lucas
-
December 11, 2024 at 5:41 pm
Jackson Gomes
Ansys EmployeeHi Ayuk,
To ensure that the information is available for export, you need to enable the Contacts and the Inter-Particles Collision Statistics Module in your simulation setup. This will allow the required data to be collected and made accessible for export using the script.
See the example of how to get the contact's data via script:
project = app.GetProject()
study = project.GetStudy()
contacts = study.GetContactData()
Best regards.
-
December 11, 2024 at 6:13 pm
cma6301
SubscriberHello Jackson,
I have enable Contacts. What I want is to exact the contact at each time step in the simulation.
in the script I used
Â
contacts = study.GetContactData(time_step)
Â
This is were I get the error. But without "time_step" in the argument I get a single value for each simulation output.
Best regards,
Â
Ayuk
-
December 11, 2024 at 6:37 pm
Jackson Gomes
Ansys EmployeeMaybe you can try something like this:
  contacts = study.GetContactData()
  overlap = contacts.GetGridFunction("Overlap").GetArray(time_step=time_step)
Â
-
- You must be logged in to reply to this topic.
- At least one body has been found to have only 1 element in at least 2 directions
- Script Error Code:800a000d
- Element has excessive thickness change, distortion, is turning inside out
- Elastic limit load, Elastic-plastic limit load
- Image to file in Mechanical is bugged and does not show text
- Help to do quasistatic analysis in static structural module
-
1932
-
823
-
599
-
591
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.