question on compute pressure

Submitted by Weijing on Fri, 02/24/2017 - 05:20

Hi everyone,

I am using compute pressure command to extract the normal pressure on x,y,z directions. I managed to use this command by using compute all temp, but the temp result obtained by this command looks like the molecular temperature. finally, the compute pressure command gave a 6 elements vector rather than an array of one scalar and on vector documented on the websites.

does the 6 elements vector I got have the definition on those website of compute pressure?

Thanks
Weijing

ckloss's picture

ckloss | Mon, 03/13/2017 - 21:35

Hi Weijing,

look at fix ave/euler. This will give you the granular stress tensor :-)

Christoph

estefan31 | Wed, 03/15/2017 - 22:42

I'm also looking at fix ave/euler. In terms of stresses, the documentation only says it outputs pressure as -1/3 of the stress tensor but it doesn't give the actual stress tensor. Is there a way to get the full stress tensor with xx, yy, zz, xy, yz, xz? I know there's the compute pressure and compute stress/atom functions, but I'm trying to find the stress tensor within specific regions of my simulation instead for the entire domain. So fix ave/euler seems like my best choice if I can somehow get a full tensor out of it.

estefan31 | Thu, 03/30/2017 - 02:13

I went with modifying DumpEulerVTK. But one thing in fix_ave_euler.cpp needs to be corrected. Line 662 says "else if(j < 14) return stress_[i][j-7];" and it should be corrected to "else if(j < 14) return stress_[i][j-8];" or else the indices will be off by 1.

Daniel Queteschiner | Thu, 03/30/2017 - 09:08

No, that is correct. The first entry in the stress array is the pressure followed by the 6 stress tensor components.

aaigner's picture

aaigner | Fri, 04/28/2017 - 13:21

Thanks for the hint.
I corrected it in the development version. The fix will be published with the next release.