Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

22KB

Background and introduction

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 bragging 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.

Tips and tricks

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 math. Even more, keep exercising. You have used differences of squares in high school. You know (or at least knew) how to integrate by parts. 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.

Nuclear reactors, pressurised pipes and fatigue

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

Case study

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.

Solid mechanics, or what we are taught at college

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

  1. a solid is in equilibrium if it is not moving in at least one inertial coordinate system,
  2. in order for a solid not to move, the sum of all the forces ought to be equal to zero, and
  3. for every external load there exists an internal reaction with the same magnitude but opposite direction.

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 boasts 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.

The stress tensor

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:

  • The $\sigma$s are normal stresses, i.e. they try to stretch or tighten the material.
  • The $\tau$s are shear stresses, i.e. they try to twist the material.
  • It is symmetric (so there are only six independent elements) because
    • $\tau{xy} = \tau{yx}$,
    • $\tau{yz} = \tau{zy}$, and
    • $\tau{zx} = \tau{xz}$.
  • The elements of the tensor depends on the orientation of the coordinate system.
  • There exists a particular coordinate system in which the stress tensor is diagonal, i.e. all the shear stresses are zero. In this case, the three diagonal elements are called the principal stresses.

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:

  • If you can compute the stress tensor at each point of our geometry, then congratulations: you have solved the solid mechanics problem.

An infinitely-long pressurised pipe

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

Finite elements, or solving an actual engineering problem

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 intrincate that render simple equations into monsters which are unsolvable with pencil and paper. Hence, finite elements enter into the scene.

The name of the game

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

  1. Finite differences
  2. Finite volumes
  3. Finite elements

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.”

Five whys do you want to do FEA?

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:

  1. Why did the robot stop?
    The circuit has overloaded, causing a fuse to blow.

  2. Why is the circuit overloaded?
    There was insufficient lubrication on the bearings, so they locked up.

  3. Why was there insufficient lubrication on the bearings?
    The oil pump on the robot is not circulating sufficient oil.

  4. Why is the pump not circulating sufficient oil?
    The pump intake is clogged with metal shavings.

  5. 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?

justify FEM in the nuclear fatigue case

divert(-1)

Computers, those little magic boxes

When we think about finite elements, we automatically think about computers. Of

https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=the-simpsons&episode=s05e03

ENIAC

A brief review of history

FEM, Computers

graphics cards

Hardware

Software

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)

Piping in nuclear rectors

The infinite pipe revisited after college

3D full

Quarter

2 grados

2D axysimmetric

1D collocation

struct vs unstruct

1st vs 2nd

complete vs incomplete (hexa)

The relativity of wrong

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?)

Linearity of displacements and stresses

cantilever beam, principal stresses, linearity of von mises

ASME stress linearization

Two (or more) materials

Young and Poisson

two cubes

A parametric tee

Temperature

Fatigue

In air

In water

Conclusions

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.

  • use your imagination
  • practise math

  1. A former boss once told me “I need the CFD” when I handed in some results. I replied that I did not do computational fluid-dynamics but computed the neutron flux kinetics within a nuclear reactor core. He joked “I know, what I need are the Colors For Directors, those pretty coloured figures along with your actual results.”