About periodic triaxial test example in the yade documentation

Asked by Lei Hang on 2020-07-06

Dear all,

When I study the periodic triaxial test in the yade documentation, some places of the script confused me.
The script link is as following:

My questions:
1.At the beginning of the script, it sets "O.periodic=True" in line 34. Why it also needs to set the "periodic=Ture" in line 38 and 44?

2.Why set the "triax.maxUnbalanced=10" in line 102 behind the "triax.doneHook='triaxFinished()'" in line 100? The "triax.doneHook='triaxFinished()'" has already called the 'triaxFinished()' function, Is the "triax.maxUnbalanced=10" still useful?

3.According to the yade documentation ("The O.energy.total functions, which sums all energies together." and "The O.energy.keys() will always return list of currently defined energies."), does it mean O.energy.total=sum( O.energy.keys())?

Many thanks in advance!

Question information

English Edit question
Yade Edit question
No assignee Edit question
Solved by:
Jan Stránský
Last query:
Last reply:
Best Jan Stránský (honzik) said : #1


> 1...

because makeCloud is independent of the simulation.
Even if the simulation is periodic, you can create (and add) non-periodic cloud.
Even if the simulation is not periodic, you can create (and add) periodic cloud.

> 2.Why set the "triax.maxUnbalanced=10" in line 102 behind the "triax.doneHook='triaxFinished()'" in line 100?

Why not? :-)
maybe the note below could be the answer?

> The "triax.doneHook='triaxFinished()'" has already called the 'triaxFinished()' function,

NO! you just say to triax, that when it is finished, it shall call triaxFinished().
It is not called by this line (it is here just a string variable after all)

> 3 ...

Again, have a try before asking :-)

O.energy.keys() is a list of strings. You can sum them, joining them in one string.
What O.energy.total() does is sum(O.energy.energies())
Note that it might not be actual total energy, just the sum of the stored values.


Lei Hang (h-stone) said : #2

Thank you very much!

Lei Hang (h-stone) said : #3

Thanks Jan Stránský, that solved my question.