LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Friction coefient calculation getting error in thermo style
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Friction coefient calculation getting error in thermo style


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Mon, 10 Jul 2017 07:23:46 -0400

On Mon, Jul 10, 2017 at 7:00 AM, tanni bhattacharjee
<tanni222byc@...24...> wrote:
>
>
> i want to calculate friction between water and graphite...

so is there a question here?
please note, that this mailing list is not a "debug my input file"
service. you can (and should) do that on your own.

http://lammps.sandia.gov/doc/Section_errors.html

axel.


> #LAMMPS Input file generated by Avogadro
> # MD simulation for SPCE
> units       real
> variable    T equal 283.15     #86.4956
> variable    V equal vol
> variable    dt equal 1
> variable    p equal 5000    # correlation length
> variable    s equal 10      # sample interval
> variable    d equal $p*$s   # dump interval
>
> # convert from LAMMPS real units to SI
>
> variable    kB equal 1.3806504e-23    # [J/K/** Boltzmann
> variable    atm2Pa equal 101325.0
> variable    A2m equal 1.0e-10
> variable    fs2s equal 1.0e-15
> variable    convert equal ${atm2Pa}*${atm2Pa}*${fs2s}*${A2m}*${A2m}*${A2m}
>
> units real
>
> atom_style full
>
> dimension 3
>
> boundary p p p
>
> #The SPC/E water potential
> pair_style      lj/cut/coul/long 12 12
> kspace_style    ewald 1.0e-4
> pair_coeff      1 1 0.15535 3.1533
> pair_coeff      * 2 0.00000 0.0000
> bond_style      harmonic
> angle_style     harmonic
> read_data      data.lammps
> bond_coeff      1 100.00   1.000
> angle_coeff     1 100.00 109.47
> #special_bonds   lj/coul 0.0 0.0 0.5
>
> group water type  2 3
> group graphite type 1
>
> neighbor 2.0 bin
> neigh_modify every 1 delay 0 check yes
>
> timestep      ${dt}
> thermo        $d
> variable     v equal vol
> print        "volume: $v"
>
>
>
>
> fix             RigidOHBonds water shake 0.0001 20 0 b 1 a 1
> fix   freeze graphite setforce 0.0 0.0 0.0
>
>
> velocity       water create 260 4928459 rot yes mom yes dist gaussian
> velocity       graphite create 260 4928459 dist gaussian
> fix            ensemble water nvt temp $T $T 10 drag 0.2
>
>
> compute tgraph graphite temp
> compute twater water temp
> thermo_style   custom step temp c_tgraph c_twater pe etotal press vol
> density
> thermo         10
>
> #unfix       NVT
> fix         NVE all nve
> reset_timestep 0
> variable    p equal 1000    # correlation length
> variable    s equal 2      # sample interval
> variable    d equal $p*$s   # dump interval
>
> compute         force  water group/group  graphite
> variable        fxy equal fxy
> variable        fxz equal fxz
> variable        fyz equal fyz
>
>
> fix          SS all ave/correlate $s $p $d &
> v_fxy v_fxz v_fyz type auto file vis.dat ave running
> variable     scale equal ${convert}/(${kB}*$T)*$V*$s*${dt}
> variable        la11 equal trap(f_SS[3])*${scale}
> variable        la22 equal trap(f_SS[4])*${scale}
> variable        la33 equal trap(f_SS[5])*${scale}
> variable        la equal (v_la11+v_la22+v_la33)/3.0
>
> variable     ndens equal count(all)/vol
> thermo_style    custom step temp press v_fxy v_fxz v_fyz v_la11 v_la22
> v_la33 v_la
> print        "average frictioncoeffient"
>
>
>
> # Run the simulation
> run            900000
>
>
> ------------------------------------------------------------------------------
> 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@lists.sourceforge.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.