Photoelastic disk solver

[PDF] with resources on how to make photoelastic particles and build a polariscope.

This webpage contains a link to source code used to find contact forces in an array of photoelastic disks. This code generates estimates to contact forces for an array of disks, when used with appropriate settings. The algorithm uses random guesses to minimize the error between the input and fit image, then uses information from particles' neighbors (via Newton's 3rd law) to further reduce the error. Finally, a non-linear least squares optimization (minpack, a Levenberg-Marquardt algorithm) is used to find a local minimum to give a best guess.

Left is a pre-processed image of the force data, and the right is the fit result from the code. Particles are highlighted by red circles.

** PLEASE DESCRIBE THIS IMAGE ** ** PLEASE DESCRIBE THIS IMAGE **
If you use this code, please cite our paper:
James G. Puckett and Karen E. Daniels. "Equilibrating temperaturelike variables in jammed granular subsystems." Physical Review Letters 110: 058001 (2013) [Link]

Source code

A simple version of the code is located in the archive peDiscSolve.tar. A better maintained version will replace this soon.

Instructions

Download the link above, and uncompress the tar file with
tar xvzf peDiscSolve.tar
The archive contains the source files and a sample of the necessary input files.

file description
img1pe.cfg configuration file contain system information and location of input files
fsigmastress optic coefficient
px2mpixel to meter conversion
fMinminimum force for random guess
dtolif separation of circle edge is less than dtol, two discs are contacts
ihtolif max minus min of the input image intensity is greater than this, rescale between 0 and 1
g2tolif g2 of disc image is greater than this, and z>1, particle is NOT a rattler
g2fcrude approximation of g2 to magnitude of average contact forces
iterMaxmaximum initial guesses for each discs
nWavesnumber of times to use guesses from neighbors
nCyclesnumber of LM passes, expensive
lmErrorsuccessful fit if normalized error of disc is below this
optionsImagelocation/name of input image
optionsCenterlocation/name of input center/radius file
id x y r(in pixels)
optionsOutputlocation/name of output force estimates
id x y r(in meters) error z neighbors[z], beta[z], f[z], alpha[z]
optionsOutputImagelocation/name of output image file
numberOfThreadsmaximum number of threads to use
img1.jpg input image file
img1cn.dat space delimited text file containing location and radius of particles in pixels
id x y r
11 June 2012
James Puckett.