yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #25244
Re: [Question #696060]: How to make some stress plates consist of 3 circles (that have radius gradually (0.5, 1, 2)?
Question #696060 on Yade changed:
https://answers.launchpad.net/yade/+question/696060
Status: Open => Needs information
Jan Stránský requested more information:
Hello,
I am sorry, but I could not understand at all, what you want to achieve..
Maybe you could provide a link to a picture or scheme?
> I am trying to simulate 3 circles of stress plates that have radius
dimension gradually, which has relation with contact force and the area
of each circle.
what is "circle of stress plate"?
what does "having radius dimension gradually" mean?
what is "contact force"?
> In order to apply the force that corresponds to each area of circles,
I need to have 3 stress plates with radius 0.5,1, and 2 in XY plane in
the center of the facet.
what is "the facet"?
A few notes to the code:
> def stress_rad1():
> rad1=O.bodies[3011].shape.radius
I got "IndexError: Body id out of range."
> O.engines=O.engines+[PyRunner(command='stress_rad1()',iterPeriod=50)]
Try to avoid this structure, put the PyRunner directly to
O.engines=[...] definition
> PyRunner(command='checkUnbalanced()',realPeriod=2,label='checker'),
using iterPeriod or virtPeriod is preferable over realPeriod
> global boulder
> boulder=O.bodies[0]
> O.bodies[0].state.mass=2000
"global boulder" is ugly, not necessary and misleading here.
You can make a global 'boulder' variable
boulder = O.bodies[0]
after sp.toSimulation(), without "ugly" global keyword.
Or just use O.bodies[0], is not much longer and maybe even more clear what it is and you are already using it this way (inside checkUnbalanced) anyway..
> def unloadBoulder():
> if abs(O.forces.f(boulder.id)[0]):
> O.run()
> checker.command='stress_rad1()'
seems like it is not needed, O.run should not be there (the simulation
is running already), so you can set checker.command='stress_rad1()'
directly in checkUnbalanced
cheers
Jan
--
You received this question notification because your team yade-users is
an answer contact for Yade.