-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathin.interference.lamps
150 lines (127 loc) · 4.35 KB
/
in.interference.lamps
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
# Units and simulation box
# {{{
units real
atom_modify sort 1 1 map array
atom_style bond
boundary f f f
processors * * 1
# Simulation box, atom types and some bonds info
read_data structures/fake_bonds.what
# }}}
# Create graphene sheet
# {{{
bond_style harmonic
lattice hcp ${MEM_R0}
region graphene_space block -5 320 -5 320 -0.1 0.1 units box
# read_dump structures/30nm_30nm_graphene.what 0 x y z box no add yes
create_atoms 1 region graphene_space
group graphene region graphene_space
# }}}
# Declare masses
# membrane is 1, ball is 2 {{{
mass 1 12.01
mass 2 ${A_BALL_MASS}
# }}}
# Create ball
# {{{
# TODO Make starting position settable
create_atoms 2 single ${a_ball_x} ${a_ball_y} ${A_BALL_HEIGHT} units box
region a_ball_space sphere ${a_ball_x} ${a_ball_y} ${A_BALL_HEIGHT} 7 units box
group a_ball region a_ball_space
fix a_ball_no_go a_ball setforce 0.0 0.0 0.0
# }}}
# Reshape the grapheneish membrane
# {{{
# Keep a rectangle
# region notDel block 100 200 0 300 -5 5 units box
# group notDel region notDel
# group del subtract graphene notDel
# delete_atoms group del
# Keep a circle
region notDel sphere 150 150 0 ${SHEET_RADIUS} units box
group notDel region notDel
group del subtract all notDel
delete_atoms group del
# Cut a small circle to act as an rozpraszacz
# region doDel sphere 135 150 0 2 units box
# region B_doDel sphere 165 150 0 2 units box
# group del region doDel
# group B_del region B_doDel
# delete_atoms group del
# delete_atoms group B_del
# }}}
# Potential settings
# {{{
# TODO not sure what is this for really
neighbor 3.0 bin
neigh_modify every 2 delay 0
pair_style lj/cut 10
pair_coeff * * 0 1 1
# LJ is now only for interaction between membrane and bouncers
# pair_coeff 1 1 5.5939 1.26 10
pair_coeff 1 2 0.0000001139 19.510832 10
pair_coeff 2 2 0.1939 3.510832 1
# Membrane holding potential
bond_coeff 1 ${MEM_K} ${MEM_R0}
create_bonds graphene graphene 1 2.0 2.8
# }}}
# Full data dump
# {{{
# FIXME move this out (also rename) - data dump frequency
variable dump_freq equal 50
# Get membrane z-position mean value (not used?)
compute mem_com graphene com
variable z_dev atom c_mem_com[3]-z
# Dump just the membrane information
# dump my_dump graphene custom ${dump_freq} membrane.lammpstrj type x y z v_z_dev
# dump_modify my_dump sort id
# dump my_dump 1 atom 160 pilotwaves.lammpstrj
thermo 5000
thermo_style custom step temp ke
# }}}
# Setup timestep and NVE
# {{{
fix NVE all nve
timestep 15
# }}}
# Wacing sheet
# Every point of the membrane is a forced oscillator {{{
fix graphene_spring graphene spring/self ${SPRING_CONSTANT} z
# With sinusoidal driving force
variable sin_force equal swiggle(0,${AMPLITUDE},${MEMBRANE_FREQUENCY})
fix wavee graphene addforce 0.0 0.0 v_sin_force
# Allow graphene atoms to move up or down only
fix move_vertical graphene setforce 0.0 0.0 NULL
# }}}
# Write some coordinates to a seperate files
# {{{
# First ball
compute fa_com a_ball com
variable fa_x_com equal c_fa_com[1]
variable fa_y_com equal c_fa_com[2]
variable fa_z_com equal c_fa_com[3]
fix a_ball_cout all print ${dump_freq} "${fa_x_com} ${fa_y_com} ${fa_z_com}" file data/a_ball.dat screen no
# Some part of the membrane
region membrane_part sphere 100 100 0 3 units box
group membrane_pos region membrane_part
compute mpart_com membrane_pos com
variable mpart_x_com equal c_mpart_com[1]
variable mpart_y_com equal c_mpart_com[2]
variable mpart_z_com equal c_mpart_com[3]
fix memb_cout all print 160 "${mpart_x_com} ${mpart_y_com} ${mpart_z_com}" file data/membrane_pos.dat screen no
# }}}
# Reach oscillatory stability
# Start standing still {{{
velocity all set 0 0 0 units box
# Prevent energy accumulation
fix vis graphene viscous 2
run 4000
# }}}
# Drop the ball
# {{{
unfix a_ball_no_go
fix a_gravity a_ball addforce 0.0 0.0 ${GRAVITY}
# With velocityo
velocity a_ball set 0.0 ${a_ball_y_vel} 0.0
# }}}
run ${ITERATIONS}