LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] 回复: The difference between compute pressure andcompute stress/atom
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] 回复: The difference between compute pressure andcompute stress/atom


From: "709832702" <709832702@...1204...>
Date: Tue, 29 Aug 2017 07:21:04 +0800

Hi Axel,
 
use the units metal, here we compare output v_p4 (black line) with c_stressz1 (red line), the compute progress is as follows,
 
                             

compute strs all stress/atom NULL

compute vol all voronoi/atom

variable stress1 atom "c_strs[1]/10000/c_vol[1]"

variable stress2 atom "c_strs[2]/10000/c_vol[1]"

variable stress3 atom "c_strs[3]/10000/c_vol[1]" 

compute stressx1 all reduce ave v_stress1

compute stressy1 all reduce ave v_stress2

compute stressz1 all reduce ave v_stress3

# Store final cell length for strain calculations

variable tmp equal "lx"

variable L0 equal ${tmp}

print "Initial Length, L0: ${L0}"

variable tmp equal "ly"

variable L1 equal ${tmp}

print "Initial Length, L1: ${L1}"

variable tmp equal "lz"

variable L2 equal ${tmp}

print "Initial Length, L2: ${L2}"

######################################

# DEFORMATION

reset_timestep 0

fix 1 all nve

fix 3 all langevin 10 10 0.1 48279

variable srate equal 1.0e8

variable srate1 equal "v_srate / 1.0e12"

fix 2 all deform 1 y erate ${srate1} units box remap x

# p2, p3, p4 are in GPa

variable strain0 equal "(lx - v_L0)/v_L0"

variable strain1 equal "(ly - v_L1)/v_L1"

variable strain2 equal "(lz - v_L2)/v_L2"

variable p0 equal "v_strain0"

variable p1 equal "v_strain1"

variable p11 equal "v_strain2"

variable p2 equal "-pxx/10000"

variable p3 equal "-pyy/10000"

variable p4 equal "-pzz/10000"

thermo_style custom step v_strain0 v_strain1 v_strain2 temp v_p2 v_p3 v_p4 c_stressx1 c_stressy1 c_stressz1

 

Best wishes!



------------------ 原始邮件 ------------------
发件人: "Axel Kohlmeyer";<akohlmey@...24...>;
发送时间: 2017年8月28日(星期一) 晚上7:28
收件人: "709832702"<709832702@...1204...>;
抄送: "lammps-users"<lammps-users@lists.sourceforge.net>;
主题: Re: [lammps-users] The difference between compute pressure andcompute stress/atom



On Mon, Aug 28, 2017 at 12:49 AM, 709832702 <709832702@...1204...> wrote:
 
Hi Axel,
 
Both of the two curves represent the normal stress along tensile direction.

?in what units??
 
The black line is that I used the "compute pressure" command to calculate the normal stress(pzz), while the red line I used the command "compute stress/atom" and use the "compute reduce" to calculate the normal stress(sigmazz), I think they are should be the same, but the result does not. I use these two method in the other materials, they are the same. So which method is better to calculate the normal stress during the tensile test.

?impossible to say. both should give *identical* output, if computed correctly. since you don't provide enough information to assess how you computed them, there is no way to tell. they could be both wrong.

axel.?


 
 
Best wishes!


------------------ 原始邮件 ------------------
发件人: "Axel Kohlmeyer";<akohlmey@...24...>;
发送时间: 2017年8月28日(星期一) 凌晨4:18
收件人: "709832702"<709832702@...6558...com>;
抄送: "lammps-users"<lammps-users@lists.sourceforge.net>;
主题: Re: [lammps-users] The difference between compute pressure andcompute stress/atom



On Sat, Aug 26, 2017 at 11:41 PM, 709832702 <709832702@...1204...> wrote:

Hi,

Recently, I adopted the compute pressure and compute stress/atom to calculate normal stress under uniaxial tensile as shown in the attached Figure, here the tensile direction is with the periodic boundary, and the other two direction are the free surface, I found that the stresses are not equal at the beginning, although they are in agreement at the end of progress, so what is the reason, they are all based on the virial theory. I also test under all three directions are the periodic boundaries, this time they are nearly coincident.

first rule about ?figures in science: *always* include units!
?
since you don't explain with sufficient detail what you are computing for the figure, there is little to comment. if you did it correctly, both graphs should be identical, since they should show the identical information. the fact, that they don't coincide hints at you don't computing one of them correctly.

axel.



 

Best wishes!


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...655....net
https://lists.sourceforge.net/lists/listinfo/lammps-users




--
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.



--
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.