PeriIsoCompressor.sigma different from getStress()

Asked by Sacha Duverger


I am trying to compact a cloud in a periodic cell using PeriIsoCompressor.
At first it seems to work well : the cloud gets denser until PeriIsoCompressor.sigma.mean() reaches the target mean stress. But when I compare PeriIsoCompressor.sigma to getStress(), the mean stress is completely different (~26 times lower).

Please see below a mwe and its output when using yade at git revision 4852d5601.

Am I correctly using PeriIsoCompressor ?

Thanks in advance,


## MWE ##
O.periodic = True
O.cell.setBox((1, 1, 1))

sp.makeCloud(minCorner=(0,0,0), maxCorner=(1, 1, 1), rMean=5e-3, rRelFuzz=5e-4, num=5000, periodic=True, seed=42)

iso_comp = PeriIsoCompressor(charLen=5e-3, stresses=[-1e5], doneHook="O.pause()")
O.engines = O.engines + [iso_comp]

print("\nPIC mean stress: ", iso_comp.sigma.mean())
print("getStress mean stress: ", getStress().trace()/3)

## Output with yade 4852d5601 ##
Welcome to Yade 2021-06-08.git-4852d56
Using python version: 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0]
TCP python prompt on localhost:9000, auth cookie `yecssk'
XMLRPC info provider on http://localhost:21000
Running script

PIC mean stress: -99503.28987122637
getStress mean stress: -3824.356053577036

Question information

English Edit question
Yade Edit question
No assignee Edit question
Solved by:
Sacha Duverger
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :


confirming the issue.

If I continue, the PIC mean stress remains constant, while getStress mean stress is growing, have a try.
Maybe it is equal for unbalanced force = 0? (just brainstorming)

Also I am not sure is PeriIsoCompressor is maintained or not, have a look at PeriTriaxController.


Revision history for this message
Jérôme Duriez (jduriez) said :


What is sure is that you eventually comparing two stress expressions that are quite different:

- PIC uses some totalForceInVolume [*] expression I'm totally unfamiliar with (=> which I can not justify at the moment / ever ?)
- getStress is the classical Love-Weber formula.

Please open an issue about that engine, especially if you think there is another issue about unbalanced force test (from another discussion)

[*] and below

Revision history for this message
Sacha Duverger (schmxprr) said :

Thank you for your answers,

I opened an issue on gitlab and proposed an incomplete fix [1].

From now on, I'll use PeriTriaxController instead.

Thanks again,