[liggghts] 01/02: Fix autopkgtest. (Closes: #747339)
Anton Gladky
gladk at moszumanska.debian.org
Sun May 18 10:23:43 UTC 2014
This is an automated email from the git hooks/post-receive script.
gladk pushed a commit to branch master
in repository liggghts.
commit 1b265e0869f04a3039ea4839584194add5d6fc26
Author: Anton Gladky <gladk at debian.org>
Date: Sat May 17 22:53:17 2014 +0200
Fix autopkgtest. (Closes: #747339)
---
debian/tests/control | 2 +-
debian/tests/heat | 96 +++++++++++++++++++++++++++++++++++++++++++-
debian/tests/packing | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 205 insertions(+), 3 deletions(-)
diff --git a/debian/tests/control b/debian/tests/control
index bd2f28c..c7e6c4e 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,2 @@
-Tests: heat
+Tests: heat packing
Depends: liggghts
diff --git a/debian/tests/heat b/debian/tests/heat
old mode 100644
new mode 100755
index b5731de..e6d2c91
--- a/debian/tests/heat
+++ b/debian/tests/heat
@@ -1,7 +1,99 @@
#!/bin/sh
+# autopkgtest check
+# (C) 2014 Anton Gladky
+
set -e
export OMPI_MCA_orte_rsh_agent=/bin/false
-liggghts < ./examples/examples/LIGGGHTS/Tutorials_public/heatTransfer_1/in.heatGran
-mpirun -np 2 liggghts < ./examples/examples/LIGGGHTS/Tutorials_public/heatTransfer_1/in.heatGran
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+mkdir post
+
+cat <<EOF > in.heatGran
+#Heat transfer example
+
+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.7
+fix m4 all property/global coefficientFriction peratomtypepair 1 0.05
+#fix m5 all property/global characteristicVelocity scalar 2.
+
+
+#New pair style
+pair_style gran model hertz tangential history #Hertzian without cohesion
+pair_coeff * *
+
+timestep 0.000025
+
+fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
+
+fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
+fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.15
+fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 0.05 0. 0.
+
+#heat transfer
+fix ftco all property/global thermalConductivity peratomtype 100.
+fix ftca all property/global thermalCapacity peratomtype 10.
+fix heattransfer all heat/gran initial_temperature 300.
+
+#region of insertion
+region bc cylinder z 0. 0. 0.045 0.00 0.15 units box
+
+#particle distributions and insertion
+fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 8000 radius constant 0.004
+fix pdd1 all particledistribution/discrete 1. 1 pts1 1.0
+
+fix ins all insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. -0.3 &
+ insert_every once overlapcheck yes all_in yes volumefraction_region 0.25 region bc
+
+#fix ins nve_group pour/legacy 500 1 1 vol 0.7 1000 diam 0.008 0.008 dens 8000 8000 vel 0. 0. 0. 0. -0.3 region bc
+
+#apply nve integration to all particles
+fix integr all nve/sphere
+
+#output settings, include total thermal energy
+compute rke all erotate/sphere
+thermo_style custom step atoms ke c_rke f_heattransfer vol
+thermo 1000
+thermo_modify lost ignore norm no
+compute_modify thermo_temp dynamic yes
+
+#insert the first particles so that dump is not empty
+run 1
+dump dmp all custom 800 post/dump*.heatGran id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius f_Temp[0] f_heatFlux[0]
+unfix ins
+
+#let the particles settle
+run 20000 upto
+
+#set particle temperature for half the bed
+region halfbed block 0 INF INF INF INF INF units box
+set region halfbed property/atom Temp 800.
+
+#run to see heat transfer
+run 50000 upto
+
+EOF
+
+mpirun -np 2 liggghts < in.heatGran
+liggghts < in.heatGran
+echo "run: OK"
diff --git a/debian/tests/packing b/debian/tests/packing
new file mode 100755
index 0000000..227cec3
--- /dev/null
+++ b/debian/tests/packing
@@ -0,0 +1,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"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/liggghts.git
More information about the debian-science-commits
mailing list