LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] problem with calculating viscousity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] problem with calculating viscousity

From: Alireza Shadloo <alirezashadloo@...16...>
Date: Thu, 24 May 2018 17:53:07 +0000 (UTC)

Dear Axel

Thank you very much for your email. As you suggested in the first step i tried to simulate the water box with no wall. my simulation was favored. for the next step i am trying to calculate the viscosity of Argon with wall. Now i have some obstructions to do it. As i understood from lammps manual the pxy is for entire system of atoms and it can't use for mobile (Argon) group. so what is the way to calculating the pxy of mobile group in confined system??

On Monday, May 21, 2018, 6:31:50 PM GMT+4:30, Axel Kohlmeyer <akohlmey@...24...> wrote:

On Sun, May 20, 2018 at 12:13 PM, <> wrote:
dear all
I am new in lammps and i try to calculate the viscousity of water molecular (spce) confined between two harmonic walls. in lammps manual,  a Sample LAMMPS input script has been written for viscosity of liquid Ar. so i tried to modify this code for my simulation. so my lammps input script is:

​you are trying to do two significant modifications at the same time while being inexperienced. that is a very bad idea. try one at a time, i.e. either introduce walls to an Ar system or do a bulk SPC/E water system (or better both) to learn about the issues related to that.


variable  T equal 300
variable  V equal vol
variable  dt equal 1
variable  p equal  400
variable  s equal  5
variable  d equal $p*$s

variable   kB equal 1.3806504e-23  # [J/K] Boltzmann

variable   A2m equal 1.0e-10
variable   fs2s equal 1.0e-15
variable  atm2Pa equal 101325.0
variable   convert2 equal ${atm2Pa}*${atm2Pa}*${fs2s}*${ A2m}*${A2m}*${A2m}
dimension    3


 velocity    all  create  $T 34387 rot yes dist gaussian
fix         55 up-wall nvt temp $T $T 10
fix         5 down-wall nvt temp $T $T 10
fix         4 spce nve
fix         7 spce temp/rescale 100 $T $T 0.02 1.0
fix         77
up-wall temp/rescale 100 $T $T 0.02 1.0
fix         777
down-wall temp/rescale 100 $T $T 0.02 1.0  
timestep    ${dt}

thermo        $d
thermo_style custom step temp pe  ke etotal enthalpy press vol ebond  ecoul eangle
 run        20000

variable  pxy equal pxy

variable   pxz equal pxz

variable   pyz equal pyz

fix    SS spce ave/correlate $s $p $d  v_pxy v_pxz v_pyz type auto file S0St.dat ave running

variable   scale2 equal ${convert2}/(${kB}*$T)*$V*$s*$ {dt}

variable  v11 equal trap(f_SS[3])*${scale2}

variable   v22 equal trap(f_SS[4])*${scale2}

variable    v33 equal trap(f_SS[5])*${scale2}

thermo_style custom step temp press v_pxy v_pxz v_pyz v_v11 v_v22 v_v33
run   10000

variable   v equal (v_v11+v_v22+v_v33)/3.0
variable  ndens equal count(spce)/vol

variable  k equal (v_k11+v_k22+v_k33)/3.0

variable   ndens equal count(spce)/vol

print  "average viscosity: $v [Pa.s/ @ $T K, ${ndens2} /A^3"

my problem is pxy,pxz and pyz. because i think these values are for all atoms (both wall and water molecules) and i just want to calculate the viscousity of water molecule (no walls).
how can i calculate the pxy pxz and pyz just for water (no water+wall)??

can i use compute stress/atom command instead?? if yes how should i modify the fix ave/correlate???
can i use the flowing code??
compute mystress spce stress/atom

fix    SS spce ave/correlate $s $p $d  c_mysterss[4]  c_mysterss[5]  c_mysterss[6]  type auto file S0St.dat ave running

------------------------------ ------------------------------ ------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites,!
______________________________ _________________
lammps-users mailing list
lammps-users@...396... lists/listinfo/lammps-users

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