July 31, 2014

S-N curves

In order to set a suitable design criteria, I was looking to compare two classes of S-N curves for a fatigue design, viz., E and F2, and I could not find a handy plot to refer to. The basic S-N curve equation is as follows, which one may know is from Paris-Erdogan law (fracture mechanics):

N = k1 * S^(-m)

The standard does describe it in its logarithmic form, which is as follows:

log(N) = log(k1) - m * log(S)

and then it goes on to furnish its two sets of key components that form parts of the equation — highlighted below.

Playing with logarithms is fraught with error, as they are not the same as plain algebra — Leonhard Euler’s gift to the world, which reminds me I should jog my memory from high-school. Anyway, not to waste any time, I pulled Calca, punched in the basic equation, and then, case after case, I provided the variables from the table above. Calca, in turn provided me with an equation ready to be pasted in Grapher for a ready plot. Here are those equations for all available S-N curves.1

# Basic S-N curves
#
# Basic representative S-N curve is of the form (where, x is 
# Number of cycles, and y is S Stress range):

log(x) = a - m * log(y)

# a = log(k1).

# Seawater with adequate corrosion protection

For TJ curve:

a = 12.18 # for N =< 1.8E6
m = 3     # -- do --
y => -0.33 * log(x) + 4.06

a = 16.13 # for N > 1.8E6
m = 5     # -- do --
y => -0.2 * log(x) + 3.23

For B curve:

a = 14.61 # for N =< 1E5
m = 4     # -- do --
y => -0.25 * log(x) + 3.65

a = 17.01 # for N > 1E5
m = 5     # -- do --
y => -0.2 * log(x) + 3.4

For C curve:

a = 13.23 # for N =< 4.68E5
m = 3.5   # -- do --
y => -0.29 * log(x) + 3.78

a = 16.47 # for N > 4.68E5
m = 5     # -- do --
y => -0.2 * log(x) + 3.29

For D curve:

a = 11.78 # for N =< 1E6
m = 3     # -- do --
y => -0.33 * log(x) + 3.93

a = 15.63 # for N > 1E6
m = 5     # -- do --
y => -0.2 * log(x) + 3.13

For E curve:

a = 11.62 # for N =< 1E6
m = 3     # -- do --
y => -0.33 * log(x) + 3.87

a = 15.37 # for N > 1E6
m = 5     # -- do --
y => -0.2 * log(x) + 3.07

For F curve:

a = 11.40 # for N =< 1E6
m = 3     # -- do --
y => -0.33 * log(x) + 3.8

a = 15.0 # for N > 1E6
m = 5    # -- do --
y => -0.2 * log(x) + 3

For F2 curve:

a = 11.23 # for N =< 1E6
m = 3     # -- do --
y => -0.33 * log(x) + 3.74

a = 14.71 # for N > 1E6
m = 5     # -- do --
y => -0.2 * log(x) + 2.94

For G curve:

a = 11.00 # for N =< 1E6
m = 3     # -- do --
y => -0.33 * log(x) + 3.67

a = 14.33 # for N > 1E6
m = 5     # -- do --
y => -0.2 * log(x) + 2.87

For W1 curve:

a = 10.57 # for N =< 1E6
m = 3     # -- do --
y => -0.33 * log(x) + 3.52

a = 13.62 # for N > 1E6
m = 5     # -- do --
y => -0.2 * log(x) + 2.72

And finally, here’s the plot I was looking to generate. (The black lines are TJ, green lines are E, and red lines are F2 curves.) Grapher makes it easy to switch curves on and off — using check marks in the equation side bar.


  1. It’s just awesome to punch in any equation in Calca, even if it’s a complicated LHS in order to get a solved output. MathCAD cannot do this; Matlab cannot do this; and Maple cannot do this — at least the last time I checked. 

July 27, 2014

OS X on external volume

Maintaining hardware, the women in our lives have assumed, is a man’s job. So, just when the handyman (i.e., I) took his hands off maintaining the family iMac was when things started going south. It was barely a day after a full rsync backup of Users folder to an external FAT drive — no time to fuss around with permissions crap, and since SuperDuper! decided it couldn’t/wouldn’t (I don’t care) do this job; I am so not kidding! — that the computer’s hard drive failed completely. No recovery volume, no primary volume. Kaput, as they say. Lost NVAlt notes, kiddy journals in Day One, et al.

I installed OS X via the internet recovery, not knowing it was the hard drive, since Disk Utility gave the drive a clean chit, and it failed again the very next day. The boot would take 5 hours. My wife actually turned the iMac on, and for her dogged loyalty decided to wait for 5 hours just to print something, when I had already pulled out our backup computer running Elementary OS that literally boots in 5 seconds and ready for use on a 2GB Intel Atom D525 Processor — for heaven’s sake! (The iMac has 8GB and is Core i5 2.x something; for the household work, this is my new measure of efficiency.)

