First of all, please take this text as a written chat between you an me, i.e. an average engineer that have already taken the journey from college to performing actual engineering using finite element analysis and has something to say about it. Picture yourself in a coffee bar, talking and discussing concepts and ideas with me. Maybe needing to go to a blackboard (or notepad?). Even using a tablet to illustrate some three-dimensional results. But always as a chat between colleagues.
Please also note that I am not a mechanical engineer, although I shared many undergraduate courses with some of them. I am a nuclear engineer with a strong background on mathematics and computer programming. I went to college between 2002 and 2008. Probably a lot of things have changed since then---at least that is what these millenials guys and girls seem to be boasting about---but chances are we all studied solid mechanics and heat transfer with a teacher using a piece of chalk on a blackboard and students writing down notes with pencils on paper sheets. And there is really not much that one can do with pencil and paper regarding mechanical analysis. Any actual case worth the time of an engineer need to be more complex than an ideal canonical case with analytical solution.
We will be swinging back and forth between a case study about fatigue analysis in piping systems of a nuclear power plant and more generic and even romantic topics related to finite elements and computational mechanics. These latter regressions will not remain just as abstract theoretical ideas. Not only will they be directly applicable to the development of the main case, but they will also apply to a great deal of other engineering problems tackled with the finite element method.
Finite elements are like magic to me. I mean, I can follow the whole derivation of the equations, from the strong, weak and variational formulations of the equilibrium equations for the mechanical problem (or the energy conservation for heat transfer) down to the algebraic multigrid preconditioner for the inversion of the stiffness matrix passing through Sobolev spaces and the grid generation. Then I can sit down and program all these steps into a computer, including the shape functions and its derivatives, the assembly of the discretised stiffness matrix assembly, the numerical solution of the system of equations and the computation of the gradient of the solution. Yet, the fact that all these a-priori unconnected steps once gets a pretty picture that resembles reality is still astonishing to me.
Again, take all this information as coming from a fellow that has already taken such a journey from college’s pencil and paper to real engineering cases involving complex numerical calculations. And developing, in the meantime, both an actual working finite-element back-end and front-end from scratch.
There are some useful tricks that come handy when trying to solve a mechanical problem. Throughout this text, I will try to tell you some of them.
One of the most important ones is using your imagination. You will need a lot of imagination to “see“ what it is actually going on when analysing an engineering problem. How the loads “press” one element with the other, how the material reacts depending on its properties, how the nodal displacements generate stresses (both normal and shear), how results converge, etc. And what these results actually mean besides the pretty-coloured figures.1 This journey will definitely need your imagination. We will see equations, numbers, plots, schematics, 3D geometries, interactive 3D views, etc. Still, when the theory says “thermal expansion produces linear stresses” you have to picture in your head three little arrows pulling away from the same point in three directions, or whatever mental picture you have about what you understand are thermally-induced stresses. What comes to your mind when someone says that out of the nine elements of the stress tensors there are only six that are independent? Whatever it is, try to practice that kind of graphical thoughts with every concept.
Another heads up is that we will dig into some math. Probably it would be be simple and you would deal with it very easily. But probably you do not like equations. No problem! Just ignore them for now. Read the text skipping them, it should work. It is fine to ignore math (for now). But, eventually, a time will come in which it cannot (or should not) be avoided. Here comes another experience tip: do not fear mathematics. Even more, keep exercising. You have used differences of squares in high school. You know (or at least knew) how to integrate by parts. Remember what Laplace transforms are used for? Once in a while, perform a division of polynomials using Ruffini’s rule. Or compute the second derivative of the quotient of two functions. Whatever. It should be like doing crosswords on the newspaper. Grab those old physics college books and read the exercises at the end of each chapter. It will pay off later on.
Piping systems in sensitive industries like nuclear or oil & gas should be designed and analysed following the recommendations of an appropriate set of codes and norms, such as the ASME\ Boiler and Pressure Vessel Code. This code of practice (book) was born during the late\ XIX century, before finite-element methods for solving partial differential equations were even developed. And much longer before they were available for the general engineering community. Therefore, much of the code assumes design and verification is not necessarily performed numerically but with paper and pencil (yes, like in college). However, it still provides genuine guidance in order to ensure pressurised systems behave safely and properly without needing to resort to computational tools. Combining finite-element analysis with the ASME code gives the cognisant engineer a unique combination of tools to tackle the problem of designing and/or verifying pressurised piping systems.
In the years following Enrico Fermi’s demonstration that a self-sustainable fission reaction chain was possible (actually, in fact after WWII was over), people started to build plants in order to transform the energy stored within the atoms nuclei into usable electrical power. They quickly reached the conclusion that high-pressure heat exchangers and turbines were needed. So they started to follow the ASME\ Boiler and Pressure Vessel Code. They also realised that some requirements did not fit the needs of the nuclear industry. But instead of writing a new code from scratch, they added a new chapter to the existing body of knowledge: the celebrated ASME Section\ III.
After further years passed by, engineers (probably the same people that forked section\ III) noticed that fatigue in nuclear power plants was not exactly the same as in other piping systems. There were some environmental factors directly associated to the power plant that was not taken into account by the regular ASME code. Again, instead of writing a new code from scratch, people decided to add correction factors to the previously amended body of knowledge. This is how knowledge evolves, and it is this kind of complexities that engineers are faced with during their professional lives. We have to face it, it would be a very hard work to re-write everything from scratch every time something changes.
figure of a CAD pipe system RO-02 12D-24 33410
In each of the countries that have at least one nuclear power plant there exists a national regulatory body who is responsible for allowing the owner to operate the reactor. These operating licenses are time-limited, with a range that can vary from 25 to 60 years, depending on the design and technology of the reactor. Once expired, the owner might be entitled to an extension, which the regulatory authority can accept provided it can be shown that a certain (and very detailed) set of safety criteria are met. One particular example of requirements is that of fatigue in pipes, especially those that belong to systems that are directly related to the reactor safety.
How come that pipes are subject to fatigue? Well, on the one hand and without getting into many technical details, the most common nuclear reactor design uses liquid water as coolant and moderator. On the other hand, nuclear power plants cannot by-pass the thermodynamics of the Carnot cycle, and in order to maximise the efficiency of the conversion between the energy stored in the uranium nuclei into electricity they need to reach temperatures as high as possible. So, if we want to have liquid water in the core as hot as possible, we need to increase the pressure. The limiting temperature and pressure are given by the critical point of water, which is around 374ºC and 22\ MPa. It is therefore expected to have temperature and pressures near those values in many systems of the plant, especially in the primary circuit those that directly interact with it, such as pressure and inventory control system, decay power removal system, feedwater supply system, emergency core-cooling system, etc.
Nuclear power plants are not always working at 100% power. They need to be maintained and refuelled, they may undergo operational transients, they might operates at a lower power due to load following conditions, etc. These transient cases involved changes both in temperatures and in pressures that the pipes are subject to, which in turn give rise to changes in the stress tensor of the pipes. As the transients are postulated to occur conservatively cyclically during a number of times during the life-time of the plant (plus its extension period), mechanical fatigue in these piping systems arise especially at the interfaces between materials with different thermal expansion coefficients.
Mechanical systems can fail due to a wide variety of reasons. The effect known as fatigue can create, migrate and grow microscopic cracks at the atomic level, called dislocations. Once these cracks reach a critical size, then the material fails catastrophically even under stresses lower than tensile strength limits. There are not complete mechanistic models from first principles which can be used in general situations, and those that exist are very complex and hard to use. Instead, using an experimental approach very much like the Hooke Law experiment, the stress amplitude of a periodic cycle can be related to the number of cycles where failure by fatigue is expected to occur. For each material, this dependence can be obtained using normalised tests and a family of “fatigue curves” for different temperatures can be obtained.
fatigue curve
It should be stressed that the fatigue curves are obtained in a particular load case, namely purely-periodic one-dimensional, which is not directly generalised to other three-dimensional cases. The application of the curve data implies a set of simplifications and assumptions that are translated into different possible “rules” for composing real-life cycles. There also exist two safety factors which increase the stress amplitude and reduce the number of cycles respectively. All these intermediate steps render the analysis of fatigue into a conservative computation scheme. Therefore, when a fatigue analysis performed using the fatigue curve method arrives at the conclusion that “fatigue is expected to occur after ten thousand cycles” what it actually means is “we are sure fatigue will not occur before ten thousand cycles, yet it may not occur before one hundred thousand or even more.”
So, let us start our journey. Our starting place: undergraduate solid mechanics courses. Our goal: to obtain the internal state of a solid subject to a set of movement restrictions and loads (i.e. to solve the solid mechanics problem). Our first step: Newton’s laws of motion. For each of them, all we need to recall here is that
We have to accept that there is certain intellectual beauty when complex stuff can be expressed in simple term. Yet, from now on, everything can be complicated at will. We can take the mathematical path like D’Alembert and his virtual displacements ideas (in his mechanical treatise, D’Alembert brags that he does not need to use a single figure throughout the book). Or we can go graphical following Cullman. Or whatever other logic reasoning to end up with a set of actual equations which we need to solve in order to obtain engineering results.
In any case, what we should understand (and imagine) is that external forces lead to internal stresses. And in any three-dimensional body subject to such external loads, the best way to represent internal stresses is through a $3 \times 3$ stress tensor. This is the first point in which we should not fear math. Trust me, it will pay back later on.
Does the term tensor scare you? It should not. A tensor is just a slightly more complex vector, and I assume you are not afraid of vectors. If you recall, a vector somehow generalises the idea of a scalar in the following sense: a given vector $\vec{v}$ can be projected into any direction $\vec{n}$ to obtain a scalar $p$. We call this scalar $p$ the “projection” of the vector $\vec{v}$ in the direction $\vec{n}$. Well, a tensor can be also projected into any direction $\vec{n}$. The difference is that instead of a scalar, a vector is now obtained.
Let me introduce then the three-dimensional stress tensor:
$$ \begin{bmatrix} \sigmax & \tau{xy} & \tau{xz} \ \tau{yx} & \sigma{y} & \tau{yz} \ \tau{zx} & \tau{zy} & \sigma_{z} \ \end{bmatrix} $$
It looks (and works) like a regular $3 \times 3$ matrix. Some brief comments about it:
What does this all have to do with mechanical engineering? Well, once we know what the stress tensor is for every point of a solid, in order to obtain the internal forces per unit area acting in a plane passing through that point and with a normal given by the direction $\vec{n}$, all we have to do is “project” the stress tensor through $\vec{n}$. In plain simple words:
Let us proceed to a our second step, and consider an infinite pipe subject to uniform internal pressure. Actually, we are going to solve the mechanical problem on an infinite hollow cylinder, which looks like pipe. This case is usually tackled in college courses, and chances are you already solved it. Actually, the first (and simpler) problem is the “thin cylinder problem.” Then, the “thick cylinder problem” is introduced, which is slightly more complex. Nevertheless, it has an analytical solution.
dnl google thin walled pressure vessel strain
equilibrium equation
stresses solution
Besides infinite pipes (both thin and thick), spheres and a couple of other geometries, there are not other cases for which we can obtain analytical expressions for the elements of the stress tensor. To get results for a solid with real engineering interest, we need to use numerical methods to solve the equilibrium equations. It is not that the equations are hard per se. It is that the mechanical parts we engineers like to design (which are of course better than cylinders and spheres) are so intricate that render simple equations into monsters which are unsolvable with pencil and paper. Hence, finite elements enter into the scene.
But before turning our attention into finite elements (and leaving college, at least undergraduate) it is worth some time to think about other alternatives. Are we sure we are tackling your problems in the best possible way? I mean, not just engineering problems. Do we take a break, step back for a while and see the whole picture looking at all the alternatives so we can choose the best cost-effective one?
There are literally dozens of ways to numerically solve the equilibrium equations, but for the sake of brevity let us take a look at the three most famous ones. Coincidentally, they all contain the word “finite” in their names. We will not dig into them, but it is nice to know they exist. We might use
Each of these methods (also called schemes) have of course their own features, pros and cons. They all exploit the fact that the equations are easy to solve in simple geometries (say a cube). Then the actual geometry is divided into a yuxtaposition of these cubes, the equations are solved in each one and then a global solution is obtained by sewing the little simple solutions one to another. The process of dividing the original domain into simple geometries is called discretization, and the resulting collection of these simple geometries is called a mesh or grid. They are composed of volumes, called cells (or elements) and vertices called nodes. Now, grids can be either
a. structured, or b. unstructured
[Figure@fig:grids] illustrate how the same domain can be discretized using these two kind of grids. In the first case, we could identify any single cell by using just two indexes. We could even tell which nodes define each cell just from these indexes. In the second case, we need an explicit list first to know how many cells there are. Even more, there is no way to link the nodes with the cells (back and forth) other than having a list of nodes and cells. Again, there are pros and cons for each of the grid types such as simplicity, flexibility, etc. In general, unstructured grids and better represent a certain geometry with the same number of cells. Structured grids suffer the so-called “staircase effect” that makes the unusable for discretizing mechanical parts.
The first of the three methods is based on approximating derivative (i.e. differentials) by incremental quotients (i.e. differences). The second one heavily relies on geometrical ideas rather than on pure mathematical grounds. Finally, our beloved finite elements are the most “mathematical” ones. Actually, a complete derivation of the finite element method can be written in a textbook without requiring a single figure, just like D’Alembert did more than two centuries ago. In any case, it is important to note that finite differences and elements compute results at the nodes of a mesh, whilst finite volumes compute results at the cells of a mesh. Finally, any method may be used in structured grids but only finite elements and volumes are especially suited for working with unstructured grids.
There are technical reasons that justify why the finite element method is the king of mechanical analysis. But that does not mean that other methods may be employed. For instance, fluid mechanics are better solved using finite volumes. And further other combinations may be found in the literature.
Before proceeding, I would like to make two comments about common nomenclature. The first one is that if we exchanged the words “volumes” and “elements” in all the written books and articles, nobody would note the difference. There is nothing particular in both theories that can justify why finite volumes use volumes and finite elements use elements. Actually volumes and elements are the same geometric constructions. The names were randomly assigned.
The second one is more philosophical and refers to the word “simulation” which is often used to refer to solving a problem using a numerical scheme such as the finite element method. I am against at using this word for this endeavour. The term simulation has a connotation of both “pretending” and “faking” something, that is definitely not what we are doing when solving an engineering problem with finite elements. Sure there are some cases in which we simulate, such as using the Monte Carlo method (originally used by Fermi as an attempt to understand how neutrons behave in the core of nuclear reactors). But when solving deterministic mechanical engineering problems I would rather say “modelling” than “simulation.”
This section is not (just) about different kinds of elements like tetrahedra, hexahedra, pyramids and so on. It is about the different kinds of analysis there are. Indeed, there are a whole plethora of particular types of calculations we can perform, all of which can be called “finite element analysis.” For instance, for the mechanical problem, we can have different kinds of
And then there exist different pre-processors, meshers, solvers, pre-conditioners, post-processing steps, etc. A similar list can be made for the heat conduction problem, electromagnetics, the Schröedinger equation, neutron transport, etc. But there is also another level of “kind of problem,” which is related to how much accuracy and precision we are to willing sacrifice in order to have a (probably very much) simpler problem to solve. Again, there are different combinations here but a certain problem can be solved using any of the following three approaches, listed in increasing amount of difficulty and complexity:
i. conservative ii. best-estimate iii. probabilistic
The first one is the easiest because we are allowed to choose parameters and to make engineering decisions that may simplify the computation as long as they give results towards the worse-case scenario. More often than not, an conservative estimation is enough in order to consider a problem solved. Note that this is actually how fatigue results are obtained using fatigue curves, as discussed in\ [@sec:fatigue]. A word of care should be taken when considering what the “worst-case scenario” is. For instance, if we are analysing the temperature distribution in a mechanical part subject to convection boundary conditions, we might take either a very large or a very low convection coefficient as the conservative case. If we needed to design fins to dissipate heat then a low coefficient would be the choice conservative. But if the mechanical properties deteriorated with high temperatures then the conservative way to go would be to set a high convection coefficient. A common practice is to have a fictitious set of parameters, each of them being conservative leading individually to the worst-case scenario even if the overall combination is not physically feasible.
As neat and tempting as conservative computations may be, sometimes the assumptions may be too biased toward the worst-case scenario and there might be no way of justifying certain designs with conservative computations. It is then time to sharpen our pencils and perform a best-estimate computation. This time, we should stick to the most-probable values of the parameters and even use more complex models that can better represent the physical phenomena that are going on in our problem. Sometimes best-estimate computations are just slightly more complex than conservative models. But more often than not, best-estimates get far more complicated. And these complications come not just in the finite-element model of the elastic problem but in the dependence of properties with space, time and/or temperature, in non-trivial relationships between macro and microscopic parameters, in more complicated algorithms for post-processing data, etc.
Example?
Finally, when then uncertainties associated to the parameters, methods and models used in a best-estimate calculation render the results too inaccurate for a certain regulatory body to approve a design, it might be needed to do a full set of parametric runs taking into account the probabilistic distribution of each of the input parameters. This kind of computation involve
This kind of computation is usually required by the nuclear regulatory authorities when power plant designers need to address the safety of the reactors. What is the heat capacity of uranium above 1000ºC? What is the heat transfer coefficient.
------
So we know we need a numerical scheme to solve our mechanical problem because anything slightly more complex than an infinite pipe does not have analytical solution. We need an unstructured grid because we would not use Legos to discretize pipes. We selected the finite elements method over the finite volumes method, because FEM is the king. Can we pause again and ask ourselves why is it that we want to do finite-element analysis?
There exists a very useful problem-solving technique coined by Taiichi Ohno, the father of the Toyota production system, known as the Five-whys rule. It is based on the fact people make decisions following a certain reasoning logic that most of the time is subjective and biased and not purely rational and neutral. By recursively asking (at least five times) the cause of a certain issue, it might possible to understand what the real nature of the problem (or issue being investigated) is. And it might even be possible to to take counter-measures in order to fix what seems wrong.
Here is an original example:
Why did the robot stop?
The circuit has overloaded, causing a fuse to blow.
Why is the circuit overloaded?
There was insufficient lubrication on the bearings, so they locked up.
Why was there insufficient lubrication on the bearings?
The oil pump on the robot is not circulating sufficient oil.
Why is the pump not circulating sufficient oil?
The pump intake is clogged with metal shavings.
Why is the intake clogged with metal shavings?
Because there is no filter on the pump.
You get the point. We usually assume we have to do what we usually do (i.e. perform finite element analysis). But do we? Do we add a filter or just replace the fuse?
Getting back to the case study: do we need to do FEM analysis? Well, it does not look like we can obtain the stresses the transient cases with just pencil and paper.
divert(-1)
When we think about finite elements, we automatically think about computers. Of
ENIAC
FEM, Computers
graphics cards
FOSS
Avoid black boxes
Reflections on trusting trust
UNIX, scriptability, make programs to make programs (here a program is a calculation)
front and back
avoid monolithic divert(0)
3D full
Quarter
2 grados
2D axysimmetric
1D collocation
struct vs unstruct
1st vs 2nd
complete vs incomplete (hexa)
citar a asimov y al report de convergencia
errors and uncertainties: model parameters (is E what we think? is the material linear?), geometry (does the CAD represent the reality?) equations (any effect we did not have take account), discretization (how well does the mesh describe the geometry?)
cantilever beam, principal stresses, linearity of von mises
two cubes
Back in College, we all learned how to solve engineering problems. But there is a real gap between the equations written in chalk on a blackboard (now probably in the form of beamer slide presentations) and actual real-life engineering problems. This chapter introduces a real case from the nuclear industry and starts by idealising the structure such that it has a known analytical solution that can be found in textbooks. Additional realism is added in stages allowing the engineer to develop an understanding of the more complex physics and a faith in the veracity of the FE results where theoretical solutions are not available. Even more, a brief insight into the world of evaluation of low-cycle fatigue using such results further illustrates the complexities of real-life engineering analysis.