-
-
December 7, 2024 at 9:44 pmcma6301Subscriber
Hello,
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 pmLucas Bertollo BaggioAnsys Employee
Hello 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 pmJackson GomesAnsys Employee
Hi 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 pmcma6301Subscriber
Hello 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 pmJackson GomesAnsys Employee
Maybe 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.
- How to apply Compression-only Support?
- At least one body has been found to have only 1 element in at least 2 directions
- Error when opening saved Workbench project
- Geometric stiffness matrix for solid elements
- Script Error Code:800a000d
- Timestep range set for animation export
- Image to file in Mechanical is bugged and does not show text
- Elastic limit load, Elastic-plastic limit load
- Element has excessive thickness change, distortion, is turning inside out
- BackGround Color
-
1602
-
602
-
599
-
591
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.