Using the main file main/jam/bidisperseSinusoidalParticleJamming.cpp
, you can generate jammed packings (at a specified pressure) of bidisperse, purely repulsive, deformable particles with lobed shapes sets by a sinusoidally-varying preferred angle profile.
See some example jammed configurations below.
Particles drawn with empty circles are "rattlers" i.e. are not part of the force-bearing backbone of the packing.
Once you compile the main file, run the simulation using the generated binary file. The input parameters are:
NCELLS
: integer number of particlesnsmall
: integer number of vertices on small particles,n
on large particles is set by the 1.4:1.0 size ratio.calA0
: preferred shape parameter of all particles- defined as
calA0 = p_0^2/(4 * pi * a_0)
, wherep_0
anda_0
are the preferred perimeter and areas of the particles, respectively - Note that input
calA0
should be greater than or equal to 1 always.
- defined as
kl
: mechanical constant for perimeterkb
: mechanical constant for curvaturethA
: amplitude of sinusoidal preferred anglesthK
: wavenumber of sinusoidal preferred angles (sets number of lobes)Ptol
: pressure tolerance, jammed configs with final pressureP
satisfyPtol < P < 2 * Ptol
Ftol
: force tolerance of energy minimization protocolseed
: integer to seed random number generatorpositionFile
: path to file to store position data for jammed configuration.
To generate the above images, run a compiled binary bin.o
using
-
left:
./bin.o 12 24 1.04 1.0 0.01 3.0 3.0 1e-7 1e-12 1 pos.test
-
right:
./bin.o 12 24 1.20 1.0 0.01 10.0 5.0 1e-7 1e-12 1 pos.test
The final input to the main file, positionFile
(above called pos.test
), will store the positions of all vertices in the jammed state as well as some other useful information about the state of the system.
Each row in this file starts with a five-character keyword that denotes what information that row contains. The keywords are:
NEWFR
: starts frame- If the code prints multiple configurations, this can be used to identify the start of a new configuration.
NUMCL
: number of cellsPACKF
: packing fraction (particle areas / box area)BOXSZ
: box lengthsLx
andLy
STRSS
: components of the virial stress tensor, sorted asSxx
,Syy
,Sxy
CINFO
: information about cellVINFO
: information about vertexENDFR
: ends frame
There is one CINFO
row per cell. For a given cell mu
, the row is formatted as:
CINFO
nv
zc
zv
a0
a
p
where
nv
number of vertices on cellmu
zc
number of cell-cell contacts on cellmu
.zv
number of vertex-vertex contacts on cellmu
.a0
preferred area of cellmu
a
instantaneous area of cellmu
p
instantaneous perimeter of cellmu
There is also one VINFO
row per vertex. For a given vertex i
on cell mu
, the row is formatted as:
CINFO
mu
i
x
y
r
l0
t0
where mu
and i
refer to the cell and vertex indices, respectively, and
x
: x coordinate of vertexy
: y coorindate of vertexr
: radius of vertexl0
: preferred length of edge between verticesi
andi+1
t0
: preferred angle for angle centered on vertexi
To run an ensemble of jammed configurations on a remote cluster, use the following steps. Note: currently only supports clusters that use the Slurm workload manager.
To clone the repository to your remote cluster, ssh
onto the login node and use
>> git clone https://github.com/jacktreado/dpm.git
The bash script submit_bidisperseSinusoidalParticleJamming.sh submits an ensemble of simulations to the cluster as an array job.
NOTE: All data will be placed in project on Grace if using Yale HPC. If using a different file storage system, edit outputdir
to the desired location for data output.
- Once you have logged in to the remote cluster,
cd
to~/dpm/bash/jam
. - Use
>> cat submit_bidisperseSinusoidalParticleJamming.sh
to see the input list, which is:
# ====================
# INPUTS
# ====================
# 1. NCELLS
# 2. n
# 3. calA0
# 4. kb
# 5. thA (lobey preferred angle amplitude)
# 6. thK (lobey preferred angle wavenumber)
# 7. partition
# 8. time
# 9. number of runs (number of array entries, i.e. arraynum)
# 10. start seed (end seed determined by number of runs)
- Jobs are submitted with
>> bash submit_bidisperseSinusoidalParticleJamming.sh [INPUTS]
where[INPUTS]
must match the list above. See input description below.
NCELLS
: integer number of particlesn
: integer number of vertices on small particles (nsmall
above)calA0
: preferred shape parameter of all particleskb
: mechanical constant for curvaturethA
: amplitude of sinusoidal preferred anglesthK
: wavenumber of sinusoidal preferred angles (sets number of lobes)partition
: Slurm partition to queue + run jobstime
: Slurm time limitnumSeedsPerRun
: number of jobs in batch submissionstartSeed
: first seed in array, last seed isstartSeed + numSeedsPerRun
By default, data will be stored in your Grace project folder.
Each file will begin with lobes_
, with the parameters for the ensemble following. For example, an ensemble with NCELLS=16
, n=24
, calA0=1.10
, kb0.01
, thA=3.0
, and thK=3.0
will be stored in the directory
~/project/dpm/jam/lobes_N16_n24_calA01.10_kb0.01_thA3.0_thK3.0
Each file will begin with the string lobes_N16_n24_calA01.10_kb0.01_thA3.0_thK3.0
and will end with _seed[seedNumber].pos
, where seedNumber
denotes the seed used in the random number generator. This differentiates different members of the particular ensemble.
The MATLAB function processJammedDPMEnsemble will aggregate statistical data stored the ensemble folder (i.e. ~/project/dpm/jam/lobes_
) and save it to a .mat
file (see MATLAB documentation stored in ~/project/dpm/jam/matfiles
.
To submit this function to the cluster, use the Slurm script slurm_bidisperseSinusoidalParticleJamming.slurm. This script must be edited via the command line, so open the file using a command line editor like vim
or emacs
.
Slurm-specific options, like partition
or time
are controlled by the #SBATCH
headers. See this Slurm cheatsheet for all cluster options.
Simulation options are set by these variables:
# matlab input information
NCELLS=16
nsmall=24
calA0=1.10
kb=1.0
thA=3.0
thK=3.0
To process a given set of simulations, edit these variables & the Slurm headers appropriately, then use sbatch
to submit the script to the cluster:
>> sbatch slurm_bidisperseSinusoidalParticleJamming.slurm
A matfile
with ensemble statistics will be saved in the folder ~/project/dpm/jam/matfiles
with the same name as the ensemble folder.