← Back to team overview

yade-users team mailing list archive

Re: [Question #685375]: Converting polyhedron body to Potential Particle or Potential Block

 

Question #685375 on Yade changed:
https://answers.launchpad.net/yade/+question/685375

    Status: Open => Answered

Vasileios Angelidakis proposed the following answer:
> just without last rotation around Y axis, the obtained PB is not same
as the input polyhedron regarding to its orientation.

Regarding the orientation:
If you assign bbb.state.ori=bbb.shape.orientation, you should get the orientation of the particle in the random (non-principal) system you assigned it at, initially. I see that this doesn't work in this case, which makes me infer that yes, the sign of "d" plays a role here. If you plot the "dv" values before subtracting "chosenR", you will see that two of them are zero. Please have a look at the calculation of "dv" and find out why that happens (since all "dv" values should be non-zero and positive, for them to make sense).

Regarding the positioning of the particle:
Bear in mind that the PotentialBlock is centred to its centroid upon its definition, while I think you assign the particle to a local coordinate system, which is not centred around the centroid initially, so you can expect a discrepancy there.

> how can I solve this issue automatically?
I feel your struggle for automation :D I think after you sort out the issue with the zero "dv" values, you shouldn't need to do any manual checks for the bulk of particle shapes you use. You can do one or two checks for selected particles, to ensure that everything works fine. To automate the procedure, consider creating a function to do the transformation, instead of putting the whole script inside a loop for each particle shape.

Regards,
Vasileios

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.