I want to implement the rotation and translation of the sphere at the same time, but fix Move Rotate and Fix Linear don’t work at the same time。I wonder if there is a proper way to achieve this movement。
It is extremely difficult to make a specific suggestion on such a vague description, thus please provide a minimal example input deck showing translation and rotation that you want to achieve (just comment out one of the two).
Hello, I am glad to get your reply! I want to achieve both rotation and translation of the hemispherical abrasive grain.Currently, I can only implement to achieve one type of motion, and cannot use rotation and translation together.I am also sending you a case study and look forward to receiving your guidance.
units metal dimension 3 boundary p p p atom_style atomic neighbor 1.0 bin neigh_modify every 1 delay 0 #check yes timestep 0.004 #create atom region box block -200 800 -80 80 -20 255 units box create_box 1 box lattice fcc 3.615 #region #up region hi-above block -50 50 -50 50 100 137 units box region hi-asperity sphere 0 0 137 30 units box region hi-sphere intersect 2 hi-asperity hi-above #create_atoms create_atoms 1 region hi-sphere mass * 63.546 #group group hi-sphere region hi-sphere #group hi-sphere type 1 #initial velocity compute asp hi-sphere temp velocity hi-sphere create 300 482748 temp asp #pair_style pair_style eam pair_coeff * * cuu3.eam #min_style cg #minimize 1.0e-14 1.0e-16 10000 10000 #neigh_modify every 1 delay 5 check yes #fix fix 2 hi-sphere nve fix 3 hi-sphere temp/rescale 500 300 300 0.1 1 fix_modify 3 temp asp thermo 500 #variable #variable X equal step*0.004*1 #fix 5 hi-sphere move linear 1.0 0.0 0.0 units box fix 6 hi-sphere move rotate 0.0 0.0 137.0 0.0 0.0 1.0 20.0 dump 1 all atom 100 dump.cu75dR10 neigh_modify every 1 delay 5 run 1000 #fix 6 hi-sphere move linear 1.0 0.0 0.0 units box run 105000
Please note that there is an issue with your input example: you are applying a time integration and a thermostat to the fix move group. Fix move does its own update of positions and velocities and thus its group of atoms must not overlap with those of other time integration fixes.
If you want to do regular time integration and induce a translational and rotational motion you need to use fix addforce and fix addtorque, but that is not the same as what fix move would do.
To implement both translation and rotation in fix move, the source code of fix move needs to be extended to include such a combined motion. But that is rather straightforward to do by “cloning” the code for the rotation and adding the translation on top of that. I have just done this and included it in a pull request for LAMMPS on GitHub: Misc changes by stanmoore1 · Pull Request #3199 · lammps/lammps · GitHub
If you feel adventurous, you can download a snapshot of the updated source code from: https://github.com/lammps/lammps/archive/refs/heads/misc.zip
and compile an updated LAMMPS version with the new feature included.
the fix move command in your input would then be something like:
fix 6 hi-sphere move transrot $(1.0/3.615) 0.0 0.0 0.0 0.0 137.0 0.0 0.0 1.0 20.0