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

Tutorial: multi-linear regression

The straight line is the linear regression of a function that takes scalars (x-values) as input and returns scalars (y-values) as output. (figure from GANFYD)

You’ve probably seen classical equations for linear regression, which is a procedure that finds the straight line that best fits a set of discrete points \{(x_1,y_1), (x_2,y_2),...,(x_N,y_N)\} . You might also be aware that similar formulas exist to find a straight line that is a best (least squares) fit to a continuous function y(x) .

The pink parallelogram is the multi-linear regression of a function that takes vectors (gray dots) as input and returns vectors (blue dots) as output

The bottom of this post provides a link to a tutorial on how to generalize the concept of linear regression to fit a function \vec{y}(\vec{x}) that takes a vector \vec{x} as input and produces a vector \vec{y} as output. In mechanics, the most common example of this type of function is a mapping function that describes material deformation: the input vector is the initial location of a point on a body, and the output vector is the deformed location of the same point. The image shows a collection of input vectors (initial positions, as grey dots) and a collection of output vectors (deformed locations as blue dots). The affine fit to these descrete data is the pink parallelogram. 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

Publication: Conjugate stress and strain caveats /w distortion and deformation distinction

The publication, “Caveats concerning conjugate stress and strain measures (click to download)” contains an analytical solution for the stress in a fiber reinforced composite in the limit as the matrix material goes to zero stiffness. Because the solution is exact for arbitrarily large deformations, it is a great test case for verification of anisotropic elasticity codes, and it nicely illustrates several subtle concepts in large-deformation continuum mechanics.

 

Also see related viewgraphs entitled “The distinction between large distortion and large deformation.”