Chyetanya Kuntehttp://ckunte.net/log/rss.xmlckunte.net/log.Thu, 31 Jul 2014 21:03:13 GMTPyRSS2Gen-1.0.0http://blogs.law.harvard.edu/tech/rssS-N curveshttp://ckunte.net/log/2014/sn-curves<p>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): </p>
<pre><code>N = k1 * S^(-m)
</code></pre>
<p>The standard does describe it in its logarithmic form, which is as follows:</p>
<pre><code>log(N) = log(k1) - m * log(S)
</code></pre>
<p>and then it goes on to furnish its two sets of key components that form parts of the equation — highlighted below.</p>
<p><img class="screen" src="/log/images/sncurves1.png"></p>
<p>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.<sup id="fnref:1"><a class="footnote-ref" href="#fn:1" rel="footnote">1</a></sup></p>
<pre><code># 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
</code></pre>
<p>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.</p>
<p><img class="screen" src="/log/images/sncurves2.png"> </p>
<div class="footnote">
<hr />
<ol>
<li id="fn:1">
<p>It’s just awesome to punch in any equation in <a href="http://calca.io/">Calca</a>, 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. <a class="footnote-backref" href="#fnref:1" rev="footnote" title="Jump back to footnote 1 in the text">↩</a></p>
</li>
</ol>
</div>Chyetanya Kuntehttp://ckunte.net/log/2014/sn-curvesThu, 31 Jul 2014 00:00:00 GMTOS X on external volumehttp://ckunte.net/log/2014/imac-on-ext-vol<p>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 <code>Users</code> 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.</p>
<p>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 <a href="http://elementaryos.org">Elementary OS</a> that literally boots in 5 seconds and ready for use on a 2GB Intel <em>Atom</em> 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.)</p>
<p>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:</p>
<table>
<tr>
<th>Me</th>
<td>Hello. Hi, could you connect me to the service please, I have an issue with my iMac?</td>
</tr>
<tr>
<th>Operator</th>
<td>Hold on.</td>
</tr>
<tr>
<th>Service</th>
<td>Yes?</td>
</tr>
<tr>
<th>Me</th>
<td>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.</td>
</tr>
<tr>
<th>Service</th>
<td>You have to bring it in, and we take a look.</td>
</tr>
<tr>
<th>Me</th>
<td>If in case it is the hard drive, would you be able to replace the normal hard drive with an SSD?</td>
</tr>
<tr>
<th>Service</th>
<td>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.</td>
</tr>
<tr>
<th>Me</th>
<td>Not even if I am willing to pay for an SSD?</td>
</tr>
<tr>
<th>Service</th>
<td>No.</td>
</tr>
<tr>
<th>Me</th>
<td>I see. OK, thank you.</td>
</tr>
</table>
<p>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.</p>
<p><img class="screen" src="/log/images/imac-extdrive-1.jpg"></p>
<ol>
<li>Initiated Recovery with Cmd + R upon the boot sound — holding it until the system entered a recovery mode.</li>
<li>The recovery mode then downloaded OS X Basic system to perform necessary disk operations.</li>
<li>I attached an external hard drive and followed <a href="http://support.apple.com/kb/HT5911" title="OS X: Installing OS X on an external volume">these instructions</a>.</li>
<li>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.</li>
<li>Once installed, the iMac now automatically boots from the external drive.</li>
</ol>
<p><img class="screen" src="/log/images/imac-extdrive-2.jpg"></p>
<p>It’s been five days since, without fuss, and it’s working more or less as it has been for the last four years.</p>Chyetanya Kuntehttp://ckunte.net/log/2014/imac-on-ext-volSun, 27 Jul 2014 00:00:00 GMTOn allowable von Mises stresshttp://ckunte.net/log/2014/von-mises<p><em>(Preface: In response to a request for reference on allowable <a href="http://www.learnengineering.org/2012/12/what-is-von-mises-stress.html">von Mises</a> stress, I replied to a former colleague some months ago with the following.)</em></p>
<p>“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.</p>
<p>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:</p>
<pre><code>Ud = ((1 + v) / 3E) * (((fx - fy)^2 + (fy - fz)^2 + (fz - fx)^2) / 2)
</code></pre>
<p>Distortion energy for simple tension case at the time of failure is given as follows:</p>
<pre><code>Ud,simple = ((1 + v) / 3E) * Fy^2
</code></pre>
<p>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:</p>
<pre><code>sqrt(((fx - fy)^2 + (fy - fz)^2 + (fz - fx)^2) / 2) >= Fy
</code></pre>
<p>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.<sup id="fnref:1"><a class="footnote-ref" href="#fn:1" rel="footnote">1</a></sup></p>
<p>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 <a href="http://en.wikipedia.org/wiki/Cauchy_stress_tensor">deviatoric</a> strain energy is still proportional.</p>
<p>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.</p>
<p>People tend to derive its allowable (commonly used is <code>0.9 * Fy</code>, or 90% of yield strength of steel) by substituting allowable limits of normal and shear stresses in the equation, as below:</p>
<p>In the following, <code>fx</code> and <code>fy</code> are maximum allowable principal stresses, where as <code>txy</code> is the maximum allowable shear stress.</p>
<pre><code>fx = 0.6 * Fy
fy = 0.6 * Fy
txy = 0.4 * Fy
</code></pre>
<p>von Mises stress, <code>fvm</code> is as follows:</p>
<pre><code>fvm = (1 / sqrt(2)) * sqrt(fx^2 + fy^2 + 6 * txy^2) => 0.92 Fy
</code></pre>
<p>The allowable becomes interesting (reduces) when one of the principal stresses is negligible, e.g., if </p>
<pre><code>fy = 0
</code></pre>
<p>then,</p>
<pre><code>fvm => 0.81 Fy
</code></pre>
<p>If Shear stress is negligible, von Mises stress, <code>fvm</code> becomes:</p>
<pre><code>fy = 0.6 * Fy
txy = 0
fvm => 0.6 Fy
</code></pre>
<p>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.</p>
<div class="footnote">
<hr />
<ol>
<li id="fn:1">
<p>Dr. McGinty of <a href="http://www.continuummechanics.org/cm/vonmisesstress.html" title="von Mises stress">Continuum Mechanics</a> explains it much better than I ever could. <a class="footnote-backref" href="#fnref:1" rev="footnote" title="Jump back to footnote 1 in the text">↩</a></p>
</li>
</ol>
</div>Chyetanya Kuntehttp://ckunte.net/log/2014/von-misesMon, 21 Jul 2014 00:00:00 GMT