Вы находитесь на странице: 1из 88

Simple

Deformation and
Vibration
by Finite Element Analysis

Gunnar Backstrom, Ph.D.

This electronic book is marketed in the form of a PDF file, created


by the Adobe Acrobat program, version 5. It may also be read by
later versions of the same program.
This file may not be transferred to other persons, in any form or by
any means. You may only print the text for your personal use.
Seaching for Words
The Acrobat program lets you search for words and even word
combinations. After selecting Edit, Find (or pushing the keys Ctrl+f)
it suffices to enter the item of interest. This feature makes an index
unnecessary.
Navigating by Bookmarks
The table of contents is always available and may be brought up to
the left of the text by clicking on Bookmarks. A simple click on a
subtitle then opens that section immediately. Click on Bookmarks
again, and the table of contents becomes hidden.

Copyright 2006
by GB Publishing and Gunnar Backstrom
Malmo, Sweden

Preface

During my early years as a student at Uppsala University, Sweden, I


took a special interest in partial differential equations. To my mind,
these equations seemed to be all-important keys to the predictions in
space and time that physics is all about. Nevertheless, undergraduates
still regard them as esoteric objects that are part of the curriculum but
sadly useless.
Partial differential equations are indeed cumbersome, since few
analytical methods of solution exist, and numerical tools of
reasonable generality have been lacking. During a visit in the San
Francisco Bay area in 1992 I happened to see an advertisement about
a Solver for Partial Differential Equations, which caught my
attention since I was currently planning a course in applied finite
element analysis (FEA). When I later started to work with this
software I had the feeling that a curtain was drawn, and that I could
suddenly see the fields through the graphics on the computer screen. I
was absolutely stunned to find that almost any problem could be
solved, even if it involved several complicated, simultaneous
equations and often even if they were not linear. I simply could not
keep this extraordinary experience to myself.
My first book on the applications of FEA appeared in 1994 and
covered electro- and magnetostatics, heat conduction, elasticity, and
liquid flow. A later edition (1996) also comprised the areas of
vibrations in solids and fluids, electromagnetic waves, and quantum
mechanics.
The software (FlexPDE) has since evolved to a significant degree.
The present textbook exploits version 5 of FlexPDE, which exists
both as a Professional Version and a Student Version. The latter is
limited to four simultaneous PDEs and also restricts the number of
node points in space. The FlexPDE program may be used under
Linux and MacIntosh, as well as under MS Windows.

Acknowlegements
I am deeply indebted to my late friend Dr. Russell Ross, formerly of
the University of East Anglia, UK, for reading and criticizing the
typescript, as well as for working through the examples. His intelligence and vigilance made him the ideal pilot user.
Finally, I gratefully acknowledge the support of Mr. Robert
Nelson, PDE Solutions, Inc., the demon programmer behind
FlexPDE. His prompt attention to my innumerable queries about the
operation of his software was essential to the success of this work.
Gunnar Backstrom

The finite-element software package used for this book (FlexPDE ) is


marketed by
PDE Solutions Inc.
P.O. Box 4217, Antioch, CA 94531-4217, USA
Phone: +1 925 776 2407
Fax: +1 925 776 2406
Email: info@pdesolutions.com
www.pdesolutions.com

Contents

1 Introduction
Page References
How to use this Book

1
2
3

Preliminaries
2

Graphical Facilities

Downloading the Free FlexPDE program


The FlexPDE Editor
Plotting Functions of One Variable
Running the Problem Descriptor File
Plotting Functions of Two Variables
Help and Manual

5
6
7
8
9
15

Curly Velocity Fields

17

Liquid, Rotating as a Disk


Non-Constant Z
More General Velocity Fields

17
19
24

Fields of Gravitation

26

Earth and Moon as Point Masses


Planets of Finite Size
Divergence of g

26
28
33

Laplace and Poisson Equations

35

Known Values on Boundaries


Values and Derivatives on Boundaries
Multiplying through the PDE
Derivative Boundary Conditions Only
Solution over a Quarter-Circle
The Poisson Equation

35
37
38
39
40
41

Elastic Deformation
6

Elementary Elasticity in (x,y) Space

43

Plane Stress
Boundary Conditions
Steel Plate Under Compressive Strain
Strained Plate, No Sliding
Plate Subjected to Pressure at One End
Plate with Tension Applied at both Ends
Plate Subjected to Shear Forces

44
46
48
52
54
55
56

Straight Beams

59

Beam with Uniform Load


Comparison with an Analytic Solution
Further Analysis of Stress
Beam Loaded on a Line
Gravity Bending
Forces and Moments
Beam with Bending Moments at Ends
Elastic Energy
Plane Strain

59
61
62
67
68
70
71
75
76

Hooks, Rings and Tubes

80

Semi-Circular Beam
Compound Semi-Circular Beam
Tube with Internal and External Pressure
Comparison with Exact Solution
Tube with Tangential Load
Tube Strained between Two Edges

80
82
84
87
88
90

Elasticity in (U,z) Space

Tube with Internal Pressure


Tube Pressurized over Part of its Length
Stress Concentration in a Shaft

96
98
101
103

10 Torsion
Twisted Circular Steel Shaft
Twisted Square Bar
General PDE for Torsion
Compound Bar
Hollow Bar
PDE for Warping
Warping of an Elliptical Shaft
11 Thermo-Elasticity
Uniformly Heated Semi-Circular Rod
Thermo-Elasticity in (x,y) Space
Steel Block, Strained by a Temperature Gradient
Bi-Metallic Block
Simultaneous PDEs for Stress and Temperature
PDEs for Axially Symmetric Problems
Axially Symmetric heating of a Cylinder
12 Deformation in Three Dimensions
Two Point Charges of Different Signs
Non-Linear Set of Point Charges
Laplace Equation in 3D
Elasticity in Three Dimensions
Include-File for 3D Elasticity
Capturing Descriptor Errors
Plate under Pressure from Top
Bending of a Beam under Gravity
Beam under Asymmetric Load
Tube under Asymmetric Load
Torsion and Warping of a Hollow Bar

108
109
111
113
114
115
116
119
122
123
125
126
128
131
133
135
139
139
142
143
146
147
148
148
150
152
154
156

Elastic Vibration
13 Waves Along a Beam
Complex Solution
Forced Shear Vibration
Animated Shear Vibration
Driving Force
Wavelength
Longitudinal Vibration
Bending Vibration
14 Eigenstates in Two Dimensions
Frequency Scan
Finding Eigenstates
Plate with Free Boundaries
Animation of a Vibrating Plate
15 Eigenstates of a Membrane
Circular Membrane
Triangular Drumhead
Fancy Drumhead
16 Eigenstates in Three Dimensions
Vibration of a Rectangular Block
Vibration of a Tube
Vibrating Circular Plate
Vibrating Plate with Free Boundaries
Vibrating Sledgehammer
17 Waves in Fluids
Complex Solution
Plane Acoustic Wave
Resonance
Constricted Cavity
Cylindrical Resonator

160
161
163
165
167
167
168
170
173
173
176
178
180
183
184
186
188
190
191
193
195
197
199
203
204
206
208
209
211

Appendix
Principles of Finite Element Analysis
Interpolation and Differentiation in 2D
Interpolating to Obtain a Solution in 2D
Solving for Node Values in 2D
Natural Boundary Conditions

215
215
217
219
221

Conclusion

223

References

224

Vocabulary of FlexPDE

225

1 Introduction

The classical fields of physics are governed by partial differential


equations. Some exact solutions are available, but not commonly in
cases of practical interest. Even when solutions exist, they tend to be
complicated and must be evaluated numerically for graphical presentation in digestible form.
Finite element analysis (FEA) is a numerical approach in which the
field domain under study is divided into a multitude of regions, each
giving rise to one or more equations. The main task is to solve all
these hundreds of simultaneous equations, which was impracticable
before the days of transistorized computers.
An enormous number of textbooks on finite element analysis exist
today, and they all present the various mathematical procedures in
detail. They assume that the reader will make calculations on simple
systems by hand and then type FORTRAN code or other, provided in
an appendix, in order to handle more complex situations.
Some twenty years ago, the choice was between writing ones own
programs or abstaining completely from FEA. Today, expert software
saves students from worrying about programming strategy, formatting, indices and graphics. The tools of FEA are now on anyones
desk, since the average personal computer is adequate for solving a
large number of such problems.
Now a program exists that permits you to enter the equations with
the boundary conditions required by your mathematical model, solve
them automatically, and present the results graphically in a variety of
ways.
The software that achieves these wonders is FlexPDE from PDE
Solutions Inc. One of the attractive applications of this program is in
university education. An extremely large range of problems involving
classical fields may easily be studied in detail, and with realistic
boundary conditions. Non-linear equations and boundary conditions
as well as space-dependent materials properties are no longer serious
1

limitations. The number of cases for study is virtually unlimited, and


by solving problems under various conditions you may develop an
intuitive feeling for how fields behave.
No one would even consider taking courses in Object Oriented
Programming, with applications to advanced string, windows and
mouse handling, before using a modern word processor. We all leave
such chores to specialists, who spend years learning the tricks of their
profession and then devote more years to produce the software we use
every day.
Numerical algorithms and programming really have little to do
with the concepts of physical fields and if months, or even years, may
be gained by skipping the details of these items, then there is no
reason to hesitate. Every scientist has to make a choice about what to
learn and what to leave alone. No one can master all of physics, not
even all of classical physics. The real choice is between additional
ignorance within your main discipline or within some adjacent field.
On the other hand, no scientist would be content to use a numerical
toolbox, such as FlexPDE, without knowing at least the principles of
operation. Some details are even essential for the formulation of
boundary conditions. In an attempt to include a general description of
the method and at the same time de-emphasize its importance to the
reader, I have included an appendix on this subject.
The main purpose of this volume is to illustrate how fields change
when you modify the geometry, introduce different materials, and
change the boundary conditions. It should be regarded as a
companion to ordinary textbooks. The study of most analytic
solutions in such texts may henceforth be replaced by FEA calculations, which yield better understanding of the physical phenomena.

Page References
As a reader, I have found that books generally contain much unnecessary numbering, which is not only redundant but makes the text
tiresome to read. This made me choose a minimalist system for
internal references. Strictly speaking, the page number is the only
coordinate necessary. Hence, I have refrained from numbering figures
and equations. Most often, there is only one figure on a page, and in
2

any case the risk of ambiguity is exceedingly small. Equations of


special importance have been marked by the bullet symbol z for later
reference. Hence, p.63z2 would point at the second bullet on page
63. Another simplification is that figures are discussed in the current
text, just before or after the figure.
The external reference2p37 is to be understood as source 2, page
37.

How to use this Book


