diff --git a/doc/src/Howto_viscosity.rst b/doc/src/Howto_viscosity.rst index 5cabf63de3..94be9589e0 100644 --- a/doc/src/Howto_viscosity.rst +++ b/doc/src/Howto_viscosity.rst @@ -65,10 +65,11 @@ liquid Ar via the GK formalism: .. code-block:: LAMMPS - # Sample LAMMPS input script for viscosity of liquid Ar +# Sample LAMMPS input script for viscosity of liquid Ar units real - variable T equal 86.4956 + variable T equal 200.0 # run temperature + variable Tinit equal 250.0 # equilibration temperature variable V equal vol variable dt equal 4.0 variable p equal 400 # correlation length @@ -99,12 +100,14 @@ liquid Ar via the GK formalism: # equilibration and thermalization - velocity all create $T 102486 mom yes rot yes dist gaussian - fix NVT all nvt temp $T $T 10 drag 0.2 + velocity all create ${Tinit} 102486 mom yes rot yes dist gaussian + fix NVT all nvt temp ${Tinit} ${Tinit} 10 drag 0.2 run 8000 # viscosity calculation, switch to NVE if desired + velocity all create $T 102486 mom yes rot yes dist gaussian + #fix NVT all nvt temp $T $T 10 drag 0.2 #unfix NVT #fix NVE all nve @@ -113,12 +116,13 @@ liquid Ar via the GK formalism: variable pxz equal pxz variable pyz equal pyz fix SS all ave/correlate $s $p $d & - v_pxy v_pxz v_pyz type auto file S0St.dat ave running + v_pxy v_pxz v_pyz type auto file S0St.dat ave running variable scale equal ${convert}/(${kB}*$T)*$V*$s*${dt} variable v11 equal trap(f_SS[3])*${scale} variable v22 equal trap(f_SS[4])*${scale} variable v33 equal trap(f_SS[5])*${scale} - thermo_style custom step temp press v_pxy v_pxz v_pyz v_v11 v_v22 v_v33 + compute msd all msd com yes + thermo_style custom step temp press v_pxy v_pxz v_pyz v_v11 v_v22 v_v33 c_msd[*] run 100000 variable v equal (v_v11+v_v22+v_v33)/3.0 variable ndens equal count(all)/vol