Hi, all
Assume that in a simulation, there are three set ups related to forces of particles:
pair_style CH.airebo 2.0 0 0
fix 1 spring tether 50 NULL NULL 0 0
fix 2 all nve
So how are the force components determined?
Checking the src files:
Line 1: in pair_airebo.cpp, there are terms like f[i][2]+=delzfpair
Line 2: in fix_spring.cpp, there are also terms like f[i][2]-=fzmassone
Line 3; in fix_nve, there are terms like v[i][2]+=dtfm*f[i][2]
Does Line 2 overwrite f[i][2] defined in Line 1? then Line 3 use only f[i][2] determined by Line 2 to update the velocity of particles?
Thanks,
Alex
Hi, all
Assume that in a simulation, there are three set ups related to forces of
particles:
pair_style CH.airebo 2.0 0 0
fix 1 spring tether 50 NULL NULL 0 0
fix 2 all nve
So how are the force components determined?
the forces caused by fix spring are added to
those computed by the pair style. what else?
Checking the src files:
Line 1: in pair_airebo.cpp, there are terms like f[i][2]+=delz*fpair
Line 2: in fix_spring.cpp, there are also terms like f[i][2]-=fz*massone
Line 3; in fix_nve, there are terms like v[i][2]+=dtfm*f[i][2]
Does Line 2 overwrite f[i][2] defined in Line 1?
no. why?
then Line 3 use only
f[i][2] determined by Line 2 to update the velocity of particles?
no. it looks like you don't know basic C/C++.
please find a suitable text book and update
your knowledge about it.
cheers,
axel.