This volume aspires to confer understanding of the fields of elasticity
by numerical solutions of elementary problems. In a few, particularly
simple, cases we shall compare to known analytic solutions, but in
most cases only numerical methods are practicable.
The FEA method offers the advantage that similar problems may
be solved by the same procedure, mostly by mere modification of the
input data. Analytic methods, on the other hand, may require a
radically different formalism for handling a slightly different situation. In the case of non-linear equations, numeric solution normally is
the only option available.
To the ordinary physicist or engineer there is little point in
studying the analytic techniques for solving PDEs. This toil is for
specialized mathematicians, who devote their lives to extending the
range of problems tractable by exact means. For someone interested
in applications, the analytic approach to PDEs is extremely timeconsuming, and the mathematical apparatus tends to obscure the
essential physical principles involved.
A better use of your time and effort is to consider various aspects
of FEA solutions that illustrate the role of boundary conditions and
materials properties. The syntactic rules of FlexPDE are simple and
direct and may be learnt while solving elementary problems. The
investment made in getting acquainted with FlexPDE is profitable,
since PDEs occur in virtually all areas of physics and engineering.
FlexPDE allows us to treat finite-element analysis as a mathematical toolbox, which means that the user does not have to know
about the numerous algorithms that constitute this powerful program
package. Basically, the latter is similar to other, more expensive,
3

products on the market. The insight gained by using FlexPDE will


thus prove to be valuable for future work with other programs.
Here are a few principles to keep in mind while studying this book.
i Do not be afraid of making errors. The computer does not go up in
smoke, and by correcting mistakes you learn the FlexPDE syntax.
i It is not enough to read the book. It shows a large number of
plotted results, but running the files yields additional figures that
are essential to understanding.
i Typing descriptor files is a way of learning. These lists illustrate
the practice of finite-element calculations, and the command words
constitute the language of FlexPDE.
i As you work with descriptors, take the opportunity of displaying
additional plots.
i Be inquisitive! Do not accept FlexPDE commands until you
understand what they achieve. Make a small test on your own by a
short descriptor file. Occasionally, modify examples in the book to
watch the effect.
i Allot time for the exercises. Some of them are simple variations of
examples in the same chapter. Others expect you to be more
independent. The important thing is to be active.
i Learn by doing!

2 Graphical Facilities

When a solution to a partial differential equation has been obtained,


one would normally want to plot the results. Even if this is the last
stage of the process, it is the easiest one to learn. For this reason we
shall begin by studying the various modes of graphical presentation
available in FlexPDE.

Downloading the Free FlexPDE Program


There are two main modifications of the FlexPDE program, the
Professional Version and the (free) Student Version. These are
identical, except that in the latter the number of node points in space
and the number of simultaneous equations are limited. This limitation
is not serious, however, since it permits all of the examples given in
this book to be run. In order to obtain a key code to open the Student
Version you just have to supply your name and address.
Both versions plus a number of examples are available on the
Internet under the address www.pdesolutions.com.
At this web site you are invited to download the latest version, and
even a few earlier ones. You should store the Student Version in a
suitable folder, such as flexpde5s. After the data transmission, which
could take several minutes, you double-click on the file icon to install
the program. This final stage only takes seconds to complete.
Immediately after installation, FlexPDE is ready to be used. You
can now run some sample files included, and you may even modify
the numerical input values and obtain completely new results.
Before starting to work with the program you should create a
special folder for your own FlexPDE applications. Even if you could
run them from any folder, it is wise to create a special one, say
flexpde_mex, for your problem descriptor files (scripts). First open My
Computer, select (C:) and then File, New, Folder and type
flexpde_mex over NewFolder.
5

The FlexPDE Editor


Double-clicking on the FlexPDE icon starts the program, and after
clicking on File in the left corner you will see the following menu.

Clicking on New Script makes a window appear, where you


browse for the path (flexpde_mex) and then name your first problem
descriptor file, e.g. mex021. The extension (family name) is always
understood to be .pde.
Naming gives rise to a new window, as illustrated below. The one
to the right is the editor, where you type the script using the headings
(red) already present as a guide.
The empty left area is the status window, recording the operations
performed when an application is executed.

Plotting Functions of One Variable


We shall now create a file that defines your first task : plotting a
function of one variable and its derivatives. We use the editor to enter
the following descriptor (script) file.
The upper-case words are reserved for the program and will be
used again and again in all descriptors. They mark the beginning of a
segment where you enter instructions and data pertinent to the
problem at hand. In this book, keywords will be printed in bold when
used for the first time, or else discussed in the text.
The editor automatically adds colors to different kinds of entries in
order to enhance readability.
In this book we use the Student Version 5.
TITLE
{ mex021.pde }
'sin(x)+ x* cos(x)'
COORDINATES
{ Student Version 5 }
cartesian1
{ This is a one-dimensional application }
DEFINITIONS
Lx=10
f=sin(x)+ x* cos(x)
{ Function to be plotted }
fx=dx(f)
{ First derivative }
fxx=dxx(f)
{ Second derivative }
BOUNDARIES
region 'domain'
{ Region for plot }
start(-Lx) line to (Lx)
PLOTS
elevation(f, fx, fxx) from (-Lx) to (Lx)
END

Notice that a string of characters, such as the title, must be


delimited by quotes. The curly brackets { } enclose comments which
help us to remember the purpose of various lines, and these portions
are not processed by the program. For instance, it is wise to include
the intended name of the descriptor file on the first line. The names in
this book use the chapter number for the first digits.
The mathematical notation used under definitions is much like that
of most programming languages. The sign means multiply and ^
means raise to a power. FlexPDE is case-insensitive, which means
that f and F are treated as identical variables.
7

Standard functions are also available, such as sin( x ) above. In


addition, partial derivatives are allowed operators. The derivative
w f /w x is simply denoted dx(f), and so on. A higher derivative may be
written dx(dx(f)), or simply dxx(f).
The final section specifies an elevation plot, which effectively is a
set of curves. You may plot several functions in the same figure, but
that is useful only if the function values are of comparable magnitude.
In order to make the script file more readable it is helpful to indent
lines containing your statements. You may design the page to suit
your personal taste, and the above style is only a suggestion.

Running the Problem Descriptor File


A click on the lightning symbol at the top of the Editor window starts
execution of the program and immediately produces the figure below.

In the above plot, the three curves a, b and c may be identified by


means of their colors and the table on the right. The curves permit
you, for instance, to relate zero crossings to minimum and maximum
points.
After this you may want to explore other functions f ( x ) in a
similar manner. If an expression is more complicated than in the
above model descriptor, divide it into groups of terms and let it run
over two lines if necessary. The program interprets the contents of
each line in an intelligent manner, and no continuation signs are
needed. If this would make an expression more clear, you may
separate terms by extra spaces.

Plotting Functions of Two Variables


Next we shall study a function of two variables, which is what this
software is primarily designed to handle. When typing the new
descriptor file you have two options. Either you click on File, New
Script and type all the lines required, or you Open a previous file
(mex021), click on SaveAs to make a copy under a new name, and
then modify lines as needed. If the new file should be rather similar to
the previous one, the latter alternative is of course preferable.
As shown in the definitions segment, a line may contain two or
more assignments, without any marks (except spaces) to separate the
statements.
Since the present function depends on two variables, the program
requires that we reserve a region in ( x , y ) space, here of size Lx=1.0
by Ly=1.0. In the boundaries segment we define the shape of this
region by a set of ( x , y ) coordinates, connected by straight lines. We
always draw the boundary of a region in the positive sense (counterclockwise), so that the interior of the region remains on our left as we
go around.
To obtain a region we must close the boundary by going back to
the starting point. The command close achieves this.
An elevation plot of a function f ( x , y ) always refers to a line in
the ( x , y ) plane, specified by a from...to statement. This type of plot
displays the height of the function surface above the given line.
9

TITLE
{ mex022.pde }
'x^2+ 2*y^2'
SELECT
spectral_colors
{ Values from red to violet }
DEFINITIONS
Lx=1.0 Ly=1.0 f=x^2+ 2*y^2
grad_f=vector( dx(f), dy(f)) laplace_f=dxx(f)+ dyy(f)
BOUNDARIES
region 'domain'
{ Closed by return to start }
start (-Lx,-Ly) line to (Lx,-Ly) to (Lx,Ly) to (-Lx,Ly) close
PLOTS
grid( x, y)
{ Triangular mesh }
surface( f)
{ Surface in 3 dimensions }
elevation( f) from (-Lx,-Ly) to (Lx,Ly) { Height of f(x,y) above line }
contour( f)
{ Contour plot of function }
contour( f) painted
{ Color coded in plane }
vector( grad_f) as 'Gradient'
{ Arrow plot with a title }
vector( grad_f) norm
{ Normalized vector }
contour( laplace_f)
{ Test if f(x) is harmonic }
END

When we run this file, the program presents all the plots as a set of
miniatures on the screen. A double-click anywhere inside a selected
figure will enlarge it. Another double-click restores the mosaic of
miniatures.

10

A figure may be copied on paper by right-clicking and selecting


Print. Alternatively, you can use the PrtScr (print screen) key on your
PC and paste the plot to a word processor.
In the final section of the script we begin by plotting the grid
(above), which shows how the domain is divided into cells. FlexPDE
computes one function value for each of the corners of a triangular
cell, and one value at each midpoint of a side. These are the reference
data, and in order to obtain values at intermediate points, and to form
derivatives, the program interpolates by fitting polynomials P( x , y )
to the known values. Normally, we do not need to request a grid plot,
because such a plot automatically appears below the status window.
The second figure (below) produced by this file is a plot of a
surface that presents function values as heights over the ( x , y ) plane.
This figure also presents f ( x , y ) by the colors of the rainbow in the
order of the frequency (or energy) of light, i.e. the lowest values by
red and the highest ones by violet. This also associates with
temperature, in the sense that a metal first becomes red then bluishwhite when heated. Under select we specify spectral_colors, since the
reverse order is the default.

All points on the surface having values between 2.00 and 2.10, say,
are in the same color. This means that the borderline between two
11

colors corresponds to a value of f ( x , y ) that may be read off the table


to the right of the plot.
The above surface is viewed at a certain angle with respect to the
coordinate axes, but you can move the camera by right-clicking on
the plot, and then click on Rotate. The three values given just above
the list to the right indicate the current position of the viewpoint, i.e.
the camera coordinates ( x , y ) and the elevation angle in degrees.
The next figure (below) is an elevation plot on a diagonal line in
the ( x , y ) plane.

The fourth figure is a contour plot (below) consisting of a set of


curves in the ( x , y ) plane, each curve corresponding to a constant
value of f. These function values may be read off the adjoining table,
which also indicates the minimum and maximum values over the
domain. This is similar to a surface plot viewed from above, the
borderlines between the different colors forming the contours.

12

The painted contour plot below is simply a plot with colored


spaces between the contours.

Alternatively, this plot may be regarded as a picture of a surface


plot, taken straight from above. The color code yields a quick
overview of the surface representing the function.
A new feature under definitions is the vector grad_f, formally
defined by
13

