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.
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)
A simple version of the code is located in the archive peDiscSolve.tar. A better maintained version will replace this soon.
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.
11 June 2012
||configuration file contain system information and location of input files|
|fsigma||stress optic coefficient|
|px2m||pixel to meter conversion|
|fMin||minimum force for random guess|
|dtol||if separation of circle edge is less than dtol, two discs are contacts|
|ihtol||if max minus min of the input image intensity is greater than this, rescale between 0 and 1|
|g2tol||if g2 of disc image is greater than this, and z>1, particle is NOT a rattler|
|g2f||crude approximation of g2 to magnitude of average contact forces|
|iterMax||maximum initial guesses for each discs|
|nWaves||number of times to use guesses from neighbors|
|nCycles||number of LM passes, expensive|
|lmError||successful fit if normalized error of disc is below this |
|optionsImage||location/name of input image|
|optionsCenter||location/name of input center/radius file|
id x y r(in pixels)
|optionsOutput||location/name of output force estimates|
id x y r(in meters) error z neighbors[z], beta[z], f[z], alpha[z]
|optionsOutputImage||location/name of output image file|
|numberOfThreads||maximum number of threads to use|
||input image file
||space delimited text file containing location and radius of particles in pixels
id x y r