


{"id":395689,"date":"2024-11-28T18:40:51","date_gmt":"2024-11-28T18:40:51","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/395689\/"},"modified":"2024-11-28T18:40:51","modified_gmt":"2024-11-28T18:40:51","slug":"395689","status":"publish","type":"reply","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/395689\/","title":{"rendered":"Reply To: How to get particle X,Y,Z position in every time step in Rocky?"},"content":{"rendered":"<p>&lt;p&gt;Hello,&lt;\/p&gt;&lt;p&gt;You can use prepost scripting to get an array with the coordinates of every particle in each timestep. For example:&lt;\/p&gt;<\/p>\n<pre>project = app.GetProject()&lt;br&gt;study = project.GetStudy()&lt;br&gt;particles = study.GetParticles()&lt;br&gt;particles_coordinates_X = particles.GetGridFunction('Coordinate : X')&lt;br&gt;particles_X_timestep_1 = particles_coordinates_timestep_1.GetArray(time_step=1)&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;<\/pre>\n","protected":false},"template":"","class_list":["post-395689","reply","type-reply","status-publish","hentry"],"aioseo_notices":[],"acf":[],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/395689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/reply"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/395689\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=395689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}