How to avoid collision

satri
satri Altair Community Member
edited February 28 in Community Q&A

Hello

I am trying to create a chain of particles in random positions. I wanted to use the built-in random position and orientation but unfortunately, i am getting a biased generation of fibers hence i am using the custom factory tutorial (T6) and particle replacement tutorial (T1) as references and generating the particles by myself. Now I can generate the particles but when i generate the particles these are going into each other as you see in the image.

image

Could anyone please suggest to me how i can avoid the collision between the meta particles? 

The login i am using to create the particle is as follows

I want to generate 10 particles at a height of 50e-6m i am picking 10 random points around the origin and computing the angle the random point makes with the origin. and then find the angle made by the normal vector to this point. This angle is being used to give the orientation in the xy plane. I am not giving the orientation in the z-axis as of now but i can change that. I am currently detecting collision between the fibers. I am not sure how i could avoid that because the two reference APIs don't know the position of other particles. 

Tagged:

Answers

  • satri
    satri Altair Community Member
    edited February 23

    This is what random orientation means which the inbuilt random orientation program will not generate. This will be generated based on what i described above

    image

    But i am not sure how to get rid of the collision. 

  • satri
    satri Altair Community Member
    edited February 27

    I have an alternative so far by adding all the single fibers in different layers in z axis that works but this increases the simulation time. Is there any way to cycle through all the old coordinates and just change the z-orientation angle slightly? How to do this? how can i store the coordinates of all the previous fibers and check for collision? Is this even possible?

  • Stephen Cole
    Stephen Cole
    Altair Employee
    edited February 28

    I have an alternative so far by adding all the single fibers in different layers in z axis that works but this increases the simulation time. Is there any way to cycle through all the old coordinates and just change the z-orientation angle slightly? How to do this? how can i store the coordinates of all the previous fibers and check for collision? Is this even possible?

    Hi Shyam, as you say the API doesn't have any contact detection, so if you are using a custom model then the particles will be placed as specified by the code, which makes it very difficult to avoid collisions. 

     

    With the random orientation of the in-built particles have you confirmed there is enough space to generate the particles, that they are not been constrained by the factory size?


    Regards

    Stephen