Blog

How to Calculate Stress and Strain with FEM Software?

FEM users often wonder how stress and strain are calculated and how these quantities are related to the nodes? Which of this is calculated first? An ad hoc answer to the question is strain. However, my answer is neither. Confused? In short, FEM calculates the displacements and reaction forces at the nodes. This is further on used to calculate the strains and then stresses. If you’re wondering what is the finite element method and how to learn it, I recommend you to first read these two blog articles: “What is FEA?” and “How can I learn FEA?

In order to understand how and when stress and strain are calculated, it is firstly important to understand how FEA software, including SimScale, functions. Most FEA software solutions have a similar workflow which is imperative for knowing how and when quantities are calculated.

Mathematics of the solution process in FEA

Traditionally, computers were designed to solve matrix equations. Numerical techniques have been developed over the last several decades motivated towards solving matrix equations, linear and nonlinear. Today, one can say that linear systems can definitely be solved. However, the same cannot be assumed for a nonlinear system of equations.

That apart, one of the aspects of efficient meshing includes assignment of node numbers such that the total bandwidth of the matrix is reduced to a minimum. Thus, equation systems are commonly stored in “Sparse” formats. For more details on sparse matrices and solvers, the blog article on “Direct and iterative solvers” is a recommended reading. An entire branch of applied mathematics is dedicated to improving solvers and algorithms for solving nonlinear system of equations.

The Process of FEA

So far it is understood that FEM converts a PDE into a system of equations. This system of equations (in matrix form) is solved using complicated algorithms and solvers. The question remains as to what is one solving for? Is one solving for displacements or velocities or strains or stresses or forces?

2D finite element mesh

Fig 01: A 2D finite element mesh (Source)

In short, we are generally solving for unknowns at the nodes. These unknowns are commonly displacements (in mechanical problems) or temperature (in thermal problems) and so on. Further quantities like stress and strain are obtained only as a part of post-processing. The overall process of FEA can be divided into several steps:

  • Preparation of geometry
  • Pre-processing
  • Post-processing for outputs
  • Analysis

In the coming section, each step involved in an FEA program and when / how stress and strain are calculated will be discussed in more detail. The overall procedure remains the same, irrespective of the software used.

Preparation of Geometry

Here, preparation of geometry is referred to as development of a CAD model. Most often, CAD models can be obtained through online platforms like GrabCAD. The considered CAD model needs to be a good representative of the reality. It is important to have caution as many of the models obtained from such forums have engravings. The original authors most often engrave their name on the CAD model.

The presence of such engravings can cause issues with automatic mesh generators and leads to extremely small or distorted meshes and subsequently errors in solution.

Pre-processing

Pre-processing involves several important issues starting from meshing. SimScale offers automatic mesh generators including the possibility for mesh refinements in layers or at regions around possible singularities.

The mesh creation is an integral part of preparations for the solution process. Meshing also implies to choosing an interpolation function. For example, as discussed in the blog article on “Modeling Elastomers Using FEM: Do’s and Don’ts“, second-order interpolation functions are preferred over first-order, especially for modeling hyperelastic materials. In contrast, using first-order tetrahedrons can be disastrous! Hence, choosing the right mesh and interpolation type governs the accuracy.

In addition, in choosing a mesh, pre-processing also involves choosing the appropriate boundary conditions, material properties, and constraints.

Solution process

The PDE governing the physics has been converted to an integral form and further on into a matrix form. The matrix contribution of each element is calculated and assembled into a global system of equations. This global equation is eventually sent to a solver where the solver solves for nodal displacements and reactions. While in linear problems, the solver solves for the displacements and reactions in one step, the nonlinear problems need several iterations to solve for the same.

stress and strain in a car crash test

Fig 02: Visualization of car crash (Source)

Once the nodal displacements have been solved, this is the time to actually calculate the stresses that are shown for plotting. A flag is generally used to inform the routine that the solution process is complete and stresses are being calculated for plotting.

Stress Projection Process

The stresses are calculated at each of the integration points in the element and later projected to the nodal points as illustrated in Fig 03.

Stress and strain, Illustration of stress projection from Gauss points to the nodal points. A FEM mesh (left) and its blown up image showing the projection of stress (right)

Fig 03: Illustration of stress projection from Gauss points to the nodal points. A FEM mesh (left) and its blown up image showing the projection of stress (right)

Fig. 03 illustrates for a simple case of a four-noded quadrilateral element with 2×2 quadrature scheme. Irrespective of the type of element and integration scheme used, the overall procedure remains the same. The displacements are known at the nodal points. Using the interpolation (or ansatz or shape) functions, the displacements are first calculated at the integration points.

Following this, the kinematic quantities like strains and deformation gradients are calculated at the Gauss point. Further on, using these kinematical quantities and material properties, the stress is calculated at the Gauss point. Further on, using the interpolation function for that element, this stress is projected to the nodes.

Now, as shown in Fig. 03, each projection might lead to slightly (or even completely) different values of stresses at the node. Most FEA programs perform a nodal averaging such that the projected values are averaged and only one value is considered for each node. This is shown in red in Fig. 03.

Here, caution needs to be demonstrated. Most often, especially in fracture problems, displacement plots are discussed rather than stresses. Due to the above averaging, though stresses might appear smooth, there might be significant jumps and the mesh might not be good enough to obtain stress convergence! Hence, though averaging is a nice tool for colorful pictures, switching off averaging could demonstrate if the mesh leads to reasonable results.

Conclusion: Calculating Stress and Strain

To summarize the discussions, displacements and reaction forces are the fundamental quantities that are being solved in any FEM computation. Both stresses and strains are calculated as post-processing quantities once a converged solution is obtained for the nodal displacements.

Stress and strain are calculated at the Gauss points and further on projected to the nodal points. Here, one needs to exercise extreme caution since most FEA software solutions perform a nodal averaging. Such averaging will hide any mesh effects that need to be addressed for accurate solutions.

SimScale is the world's first cloud-based simulation platform, enabling you to perform CFD, FEA, or thermal analyses. Sign up for the 14-day free trial and join the community of 70 000 engineers and designers. No payment data required.