[lammps-users] 2. compute stress/atom (Gaurav Pranami)

I have done a similiar simulation,with 108 atoms .I have noticed that the simulation result is relative with the initial configuration and number of atoms.may it will help you.

ChenJi
Material Science And Engineering Department
Xi’An Technological University
Xi’An,ShanXi Province,710032
P.R.C.

在2009-01-25,[email protected] 写道:
>Send lammps-users mailing list submissions to
>	[email protected]
>
>To subscribe or unsubscribe via the World Wide Web, visit
>	https://lists.sourceforge.net/lists/listinfo/lammps-users
>or, via email, send a message with subject or body 'help' to
>	[email protected]
>
>You can reach the person managing the list at
>	[email protected]
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of lammps-users digest..."
>
>
>Today's Topics:
>
>   1. Re: Fwd: Thermal conductivity computation (Sreekant Narumanchi)
>   2. compute stress/atom (Gaurav Pranami)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Sat, 24 Jan 2009 16:18:41 -0800 (PST)
>From: Sreekant Narumanchi <[email protected]>
>Subject: Re: [lammps-users] Fwd: Thermal conductivity computation
>To: Steve Plimpton <[email protected]>
>Cc: Lammps <[email protected]>
>Message-ID: <[email protected]>
>Content-Type: text/plain; charset="iso-8859-1"
>
>Steve,
>?I notice a variable "e_exchange" in fix_thermal_conductivity.cpp.
>Is this the energy exchange that I should utilize?
>?
>Sreekant
>
>
>From: Sreekant Narumanchi <[email protected]>
>Subject: Re: [lammps-users] Fwd: Thermal conductivity computation
>To: "Steve Plimpton" <[email protected]>
>Cc: "Lammps" <[email protected]>
>Date: Saturday, January 24, 2009, 4:16 PM
>
>
>
>
>
>
>
>Steve,
>?I have been trying to extract the kinetic energy that is being exchanged between the "hot" and "cold" layer in the thermal conductivity computation. The documentation page for the fix thermal/conductivity command mentions that the cumulative kinetic energy being exchanged between the hot and cold layer is stored as a scalar quantity. But I am not clear on what is the name for this scalar and how I would access it. I looked at fix_thermal_conductivity.cpp file and see a variable "ke" being computed. But I am not sure if "ke" is the variable I should be printing out via a thermo_style command. Also, I assume I should only be looking for the kinetic energy being swapped and not the kinetic energy of the whole system.
>?In order to understand fix_thermal_conductivity.cpp, are there any other files that I should also look at?
>?
>?
>Thanks,
>Sreekant
>
>
>
>From: Steve Plimpton <[email protected]>
>Subject: Re: [lammps-users] Fwd: Thermal conductivity computation
>To: "Sreekant Narumanchi" <[email protected]>
>Cc: "Lammps" <[email protected]>
>Date: Wednesday, January 21, 2009, 7:24 AM
>
>You'll have to judge what is linear enough.  Re: non-cubic cells,
>I've never used MP with those, but I can't think of any
>immediate problem, so long as you put your swap bins
>in a direction that is not tilted.  E.g. have an xy tilt and
>bin in the y dir.
>
>Steve
>
>> Steve,
>>  I increased the kinetic energy swap rate to 10 timesteps (50 timesteps).
>> The V-shape is shown in the attached Excel file for two time instants
>(25000
>> and 30000 th time steps). Would you agree they are starting to be more
>> linear?
>>  I am aiming to replicate some of the 1997 J.Chem. Phys. Muller-Plathe
>paper
>> results. In that paper, an orthorhombic periodic cell is used. In order to
>> create such a cell, would a "custom" lattice style have to be
>used?
>>
>> Thanks,
>> Sreekant
>>
>> From: Steve Plimpton <[email protected]>
>> Subject: [lammps-users] Fwd: Thermal conductivity computation
>> To: "Lammps" <[email protected]>
>> Date: Tuesday, January 20, 2009, 8:32 AM
>>
>> From: Steve Plimpton <[email protected]>
>> Date: Tue, Jan 20, 2009 at 7:57 AM
>> Subject: Re: [lammps-users] Thermal conductivity computation
>> To: Sreekant Narumanchi <[email protected]>
>>
>>
>> Please post your Qs to the mail list, not me directly,
>> so others can comment.
>>
>> 1) the header of the file tells you what's in the columns:
>>
>> # TimeStep Number-of-layers
>> # Layer Coordinate Natoms v_temp
>> 1000 20
>>  1 0.025 150.9 1.48848
>>
>> 4 columns are layer, coord, # of atoms, v_temp
>>
>> 2) You should get a V-shaped profile at any point in
>> time.  You are getting one from 1.4 to 1.6 roughly.
>> You're not swapping enough KE to get a stronger V.
>> See the MP papers for more discussion.
>> You typically have to average the profile over many
>> outputs to get a smooth profile.
>>
>> 3) The heat flux is something LAMMPS computes
>> for you and stores with the fix.  See the fix thermal/conductiity
>> command for how to get at that value and print it out.
>>
>> Steve
>>
>>> Steve,
>>>  I incorporated your suggestion in the input file (attached) and ran a
>>> simulation - the log file and the temperature profile file
>(tmp.profile)
>> are
>>> also attached.
>>>  I have some questions about the tmp.profile.
>>>
>>> 1) The first is regarding the various columns that appear in the
>>> tmp.profile. I was trying to understand what columns 3 and 4 are (is
>one
>> of
>>> them v_temp?).
>>> 2) If I am understanding the Muller-Plathe algorithm, I should be
>getting
>> a
>>> linear temperature profile in the 20 layers that I have in the
>> z-direction.
>>> If I should be looking at column 4 of tmp.profile, it is not clear
>that
>>> there is a linear profile at any timestep. This is a little confusing
>to
>> me
>>> at present.
>>> 3) In order to extract a number for thermal conductivity, I also have
>to
>>> compute the heat flux. I am not sure how to extract this heat flux
>number.
>>> Would I have to use the thermo_style command to extract the energy?
>>> Actually, in the input file, ke/atom is already being computed.
>>>  In the near future, I would like to take a shot at computing bulk
>thermal
>>> conductivity of silicon (perhaps with stillinger weber potential) at
>300K
>>> and compare to the experimental value (~ 150 W/mK). All this is still
>>> primarily aimed at understanding MD and LAMMPS better.
>>>
>>>
>>> Thanks,
>>> Sreekant
>>>
>>>
>>>
>>> From: Steve Plimpton <[email protected]>
>>> Subject: Re: [lammps-users] Thermal conductivity computation
>>> To: "Sreekant Narumanchi"
><[email protected]>
>>> Cc: [email protected]
>>> Date: Monday, January 19, 2009, 8:32 AM
>>>
>>> You want
>>> variable      temp atom c_ke[]/1.5
>>> not
>>> variable      temp atom c_ke/1.5
>>>
>>> Read the variable doc page.  You also have fix nve commented out.
>>> Your atoms will not move.
>>>
>>> Steve
>>>
>>>> Steve,
>>>>  I was trying to run a thermal conductivity example by modifying
>>> bench/in.lj
>>>> (attached file).
>>>> I get an error message as shown in the attached file. Please
>advise as
>> to
>>>> what I maybe doing incorrectly.
>>>>  I was also not sure if I need a thermo_style command in the input
>> file.
>>>> I am trying to extract a thermal conductivity number from the
>> simulation.
>>>>  I will also go through the Muller-Plathe paper.
>>>>
>>>> Thanks,
>>>> Sreekant
>>>>
>>>>
>>>> From: Steve Plimpton <[email protected]>
>>>> Subject: Re: [lammps-users] Thermal conductivity computation
>>>> To: [email protected]
>>>> Cc: [email protected]
>>>> Date: Monday, January 12, 2009, 7:56 AM
>>>>
>>>> I don't have an example,but aside from the fix itself the
>>>> only command you need (to monitor the KE flow) are
>>>> those listed on the fix thermal/cond doc page, with
>>>> fix ave/spatial.  You could add all that to bench/in.lj
>>>> and it should work.
>>>>
>>>> Steve
>>>>
>>>>>  I am a new LAMMPS user and am working through some of the
>> examples.
>>>>> It would be very helpful if someone could send me a simple
>input
>>> script
>>>> file
>>>>> illustrating the use of the fix thermal/conductivity command
>to
>>> compute
>>>> the
>>>>> thermal conductivity in a material (any material and any
>> potential).
>>>>>
>>>>> Thanks,
>>>>> Sreekant
>>>>>
>>>>>
>>>>> From: Sreekant Narumanchi
><[email protected]>
>>>>> Subject: Thermal conductivity in solids
>>>>> To: [email protected]
>>>>> Date: Tuesday, December 30, 2008, 7:24 AM
>>>>>
>>>>>  I am a new user of LAMMPS and molecular dynamics codes in
>> general. My
>>>>> interest is in thermal transport. To get started, I was
>planning
>> to
>>> use
>>>>> LAMMPS to compute thermal conductivity in a solid (e.g.
>silicon).
>> I
>>> was
>>>>> wondering if anyone has used LAMMPS for thermal conductivity
>>> computations
>>>>> and had suggestions on ways to proceed.
>>>>>
>>>>> Thanks,
>>>>> Sreekant Narumanchi
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>------------------------------------------------------------------------------
>>>>> Check out the new SourceForge.net Marketplace.
>>>>> It is the best place to buy or sell services for
>>>>> just about anything Open Source.
>>>>> http://p.sf.net/sfu/Xq1LFB
>>>>> _______________________________________________
>>>>> lammps-users mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/lammps-users
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>------------------------------------------------------------------------------
>> This SF.net email is sponsored by:
>> SourcForge Community
>> SourceForge wants to tell your story.
>> http://p.sf.net/sfu/sf-spreadtheword
>> _______________________________________________
>> lammps-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/lammps-users
>>
>>
>
>
>
>
>      
>-------------- next part --------------
>An HTML attachment was scrubbed...
>
>------------------------------
>
>Message: 2
>Date: Sat, 24 Jan 2009 22:25:29 -0600 (CST)
>From: "Gaurav Pranami" <[email protected]>
>Subject: [lammps-users] compute stress/atom
>To: [email protected]
>Message-ID: <[email protected]>
>
>Dear LAMMPS users,
>
>    I am using the serial version of LAMMPS (Jan 23, 2009) on cygwin on Windows
>XP with additional packages: opt, molecule, kspace, class2, manybody.
>
>    I am simulating 125 Lennard Jones particles (epsilon = sigma = 1) in LJ
>units at the number density of 0.85 at reduced temperature of 1.2 in NVE
>ensemble. The volume of my simulation box is 147.059. 
>
>    I'd appreciate if you can help me resolve the the following unexpected
>observations:
>
>1. I used compute stress/atom command to calculate the pressure as described in
>the documentation. However, the pressure calculated by LAMMPS is not same as the
>pressure calculated using the 'compute' command, see column #3 and #4 in the
>output. As mentioned in the documentation, these two values should match. Here
>is the link to this documentation page:
>http://lammps.sandia.gov/doc/compute_stress_atom.html
>
>2. The 'sum' mode of 'compute reduce' outputs the sum divided by the number of
>particles for the global stress components, see the column #4, #5 and #6 in the
>output. This is not the expected behavior as explained the manual. The manual
>states that LAMMPS should output the extensive value for 'sum' mode, i.e. #4 =
>-(#5+#6+#7)/(3*vol), but this is not true in the output. Here is the link to
>this documentation page:
>http://lammps.sandia.gov/doc/compute_reduce.html
>
>   Here is the thermo output:
>------------------------------------------------------
>Step Temp Press pr stgb[1] stgb[2] stgb[3] 
>3000  0.19959828  -3.6026013  -2.8299618    3.542873   2.9886061   3.4566444 
>4000  0.21972125  -3.5906188  -2.8179793    3.6414372  3.027412    3.2769829 
>5000  0.25928035  -3.3888346  -2.6161951    3.3519174  3.0632664   2.8184672 
>6000  0.24798621  -3.1076225  -2.334983     2.939114   2.7244319   2.5775896 
>7000  0.26337174  -3.6106924  -2.8380529    3.1305292  3.6123963   3.2737548 
>8000  0.28416182  -3.3500865  -2.577447     3.1591088  2.9036388   3.0341449
>-------------------------------------------------------
>
>
>   Here is the input file:
>------------------------------------------------------
># LJ Particles
>
>echo 		both
>
>variable	p index LJ
>variable	s equal step
>
>units		lj
>atom_style	atomic
>read_data	data.$p
>
>mass		* 1.0
>pair_style	lj/cut 2.5
>pair_coeff	* * 1.0 1.0 2.5
>pair_modify	tail yes
>
>timestep	0.005
>velocity	all create 1.2 32554 dist gaussian 
>
>neighbor	1.0 bin
>neigh_modify	every 5 delay 0 check yes
>fix 		1 all nve/limit 0.05
>run 		1000
>
>unfix		1
>fix		1 all nvt 1.2 1.2 1 
>run 		1000
>
>unfix		1
>fix		1 all nve
>run		1000
>
>compute		stpa all stress/atom
>compute		stgb all reduce sum c_stpa[1] c_stpa[2] c_stpa[3] 
>variable	pr equal -(c_stgb[1]+c_stgb[2]+c_stgb[3])/(3*vol)
>thermo_style	custom step temp press v_pr c_stgb[1] c_stgb[2] c_stgb[3]
>dump		D1 all custom 1000 dump.$p id c_stpa[1] c_stpa[2] c_stpa[3]
>log		log.$p
>thermo		1000
>run		5000
>---------------------------------------------------------------
>
>
>Here is the data file to reproduce my result:
>---------------------------------------------------------------
>Created by create_lj
>125 atoms
>0 bonds
>1 atom types
>-2.63917 2.63917 xlo xhi
>-2.63917 2.63917 ylo yhi
>-2.63917 2.63917 zlo zhi
>
>Masses
>
>1 1.0
>
>Atoms
>
>1 1 -2.59786 0.199459 0.555926
>2 1 0.792447 1.41057 2.42374
>3 1 -2.40367 1.9251 -1.07464
>4 1 1.01817 0.0109657 -0.441416
>5 1 2.45625 0.380624 -0.202503
>6 1 1.05669 -1.85067 1.04609
>7 1 -0.445224 1.80644 -0.0740315
>8 1 1.43947 2.51588 -0.335202
>9 1 -1.75826 2.26323 2.45385
>10 1 2.21142 2.63577 -1.63315
>11 1 -0.945717 -1.59385 -0.248115
>12 1 -0.187309 -2.20695 -1.40284
>13 1 0.731408 -0.472485 -2.44183
>14 1 -0.85155 -2.43392 0.265428
>15 1 0.846649 -0.760951 0.0980438
>16 1 0.981153 0.711087 1.09329
>17 1 1.10828 -0.467631 -0.0275641
>18 1 1.22333 1.44855 2.14744
>19 1 -1.24052 0.0380062 0.0917534
>20 1 0.824933 -1.54074 0.339542
>21 1 0.808073 0.120846 -1.09809
>22 1 -2.46529 0.750115 2.5161
>23 1 -1.87641 1.2293 1.3948
>24 1 1.3147 1.09312 -1.88886
>25 1 -2.2074 1.67557 1.30583
>26 1 -0.285954 2.53336 -2.19587
>27 1 0.0752806 -1.5595 1.67482
>28 1 -0.710593 1.94085 -0.235935
>29 1 -1.33472 0.229174 -1.45411
>30 1 -0.464502 -0.222329 0.381168
>31 1 -1.61053 -0.940435 -2.55868
>32 1 -1.19448 -2.03964 2.54184
>33 1 -2.21283 0.0561586 -0.964498
>34 1 -0.556254 -1.03468 2.20301
>35 1 -1.5182 -0.909437 1.16111
>36 1 0.817144 -0.497605 -2.35543
>37 1 -0.264755 -0.104938 -0.734956
>38 1 -1.09446 0.442579 1.25351
>39 1 1.84368 -2.43008 1.41207
>40 1 1.32758 1.10828 -0.383936
>41 1 2.58816 0.465274 2.63706
>42 1 -1.09123 1.98619 1.68692
>43 1 2.09708 2.16837 2.08974
>44 1 0.208687 2.58988 -2.3294
>45 1 -0.870611 -0.811735 1.66111
>46 1 1.18941 1.27225 0.174203
>47 1 -1.65411 0.399356 -2.06589
>48 1 -0.481245 -1.8678 -1.83917
>49 1 -1.02876 1.4077 1.68786
>50 1 2.10437 -1.97195 0.0767962
>51 1 -2.47803 -2.13698 -2.47656
>52 1 1.35758 -1.32131 -1.21847
>53 1 1.11985 -1.29983 0.707434
>54 1 -2.25387 1.80392 -0.359966
>55 1 -0.980875 -1.31782 -0.658835
>56 1 0.915786 -0.0136548 -2.52815
>57 1 -0.0697791 -0.986861 -1.64404
>58 1 0.783153 -1.72269 -1.59114
>59 1 -2.30365 -0.84966 -2.33638
>60 1 -2.06189 -1.83069 -1.01722
>61 1 0.127444 -1.05477 2.34668
>62 1 0.920543 0.770928 -1.32811
>63 1 0.487547 2.22685 -1.97624
>64 1 1.89933 -1.25451 2.40626
>65 1 -0.560884 0.324528 1.81328
>66 1 -1.34608 -0.699641 1.25994
>67 1 -0.895625 1.04187 2.53842
>68 1 -1.54841 -1.87117 -0.449172
>69 1 -1.21577 -0.970142 -0.391962
>70 1 -0.344854 -0.34875 -2.48882
>71 1 1.1435 0.346887 -2.43511
>72 1 1.30734 -1.24707 0.751291
>73 1 1.16296 0.187245 1.13958
>74 1 -2.15143 -2.47492 2.57269
>75 1 -0.935668 -1.61584 -0.410018
>76 1 2.33914 0.945166 -2.3799
>77 1 0.288973 0.706746 2.01986
>78 1 -2.54057 2.36631 -1.6099
>79 1 -0.805282 -0.725773 0.168812
>80 1 -2.51551 1.22675 0.841671
>81 1 0.0217407 1.1906 0.167753
>82 1 0.791313 -1.80487 0.100063
>83 1 -2.02343 0.551478 -0.061916
>84 1 -0.789821 0.501666 2.00049
>85 1 -0.781109 -0.870978 -1.7018
>86 1 1.18085 -0.0304439 0.327171
>87 1 -1.25688 -0.422901 2.22013
>88 1 1.09764 0.2576 1.25418
>89 1 -2.61355 0.379176 1.85891
>90 1 0.247024 -2.31826 1.70616
>91 1 -1.79639 0.237851 1.86634
>92 1 -1.50569 -1.74724 -2.45423
>93 1 1.93093 1.92766 -0.212096
>94 1 -1.81635 2.46748 -0.970017
>95 1 1.70932 -1.39455 -2.35284
>96 1 1.1934 -0.237852 -1.88072
>97 1 -2.58582 2.00771 -0.766852
>98 1 1.22024 2.30664 -1.74895
>99 1 0.523574 0.725127 -0.471644
>100 1 1.14772 -2.60061 1.42416
>101 1 -1.35752 2.32465 0.108955
>102 1 -0.369976 -0.313203 -1.49569
>103 1 -2.59841 1.46675 1.76529
>104 1 -0.332877 0.373294 -1.98847
>105 1 2.17122 2.58065 0.878254
>106 1 2.58328 -2.40027 0.990791
>107 1 -0.922782 -1.44787 -1.23665
>108 1 1.77237 2.62127 -2.60043
>109 1 -0.885622 0.254774 1.26081
>110 1 -2.0104 -2.19797 1.83576
>111 1 1.80919 -1.44481 -2.54625
>112 1 1.93157 2.0914 1.74828
>113 1 -1.09236 -1.24987 1.2774
>114 1 2.22894 1.49985 -1.38862
>115 1 2.30332 0.57198 1.41364
>116 1 1.33449 1.04162 -1.77817
>117 1 0.317176 -0.347457 -1.87213
>118 1 -0.762737 1.75719 0.737404
>119 1 0.0140992 -0.560088 -2.11978
>120 1 1.67618 1.10934 1.62421
>121 1 -1.37919 2.37825 -1.53213
>122 1 2.52772 -1.91814 1.83538
>123 1 0.598147 -2.18167 1.23062
>124 1 2.50916 -2.51425 1.32802
>125 1 -2.1043 -2.19737 1.31384
>--------------------------------------------------------
>
>Thanks,
>
>Gaurav Pranami
>
>Graduate Student (Ph.D.)
>(515) 230 7005 
>[email protected]
>
>Office:
>1014 Sweeney Hall
>Department of Chemical and Biological Engineering
>Iowa State University
>Ames, IA – 50011
>
>Residence:
>137 N Hyland, Apt 12
>Ames, IA – 50014
>Iowa State University
>
>
>
>
>
>
>
>------------------------------
>
>------------------------------------------------------------------------------
>This SF.net email is sponsored by:
>SourcForge Community
>SourceForge wants to tell your story.
>http://p.sf.net/sfu/sf-spreadtheword
>
>------------------------------
>
>_______________________________________________
>lammps-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/lammps-users
>
>
>End of lammps-users Digest, Vol 32, Issue 40
>********************************************