move wall till pressure limit

Submitted by botjebalt on Tue, 05/31/2016 - 23:41

Hi,
I have made a box filled with particles and I want to apply a certain pressure on them. To apply the pressure a mesh wall moves down to compress the particles. However, I want to let the wall move till a certain pressure value is met. I tried to do so by making the mesh move inside the loop untin the pressure limit is met.
The problem is that I do not know how the calculate the pressure and implement it in the loop.
I have tried compute wall/gran/local force to calculate the force on the mesh, but i am not able to use the output parameters in my loop.
I have also tried to use fix ave/euler since from the description it can be used to calculate the pressure. But once again i have no idea how to use the output parameters in my loop.
Finally i have tried to dump the euler data and then read the pressure using read_data but this also didn't seem to work.

Does anybody know of a way to calculate the pressure and implement it in my loop or knows of another way to implement pressure on the particles?

With kind regards,
Vincent Balt