If you are writing a code for solving for the equations of mechanical equilibrium in an elastically inhomogeneous system, then there are several test cases that you might wish to run to make sure that your code is working fine. One of them is the stress fields of a circular hole in a plate which is under an applied uniaxial stress. Typically, the problem is solved in polar coordinates and the stresses at any given point (r,\theta) are given by the following expressions; see Elasticity (2nd Edition) by J R Barber, p. 109, Equations 8.74 — 8.76, for example — by the way, a sample chapter from the book is available for download here (pdf).

\sigma_{rr} = \frac{S}{2} \left( 1 - \frac{a^{2}}{r^{2}}\right) + \frac{S \cos(2\theta)}{2}\left(\frac{3 a^{4}}{r^{4}} - \frac{4 a^{2}}{r^{2}} + 1 \right) ;

\sigma_{r \theta} =  \frac{S \sin(2\theta)}{2}\left(\frac{3 a^{4}}{r^{4}} - \frac{2 a^{2}}{r^{2}} - 1 \right) ;

\sigma_{\theta \theta} = \frac{S}{2} \left( 1 + \frac{a^{2}}{r^{2}}\right) - \frac{S \cos(2\theta)}{2}\left(\frac{3 a^{4}}{r^{4}} + 1 \right) ;

where S is applied stress, and a is the radius of the cavity.

Here is a code written in C which will generate the data files for the stresses along the x- and y-axes from the center of the circular cavity of unit radius under an applied (tensile) uniaxial stress of unity. Note that you should have write permissions in the directory for the output data files to be written. Compile the code (gcc –lm circ_hole_under_uniaxial_stress.c) and execute the resultant binary a.out.

You may have to tweak the code a bit if you have different applied stress and/or cavity radius. The data files generated using the code can then be plotted using gnuplot; and, such plots of the stress fields are shown here: Stress fields along x-axis(pdf) and Stress fields along y-axis (pdf). The following aspects of the plots are worth noting:

  1. The \sigma_{12} components of the stress fields are zero both along x- and y-axes;
  2. When the applied stress is along the x-direction, the \sigma_{11} component of the stress at the cavity along the y-axis jumps to thrice the applied stress; and,
  3. Far away from the cavity, the stress fields in the plate are just the applied fields (as one would expect from St. Venant principle, which was used to obtain the stress fields in the first place).

Have fun!