1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
#!/bin/sh
# autopkgtest check
# (C) 2014 Anton Gladky
set -e
export OMPI_MCA_orte_rsh_agent=/bin/false
WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
mkdir post
cat <<EOF > in.packing
#Particle packing by insertion and successive growing of particles
atom_style granular
atom_modify map array
boundary m m m
newton off
communicate single vel yes
units si
region reg block -0.05 0.05 -0.05 0.05 0. 0.15 units box
create_box 1 reg
neighbor 0.002 bin
neigh_modify delay 0
#Material properties required for new pair styles
fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
#New pair style
pair_style gran model hertz tangential history #Hertzian without cohesion
pair_coeff * *
timestep 0.00001
fix xwalls1 all wall/gran model hertz tangential history primitive type 1 xplane -0.05
fix xwalls2 all wall/gran model hertz tangential history primitive type 1 xplane +0.05
fix ywalls1 all wall/gran model hertz tangential history primitive type 1 yplane -0.05
fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplane +0.05
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.00
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.15
#distributions for insertion
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 2500 radius constant 0.005
fix pts2 all particletemplate/sphere 1 atom_type 1 density constant 2500 radius constant 0.008
fix pdd1 all particledistribution/discrete 1. 2 pts1 0.3 pts2 0.7
#parameters for gradually growing particle diameter
variable alphastart equal 0.25
variable alphatarget equal 0.67
variable growts equal 50000
variable growevery equal 40
variable relaxts equal 20000
#region and insertion
group nve_group region reg
#particle insertion
fix ins nve_group insert/pack seed 5330 distributiontemplate pdd1 &
maxattempt 200 insert_every once overlapcheck yes all_in yes vel constant 0. 0. 0. &
region reg volumefraction_region \${alphastart}
#apply nve integration to all particles that are inserted as single particles
fix integr nve_group nve/sphere
#output settings, include total thermal energy
compute 1 all erotate/sphere
thermo_style custom step atoms ke c_1 vol
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
#insert the first particles
run 1
dump dmp all custom 350 post/dump*.packing id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
unfix ins
#calculate grow rate
variable Rgrowrate equal (\${alphatarget}/\${alphastart})^(\${growevery}/(3.*\${growts}))
print "The radius grow rate is \${Rgrowrate}"
#do the diameter grow
compute rad all property/atom radius
variable dgrown atom \${Rgrowrate}*2.*c_rad
fix grow all adapt \${growevery} atom diameter v_dgrown
#run
run \${growts}
#let the packing relax
unfix grow
run \${relaxts}
EOF
mpirun -np 2 liggghts < in.packing
liggghts < in.packing
echo "run: OK"
|