I called up a local authorized reseller, who also provides some sort of unofficial Genius support, and this is the conversation I had on the phone:

Me Hello. Hi, could you connect me to the service please, I have an issue with my iMac?
Operator Hold on.
Service Yes?
Me Hi. I am having booting issues with my 27” iMac (Mid 2010). It takes a long time to start. I’ve already formatted the drive, and reinstalled OS X afresh. The problem persists.
Service You have to bring it in, and we take a look.
Me If in case it is the hard drive, would you be able to replace the normal hard drive with an SSD?
Service No. We look at it first, get the serial of the component and order the same again. It will take two weeks to place the order.
Me Not even if I am willing to pay for an SSD?
Service No.
Me I see. OK, thank you.

At this point, I was about to trash the iMac, power it down, and leave it near the trash can, when I decided to have one last go to see if this thing could be powered by a USB powered external hard drive as its primary volume.

  1. Initiated Recovery with Cmd + R upon the boot sound — holding it until the system entered a recovery mode.
  2. The recovery mode then downloaded OS X Basic system to perform necessary disk operations.
  3. I attached an external hard drive and followed these instructions.
  4. Further, I also formatted the internal problematic hard drive to FAT, so the iMac wouldn’t mistake it every time as the first drive to boot from.
  5. Once installed, the iMac now automatically boots from the external drive.

It’s been five days since, without fuss, and it’s working more or less as it has been for the last four years.

July 21, 2014

On allowable von Mises stress

(Preface: In response to a request for reference on allowable von Mises stress, I replied to a former colleague some months ago with the following.)

“Allowable” von Mises stress is tricky, which is why no (college grade or professional) textbook and no Standard explicitly advocates one. The reason behind is obvious. von Mises stress check is not an universal formulae, because the outcome of this equation is governed by the relative magnitudes of components within.

von Mises stress combines normal and shear stress in a rather simplified manner to obtain a practical (theoretically less robust) approach to a notional limit. Distortion energy required per unit volume, Ud, for a general three-dimensional case is given in terms of principal stress values as follows:

Ud = ((1 + v) / 3E) * (((fx - fy)^2 + (fy - fz)^2 + (fz - fx)^2) / 2)

Distortion energy for simple tension case at the time of failure is given as follows:

Ud,simple = ((1 + v) / 3E) * Fy^2

Above two quantities can be connected using distortion energy, so the condition of failure will be as follows, in which the LHS forms the expression for von Mises stress:

sqrt(((fx - fy)^2 + (fy - fz)^2 + (fz - fx)^2) / 2) >= Fy

von Mises attempts to develop a yield criterion for ductile materials that can be applied to any complex three-dimensional loading condition, without regard for the mix of normal and shear stresses. It does this by simplifying a complex stress condition down to a single numerical scalar value, which is determined from a uniaxial tension test — convenient for lab test, and also the easiest. This convenience is why I think most people use it.1

However, one should keep in mind that the representative stress for uniaxial tension is not equal to the uniaxial tension stress, but is instead about 81%. This inconvenience is manipulated by factoring it up by 1.22 to make it equal; which is further accepted because the deviatoric strain energy is still proportional.

So, not quite the science, it is an empirical process with inherent errors and deviations — as you can imagine, and there’s no strict rule to conform to saying materials must or will yield in accordance with the von Mises yield criteria. The approximations in the form of results appear to work reasonably well, and for most purposes, people tend to use that as a good indicator. But it’s never a good idea to push safety critical elements to limit using this inconvenient yield criterion — for obvious reasons.

People tend to derive its allowable (commonly used is 0.9 * Fy, or 90% of yield strength of steel) by substituting allowable limits of normal and shear stresses in the equation, as below:

In the following, fx and fy are maximum allowable principal stresses, where as txy is the maximum allowable shear stress.

fx = 0.6 * Fy
fy = 0.6 * Fy
txy = 0.4 * Fy

von Mises stress, fvm is as follows:

fvm = (1 / sqrt(2)) * sqrt(fx^2 + fy^2 + 6 * txy^2) => 0.92 Fy

The allowable becomes interesting (reduces) when one of the principal stresses is negligible, e.g., if

fy = 0

then,

fvm => 0.81 Fy

If Shear stress is negligible, von Mises stress, fvm becomes:

fy = 0.6 * Fy
txy = 0

fvm => 0.6 Fy

Notice how low the allowable can drop when derived parametrically. One therefore needs to carefully choose how von Mises stress is used, because it depends upon the magnitudes of normal and shear stresses.


  1. Dr. McGinty of Continuum Mechanics explains it much better than I ever could.