Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

pressure elements profiles

16 views
Skip to first unread message

jude vishnu

unread,
Mar 31, 2023, 1:13:17 PM3/31/23
to freud-users
Hello all,
Has anyone calculated local pressure tensor along a direction of the simulation box?
I have a system of polymers with fene and WCA interactions..
My plan is to use neighbor list   of freud to calculate forces on particles from their trajectory.
For this I find the neighbors with 1 sigma distances and calculate forces and the distances and distance vectors.
Now for each particle I find the force on each of them due to neighbors (using neighbor list).
Bond list from gsd file will be used similary for FENE calculations.
I then find virial on each particle separately.

Now I bin the virial of each particles by using position of each particles along a direction. I can then sum over the virial of each particle in a bin to get total pressure tensor of that bin.

The problem now is that the result I get from this does not match with on the fly calculation in hoomd 2.9.6. I am attaching my code here. I think I am doing something wrong in force calculation and may be I should used different kind of neighbor list. Any input would be appreciated. 
virial_pressure.py

gyorgy...@gmail.com

unread,
Apr 1, 2023, 5:11:00 AM4/1/23
to freud-users
Hello,

This is not really an answer to your question just a remark. 
I think that you cannot compute a local pressure tensor from the atomic virials like that. Sure, you can sum up and average them, which will tell you something about some local stresses, but I would not call it really stress (or pressure). The virial expression gives you a correct pressure tensor only when computed in the whole box. If you localize the pressure by summing up the virials in a given volume then the pressure tensor you get from this calculation will be wrong. The problem stems from localizing a quantity (pressure) which is inherently non-local.
To compute local pressure tensors one can use Irving-Kirkwood type expressions or the Method of Planes - or surely others that I am not aware of. 

This is my understanding of the problem, but I am happy to change my opinion if you have a different view,
Best regards,
Gyorgy

jude vishnu

unread,
Apr 1, 2023, 9:13:38 AM4/1/23
to freud-users
Dear Gyorgy,
Can you please refer me to any papers which uses Irving-Kirkwood type expressions or the Method of Planes to calculate local pressure in simulations if you know of any?

Regards,
Jude

gyorgy...@gmail.com

unread,
Apr 4, 2023, 4:54:02 PM4/4/23
to freud-users
Hi Jude,

Off the top of my head I can recall these papers:
Irving-Kirkwood method: https://doi.org/10.1063/1.1747782
This is perhaps a good summary of the problem: https://pubs.acs.org/doi/abs/10.1021/acs.jctc.6b00576

Check these papers, maybe you find more interesting ones through references in the above articles.

Hope this helps
Best regards,
Gyorgy
Reply all
Reply to author
Forward
0 new messages