Skip to content Skip to navigation

Turning a Microscope into a Pressure Gauge

Did you know that your brighfield or confocal microscope can actually measure stresses in colloidal materials? Here we introduce our SALSA (Stress Assessment from Local Structrure Anisotropy) method determining the stresses in hard-sphere colloidal suspensions. By just using the particle positions, SALSA can effectively transform your micorscope into a local pressure gauge.

We have recently publishsed a paper showing how SALSA measures the nonlinear stresses generated by crystalline defects in 3D colloidal crystals. In that work, we are able to visulize the particle-level stress distributions surrounding vacancies, dislocations, and grain-boundaries!

The following video shows the principle of SALSA.

==========================================
============  SALSA Code Tutorial ============
==========================================

IMPORTANT! Before you start:
1. SALSA can only be used for calculating the stress field in hard-sphere systems!
2. The current version only calculates the 3D data. We are working on the 2D version.
3. Currently, only Matlab version is available.
4. SALSA requires a time series of particle positions for time-average. There shouldn’t be any significant structural change within the time series.

Download the SALSA code here. Add the corresponding Matlab paths, then open the file ‘runner_script.m’.
As you can see in this script, the SALSA calculation simply contains two steps: 1) calculating the fabric tensor and 2) turning it into stress fields.

Step 1:
Calculate the individual particle’s fabric tensor by calling
‘fabric_delta(fileIn, fileOut, cutoff, xyzScaling)’

Fabric tensor basically determines the colliding neighbor configuration of a particle. Specifically, it calculates the relative vectors between a selected-particle and its colliding neighbors, then sum the dyadic tensor (r.r) of these vectors.

Here,
fileIn’: path of a typical Crocker-Grier featuring output file, where columns 1 to 3 are x, y, z positions of the particles.
fileOut’: output file path. The output file contains, x, y, z for the first three columns. Columns 4 to 12 correspond to the xx, xy, xz, yx, yy, yz, zx, zy, zz components of the fabric tensor.
cutoff': the cutoff distance (in micron) for including the colliding neighbors. When cutoff is sufficiently small, the trace of fabric tensor is proportional to it. Therefore, the final pressure (~tracer/cutoff) is independent of the cutoff value.
xyzScaling’: 1X3 vector denoting the pixel-micron ratio of x, y, and z axes.

In the example ‘runner.script.m’, there are two nested for-loops. The inner for-loop (time) calculates the fabric of the time series of particle positions, since SALSA needs time-average to correctly determine the particle collision probability. Results are more accurate if you average over more frames. The outer loop (cutoff) calculates the fabric using different cutoff values. This helps us to evaluate whether we chose a reasonable cutoff or not, since the final pressure should be independent of this value. Normally, you would want a value around the location of the g(r) first peak. See Eric Week's website for a g(r) calculation tutorial. In our case, we had a particle diameter ~ 1.5 um, so we use this range 1.31< cutoff < 1.61. 

Step 2:
We multiply the calculated fabric tensors to all prefactors (thermal energy, particle size, and shell thickness), perform a time-average, and blur the averaged-tensor into continuous stress fields.

In this step, the “fabric2stress2D” function will read in all *.csv files in the folder of ‘dirPath’ (assuming they are the fabric results for time-average). Then the function will assign the values to a 3D grid, and smooth it into a continuous field.
gridRes’: the grid box size in micron. To begin, we can use 1/10 to the particle diameter.
pDia’: particle diameter in micron. This is crucial, cause it’ll directly affect the shell thickness (cutoff - pDia) value.
filterSize’: Gaussian filter size for the smoothing process (across how many grid boxes). If you set it to 10, it’ll be the particle size.

The final output are six M-files, the six independent stress components. Each M-file is a 3D matrix containing the stress value in Pascal. You can now use your favorite program (Matlab, mathematica, Python, etc …) to visualize these fields!

Category(s):