grad( f ) { f { i

wf
wf
j
wx
wy

where i and j are vectors of unit length along the x and y axes. We
express this vector simply in terms of its components dx(f) and dy(f).
This permits us to represent the gradient field by arrows.

In the above plot, each arrow shows the direction of maximum


slope and (by its length) the corresponding magnitude, also indicated
by colors.

14

The above is a normalized vector plot, which means that the


vectors are all of the same length. The directions are now easily
readable in the center part of the figure, and the magnitude of the
vectors is still roughly indicated by color. Here, we clearly see that
the arrows point away from the center, showing that a minimum is
located at the origin (0,0).
The last figure on the screen shows the result of applying the
-operator twice to obtain laplace_f, as follows.
f
2

FG i w  j w IJ FG i w  j w IJ f
H w x w yK H w x w yK

w2f w2f

w x2 w y2

The corresponding contour plot (below) exhibits no curves at all, and


the maximum and minimum values are both closely equal to 6.0,
differing only in the 4th decimal. This means that the function
2
laplace_f is effectively constant. The fact that ( f ) is different from
zero also indicates that f ( x ) is not a harmonic function1p477.

We notice that there are now two tabs on top of the editor,
corresponding to the two scripts. Clicking on tabs, it becomes easy to
return to earlier scripts and plots from the same session.

15

Help and Manual


FlexPDE offers a Help button, which provides information about the
various commands, including the syntax of their use. Refer to this
source whenever you encounter a command that does not seem
familiar. The program also comes with a printed manual.

Exercises
Explore the following functions, perhaps with modified values of Lx
and Ly.
f x2 y
f
f

16

x2 y2
sin(5 x 2  5 y 2 )

3 Curly Velocity Fields

In the preceding chapter we demonstrated various aspects of more or


less arbitrary functions. We are now about to study more realistic
fields, similar to those occurring in the mechanics of fluids, where a
velocity vector may be defined at every point of the field.
We shall consider a few simple cases where a fluid rotates around
an axis. This means that the velocity v at every point is perpendicular
to the radius vector and that its magnitude is v Z r . These facts
may be summarized by a determinant expression, yielding the
velocity vector:
v

w ur

Zx Z y Zz
x

R| Z z  Z y U|
S| Z x  Z z V|
TZ y  Z x W
y

We restrict our study to the ( x , y ) plane, i.e. vz in the third row


must be zero. This generally requires Z x Z y 0 , leaving us with
only the z-component, which we shall simply call Z .

Liquid, Rotating as a Disk

In this case, Z will be the same over the entire domain. The following
descriptor is what we need to explore the various features of this
motion. In order to define a circular domain we need the new
command arc, which permits us to draw a sequence of quarter-circles.
In the definitions segment we have included the special differentials
div(v) and u v z , the latter being the z-component of curl(v). The
definitions of these operations in ( x, y) coordinates are

v { div(v)

w vx w vy

wx wy

17

and

u v { curl( v )

w
w
w
wx wy wz
i

vx

vy

vz

R|w v  w v U|
|| ww vy wwvz ||
S| w z  w x V|
||w v  w v ||
Twx w yW
z

where we now use only the third (z) component.


TITLE
{ mex031.pde }
'Liquid Rotating as a Disk'
SELECT
spectral_colors
DEFINITIONS
{ SI units : m, s }
r1=1.0 rad=sqrt(x^2+y^2)
{ Radius=square root }
omega=1.0
{ Angular velocity }
vx=-omega*y vy=omega*x
{ Velocity components}
v=vector( vx, vy)
{ Velocity vector }
vm=sqrt(vx^2+vy^2)
{ Magnitude of v }
div_v=dx(vx)+ dy(vy) curl_z=dx(vy)- dy(vx)
BOUNDARIES
region 'domain' start(r1,0)
arc to (0,r1) to (-r1,0) to (0,-r1) close
{ Circular arc }
PLOTS
contour( vx) contour( vy) contour( vm)
contour( div_v) contour( curl_z) vector( v) norm
END

18

The above figure shows the normalized vector plot of the velocity.
The divergence div_v turns out to be constant, with the value zero.
The contour plot of curl_z is also trivial, since the function has the
almost constant value 2.000. Of course, we could easily calculate
these functions exactly by hand in this simple case, but we shall find
similar plots convenient with other, more complicated velocity fields.

Non-Constant Z

We next explore a situation where the angular velocity Z varies with


the radius R. Such a variation could exist in a liquid, but we need not
discuss in detail what would be required to make it move the way we
specify. In the descriptor below, modeled after mex031, we choose
the function Z 1 / R 2 .
TITLE
{ mex032.pde }
'Non-Constant Omega'
SELECT
spectral_colors
DEFINITIONS
{ SI units }
r1=1.0
rad=sqrt(x^2+y^2) omega=1/rad^2
{ rad=R }
vx=-omega*y vy=omega*x
{ Velocity }
v=vector( vx, vy) vm=sqrt( vx^2+vy^2)
{ Magnitude }
div_v=dx(vx)+ dy(vy) curl_z=dx(vy)- dy(vx)
BOUNDARIES
region 'domain'
start(r1,0) arc to (0,r1) to (-r1,0) to (0,-r1) close
PLOTS
contour(vx) contour(vy)
contour( abs(vx)) log
{ Log10 of absolute value }
contour( abs(vy)) log
contour( div_v) contour( curl_z)
contour( vm) log vector( v) norm
END

Evidently, the contour plots of vx and vy are trivial, because most


of the variation occurs close to the origin.
In order to follow the variation over a large range of function
values, we use the modifier log to request a contour plot with a
19

10-logarithmic scale. The logarithmic plots of the magnitudes of vx


and vy now appear to be similar, except for a rotation through 900.
The plot of curl_z may seem peculiar. It actually consists of a
number of irregularly shaped zero contours. Other contours listed in
the table correspond to magnitudes below 10-12, whereas we obtained
2.0 in mex031. In view of the round-off errors always present in
numerical calculations we take this to mean that the value of curl_z is
zero over the whole region, which we can readily verify by exact
calculus. The divergence div_v also seems to be zero.

By a contour plot of vm and a normalized vector plot of v we


present both the speed and the direction at various points. Thus these
two graphs together completely characterize the vector field.
We now proceed to a similar case with Z sin( R) , which only
requires the following changes of the descriptor mex032.
TITLE
'Non-Constant Omega'

rad=sqrt( x^2+y^2) omega=sin( rad)


...

{ mex032a.pde }

Running this file, we find that curl_z becomes clearly different


from zero, although the liquid appears to circulate much the same
20

way as it did before. The value of the divergence div_v, however, still
vanishes.
What kinds of rotary motion yield non-zero values of curl_z? In
textbooks on vector analysis we find the definition
curl( v ) z { u v

1
v dl
z
z
S C
where the line integral is taken over a closed curve C of area S in the
( x , y ) plane. The situation is depicted in the next figure, where we
have drawn an area element (gray) that will eventually shrink to
negligible size. This element is limited by two radial and two circular
segments. The velocity v is directed along the circular paths; hence
the radial parts contribute nothing to the integral. The contribution
from a circular segment is just the speed vm multiplied by the length
of the arc, and since these two terms are of opposite sign they might
accidentally cancel.

{ Slim
o0

In mex031 the outer path was longer and, in addition, the speed
was larger there. Each of these enhancing factors was proportional to
the radius and the result was a nonzero value of curl_z.
In the case of the liquid with Z 1 / R 2 , the smaller velocity on the
outer path compensates exactly for the increase of the path length,

21

which makes curl_z equal to zero. Generally, one might say that a
vanishing curl is a rare accident.
In the following file, which is based on mex031, we first make an
elevation plot on the curve 'inner', which is a circle and may be
eccentric (due to r0). We define it by a feature, a curve that may be
closed but does not form a region (which requires close). Here, we use
the convenient command angle to draw the second circle.
TITLE
{ mex031a.pde }
'Liquid Rotating as a Disk, Curl'
SELECT
spectral_colors
DEFINITIONS
r1=1.0 r2=0.3 r0=0.2
omega=1.0
{ Angular velocity }
vx=-omega*y vy=omega*x
{ Velocity components }
v=vector( vx, vy)
{ Velocity vector }
vm=sqrt(vx^2+vy^2)
{ Magnitude of v }
div_v=dx(vx)+ dy(vy) curl_z=dx(vy)- dy(vx)
BOUNDARIES
region 'domain'
start(r1,0) arc to (0,r1) to (-r1,0) to (0,-r1) close
feature
start 'inner' (r0+r2, 0) arc( center=r0,0) angle=360
PLOTS
elevation( tangential( v)/(pi*r2^2) ) on 'inner'
{ Curl_z }
contour( vm/(pi*r1^2))
{ Average }
END

The software enables us to estimate curl_z by means of a line


integral. We just need to calculate the integral of
v d l { vt dl
along a closed curve, vt being the component of v tangential to that
curve. The command tangential selects the vector component vt . The
program automatically calculates the integral of the function plotted,
and we divide that by the area S of the smaller circle. The result is
displayed on the bottom line of the following plot.
The line integral for u v z should ideally be taken to the limit of
vanishing r2, but in this simple case that would not be necessary. If
we were to decrease the radius of the curve by a factor of 10,

22

however, there would be too few triangular cells to guarantee


reasonable accuracy.

In a contour plot of vm we automatically obtain the area integral


over ( x , y ) space. Dividing by the area of the domain we generate the
average value.
In the past examples we noticed that the divergence of the velocity
field was zero. In order to understand why this happens we consider
the integral definition
1
div(v) { v { lim
v n da ,
z
S
V o0 V
where the integral is now taken over the surface S of a volume
element V as shown in an earlier figure (p.21). The cylindrical
surfaces of the box give no contributions to the integral, since v is
perpendicular to the normal n on these surfaces. Two of the limiting
planes are parallel to the ( x , y ) plane. The integral over these planes
also adds nothing, because the velocity is always confined in the
( x , y ) plane. As regards the radial planes, they give equal contributions, but of opposite signs, since the velocity depends on the
radius R in the same way on both of them. Thus, whenever Z depends
on R only, the divergence must be zero.

zz

23

More General Velocity Fields


In previous examples we were concerned with rotation about an axis,
and the angular velocity depended only on the radius. That was
clearly a special case of fluid motion. We shall now look at a more
general velocity field, where the velocity components are independent
functions of R. Let us introduce the following (arbitrary) definitions
into a copy of mex032, produced by SaveAs.
TITLE
'More General Velocity Field'
SELECT
spectral_colors
DEFINITIONS
r1=1.0 rad=sqrt(x^2+y^2)
vx=rad*tan( rad) vy=exp( rad)

{ mex033.pde }

The resulting contour plot of the divergence shows non-zero


values, as seen in the figure below.

The contour plot of curl_z also exhibits non-zero values. The


vector plot of the velocity, however, reveals no signs of any
circulating motion that could lead us to suspect non-zero curl_z.

24

The lesson to be drawn from the examples of this chapter is that


the appearance of a velocity field, as given by a vector plot, is not
sufficient to assess whether curl or div is zero or not. We always need
to apply the differential or integral definitions to make this distinction.

Exercises

Try Z 1 R in one of the above descriptors.


Try Z R 2 and estimate the curl by a line integral. Then do it
again with a different center for the smaller circle.
Plot the vector fields curl( grad( x^2+y^2)) and curl( grad( x^2+y^3)).
Invent your own functions of ( x , y ) for vx and vy and calculate the
curl and the divergence.

25

4 Fields of Gravitation

Massive objects create a force field, acting on any other mass. This
force may be expressed in terms of a potential function U. For a point
mass at ( x0 , y0 ) , the potential may be written
U

G

m
R

G

( x  x 0 ) 2  ( y  y0 ) 2

where G is the gravitational constant and R the radial distance from


the point mass to the field point.

Earth and Moon as Point Masses


Let us choose the Earth-Moon system as a concrete example, using
the following descriptor. Throughout this volume we shall use SI
units (kg, m, s, etc.) for all physical quantities.
TITLE
{ mex041.pde }
'Earth-Moon Gravitational Field'
SELECT
spectral_colors
{ From red to violet }
DEFINITIONS
{ SI units : m, kg, s, N, rad }
d=3.84e8 Lx=d Ly=d
m1=5.98e24 m2=7.35e22
{ Masses of Earth and Moon }
G=6.67e-11
{ Graviational constant }
U=-G*m1/sqrt(x^2+y^2)- G*m2/sqrt(x^2+(y-d)^2)
gx=-dx(U) gy=-dy(U)
{ Field components }
gv=vector( gx, gy) gm=sqrt( gx^2+ gy^2) { Vector and magnitude }
BOUNDARIES
region 'domain' start(-Lx,-Ly/2)
line to (Lx,-Ly/2) to (Lx,3/2*Ly) to (-Lx,3/2*Ly) close
PLOTS
contour( U) contour(-U) log surface(-U) log
contour( abs( gx)) log contour( abs( gy)) log
contour( gm) log

26

vector( gv) norm as 'Field directions'


END

For the potential U we simply write a sum of terms of the form


Gmi / ri , where G is the gravitational constant, mi the masses of the
objects and ri the distances to the field point. The relation g U
then yields the gravitational field strength. We place the origin at the
center of the Earth, and the Moon at a distance d on the y-axis.
The contour plot of U yields curves that all lie close to the Earth.
In order to study the function over the full domain we request a
logarithmic plot of -U, rather than the direct value.
The logarithmic plot of the magnitude of g (below) demonstrates
how the Moon perturbs the Earths gravitational field. In fact, there is
a region (red) close to the Moon where the field seems to be zero.

The point where the magnitude of the field vanishes is also evident
from the vector plot below, where the field direction at that point
seems to be undetermined.

27

Planets of Finite Size


Using the next descriptor we shall look more closely at the field
around each planet. In order to indicate these objects we cut out the
areas occupied by the Earth and the Moon from the domain. This is
also a better presentation in the sense that our potential strictly applies
only to the region outside the massive objects.
In order to exclude a region occupied by a planet we simply define
its contour. For drawing circles we use the command arc in the
simple way demonstrated on p.22. We just specify the center
coordinates and the angle for one full turn. The descriptor has much
in common with mex041.
TITLE
{ mex042.pde }
'Earth-Moon Gravitation, Close to the Earth'
SELECT
spectral_colors
DEFINITIONS
d=3.84e8 r1=6.37e6 L=10*r1
m1=5.98e24 m2=7.35e22
{ Masses of Earth and Moon }
G=6.67e-11
{ Graviational constant }
U=-G*m1/sqrt(x^2+y^2)- G*m2/sqrt(x^2+(y-d)^2)
gx=-dx(U) gy=-dy(U)
{ Field components }
gv=vector( gx, gy) gm=sqrt( gx^2+ gy^2) { Vector and magnitude }

28

gv_angle=sign(gy)*arccos( gx/gm)/pi*180
BOUNDARIES
region 'domain'
start(-L,-L) line to (L,-L) to (L,L) to (-L,L) close
start(r1,0) arc( center=0,0) angle=360
PLOTS
grid(x,y)
contour( gm) as 'Magnitude' contour( gm) log
surface( gm) log
vector( gv) norm contour( gv_angle)
END

{ Exclude Earth }

The following grid plot shows that the program automatically


divides the area into smaller triangles as you approach an object, in
this case a planet. This is useful since we are going to inspect the
behavior of the gravitational field at close range.

The shrinking of cells close to an object is the first example of the


adaptive gridding employed by the program. Inspecting the grid plot
we understand why it would not practicable to show both planets in
the same figure. Using the Student Version, this example requires 608
nodes, while the maximum allowed is about 800. For this reason, we
shall present the field close to the Moon separately.

29

From the next plot we find that the maximum magnitude of the
field strength occurs on the surface of the Earth and has the value
9.83.

In the vector plot below, you will notice that some arrows seem to
penetrate into the region reserved for the Earth. This occurs because
an arrow presents the field existing at its base, not at the tip.

30

Since a field normally has a direction at each point in space, we


may also request a contour plot of the angle of direction. This we do
in the last plot (not shown), just inverting the equation cosT g x / gm
and then converting from radians to degrees. This leaves an
ambiguity concerning the sign of the direction, which we resolve by
means of the sign function.
The next task will be to plot the field in the neighbourhood of the
Moon. To do so we only need to modify the geometry in mex042 as
follows.
TITLE
{ mex042a.pde }
'Earth-Moon Gravitation, Close to the Moon'
SELECT
spectral_colors
DEFINITIONS
d=3.84e8 r2=1.74e6 L=10*r2

region 'domain'
start(-L,d-L) line to (L,d-L) to (L,d+L) to (-L,d+L) close
start(r2,d) arc( center=0,d) angle=360
{ Exclude Moon }
PLOTS

The angle plot below shows that the field now is strongly
asymmetric, because of the influence of the Earths gravitation.

31

Next, we explore the field in a region between the Earth and the
Moon. The following amendments to mex042 are required.
TITLE
{ mex042b.pde }
'Earth-Moon Gravitation, Intermediate Region'
SELECT
spectral_colors
DEFINITIONS
d=3.84e8 r2=1.74e6 L=15*r2

region 'domain'
start(-L,d-2*L) line to (L,d-2*L) to (L,d) to (-L,d) close
start(-r2,d) arc( center=0,d) angle=180 line to (-r2,d)
{ Moon }
PLOTS

The following is a logarithmic contour plot of g over a region that


includes the neighborhood of the Moon and extends somewhat in the
direction of the Earth. Here, a deep minimum indicates the point
where the gravitational field vanishes. The gradual deformation of the
circular contours around the Moon, caused by the Earths attraction,
is clearly visible.

32

Divergence of g
Before leaving the gravitational field we should investigate whether
the divergence, g {  2U , is equal to zero. For this purpose we
add the following definition before boundaries to a copy of mex041
and make the corresponding contour plot.
TITLE
{ mex041a.pde }
'Earth-Moon Gravitation, Divergence'

laplace_xy=dxx(U)+dyy(U) { Divergence of gv in (x,y) coordinates }


BOUNDARIES
...
PLOTS
contour( abs( laplace_xy)) log
END

To the reader who knows that the divergence of a gravitational


field in free space vanishes, the following plot of laplace_xy may
come as a shock.

We are in three dimensions, however, although the plots are in a


plane through the two planetary objects. If we had included the term
dzz(U), we would in fact have obtained the irregular contours
suggesting zero divergence.
33

Exercises
Modify mex041 by adding a contour plot of curl(g)z.
Change mex042 by making an elevation plot of gm along the line
y=0.
Convert the contour plots in mex042b to painted. Also try a
logarithmic elevation plot along the line of symmetry.

34

5 Laplace and Poisson Equations

We are finally coming to the core of this book : calculating a field


from the governing partial differential equation (PDE) and certain
knowledge about conditions on the boundary.

Known Values on Boundaries


The first example is the simplest one possible. We shall solve the
Laplace equation
U { U { div(grad (U ))
2

w 2U w 2U

w x2 w y2

using known values of U ( x , y ) on a rectangular boundary. FlexPDE


accepts both div and grad as operators and transforms them internally
into the above 2nd-order PDE.
The following descriptor for this problem makes use of a few new
commands, given in bold characters. First we specify the maximum
relative error of the solution by the optional statement errlim=1e-5.
We can request this high accuracy, because we suspect that the
problem will be an easy one.
The next new keyword is variables, which heads the segment for
the dependent variable: the one to solve for. Then comes the
equations segment with the Laplace PDE.
The solution area limited by the boundary is called the domain. In
the boundaries segment, we specify values of the dependent variable
U on each of the four sides of the rectangle by value statements.
We could have supplied almost any function for the boundary
values, but the skeptical reader might want to convince himself that
the solution emerging is correct. The best way of checking the
numerical results is to use boundary values taken from an analytic
solution. It is known1p477 that the real as well as the imaginary part of
35

any simple complex function f ( z ) satisfies the Laplace equation.


Thus we specify U Re( z 2 ) x 2  y 2 for every point on the
boundary.
TITLE
{ mex051.pde }
'Laplace Equation'
SELECT
{ Student Version }
spectral_colors errlim=1e-5
{ Requested relative accuracy }
VARIABLES
U
{ Unknown }
DEFINITIONS
Lx=1 Ly=1 U_ex=x^2- y^2
{ Exact solution }
EQUATIONS
div( grad( U))=0
{ Laplace PDE }
BOUNDARIES
region 'domain' start(-Lx,-Ly)
value(U)=U_ex line to (Lx,-Ly)
{ U known on boundary }
value(U)=U_ex line to (Lx,Ly)
value(U)=U_ex line to (-Lx,Ly)
value(U)=U_ex line to close
PLOTS
contour( U) surface( U) contour( U_ex) contour( U-U_ex)
END

The program cannot know that U_ex actually is the solution; it


only uses the values on the boundary and the PDE. This means that
our test is non-trivial. In seconds, the program produces the following
contour plot of the solution.

36

The plots of U and U_ex are indistinguishable to the naked eye. In


anticipation we added a plot of U-U_ex, which presents the error of
the numerical solution. As you see from the next plot the error is less
than 10-9 of the maximum value of U for this number of nodes.

In this example we specified values on a rectangular boundary, but


we could just as well have made it triangular, circular or half-circular.
We could even have cut out areas inside the domain, supplying values
on the inner boundaries too. Rigorous literature on PDEs proves that
the Laplace equation has exactly one solution, if the values on the
boundaries are known.

Values and Derivatives on Boundaries


As an alternative to function values we could have specified values of
the normal derivative, U n { w U /w n , taken in a direction n perpendicular to the boundary, and outwards from the solution domain. Let
us use such a condition in a new descriptor, based on mex051, where
the region segment reads as follows.
TITLE
'Laplace Equation'
...

{ mex052.pde }

37

region 'domain' start(-Lx,-Ly)


value(U)=U_ex line to (Lx,-Ly)
natural(U)=2*x line to (Lx,Ly)
value(U)=U_ex line to (-Lx,Ly)
value(U)=U_ex line to close

{ Outward derivative, dx(U) }

The FlexPDE notation for w U / w n is natural(U), for obscure traditional reasons. Running this descriptor we again find excellent
agreement with the exact solution.

Multiplying through the PDE


There is an important point to notice about natural boundary
conditions. One would think that multiplying all the terms of a PDE
by the same factor would not change the solution, but this is not so. In
fact, we need to multiply the natural boundary conditions by the same
factor. This occurs because the program integrates the PDE by parts,
making this factor appear in the result. Let us illustrate this by a
modification of mex052.
TITLE
'Laplace Equation, Multiplied'
...
div( 5*grad( U))=0

{ mex052a.pde }

{ Laplace PDE }

natural(U)=5*2*x line to (Lx,Ly) { Outward derivative, dx(U) }

Running this file we find the same small error as before. If we


erase the multiplier in the natural boundary condition, however, the
error becomes very large.
We shall encounter several examples in this book, where a
multiplier occurs in this position inside the PDE. Usually, the factor is
not an integral number but a materials property.

38

Derivative Boundary Conditions Only


Now let us proceed to the extreme case, supplying only derivative
conditions on all of the four boundary lines, using the modifications
to mex051 indicated below. For the line at the bottom of the rectangle
we must enter the downward derivative, w U / w (  y ) 2 y .
TITLE
'Laplace Equation'
...
region 'domain' start(-Lx,-Ly)
natural(U)=2*y line to (Lx,-Ly)
natural (U)=2*x line to (Lx,Ly)
natural (U)=-2*y line to (-Lx,Ly)
natural (U)=-2*x line to close
...

{ mex053.pde }

{ Outward derivatives }

The deviation of the numeric solution from the exact one is no


longer small, but it takes an almost constant value. This may be no
surprise, if you thought (correctly) that a function could not be
uniquely determined by its derivatives.
You may now guess that derivative boundary conditions are
sufficient except for a constant, and fortunately the program also
allows us to assign a value to a single point. Using this feature we
modify mex053 as follows.
TITLE
'Laplace Equation'
...
region 'domain' start(-Lx,-Ly) point value(U)=U_ex
...

{ mex053a.pde }

The point value statement must be typed immediately after the


parentheses containing the point coordinates. The value applies only
to that point and takes no effect later in the descriptor. Running this
descriptor file we obtain an error almost as low as for mex051.

39

Solution over a Quarter-Circle


We shall now solve the Laplace equation over the first quadrant of a
circle, using Im( z 2 ) for the boundary values, as explained by the
partial descriptor below, based on mex051. Here we must supply
coordinates for the center of the arc in order to specify uniquely the
boundary curve we want.
TITLE
'Laplace Equation'
...
DEFINITIONS
r0=1 U_ex=2*x*y
...
region 'domain' start(0,0)
value(U)=U_ex line to (r0,0)
value(U)=U_ex arc(center=0,0) to (0,r0)
value(U)=U_ex line to close
...

{ mex054.pde }

{ Exact solution }

Running this new descriptor you obtain the plot below for U. The
last plot (not shown here) indicates that the actual error in U is larger
than that estimated (RMS Error, MAX Error) at a number of spots close
to the curved boundary. The error is largest inside the cells having a
curved side, but it remains smaller than errlim over the rest of the
domain.

40

The Poisson Equation


The Poisson equation is similar to the Laplace PDE, the only
difference being that the right member is a function, rather than zero.
It is difficult to find exact solutions to such problems, but it is easy to
find a PDE that corresponds to a given exact solution. We need only
apply 2 to a function of our choice to obtain the corresponding right
member of the equation. To that solution we could then add any
known solution to the Laplace equation (e.g. x*y), since that would
contribute zero to the right side of the PDE.
TITLE
{ mex055.pde }
'Poisson Equation'
SELECT
errlim=1e-3 spectral_colors
VARIABLES
U
DEFINITIONS
Lx=1 Ly=1 U_ex=(x^3+y^2)+ x*y
{ Exact solution }
EQUATIONS
div( grad( U))=6*x+2
BOUNDARIES
region 'domain' start(-Lx,-Ly) value(U)=U_ex
line to (Lx,-Ly) to (Lx,Ly) to (-Lx,Ly) close
PLOTS
contour( U) surface( U) contour( U_ex) contour( U-U_ex)
END

Here, the value boundary condition takes the same form for all four
sides of the square. In such a case, the program permits us to type the
expression for the value only once, making it automatically valid for
the following segments of the boundary.
The next figure shows a surface plot of the solution. The last figure
(not shown here) indicates that the solution is inside the error limit
requested, except at one point.

41

Exercises
In mex051, try using the function U_ex=x^2+y^2 (which is not an
analytic solution to the PDE). Do you still obtain a numeric solution?
Solve mex051 over a rectangular region of the same size using
value boundary conditions from U_ex=x/(x^2+y^2) (which is the real
part of 1/z). Locate your domain so that it does not include the
singular point at the origin.
Solve the Laplace equation in mex054 over the first quadrant, but
specify normal derivatives on the two straight boundaries and values
on the arc.
Modify mex055 with respect to the boundary conditions. Let the
values be known on the horizontal boundaries, and introduce
derivative boundary conditions on the vertical lines. Remember to use
the outward derivative.
Modify mex055 again, specifying derivative boundary conditions
on all boundaries and adding a point value at one of the corners.
Change the boundary values in mex055 to U_ex=sin(x)+y^2 and
modify the Poisson equation accordingly.

42

6 Elementary Elasticity in (x,y) Space

Elasticity is about deformation and internal stress in solid objects


caused by external forces and non-uniform temperature. For a volume
element, the deformation may be described in terms of local strain
along the coordinate axes. The normal strain component H x is the
fractional change of the length in the x direction. Geometric considerations2p235 lead to the following differential expressions for the
strains in terms of displacements (u, v , w) in the axial directions.

wu
,
wx

Hx

wv
,
wy

Hy

Hz

ww
,
wz

J xy

wv wu

wx wy

Here, J xy is the shear strain (angular distortion) component.


Normal stress is defined as the normal component of the force per
unit area on a surface (internal or external). The component V x , for
instance, acts on a surface perpendicular to the x-axis and the force
component is directed along the x-axis.
One of the corner-stones of elasticity is an empirical law, due to
Hooke2p289, which means that the change in length of a volume
element in the x direction, say, depends not only on the force in that
direction, but also on the transverse forces. For a uniform temperature, this relation may be written

R|H
||
S|H
||H
T

1
V x  P V y Vz
E
1
V y  P Vz V x
E
1
Vz  P V x V y
E

d
a
d

i
f
i

where E is the modulus of elasticity and P the Poisson ratio.


The above set of equations thus expresses the change of shape of a
volume element as a result of the applied forces. The quantity P is
43

the ratio of elongation to transverse contraction of a volume element.


The three equations are similar, in the sense that one can be obtained
from another by cyclic permutation of x, y, and z.
The original form of Hookes law expresses strains in terms of
stresses. In order to develop the PDEs for elastic deformation, we
shall need to express stresses in terms of strains, which means that we
must invert the above system of linear equations. This simply means
solving with respect to V x , V y , and V z , which is a straightforward
but tedious task. In this book, we shall mostly be concerned with two
normal stress components, which simplifies the formal work.
Shear stress is a component of the force per unit area acting along
a surface. There are two perpendicular components of this in-plane
force, and the notation must define the orientation of the surface as
well as the direction of the force component. By convention, the
orientation is given by the first index and the stress component by the
second index. Thus, W xy is the y-component of the stress acting on a
plane perpendicular to the x-axis. The stress components W xy and W yx
hence have different definitions, but it may be shown by equilibrium
considerations2p212 that
W xy W yx
z
There is a corresponding notation for the shear strain components.
The shear components are related by

W xy

G J xy ,

W xz

G J xz ,

W yz

G J yz

with the abbreviation


G

E
2(1  P )

Plane Stress
In the 2D version of FlexPDE we may solve a PDE over a region in
( x , y ) but we cannot handle the variation with respect to z. Hence, we
must make a simplifying assumption about the behavior in the third
direction. We may choose between two simple courses of action.
44

One alternative is to assume vanishing H z . This would correspond


to an object being constrained without friction between two rigid and
immobile plates.
Another alternative is to assume vanishing V z , which means that
no external stress opposes the deformation along the third axis. This
should be valid if no force is applied in that direction.
Although we could treat either of those cases without difficulty, we
choose the more commonly occurring condition V z 0 , known as
plane stress, for all the examples in this chapter.
With V z 0 , the last of the Hooke equations (p.43) yields

Hz

P V x  V y / E

and the first two rows hence become

R|H
|S
||H
T

wu
wx
wv
wy

1
V x  PV y
E

1
V y  PV x
E

which we readily solve to obtain

R|V
S|
|TV

E
H x  PH y
1 P2
E
PH x  H y
1 P2

d
d

i
i

The shear stress W xy may simply be written

W xy

GJ xy

E
J xy
2(1  P )

If the stress components are independent of z, the equations of


mechanical equilibrium for a volume element become2p288

R|wV  wW  F
|S w x w y
||wW  wV  F
T wx wy
x

xy

( x - components, W yx = W xy )

( y - components)

yx

45

where (V x , V y ) are the normal components of stress and W xy the


shear component. The components of the external force ( Fx , Fy ) refer
to unit volume, for instance gravitational or centrifugal forces.
It now remains to substitute the expressions for stress into the
above PDEs, which yield equations for strain. These in turn may then
be replaced by the differential expressions in terms of displacements.
For instance, expanding w V x /w x by means of p.45z2 and then by
p.43z1 we obtain 2nd-order derivatives of u and v. In practice, we do
not need to make these substitutions by hand, because FlexPDE
automatically replaces the stress and strain components according to
our definitions.
As will be illustrated by the first example, the general procedure is
to solve for the displacements (u, v ) , then compute strains by
differentiation, and finally extract the stress components by means of
Hookes law.

Boundary Conditions
The boundary conditions to apply are rather obvious in cases where
the displacements of external surfaces are given. In the problem
descriptor we only need to enter the function u0 specifying the
displacement in the x directions by value(u)=u0, and so on. This usage
will become clear from the first practical example below.
When dealing with the Laplace equation (p.38) we saw that the
normal derivative U n { w U /w n could be denoted natural(U) in the
boundary conditions. In the case of elastic deformation there are two
dependent variables, u and v, and we shall see that natural needs to be
interpreted somewhat differently.
The situation where external surface forces are specified is a little
subtle, but we shall see that the practical use remains simple. In the
figure below we consider the equilibrium of a volume element,
exposed to the stress component V x at the left end, and an external
stress X at the right end. The cross-sectional area of the volume
element is denoted Ax . For this case we find the condition V x X .

46

V x Ax

XAx

By a similar argument we find that an external stress component Y


must be equal to the shear stress W xy at the left end, or in short
W xy Y .
We have thus obtained relations between the internal and external
stress components, and it now remains to explore how to express the
boundary conditions in terms of the dependent variables u and v.
In the first PDE (p.45z4), the terms correspond to forces parallel
to the x-axis. Here w /w x acts on V x , which suggests that natural(u)
should correspond to V x at the boundary. The second term of the
same PDE is wW xy /w y , and this suggests that natural(v) should
correspond to the y-directed stress W xy .
From this we may infer that the derivative conditions on a
boundary perpendicular to the x-axis would be
natural(u)= X
natural(v)= Y
The program lets us replace the command natural by load, which is a
more familiar term in mechanics. Thus, we may also type
load(u)= X

load(v)= Y

Next, we need to express the derivative conditions on a surface


perpendicular to the y-axis. Inspecting the second PDE, similar
arguments lead us to assume
load(u)= Y

load(v)= X

These interpretations of load may not be obvious, but we may


easily verify them by suitable plots of a solution. The following
47

descriptors will illustrate how these load and value boundary


conditions should be handled in practice.

Steel Plate under Compressive Strain


We shall now convince ourselves that the system of PDEs (p.45z4)
yields correct answers when solved by the FlexPDE program. For this
purpose we choose the simplest possible situation, so that we can
easily check the solution by pencil and paper. Let us take a
rectangular plate of steel and shorten it by 0.1% by applying
compressive strain in the x direction. In practice, we could press it
between two rigid, smooth, and well lubricated anvils, such that the
plate is free to slide sidewise, except at the middle point of one of the
faces.
In Chapter 5, we only had one unknown function to determine, but
now we must solve for two functions, u and v, which are the
displacements along the axes. In the descriptor below we first declare
u and v to be the dependent variables. There are also two PDEs, as
must be, and we have simplified them by neglecting volume forces,
such as gravitation.
The definitions segment contains the expressions for stress and
strain, which you should verify against those in the above theoretical
summary.
FlexPDE requires that we tag each equation by the variable
associated with the force component concerned. This means that the
first one, which expresses force equilibrium in the x direction, should
be tagged by u.
The boundaries section describes the rectangular geometry and
specifies the conditions that apply at the surfaces of the object. Here,
we attach a name to the region consisting of steel. The load on the
horizontal faces is zero, both in the horizontal (u) and vertical (v)
directions. The point value serves to fix the plate, to avoid vertical
drift during calculations.
In this descriptor, we use the grid plot in a novel way. The plot
now displays the deformed boundaries of the steel plate, the distortion
being enlarged by the factor 200. Most of the other plots are of the
48

contour type, but you could also try surface plots to explore if they
are easier to read.
TITLE
{ mex061.pde }
'Plate Under Compressive Strain'
SELECT
errlim=1e-6 spectral_colors
VARIABLES
u
v
{ Displacements in the x and y directions }
DEFINITIONS
{ SI units throughout : m, kg, s, K, N, Pa, J}
Lx=40e-3 Ly=30e-3
mu=0.3 E=200e9
{ Steel }
C=E/(1-mu^2) G=E/[2*(1+mu)]
uv=vector( u, v) uvm=magnitude( uv) { Vector displacement }
ex=dx(u) ey=dy(v) exy= dx(v)+ dy(u) { Strain components }
sx=C*(ex+ mu*ey) sy=C*(mu*ex+ ey)
{ Stress components }
sxy=G*exy ez=-mu*(sx+ sy)/E
EQUATIONS
{ No volume forces }
u: dx( sx)+ dy( sxy)=0
{ Forces in u-direction }
v: dx( sxy)+ dy( sy)=0
{ Forces in v-direction }
BOUNDARIES
region 'steel'
start 'outer' (0,0) load(u)=0 load(v)=0 line to (Lx,0)
value(u)=-1e-3*Lx load(v)=0 line to (Lx,Ly) { Compression }
load(u)=0 load(v)=0 line to (0,Ly)
value(u)=0 load(v)=0 line to (0,Ly/2) point value(v)=0
value(u)=0 load(v)=0 line to close
PLOTS
grid( x+200*u, y+200*v)
contour(u) contour(v) vector(uv) norm
contour(ex) contour(ey) contour(exy) contour(ez)
contour(sx) contour(sy) contour(sxy)
elevation(u,v) on 'outer'
END

The grid plot below shows the new shape of the plate. On the
maximized screen version you may easily read off the deviation with
respect to the original size, as given by Lx and Ly. Taking the
enhancement factor 200 into account, you will find that the length is
in fact smaller by 0.1%, as required. Also, the height is increased to
the extent expected from Hookes law.

49

The following figure shows contours of constant vertical displacement.

The values of v in the above plot are negative in the lower half of
the plate and positive in the upper half, all in perfect agreement with
Hookes law. The contours are also straight lines, as expected.
The next plot of the displacement vector (u, v ) illustrates how the
material moves as the plate is compressed. The added command norm
means that we ask the program to divide the vector components by
50

the magnitude, and the result is a standard length for the arrows. The
magnitude of the vectors is roughly indicated by the color code. The
displacement is evidently largest at the right end.

It is instructive to compare the above figure with the grid plot of


the deformation and with the elevation plot (below) on the boundary.
The vertical displacement is independent of x, but the existing slope
of the vector displacement in the upper-right corner is hardly visible.
At the left face of the plate, however, the horizontal displacement
vanishes, and near that end the vertical deviation thus dominates.

51

The contour plots of the strain components ex and ey give us very


precisely the values expected, whereas the shear strain is random and
smaller by a factor of about 107 , indicating that there is no angular
distortion.
Inspecting the contour plots of the stress components (sx, sy, and
sxy) we notice that they agree very well with expectations.
Finally, we note that we also obtain the strain component ez,
although it pertains to the third dimension. Clearly, the compressed
plate dilates uniformly in the z direction.
Although the above application is exceedingly simple, the PDEs
are far from trivial, and the same is true of the numerical methods
exploited. The fact that we obtain excellent agreement with
elementary calculations is thus an impressive demonstration of the
accuracy and efficiency of the FEA program.

Strained Plate, No Sliding


This is a variation of the preceding problem, the difference being that
we assume the anvil surfaces to be sufficiently rough to prevent any
sliding in the y direction. The descriptor needs to be modified as
follows. Since we fix both ends of the plate by value statements, we
no longer need the point value. The modifications to mex061 are as
follows.
TITLE
{ mex062.pde }
'Strained Plate, No Sliding'
SELECT
errlim=1e-4 spectral_colors
...
region 'steel'
start 'outer' (0,0) load(u)=0 load(v)=0 line to (Lx,0)
value(u)=-1e-3*Lx
value(v)=0 line to (Lx,Ly)
{ Right end }
load(u)=0 load(v)=0 line to (0,Ly)
value(u)=0 value(v)=0 line to close
{ Left end }
...

The following figure shows the resulting grid plot of the


deformation. The free surfaces have now become clearly convex.
Because of the constraints on the vertical (Y) faces the solution has
52

large curvature at the corners, and these regions require denser grids
for the calculations.

The next plot shows that the constrained sides produce shear strain,
especially near the corners. The contour for zero shear strain is
forked, and the variation is small in the region of those curves, as
indicated by the distance to the next contour. This is one of the
reasons why these contours appear somewhat irregular. The other
reason is, of course, that they are based on derivatives of the solution
for the displacements.

53

Plate Subjected to Pressure at One End


The next problem is asymmetric. The left end of the plate is fixed to a
wall, and we apply pressure on the right face, without restraining it in
the vertical direction. To specify this new type of load, we use the
rules of derivative boundary conditions. Most of the mex061
descriptor remains unchanged.
TITLE
{ mex063.pde }
'Plate under Pressure from Right'
SELECT
errlim=1e-5 spectral_colors
...
region 'steel'
start 'outer' (0,0) load(u)=0 load(v)=0 line to (Lx,0)
load(u)=-3e8 load(v)=0 line to (Lx,Ly)
{ Pressure }
load(u)=0 load(v)=0 line to (0,Ly)
value(u)=0 value(v)=0 line to close
PLOTS
grid( x+200*u, y+200*v)
contour(u) contour(v) vector(uv) norm
contour(ex) contour(ey) contour(exy) contour(ez)
contour(sx) painted contour(sy) contour(sxy)
elevation(u,v) on 'outer' elevation( sx, sy) on 'outer'
END

54

The above figure is a painted contour plot of sx, which is nearly


uniform over the right half of the plate. As you can see, the right face
seems to have the expected stress, which means that we succeeded in
imposing the intended derivative boundary conditions.
The last elevation plot is particularly instructive. It displays the
variation of both sx and sy along the boundary of the plate and
confirms more clearly the pressure we imposed on the right face.

Plate with Tension Applied at both Ends


In order to apply other aspects of load boundary conditions, we now
study a plate loaded by tension at the left and right ends. We again
use mex061 as a template. In this problem, there are only load
(natural) boundary conditions, and hence we should add point values
to prevent the plate from rotating during the calculations.
TITLE
{ mex064.pde }
'Plate with Tension at both Ends'
SELECT
errlim=1e-4 spectral_colors
VARIABLES
u
v
DEFINITIONS
Lx=40e-3 Ly=30e-3
mu=0.3 E=200e9
{ Steel }
C=E/(1-mu^2) G=E/[2*(1+mu)]
uv=vector( u, v) uvm=magnitude( uv)
ex=dx(u) ey=dy(v) exy= dx(v)+ dy(u) { Strain components }
sx=C*(ex+ mu*ey) sy=C*(mu*ex+ ey)
{ Stress components }
sxy=G*exy ez=-mu*(sx+ sy)/E
EQUATIONS
{ No volume forces }
u: dx( sx)+ dy( sxy)=0
{ Forces in u-direction }
v: dx( sxy)+ dy( sy)=0
{ Forces in v-direction }
BOUNDARIES
region 'steel' start 'outer' (0,0)
load(u)=0 load(v)=0 line to (Lx,0)
load(u)=3.0e8 load(v)=0
{ Right end }
line to (Lx,Ly/2) point value(v)=0 line to (Lx,Ly)
load(u)=0 load(v)=0 line to (0,Ly)
load(u)=-3.0e8 load(v)=0
{ Left end }

55

line to (0,Ly/2) point value(v)=0


line to close
PLOTS
grid( x+200*u, y+200*v)
contour(u) contour(v) vector(uv) norm
contour(ex) contour(ey) contour(exy) contour(ez)
contour(sx) contour(sy) contour(sxy)
elevation(u,v) on 'outer'
END

At the left and right ends we apply loads according to the relation
p.47z1. The force per unit area ( X ) is 3.0e8 on the right face of the
plate, and it takes the opposite sign on the left face.
The following elevation plot shows the expected relation between
extension in the x direction and contraction in the y direction.

The plots of stress and strain are also instructive.

Plate Subjected to Shear Forces


As a final example in our round of the elementary phenomena of
elasticity we shall now study the same plate as before, but with
tangential load on three faces, as specified in the following descriptor.
56

The bottom is fixed and the force per unit area is the same on the
remaining faces, except for signs. The descriptor is again based on
mex061.
TITLE
{ mex065.pde }
'Plate Subjected to Shear Forces'
SELECT
errlim=1e-4 spectral_colors
...
shear_f=2e8
{ Shear force per unit area }
EQUATIONS
...
region 'steel'
{ Shear load on all sides }
start 'outer' (0,0)
value(u)=0 value(v)=0 line to (Lx,0)
load(u)=0 load(v)=shear_f line to (Lx,Ly)
load(u)=shear_f load(v)=0 line to (0,Ly)
load(u)=0 load(v)=-shear_f line to close
...

The shear strain comes out as 2.60e-3, whereas the normal strains
in the x and y directions are of the order of 1e-16. Theory leads us to
expect that the latter two vanish. In short, the numerical results are in
satisfactory agreement with elementary theory.

57

The above figure shows the shape of the plate after the tangential
forces have been applied, the deformation being exaggerated by the
factor 200 for clarity.

Exercises
Assume the plate in mex062 still to be welded to the anvils, but
reverse the sign of the displacement at the right face. Study the
deformation and compare.
Save mex061 under a new name and add a tangential load of 1e8 to
the right side.
Save mex065 under a different name and remove the shear load on
the left side, then on both left and right sides.
Shear the rectangular plate (mex065) again, using value statements
only. Fix the bottom face as before and constrain the upper face to
move by a prescribed distance to the right, keeping the height
constant. Impose x-deformations proportional to y on the vertical
faces, in such a way that the boundary remains continuous.

58

7 Straight Beams

In this chapter we shall approach problems of some technological


importance and also elaborate on the graphical representation of the
results. Although technical applications usually are quite complex,
involving many parts, we shall insist on the simplest possible
example of any given kind. It is rather easy to build a complex model
from elementary constituents, but complexity is not very instructive.
Transverse loads on rectangular beams are of great importance in
engineering. In these cases a number of simple, approximate solutions
exist which may be used for comparison.

Beam with Uniform Load


Using the same formalism as in the preceding chapter we shall now
consider a realistic problem, that of a cantilever beam fixed to a wall
and loaded by pressure on the top. We specify zero displacement on
the face attached to the wall and uniform load on the upper face.
In the following descriptor we shorten the list by condensing the
first lines. Generally, headers may be followed by commands on the
same line.
The external force per unit area on the top acts in the -y direction.
TITLE 'Beam with Uniform Load'
SELECT errlim=1e-5 spectral_colors
VARIABLES u v
DEFINITIONS
L=1.0 h=0.2
mu=0.3 E =200e9
C=E/(1-mu^2) G=E/[2*(1+mu)]
uv=vector(u,v) uvm=magnitude( uv)
ex=dx(u) ey=dy(v) exy=dx(v)+dy(u)
sx=C*(ex+ mu*ey) sy=C*(mu*ex+ ey)
ez=-mu*(sx+ sy)/E
pressure=1e6

{ mex071.pde }

{ Lz=1 }
{ Steel }

sxy=G*exy

59

EQUATIONS
u: dx( sx)+ dy( sxy)=0
v: dx( sxy)+ dy( sy)=0
BOUNDARIES
region 'steel'
start 'outer' (0,-h/2)
load(u)=0 load(v)=0 line to (L,-h/2)
load(u)=0 load(v)=0 line to (L,h/2)
load(u)=0 load(v)=-pressure line to (0,h/2)
value(u)=0 value(v)=0 line to close
PLOTS
grid( x+200*u, y+200*v)
contour( u) contour( v) vector( uv) norm
contour( sx) contour( sy) contour( sxy)
contour( ez) elevation( u, v) on 'outer'
elevation( sx) on 'outer'
elevation( sy) on 'outer'
elevation( ez) on 'outer'
END

The following grid plot directly illustrates the (exaggerated)


deviation of the beam under load.

The next (contour) plot displays the longitudinal component of


stress.

60

Evidently, the upper half of the beam is in tension, the lower half
in compression. It is instructive to compare all the plots with each
other and with your intuitive notions. For example, looking at the two
plots of ez we notice that the beam thickens in its lower part.

Comparison with an Analytic Solution


There is an approximate solution to the above problem2p531. The
expression for the vertical deviation of the beam due to the load is
vapx

p0 x 2
x 2  6 L2  4 Lx

24 EI zz

where p0 is the applied pressure, and I zz the geometric moment of


inertia. For comparison we add the following two lines to mex071.
TITLE 'Beam with Uniform Load'
{ mex071a.pde }

Izz=h^3/12 v_apx=-pressure*x^2/(24*E*Izz)* (x^2+ 6*L^2- 4*L*x)


EQUATIONS
...
elevation( v, v_apx) on 'outer'
END

61

The resulting elevation plot (below) shows satisfactory agreement


between the engineering approximation and the FEA calculations.

Further Analysis of Stress

The normal and shear stresses transform under a rotation (T ) of the


coordinate system according to the following equations2p218.

R|V
||
S|W
||V
T

Vx  Vy

x'

x' y'

Vx  Vy

y'





Vx  Vy

2
Vx  Vy
2
Vx  Vy
2

cos 2T  W xy sin 2T

sin 2T  W xy cos 2T

cos 2T  W xy sin 2T

The primed stress components are those we obtain in the new


coordinate system ( x ', y ') . A central fact of elasticity is that the shear
stress vanishes for certain angles T , corresponding to a principal
system of coordinates.
From the middle equation we immediately obtain the angle from
the x-axis to one of the two principal axes
62

0.5 arctan

2W xy

V x V y

We know that the other principal axis is at right angles to this


direction, but since we can only indicate one of the two axes on a plot
we should have some criterion for selecting it. We choose to show the
direction corresponding to the highest algebraic value of principal
stress. This means tensile stress, except in cases where both principal
stresses are compressive.
All the command lines in the following list will be used again and
again, which is a good reason for keeping them in a special file
(defuv.pde), which we may easily include in later descriptors by a
convenient command. In this file we select the tensile principal axis
( x ' ). Using arctan(x) we first calculate the angle to a principal axis.
Then we calculate both principal stresses and test whether the current
x ' -axis corresponds to the highest value. If so, we keep the angle
obtained, otherwise we add pi/2.
{ Block of definitions for later descriptors }
{ defuv.pde }
C=E/(1-mu^2) G=E/[2*(1+mu)]
uv=vector(u,v) uvm=magnitude( uv)
ex=dx(u) ey=dy(v) exy=dx(v)+ dy(u)
sx=C*(ex+ mu*ey) sy=C*(mu*ex+ ey) sxy=G*exy
ez=-mu*(sx+ sy)/E
p_ang=0.5* arctan( 2*sxy/(sx-sy) )
{ Radians }
sxp0=(sx+sy)/2+ (sx-sy)/2*cos(2*p_ang)+ sxy*sin(2*p_ang)
syp0=(sx+sy)/2- (sx-sy)/2*cos(2*p_ang)- sxy*sin(2*p_ang)
{ Test for highest algebraic value: }
p_angl= if sxp0>syp0 then p_ang else p_ang+ pi/2
sxp= if sxp0>syp0 then sxp0 else syp0
{ sx' }
syp= if sxp0>syp0 then syp0 else sxp0
{ sy' }
p_angle=p_angl*180/pi
{ Degrees }
mises=sqrt( 0.5*[ (sx-sy)^2+ sx^2+ sy^2]+ 3*sxy^2)
energy_d=(1/2)*( sx*ex+ sy*ey+ sxy*exy)
{ Energy density }

The way we make logical decisions (if...then...else) should be


obvious, since the syntax involves rather plain English. (FlexPDE
usage differs from most other programming languages in that a
construct of the type x=x+pi/2 is banned.)

63

To calculate the final principal stresses, we keep a value if the test


shows that the first choice gives the highest value along the x ' -axis;
otherwise we exchange the axes.
The Mises (equivalent) stress2p316 is expressed here directly from
the Cartesian components. At the very end of the list we quote the
expression for the elastic energy density2p302 for later use.
In the following descriptor, based on mex071, we exploit the above
include file to get deeper insight into the preceding solution.
TITLE 'Beam with Uniform Load, Principal Axes'
{ mex072.pde }
SELECT errlim=1e-5 spectral_colors
VARIABLES u v
DEFINITIONS
L=1.0 h=0.2
{ Lz=1 }
mu=0.3 E =200e9
{ Steel }
#include 'defuv.pde'
{ Block of command lines }
pressure=1e6
EQUATIONS
...
contour( p_angle)
vector( cos(p_angl)*sxp, sin(p_angl)*sxp) norm notips as ' "tension" '
contour( sxp) contour( syp) contour( mises)
contour( sxp) painted contour( syp) painted
contour( mises) painted
END

When presenting the directions of principal axes by a vector plot,


we should remember that stress is not a vector. A stress component
has direction, but it is either tensile or compressive depending on the
sign. The same is true of strain. Hence, arrow tips would carry no
information. The modifier notips improves the readability of such
direction plots.
The following plot indicates the direction of the principal axis (x')
of maximum tension. In the lower-left part of the beam the predominant principal stress is compressive, however. We shall soon see
how this strange situation comes about.

64

In the current descriptor we supplied alternatives to the standard


contour plots. The painted contour plots are often easier to interpret at
a glance. Hence, the following plot of sxp (the stress along x') clearly
demonstrates (by screen colors) that this principal stress is negative in
the lower-left region.

The next plot of syp shows that the stress along the perpendicular
axis (y') is even more negative, hence algebraically smaller.
65

The following plot of equivalent stress (Mises) permits us to decide


if and where the object is likely to flow plastically. This field quantity
does not differentiate between tensile and compressive stress.

66

Beam Loaded on a Line


FlexPDE also permits us to apply load along a line perpendicular to
the (x,y) plane by the use of point load. To test this feature we modify
mex072 as follows.
TITLE 'Beam Loaded on a Line'
{ mex072a.pde }

region 'steel'
start 'outer' (0,-h/2)
load(u)=0 load(v)=0 line to (L,-h/2)
load(u)=0 load(v)=0 line to (L,h/2) load(u)=0 load(v)=0
line to (L/2,h/2) point load(v)=-5e5
{ Force per meter on line }
line to (0,h/2) value(u)=0 value(v)=0 line to close
PLOTS
grid( x+200*u, y+200*v) contour( mises) painted
END

From the grid plot (below) we find that the curvature is confined to
the left half of the beam. We also notice that there are relatively few
nodes in the right half.

The next plot of the Mises stress reveals a sharp maximum where
we applied the load. In principle, the stress per unit length of the line
is infinite, but the numerical values remain finite.
67

Gravity Bending
Let us now consider a cantilever beam loaded by its own weight and
welded to a vertical support at one end. Gravity acts on each volume
element, so that we have to introduce the term Fy in the second PDE
(p.45z4). Using mex072 as a template we eliminate all loads on the
boundaries and specify zero values for u and v on the left face.
TITLE 'Gravity Bending'
SELECT errlim=1e-5 spectral_colors
VARIABLES u v
DEFINITIONS
L=1.0 h= 0.2 Izz=h^3/12
mu=0.3 E=200e9
#include 'defuv.pde'
Fy=-7.8e3*9.8 w0=Fy*h
v_apx= w0*x^2/(24*E*Izz)*(x^2+ 6*L^2- 4*L*x)
EQUATIONS
u: dx( sx)+ dy( sxy)=0
v: dx( sxy)+ dy( sy)+ Fy=0
BOUNDARIES
region 'steel'
start 'outer' (0,-h/2)

68

{ mex073.pde }

{ Steel }
{ Gravity }
{ Analytic approx. }

{ Volume force }

load(u)=0 load(v)=0 line to (L,-h/2)


load(u)=0 load(v)=0 line to (L,h/2)
load(u)=0 load(v)=0 line to (0,h/2)
value(u)=0 value(v)=0 line to close
PLOTS
grid( x+1e4*u, y+1e4*v)
contour( u) contour( v) vector( uv) norm
elevation( u, v) on 'outer' elevation( v, v_apx) on 'outer'
contour( sx) contour( sy) contour( sxy) contour( ez)
elevation( sx) on 'outer' elevation( sy) on 'outer'
elevation( ez) on 'outer'
contour( p_angle)
vector( cos(p_angl)*sxp, sin(p_angl)*sxp) norm notips as ' "tension" '
contour( sxp) contour( syp) contour( mises)
contour( sxp) painted contour( syp) painted
contour( mises) painted
END

The grid plot looks very much like what we obtained with uniform
load on the top surface (p.60), as we could expect. If we compare the
elevation plot of sy on the boundary, however, we find a clear
difference with respect to the plot obtained by mex071.
We may again compare to the approximate expression for the
vertical displacement2p531 that we used for pressure load (p.62). The
force of gravity acts on the volume, rather than on the upper surface,
but if we express this in terms of force per unit length the following
plot yields fair agreement.

69

The plot of Mises stress shows that the maximum risk of failure
still occurs at the left corners.

Forces and Moments


We now know how to differentiate displacements to obtain strains
and stresses. By considering the equilibrium of a suitably defined part
of the object we may also relate the stresses to the external force (per
unit extension in the z direction).
In the case of the beam in the preceding example we may isolate
the major part of it by a fictitious vertical cut at the welded end. In
order to calculate the force on the surface exposed we must integrate
over a line representing the cut. This integral yields the force per unit
depth along the z direction. The program automatically supplies
integral values for an elevation plot, i.e. it evaluates the area under
each curve. The result is displayed on the bottom line of the plot.
In the descriptor fraction below (based on mex073) the integral of
sxy yields the shear force on the cut, which should balance the force
of gravity on the beam. We thus add the following lines (and perhaps
use { } to eliminate some plots that we have already seen). FlexPDE
lets us compute the weight (wgt) and report that on the same line as
the integral.
TITLE 'Gravity Bending, Force and Moment'
{ mex073a.pde }
SELECT errlim=1e-5 spectral_colors
...
wgt=Fy*h*L
{ Weight of beam }
M=wgt*L/2
{ Moment caused by weight }
EQUATIONS
...
elevation(sxy) from (0,-h/2) to (0,h/2) report( wgt)
{ Force }
elevation(sx) from (0,-h/2) to (0,h/2) report( wgt)
elevation(sx*y) from (0,-h/2) to (0,h/2) report( M)
{ Moment }
END

The following figure shows the pertinent elevation plot, and we


note that the line integral agrees reasonably well with the weight of
the beam.

70

The next elevation plot gives us the integrated force in the x


direction on the left face of the isolated part of the beam, which
shows that this force is small, compared to the weight of the beam.
Another interesting verification is to compute the bending moment
generated by the distribution of sx over the cross-section of the same
cut as before. This bending moment must balance the moment due to
gravity. The plot of sx*y confirms that the two moments also are in
reasonable agreement.
At this point we might revert to mex072a, inserting the following
line just before End.
elevation(sxy) from (0,-h/2) to (0,h/2)

{ Force }

The resulting integral turns out to be about 7% lower than the


nominal point load, which is fair considering the singularity involved.

Beam with Bending Moments at Ends


The problem of a beam with bending moments at the ends may easily
be solved analytically2p512. We shall now compare the FEA solution
to the analytic one, and in this case we neglect the influence of
gravity. For instance, we may assume the beam to be directed along
the field of gravity.

71

Hence, let us apply bending moments at the ends of the beam, both
of magnitude Mb but having opposite signs.
We may express the y displacement, v_ex, in terms of Mb using
first-order geometry of deflection2p514. We define the displacement v
to be zero at the ends.
TITLE 'Beam with Bending Moments at Ends'
{ mex074.pde }
SELECT errlim=1e-5 spectral_colors
VARIABLES u v
DEFINITIONS
L=1.0 h=0.2
mu=0.3 E=200e9
{ Steel }
#include 'defuv.pde'
Mb=5e5 Izz=h^3/12 v_ex=Mb/(E*Izz)*[x^2-(L/2)^2]/2
EQUATIONS
u: dx( sx)+ dy( sxy)=0
v: dx( sxy)+ dy( sy)=0
BOUNDARIES
region 'steel'
start 'outer' (-L/2,h/2)
{ Left end }
load(u)=Mb/Izz*y load(v)=0 line to (-L/2,-h/2) point value(v)=0
load(u)=0 load(v)=0 line to (0,-h/2)
load(u)=0 load(v)=0 line to (L/2,-h/2) point value(v)=0
load(u)=-Mb/Izz*y load(v)=0 line to (L/2,h/2)
{ Right end }
load(u)=0 load(v)=0 line to close
PLOTS
grid( x+200*u, y+200*v)
elevation( y*sx) from (0,-h/2) to (0,h/2) report( Mb)
contour( v) elevation( v-v_ex, 1e-8*v) from (-L/2,-h/2) to (L/2,-h/2)
contour( sx) contour( sy) contour( sxy) contour( ez) painted
vector( cos(p_angl)*sxp, sin(p_angl)*sxp) norm notips as ' "tension" '
contour( sxp) painted contour( syp) painted
contour( mises) painted
END

The geometry is evident from the figure below. Since the above
descriptor contains no boundary value of v, we specify a point value
v=0 at the lower corners, which both are at y=-h/2.

72

The bending moment we introduce by a distribution of normal


forces at the end faces, such that the force changes sign in the middle
of the cross-section. The axial force thus sums to zero, while the
moment becomes Mb as required. This is clearly demonstrated by the
elevation plot of y*sx over the mid-length cross-section.
At the right end, we specify load(u)=-Mb/Izz*y, which means that sx
will receive negative values for y ! 0 . At the left end, however, we
use the opposite sign. The net result is that the beam will be in
compression for y ! 0 and in tension for y  0 .

73

The above contour plot of v shows that the magnitude of the


maximum vertical displacement v is about 5e-4, and the following
elevation plot of v-v_ex indicates that the FEA error is about nine
orders of magnitude smaller.
The contour plot below shows that sx is independent of x, as
expected from elementary theory.

Comparing the plots of the stress components we find that the


magnitudes of sy and sxy are smaller than that of sx by seven orders
of magnitude. This is compatible with the theoretical prediction that
sy and sxy vanish.

74

The above plot shows the principal directions over the beam. In the
lower half, the direction of tension is along the x-axis. In the upper
half, however, compression is dominant and hence tension (if any)
must be along the y-axis.

Elastic Energy
We already introduced an expression for the elastic energy per unit
volume into the include file, defuv.pde. To obtain the total energy
stored in a strained object (per unit depth in the z direction) we only
need to integrate that expression over the domain in ( x , y ) space. Let
us now apply this calculation to a cantilever beam, fixed at the left
end and exposed to a downward force on the right face. Using
mex072 as a template, we change the boundaries segment by
removing the pressure on the top and specifying vertical load (p.47)
over the right end.
TITLE 'Beam, Shear-Loaded at End'
{ mex075.pde }
...
region 'steel'
start 'outer' (0,-h/2)
load(u)=0 load(v)=0 line to (L,-h/2)
load(u)=0 load(v)=-1e6 line to (L,h/2)
load(u)=0 load(v)=0 line to (0,h/2)
value(u)=0 value(v)=0 line to close
...
contour( mises) painted elevation( sxy) from (0,-h/2) to (0,h/2)
contour( energy_d) painted
END

From the integral value on the elevation plot of sxy we indirectly


obtain the force (-199909) on the beam. The latter is in excellent
agreement with the value -1e6*h implied by the descriptor.
The downward force induces elastic energy in the beam. If we
demand a contour plot of energy_d the program automatically integrates the expression over the domain, which means that we can read
off the energy (51.49) at the bottom of the next figure.

75

Since all relations are linear, we may guess that the force will be
proportional to the deflection, as the beam is deformed. The work
carried out in this process may be written W
f dv , and assuming

the force to vary linearly with v from zero to the maximum, we obtain
the simple expression W f max vmax /2 . The work thus becomes
W=2e5*5.14e-4/2=51.4. The agreement with our value for the stored
energy is thus excellent.

Plane Strain
So far we have assumed plane stress, which means that a volume
element may expand or contract freely in the z direction (V z 0) .
This is expected to apply reasonably well at least in cases of thin
plates, and since analytic solutions are readily available we have used
this mode extensively for comparison.
Plane strain (H z 0) , on the other hand, would apply in situations
where an elastic object is constrained between fixed, rigid and
friction-less walls.
We shall now explore the consequences of plane strain, and find
out how a solution differs from that for plane stress. As before, we
start from Hookes law for uniform temperature (p.43z2).
76

R|H
||
S|H
||H
T

1
V x  P V y  PV z
E
1
V y  P V z  PV x
E
1
V z  P V x  PV y
E

Plane strain gives us an expression for V z in terms of the


remaining stress components. With H z 0 the last equation yields

Vz

PV x  PV y

and on substituting this expression in the other equations we obtain

R|H
S|
|TH

1
V x (1  P 2 )  V y P (1  P )
E
1
V x P (1  P )  V y (1  P 2 )
E

Solving with respect to the stress components we finally have

RSV
TV

C (H x  PH x  PH y )

C (H y  PH y  PH x )

x
y

where
C

E
(1  P )(1  2 P )

Since the shear stress will take the same form as before, we only need
to change the expressions for V x and V y in a descriptor for plane
stress to make it valid for plane strain. The PDEs of equilibrium
remain the same.
We shall now prepare to repeat problems using plane strain. Since
the changes are within the included file defuv we modify that under
the new name defuve.
{ Block of commands for plane strain }
...
C=E/[(1+mu)*(1-2*mu)] G =E/[2*(1+mu)]
...

{ defuve.pde }

77

sx=C*(ex- mu*ex+ mu*ey) sy=C*(ey- mu*ey+ mu*ex)


sxy=G*exy sz=mu*sx+ mu*sy ez=(1/E)*(sz- mu*sx- mu*sy)
...

In order to apply this new policy to mex072 we only need to


change the file name on the include line.
TITLE 'Beam With Uniform Load, Plane Strain'
{ mex072e.pde }
...
#include 'defuve.pde'
{ Block of command lines }
...
contour( sz) contour( ez)
END

Running this descriptor we find that the maximum transverse


displacement (v) now is 8.89e-4, against -9.76e-4 for plane stress
(mex072). In the latter case, the lower half of the beam became
compressed, thickening the beam in the z direction. Locking this
expansion would of course tend to diminish the deflection.
The plot of sz below confirms that compressive stress is indeed
necessary in the lower half to maintain parallel faces under bending.
The final plot (not shown here) demonstrates that ez vanishes.

This single example shows that the difference between the two
modes of deformation may be clearly noticeable. It is easy to make
78

similar comparisons between plane stress and plane strain for the
other cases in this and the next chapter.
For thick objects, and in particular when stresses vary steeply in
space, we would expect a volume element to be constrained to some
extent by the surrounding material. Hence, the situation would be
intermediate between the two extremes, and we really need 3D
descriptors to generate accurate solutions.

Exercises
Replace the load in mex072 by sticking the corresponding weights
to the lower face. In which plots do you notice a difference?
Replace the distributed forces at the end of the beam with two
opposite u displacements at the left and right corners, choosing the
values resulting from mex074.
Modify mex072 by removing the load and specifying a downward
displacement of h/100 at the upper right corner. Calculate the force
(per meter extension in z) required to achieve this displacement by
integrating sxy from (L/2,-h/2) to (L/2,h/2). Also, compare the work
with the elastic energy.
Repeat mex072, adding 10% horizontal pull to the load on the top.
Find the deformation and stress distribution of a beam loaded by
its own weight and simply supported at 1/4 and 3/4 of its length.
Define u to be zero at 1/2 of the length.
Create a rectangular frame of
length 2.0, height 2.0, and width
0.3 as shown to the right. Let the
lower face be fixed, and load the
upper one by a uniformly distributed weight. Verify by integration
that the total force is transmitted
through horizontal cuts, one at midheight and another at the fixed
bottom.

79

Вам также может понравиться