LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Pressure / Virial calculation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Pressure / Virial calculation

From: Xiao Jia <xiaoj@...1508...>
Date: Tue, 29 Aug 2017 21:32:09 -0400

Dear Axel,

Thanks for your kind advice. 
I will follow your recommended materials for more information about this problem.


On Tue, Aug 29, 2017 at 8:56 PM, Axel Kohlmeyer <akohlmey@...24...> wrote:

On Tue, Aug 29, 2017 at 7:11 PM, Xiao Jia <xiaoj@...1508...> wrote:
Dear Axel,
Thanks a lot for your detailed explanation. 
Based on your explanation, I think I can keep the current code for the virial part (no need to half that) for the calculation of pressure. 
Could I have another question is that I want to calculate the pressure distribution within the system, not the overall pressure as reported from .log file in lammps. 
What I am doing is keeping going calcualtion from i,j pairs, and get the virial value in three dimensions. 
When location of atom i is within a certain smaller bin, I will count the virial from i,j pair into the overal virial in this bin. 
My question is this method processed properly? and Do I need to require atom j also within the bin?
Additionally, I guess the atoms in ilist are from local atoms, and atoms in jlist can be from both local and ghost atoms,
do I need to apply the condition that (if (j<nlocal), something like this) to count in the virial from a certain pair?

i think ​this is beyond the scope of this mailing list and - more importantly - beyond my comfort level to give specific ​advice, since i don't have much experience with this. there are several ways to tally stress into a spatial grid, specifically if you also want to include time averaging. 
the simplest approach i can imagine would be to compute stress/atom and then set up a 3d (or 2d or 1d) binning using compute chunk/atom and sum those with fix ave/chunk. since you know the volume of each bin, you can then compute the pressure distribution.
other approaches are coded in the AtC package. that is worth taking a look as well.

i also recall seeing some code and a poster at the LAMMPS workshop about 4 years ago with more elaborate spatial stress/pressure distribution computation for molecular systems. you should look for papers published by Takenobu Nakamura. there are likely more publications on that kind of topic. i think comparing your plans with what other people have done, that have spent more time on this than somebody like me, is going to be much more helpful and informative.




Dr. Axel Kohlmeyer  akohlmey@...24...
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.