← Back to team overview

yade-users team mailing list archive

Re: [Question #699279]: How to set two concentric circles with the same center and different radius?

 

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

Jan Stránský requested more information:
Hello,

please read [1]. Then read [1] again and follow the instructions.
Please provide a MWE.
Please provide (muuuuch) more information.

> How to set two concentric circles with the same center and different
radius? I want to use these two circles to simulate the shield tail gap.

What does "to set" mean?
What is "the" shield tail gap?

> What's wrong with my code?

You should tell us first.
- Do you get errors?
- Do you get different results than expected?
- ... ?

What does "wrong" mean?

> What's wrong with my code?

Very difficult to say with so little information.
Please read [1], following instructions and provide (much much) more information.

One answer is that it is wrong because the "for b in O.bodies" loop is
useless, because you have no bodies in the simulation (assuming your
code is a MWE).

Another answer could be that it is wrong, because O.bodies.append(a.id)
results in ArgumentError. But Yade tells it to you itself and you would
not need to ask here..

Another answer could be that in general it is not good idea (or at leas idea to think more about) to modify a container while looping over it ("O.bodies.append" inside "for b in O.bodies").
In this specific case it seems it does not matter, but it could be considered "wrong".

Another answer ...

> What's wrong with my code?

The correct answer depends, as always, on specific circumstances, which
we know nothing about.

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

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