-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathin.walls.equilibration
161 lines (135 loc) · 5.2 KB
/
in.walls.equilibration
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
#########################################################################
#
# ARGON FLUID BETWEEN PLATINUM WALLS
#
# Author: Diego Duque
#
# Reference: Molecular dynamics study of effect of different wetting conditions on evaporation and rapid boiling of ultra-thin argon layer over platinum surface. S.M. Shavik, Mohammad Nasim Hasan, A.K.M. Monjur Morshed, M. Quamrul Islam.
#
# run: mpiexec -np 8 ./lmp_mpi -in in.walls
#
# #######################################################################
########################################
#
# Initialization
#
########################################
# define units
units lj
# specify periodic boundary conditions
boundary p p p
# define time step
timestep 0.005
# specify parameters for neighbor list
# rnbr = rcut + 0.3
neighbor 0.3 bin
# This command sets parameters that affect the building of pairwise neighbor
# lists. All atom pairs within a neighbor cutoff distance equal to the their
# force cutoff plus the skin distance are stored in the list. Typically, the
# larger the skin distance, the less often neighbor lists need to be built, but
# more pairs must be checked for possible force interactions every timestep.
########################################
#
# Regions, groups and atoms
#
########################################
# fcc = body-centered cubic structure
# density 2.6
lattice fcc 2.6
# define regions
region simbox block 0.0 15.0 0.0 15.0 0.0 30.0
region wallUpper block 0.0 15.0 0.0 15.0 25.0 30.0
region wallBottom block 0.0 15.0 0.0 15.0 0.0 5.0
region fixedBottom block 0.0 15.0 0.0 15.0 0.0 0.0
region bulk block 1.0 13.0 1.0 13.0 12.0 18.0
############
# Sometimes we need to specify the number of particles:
#############
# define simulation volume
# If I want N = 512 atoms
# and I want a density of rho = 0.5 atoms/lj-sigma^3
# Then I can determine the size of a cube by
# size = (N/rho)^(1/3)
#########################################
# create simulation box
# create_box N region-ID
# N = # of atom types to use in this simulation
create_box 2 simbox
# place atoms of type 1 in "wallUpper" and "wallBottom"
create_atoms 1 region wallUpper
create_atoms 1 region wallBottom
mass 1 5.0
# create the group "wall"
group upper region wallUpper
group lower region wallBottom
group wall union upper lower
set group wall type 1
# create the group "fixedBottom"
group fixedBottom region fixedBottom
set group fixedBottom type 1
# specify initial positions of atoms between walls.
# place atoms of type 2 in "bulk".
lattice sc 1.3
create_atoms 2 region bulk
mass 2 1.0
# create the group "fluid"
group fluid subtract all wall fixedBottom
set group fluid type 2
# create the group "lowerWallNoFixed"
group lowerWallNoFixed subtract all fixedBottom upper fluid
########################################
#
# Interaction potential
#
########################################
# specify interaction potential
# pairwise interaction via the Lennard-Jones potential with a cut-off at 2.5 lj-sigma
pair_style lj/cut 2.5
# Type 1: Solid. Type 2: Fluid.
# pair_coef type_i type_j epsilon sigma rcut
# specify parameters between atoms of type 1 with an atom of type 1
pair_coeff 1 1 50 0.73 2.5
# ... between atoms of type 2 and 2
pair_coeff 2 2 1 1 2.5
# ... between atoms of type 1 and 2
pair_coeff 1 2 1.0 0.84 2.5
pair_modify shift yes
#The shift keyword determines whether a Lennard-Jones potential is shifted at its cutoff to 0.0. If so, this adds an
#energy term to each pairwise interaction which will be included in the thermodynamic output, but does not affect
#pair forces or atom trajectories. See the doc page for individual pair styles to see which ones support this option.
# Set each component of force on each atom in the group to the specified values fx,fy,fz.
# fix ID group-ID setforce fx fy fz
fix force fixedBottom setforce 0.0 0.0 0.0
########################################
#
# SIMULATION - Equilibration in microcanonical ensemble with langevin thermostat. Then, in microcanonical ensemble, change the temperature of group lowerWallNoSprings
#
########################################
###################
# EQUILIBRATION
###################
# microcanonical ensemble
fix nve all nve
# langevin thermostat
# fix ID group-ID langevin Tstart Tstop damp seed
fix langFluid fluid langevin 1.5 1.5 0.5 3216
fix langLowerWall lowerWallNoFixed langevin 1.5 1.5 0.5 3215
fix langUpperWall upper langevin 1.5 1.5 0.5 6586
# compute the temperature of the groups "lowerWallNoFixed", "upper" and "fluid".
compute tempLower lowerWallNoFixed temp
compute tempUpper upper temp
compute tempFluid fluid temp
# create vmd input to visualize the system during the process.
dump movie all atom 100 movie.lammpstrj
# specify thermodynamic properties to be output
thermo_style custom step temp c_tempFluid c_tempLower c_tempUpper pe ke etotal
# report instantaneous thermo values
thermo 100
# run simulation
run 30000
# unfix langevin thermostat
unfix langFluid
unfix langLowerWall
unfix langUpperWall
# save equilibartion process
write_restart restart.equilibration