I am new in LAMMPS and I have a question hopefully someone can help me.
I am trying to simulate a PTFE cell scraping on another PTFE cell.
In the previous, I used fix move command to make the upper PTFE close to the lower PTFE and scrap on it.
Then, I want to add some load on the model to make the upper PTFE close to the lower instead of move command.
I read one metal model for this issue and repeat its script.
But when I write my script in the same way, it does not workďź
boundary p p s
units real
atom_style full
pair_style lj/class2/coul/long 10.0
bond_style class2
angle_style class2
dihedral_style class2
improper_style class2
kspace_style pppm 1.0e-5
kspace_modify slab nozforce
The upper PTFE did not move close to the lower and did not move along the x axle even though I increased the amount of force to a really high value but the group doesnt move at all.
I would appreciate if anyone can tell me what am I doing wrong?
There are missing information in your script that might be the cause of your issues.
My guesses would be that either:
the definition of the upfix group is wrong in one case.
the change in timestep is bogus because of a unit change. metal units use ps as time units, real units use fs, 1000 time less.
But without any more information on your system or the rest of the script, these are wild guesses and have very few value.
Note that when you say:
that is a risky practice if you do not know the author of the script. When copying a script from one model to another you have to go through every command and be sure that they are sound in your case. If not, modify/remove them accordingly to what you are doing. I would advise to do that to your script and find out if everything your are telling LAMMPS to do correspond to your simulation plan.
region downfix block INF INF INF INF INF 14 units box #
region downt block INF INF INF INF 14 34 units box #
region downfree block INF INF INF INF 34 89 units box #
group downfix region downfix
group downt region downt
group downfree region downfree
region upfix block INF INF INF INF 180 INF units box
region upt block INF INF INF INF 160 160 units box
region upfree block INF INF INF INF 89 160 units box
group upfix region upfix
group upt region upt
group upfree region upfree
neighbor 3.0 bin
neigh_modify every 1 delay 0 check yes exclude group downfix downfix
group t union upt downt
group free union upfree downfree
minimize 1.0e-4 1.0e-6 100 1000
timestep 0.025
thermo 100
compute myTfree free temp
compute myTt t temp
compute fx downfix reduce sum fx
compute fz downfix reduce sum fz
This script is very different compared to the original commands you posted. From the few insights I can get from my reading I do not see anything wrong but I donât have time for a detailed analyses and I can only make guesses considering your system. So any help can only be general advices on what to do, the rest is on you to do.
The number of atom defined by the group commands should be part of your log files. I suggest you start there and try to figure out what is going on by yourself so you understand better what to do. And again, a timestep value of 0.025 seems very small without any justification (reactive forcefield for example). It is up to you to rerun the simulation with modified parameters and see where things went wrong.
A useful unit conversion: 1 LAMMPS real unit of force is 4.2e-4 angstrom-amu per femtosecond squared. There is a good chance that applied to a very large mass over 10,000 timesteps of 1 fs each, the displacement resulting from this force is incredibly small. You should try much larger forces (and if you have, the exact amount of force would have been very useful to tell us earlier).
This is an unscientific and thus problematic description of your problem. It is near impossible to provide meaningful advice on âdoes not workâ. Instead, you need to describe how you exactly come to the conclusion that your results are not what you expected and which properties you examined for that and how. Answers can be only as good as the questions and thus the matching response to âit does not workâ is âyou probably made a mistake somewhereâ.
Thank you for your advice!
The âunitsâ in that metal model is âmetalâ but my âunitsâ is ârealâ. The different time units make my script cannot work as expected.
I am sorry but this is rather confusing. There are no units assigned to given models. You can use any units you want as long as you convert the values used accordingly. The units command in LAMMPS only tell the software which set of units you are using for inputs/outputs.
The combination of commands:
units metal
timestep 0.001
run 1000
and
units real
timestep 1
run 1000
will both make a simulation of 1 picosecond long (10^{-12} second) as the time units is picosecond in the former case and femtosecond (10^{-15} second) in the latter. This is an important difference. As I stated, you have to make sure you convert your units accordingly when copying scripts from another person, and that the procedure fits your needs. The difference of time units has nothing to do with your script âworkingâ or not. It is up to you to make the correct conversions.
Please have a look on the units command page which will tell you which sets of units you are using.
Yes, the units is optional. But I just copied that units for my script. With the other same âtimestep, addforce, âŚâ parameters, it turns out to be âno moveâ which is expected. I did not learn carefully about these commands before.
Thank you for your kind advice! I will read it carefully!