Finite Element Analysis of Linear Elasticity
NCLab provides an interactive graphical module to simulate deformations and stresses in solid objects that are subject to acting forces or pressures. The module employs cutting edge computational methods and provides engineering-quality results. However, it was designed for non-experts – it is very easy to operate and it does not require any math.
The simulation consists of the following simple steps. Each one will be discussed in more detail below.
(1) Launch the module. You will be taken to the Geometry Editor (GE) where you can create any two-dimensional geometry of your choice using straight lines and circular arcs. The geometry can contain holes.
(2) Assign boundary markers (text strings) to selected boundary edges where you wish to fix displacements or apply forces or pressures.
(3) Proceed to Mesh Editor (ME) where you can generate the finite element mesh – a collection of small non-overlapping triangles and/or quads that fill the entire domain. These are the “finite elements” that gave the computational method its name. NCLab can either do this automatically for you, or you can create the mesh manually if you are an expert.
(4) Proceed to the Calculation section where you can specify material properties and assign boundary conditions. For each boundary marker specified previously you can assign either a fixed displacement, surface force, or surface pressure. Here you also can choose whether you wish to calculate stresses or displacements.
(5) Hit the Calculate button. This will send the computation to the cloud. When the results come back, they will be automatically visualized.
Note for experts
The module is based on the open source C++ Hermes library. The library employs cutting edge finite element technology including curved elements, higher-order elements, 8 modes of hp-adaptivity, dynamically changing hp-meshes for time-dependent problems and more. See Hermes documentation for more details. Not all features of Hermes have been implemented in this NCLab module yet, but its further expansion is planned.
Launch the module
1. Create a free account in NCLab if you do not have one yet, and log in.
2. Double-click on the Finite Element Analysis (FEA) module icon located on Desktop.
3. This will launch the FEA module:
4. Click on Solid Mechanics and then on Elasticity. A window with an empty work area will appear. This is the Geometry Editor (GE).
Create a geometry
Let’s create something simple – for example a steel rack with two shelves, 2 meters wide and 1.5 meters high. We start with setting the scale. By default, the grid step is one centimeter (0.01 m). This can be changed by right-clicking into the work area, or clicking on the Options button in the upper left corner.
Notice the Help menu on the bottom – this is where you can access more detailed instructions on using the GE.
The grid step in the x- and y-direction, dx and dy, can be changed by clicking on the upper row. Let’s change both values to 0.05 m.
Next let’s add points to the geometry. By pressing CTRL, GE will suggest the point on the grid that is closest to the mouse. The point is inserted via left mouse click. The point that is closest to the mouse is highlighted. Click on the image to enlarge it.
Next let’s add edges to the geometry. For this, switch to “Edges” in the same menu where we have previously set the values of dx and dy. Then upon pressing CTRL, GE will suggest edges. Left mouse click will add the suggested edge to the geometry. The edge that is closest to the mouse is highlighted.
So far so good? Next we will add markers to the pair of bottom edges where we want to fix displacements, and to the top surfaces of the shelves where we want to put some weight. Let’s start with the bottom ones. Simply click on each of them in order to select them. Selected edges are displayed in red.
Then click on the “Edit edges” button in the upper left corner and assign some name to the selected edges. For example, Let’s use “BOTTOM”.
Edges with assigned markers turn into solid black lines.
Analogously, select the two surface edges of the shelves and assign a marker “TOP” to them (not displayed here).
This geometry contains an inner closed loop. We need to tell whether it will serve for a different material or whether this will be a hole. In our case it is the latter. In the menu switch to Subdomains and then click into the hole. A simple menu will appear. Click on the checkbox to indicate that the subdomain is a hole.
This means that the mesh generator will not attempt to insert finite elements into this subdomain. The material marker can be left as “Undefined”.
We are now ready to proceed to mesh generation. Before that, you may want to export and save the XML geometry file via the menu.
Create finite element mesh
This is easier than it sounds. In the upper menu, click on “Mesh generation”. This will pass your geometry into Mesh Editor (ME).
Once in ME, when you hover the mouse over the domain, ME will start suggesting triangular elements for manual mesh creation. The type of elements can be switched to quads in the menu. But let’s not worry about this and let ME generate the mesh automatically. For this, open the ME menu either via right click or by clicking on “Options” in the upper left corner.
Hover the mouse over “Automesh” and then click on “Triangle”. Triangle is a high quality triangular mesh generator. A simple menu appears where you can set some parameters for Triangle.
Unless you know what you are doing, leave the angle unchanged. If you do not change the maximum triangle areas, then the generated triangles will have approximately the same size as one grid square. We do not have to make the triangles smaller here since in the Calculation module, we will be able to refine the mesh uniformly as many times as we like. The following figure shows the mesh as it comes back from the server.
Set up the calculation
Now we are ready to set up the calculation. Before doing this, you may want to export and save the mesh in XML format via the ME menu. Then, click on the “Calculation” button in the upper menu.
Starting with the upper part, you can select the polynomial degree of finite elements and the number of uniform mesh refinements. These are good defaults that you may leave unchanged if you are not exactly sure what they mean. Increasing either will make the calculation larger – the size of the calculation (number of unknowns) is shown on the right. In this case, the problem will have 19584 unknowns.
Below you will find the boundary markers “BOTTOM” and “TOP” that you previously defined in GE. Since the material is five-centimeters strong steel, let’s choose a large force, to see some deformations at all. We will set the vertical force to be -100000 N, which corresponds to 10 tons on each shelf.
For the marker BOTTOM, select “Zero displacement”. This will fix the position of the two bottom edges.
The pre-set material is steel, and it can be changed to a variety of other materials in the lower left menu. We will stay with steel for this computation.
The last two parameters that you can change are the gravitational acceleration (no need to change that) and the quantity that you desire to calculate. The options are von Mises stress, horizontal displacement, and vertical displacement. We will stay with the default von Mises stress. The following screenshot shows all values for the computation.
The calculation and data transfer will take some time, please be patient. The cloud server needs to solve a system of 19584 linear algebraic equations. This is the shorter part and it only takes two or three seconds. More time is needed to retrieve the results from the server. The results should be back in under 30 seconds. First of all, a brief summary of the convergence of the method.
This will probably not interest you unless you are an expert, so just close this window. The distribution of the von Mises stress, as well as (hugely magnified) deformation will be shown. Click on the image to magnify.
If you would like to see the displacements, return to the Calculation panel, choose horizontal or vertical displacement as the quantity to be calculated, and run the computation again.
Discussion of results
The maximum approximate value of the von Mises stress is close to 24 Mpa, which is well under the 250 MPa yield stress for steel.
It is also clearly visible where the von Mises stress is accumulated. These are the locations where the material is exposed to highest fatigue and where plastic deformations may occur at higher loading.
Keep in mind that our mesh was relatively coarse, so these results are not extremely accurate. But they are accurate enough to confirm that a 20 tons loading is not a problem at all for this massive steel shelf.
In order to get a better feeling about the accuracy of the results, return to the Calculation panel and decrease the number of uniform mesh refinements by one. This will yield a smaller problem, and less accurate results. However, if these less accurate results are close to the previous values, this means that the previous values were quite accurate.
On the other hand, if there is a large discrepancy, this means that you should refine the mesh and try again.
Once the results on a coarser and a finer mesh are very close to each other, you know that your results can be trusted.
This concludes our introduction to linear elasticity analysis in NCLab. To learn more, please read the Helps that are provided with the module.
If you are interested in programming, math, physics, CAD design or related areas, visit NCLab and learn more!