# Python script for static deflection of a beam using finite elements

Below we present a simple script for calculating the static deflection of a beam with a variety of boundary conditions and load types.  The finite element method is implemented using Python with the numpy library and plot are made using matplotlib.  This code can be easily modified for other boundary conditions or loads.

# Quick calculations for radiation heat transfer

In certain cases, radiation heat transfer is important to include in one’s calculations.  Radiation heat transfer is nonlinear because the heat flux is proportional to the temperature to the fourth power.  I find two frequent simplifications for radiation problems quite useful.  The first approximation is to linearize and create an effective convection coefficient.  The second approximation is the effective emissivity for two bodies which are transferring heat between each other via radiation.

# Optimal 3-point mounts for square and rectangular plates

Below is a table of support positions for three-point mounts of rectangular plates to maximize the first natural frequency of vibration.  If one has a plate with an aspect ratio not listed, then one can interpolate between the values.  We will publish a more detailed post giving methods and results at a later date.

# Young’s modulus for silicon

Silicon is one of the most commonly encountered materials in precision engineering (including silicon wafers and MEMS), but it poses a challenge in modeling as its material properties are anisotropic (orthotropic to be exact), meaning that the stiffness varies depending on the direction of loading relative to the crystal orientation.

A great reference for its elastic properties including when isotropic approximations are appropriate is the paper by Hopcroft et al (M. A. Hopcroft, W. D. Nix, and T. W. Kenny, “What is the Young’s Modulus of Silicon?,”
Journal of Microelectromechanical Systems, vol. 19, pp. 229-238, 2010.  link to researchgate https://www.researchgate.net/publication/224124507_What_is_the_Young%27s_Modulus_of_Silicon).  Additionally Hopcroft’s course notes are useful http://micromachine.stanford.edu/~hopcroft/Publications/Hopcroft_E_Si_v1p1.pdf

# Identical natural frequencies of beams with different boundary conditions

One somewhat surprising result in the vibration of beams is that the natural frequencies of a free-free beam are identical to those of a clamped-clamped beam. Our intuition may tell us that the fixed-fixed beam is stiffer and should have higher natural frequencies but while the fixed beam is indeed statically stiffer, the natural frequencies are identical. As we show below, fixed and free boundary conditions result in the equivalent characteristic equations to find the natural frequency because they differ simply by two differentiations. Similarly, pinned and sliding boundary conditions also have the same equivalence. As a result many pairs of boundary conditions can result in identical sets of natural frequencies but with clearly different mode shapes.

# Quick and easy way to calculate the area of any polygon — the shoelace formula

In my spare time, I enjoy watching a number of math channels on youtube, such as Numberphile, PBS infinite series,  and standupmaths.  Typically, most of the videos are about number theory or prime numbers and are not very useful to a mechanical engineer.  However, this video from mathologer discusses the shoelace formula for calculating the area of a polygon, which an engineer may find useful for calculating the area of a fluid channel or a beam section (see also the wikipedia entry for the shoelace formula).  It works for any polygon that does not intersect itself.  It may be useful in doing quick hand calculations, and it is easily scripted into a function for a computer to calculate.  One could also make a straight line approximation of a shape with curved lines to estimate its area.

# Automating ANSYS APDL Execution Using Python

We often want to incorporate a finite-element solve into a larger program for design automation or optimization. The example below includes a Python function that runs an APDL script and then checks the output file for errors.

# Good Reference for Fracture Mechanics of Ceramics

Ceramics are an important material for precision engineers.  Ceramics are often used for their low coefficients of thermal expansion, high Young’s modulus, as well as other properties.  The text Ceramics: Mechanical Properties, Failure Behaviour, Materials Selection by Dietrich Munz and Theo Fett (google books link, amazon.com link) is a very good reference for ceramics and for their failure in particular.  The text derives formulas for lifetime (time to failure) under constant and cyclic loads.  The text also provides extensive information on materials testing, statistical methods (Weibull distributions), and probability of fracture for ceramics.

# Eddy Currents Induced by Motion Through a Magnetic Field

In a previous post, we built a quick model for eddy currents in a plate stationary in a time-varying magnetic field. Here we examine the induced currents and damping force that result from motion of the plate relative to the magnetic field.

# Eddy Currents Induced by a Time-Varying Magnetic Field

In electric machines, there are two common causes of eddy currents: (1) time-varying currents in coils, and (2) motion of conductors relative to sources of magnetic field. In this post, we show how to estimate the current density arising from a time-varying magnetic field passing through a plate.