Resource: Perfect triples, “nice” unit vectors, and “nice” orthogonal matrices

“NICE” lists:

Perfect Triangles

Perfect Triangles

Have you ever noticed that textbooks often involve so-called 3-4-5 triangles? They do that to make the algebraic manipulations easier for students.  If the two legs of a right triangle are of length 3 and 4, then the hypotenuse (found from the Pythagorean theorem) has a length of 5, which is “nice” in the sense that it is an integer rather than an irrational square root that more typically comes from solving the Pythagorean theorem. As discussed in many elementary math sites (such as MakingMathematics.org), another example of a “nice” triangle is the 5-12-13 triangle, since 5^2+12^2=13^2 .

The external links in this posting contain a list of more of these so-called perfect triples of integers \{a,b,c\} for which a^2+b^2=c^2 . Perfect triples are also used to create “nice” 2D unit vectors whose components are each rational numbers (instead of involving irrational square roots from the normalization process). For example, the classic unit vector based on the 3-4-5 perfect triple is simply \{\frac{3}{5},\frac{4}{5}\} . Continue reading

WordPress Tutorial: How to Re-size and Crop Pictures

After you have uploaded a picture, there may be a chance that you will want to crop or re-size it to make it look better; you may also want to change what portion of the image shows up in the thumbnail. The following steps will help you with these goals:

1)In the media library, click on the image you would like to edit. On the next screen click the “Edit Image” button underneath the picture.

2)Select whether the changes you are about to make should apply to the full image or the thumbnail.

3)Drag a box, on the image, over the part that you would like to keep (or show up in the thumbnail).

4)Click the crop icon above the image. This will then show you what the cropped image looks like.

5)Once satisfied with the cropping, click the save button below the image. This will take you out of the edit page.

6)Finally, click the update image button and you are done.

Red numbers correspond with the steps above

However, if you are editing an image that you have already put in a post you will need to take one additional step. Go into the edit page for the post and remove the current image, then insert the image you just edited. It should carry over the previous caption/settings. As always, check the post to make sure it looks good and you are done!

Verification Research: The method of manufactured solutions (MMS)


MMS stands for “Method of Manufactured Solutions,” which is a rather sleazy sounding name for what is actually a respected and rigorous method of verifying that a finite element (or other) code is correctly solving the governing equations.

A simple introduction to MMS may be found on page 11 of The ASME guide for verification and validation in solid mechanics. The basic idea is to analytically determine forcing functions that would lead to a specific, presumably nontrivial, solution (of your choice) for the dependent variable of a differential equation.  Then you would verify a numerical solver for that differential equation by running it using your analytically determined forcing function.  The difference between the code’s prediction and your selected manufactured solution provides a quantitative measure of error.

Continue reading

Stress State Analysis Python Script

General Mohr's Circle for 3D Stress State

General Mohr's Circle for 3D Stress State

Have you ever had a stress state and wanted to simply get the principal stresses without finding a web applet to do it for you? Or maybe you want to know what the deviatoric part of the stress is without finding and using a copy of MATLAB or Mathematica to do the matrix operations for you? This script was written to help answer those questions in as little time as possible with an intuitive command line input syntax.

This script was written in Python (www.python.org) and makes use of the NumPy module (www.numpy.scipy.org). Python is a fairly platform independent programming language with more and more programs being dependent on it on all platforms. The NumPy module adds significant scientific computation power to the language by adding N-dimensional matrix support, matrix operations, LAPACK functions (matrix inverse, eigenvalue and eigenvector decompositions, etc.), among other things.

You can download the script here.

Continue reading