본문 바로가기

LAMMPS

MWE clumps - check

# minimum Working Example for Simulation of clump using molecule

# 1. Setup simulation environments
units            si
dimension        3
atom_style       hybrid sphere molecular

boundary         f f f
newton           off
processors       * * * grid numa

# 2. Setup Communication and Neighboring list
comm_modify      mode single vel yes cutoff 0.01
atom_modify      map array                                                 # Must be declared before simulation box definition
neigh_modify     delay 0 every 1 check yes once no cluster no exclude molecule/intra all page 100000 one 2000 binsize 0.02

# 3. Setup Packages
package          intel 1 mode mixed
package          omp 5
suffix           hybrid intel omp
#suffix           omp

# 4. Setup variables
variable         crit_dt      equal 1e-6
variable         screen_nstep equal round(0.01/(v_crit_dt))

# 5. Setup Domain
region           domain3D block -0.2 0.2 -0.2 0.2 -0.2 0.2
create_box       2 domain3D

# 5. Read atom and molecule data
#fix              addMolecule all property/atom mol ghost yes         # This is required for when using [atom_style sphere]

molecule         clumps m1.data scale 1.0 m2.data scale 1.1           # Readout two template for molecule

region           insertionRegion block -0.1 0.1 -0.1 0.1 -0.1 0.1     # Set pouring Space

fix              makeClumps all rigid/small/omp molecule mol clumps
fix              pourClumps all pour 10 1 4767548 region insertionRegion dens 2700 2700 mol clumps molfrac 0.5 0.5 rigid makeClumps
#fix              pourClumps all pour 500 1 4767548 region insertionRegion dens 2700 2710 mol clumps molfrac 0.4 0.6 rigid makeClumps

# 6. Decalre mocules is composed of sphere : DOF adjust ment not to calculate DOF <=0
compute          adjustDOF all temp/sphere
thermo_modify    temp adjustDOF

# 7. Setup interactions btw atoms (molecule)
pair_style       gran/hertz/history/omp 1.75e9 NULL 50.0 NULL 0.5 1
pair_coeff       * *

fix              bottomPlate all wall/gran hertz/history 1.75e9 NULL 50.0 NULL 0.5 1 &
                 zplane -0.2 NULL

# 8. Apply gravity
fix              gravAcc all gravity 9.81 vector 0.0 0.0 -1.0
fix              viscousDamping all viscous 0.0001

# 9. Preparation for run
timestep         ${crit_dt}

# 10. Print out read_data informations (atoms, molecule)
dump             myDump  all  custom  10000  atom_info.dat  id mol type diameter mass x y z


# 11. Setup dump
shell            if [ -d "post_1" ]; then rm -rf post_1; fi
shell            mkdir post_1

dump             dump_atoms all vtk ${screen_nstep} post_1/atoms*.vtk fx fy fz xu yu id type radius diameter mol x y z vx vy vz
#dump             check all custom ${screen_nstep} check.txt id type diameter x y z
#dump_modify      check sort id

#set              atom * density 2700
#fix              adjustDomain all balance 100 1.0 report

run              100000

 

m1.data

# Molecule for Clumps
# header section:
4 atoms

# body section:
Coords

1 0.003 0.0   0.0
2 0.0   0.003 0.0
3 0.0   0.0   0.003
4 0.0   0.0   0.0

Types

1 1
2 1
3 1
4 1

Diameters

1 0.01
2 0.01
3 0.01
4 0.01

Masses # Check if fix pour dens can modify density at main script

1 1e-5
2 1e-5
3 1e-5
4 1e-5

 

m2.data

# Molecule for Clumps
# header section:
3 atoms

# body section:
Coords

1 0.003 0.0   0.0
2 0.0   0.003 0.0
3 0.0   0.0   0.003

Types

1 1
2 1
3 1

Diameters

1 0.005
2 0.003
3 0.002

Masses # Check if fix pour dens can modify density at main script

1 1e-5
2 1e-5
3 1e-5

'LAMMPS' 카테고리의 다른 글

Build LAMMPS with AOCC and AOCL  (0) 2025.01.22
Build with Spack and AOCC  (0) 2025.01.22
NVE/NVT/NPT/NHT  (0) 2025.01.15
fix rigid/small vs fix rigid  (0) 2025.01.15
Rigid body atoms %d %d missing on proc %d at step %ld  (0) 2025.01.15