# Shear - contant volume (constant concentration nu) # Read and load "oldname.restart" created from place.in (must change the box units) # # Assign: wall particle diameter (again as in place.in) # NB: Usually restitution = 0.98 to obtain homogeneous steady state ##################################################################################################### # Variables ### TO BE SET variable scaling_factor equal 1 variable layerParticles equal 3150 variable vel equal 1.0 # Imposed walls velocity 1.0 variable restitution equal 0.6 # Assigned restitution coef. variable wall_diameter equal 1 # MUST BE the same as in oldname!! variable oldname string p1_N3150_dw1 # name of file to be loaded variable name string constv_N3150_dw1_e0.6 # output name ### SET box parametrs variable boxx equal 20/${scaling_factor} #15 variable boxy equal 6/${scaling_factor} variable boxz equal (11+${scaling_factor})/${scaling_factor} # 11.2, 5.5 for 1587 particles #variable boxz equal 12/${scaling_factor} shell mkdir Lammps_Results/${name} #### SET simulation parameters variable timesteps equal 1e8 # 1e8 variable dump_interval equal 1e4 # 1e4 # ${timesteps}/100 # ${timesteps}/20 # save trajectories variable print_interval equal 100 # 100 # print to screen & FILES variable restart_interval equal 1e4 # save restart variable atom_types equal 3 # number of different atom types in the simulation ### SET moving particles parameters variable density equal 1 variable diameter equal 1 variable spring_stiffness equal 2e5 variable particleVolume equal PI*${diameter}^3/6 variable particleMass equal ${density}*PI*${diameter}^3/6 variable mass_ij equal ${particleMass}/2 variable eta0 equal sqrt(${spring_stiffness}/${mass_ij}*(ln(${restitution}))^2/(PI^2+(ln(${restitution}))^2)) variable damping equal 2*${mass_ij}*${eta0} variable omega0 equal sqrt((${spring_stiffness}/${mass_ij})-${eta0}^2) variable tc equal PI/${omega0} variable restitution equal exp(-${eta0}*${tc}) ### SET wall particles parameters variable wall_radius equal ${wall_diameter}/2 variable wall_particleVolume equal PI*${wall_diameter}^3/6 variable wall_particleMass equal ${density}*PI*${wall_diameter}^3/6 variable wall_mass_ij equal ${wall_particleMass}*${particleMass}/(${wall_particleMass}+${particleMass}) variable wall_eta0 equal sqrt(${spring_stiffness}/${wall_mass_ij}*(ln(${restitution}))^2/(PI^2+(ln(${restitution}))^2)) variable wall_damping equal 2*${wall_mass_ij}*${wall_eta0} variable wall_omega0 equal sqrt((${spring_stiffness}/${wall_mass_ij})-${wall_eta0}^2) variable wall_tc equal PI/${wall_omega0} variable stepsize equal ${tc}/50.0 #variable stepsize equal ${wall_tc}/50.0 ### SET number of horizontal slices for coarse graining variable Nslice equal 25.0 #================================================== atom_style sphere atom_modify map array boundary p p f newton off communicate single vel yes units lj # Create a simulation box lattice hcp ${scaling_factor} # Print hpc spacing region boxreg block 0 ${boxx} 0 ${boxy} 0 ${boxz} units lattice #lattice create_box ${atom_types} boxreg # Print box limits # Neighbor lists boundary variable rhi equal 0.5 variable skin equal 0.3*${rhi} neighbor ${skin} bin neigh_modify delay 0 every 1 check yes #Material properties fix m1 all property/global youngsModulus peratomtype 2.e6 2.e6 2.e6 fix m2 all property/global poissonsRatio peratomtype 0.45 0.45 0.45 fix m3 all property/global coefficientRestitution peratomtypepair ${atom_types} 0.98 0.98 0.98 0.98 0.98 0.98 0.98 0.98 0.98 fix m4 all property/global coefficientFriction peratomtypepair ${atom_types} 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 fix m5 all property/global characteristicVelocity scalar 2. # Interaction model variable spring_stiffness2 equal ${spring_stiffness} variable damping2 equal ${damping}/${mass_ij} pair_style gran model hooke tangential history #${spring_stiffness2} ${damping2} #tangential linear_nohistory 0 0 damping #mass_velocity pair_coeff * * #timestep 0.00001 #--------------------------------------------------------- # Create the lower wall layer of particlesnatoms region lowerWall block 0 EDGE 0 EDGE 0 0.33333333 units lattice create_atoms 1 region lowerWall # Print number of created particles on lowerWall group lowerGroup type 1 # Print group name of created particles (1) variable lowerWallParticles equal count(lowerGroup) ##################################################################################################### # Create the upper wall layer of particles lattice hcp ${scaling_factor} origin 0 0 0.45 variable walltop equal lz-${wall_diameter}/2 region upperWall block 0 EDGE 0 EDGE ${walltop} EDGE units box create_atoms 2 region upperWall group upperGroup type 2 variable upperWallParticles equal count(upperGroup) lattice none 1 ##################################################################################################### ##################################################################################################### # Create moving particles into layerRegion variable zbox_min equal xcm(lowerGroup,z)#+${wall_diameter}/2 variable zbox_max equal xcm(upperGroup,z)#-${wall_diameter}/2 variable zplace_min equal ${zbox_min}+${diameter} variable zplace_max equal ${zbox_max}-${diameter} print "###################################################" print "zmin = ${zbox_min}, zmax = ${zbox_max}" print "###################################################" ###### creating particle factory ######################################################################################### region layerRegion block 0 EDGE 0 EDGE ${zplace_min} ${zplace_max} units box variable Lx equal lx variable Ly equal ly variable Lz equal lz #create_atoms 3 random 15485863 ${layerParticles} layerRegion #${layerParticles} #123467 group layerGroup type 3 variable height equal xcm(upperGroup,z)-${wall_diameter} variable volumeFraction equal (${layerParticles})*${particleVolume}/(lx*ly*${height}) #particle distributions fix pts1 all particletemplate/sphere 15485863 atom_type 1 density constant 1 radius constant 0.5 fix pdd1 all particledistribution/discrete 15485867 1 pts1 1.0 fix ins all insert/pack seed 32452843 distributiontemplate pdd1 vel constant 0. 0. -2.0 & insert_every 2000 overlapcheck yes all_in yes particles_in_region ${layerParticles} region layerRegion fix integrate layerGroup nve/sphere # Assign parameters to groups of particles set type 1 diameter ${wall_diameter} set type 2 diameter ${wall_diameter} set type 3 diameter ${diameter} set type * density ${density} ######################################################################################### #output settings, include total thermal energy compute rke all erotate/sphere thermo_style custom step atoms ke c_rke vol thermo 1000 thermo_modify lost ignore norm no ######################################################################################### ##################################################################################################### # Coarse graining variable z_min equal xcm(lowerGroup,z) variable z_max equal xcm(upperGroup,z) variable Delta_z equal (${z_max}-${z_min})/${Nslice} #make a dump of particles and the stl file dump dmp all custom/vtk 200 post1/Shear_*.vtk id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius run 300000 # Shear: move up and low boundary in opposite horizontal direction with velocity "vel"timesteps fix slideFixUpper upperGroup move linear ${vel} 0 0 fix slideFixLower lowerGroup move linear -${vel} 0 0 run 100000