Professional Documents
Culture Documents
Beltzer
Variational and
Finite Element
Methods
A Symbolic Computation Approach
With 66 Illustrations
Springer-Verlag
Berlin Heidelberg NewYork
London Paris Tokyo Hong Kong
Professor Abraham 1. Beltzer
Holan Institute faT Technological Education
Affiliated with Tel Aviv University
Holan 58102, Israel
2161/3020 5 4 3 2 1 0
Once again to
Dina, Ruth and Oma
Preface
The variational approach, including the direct methods and finite elements,
is one of the main tools of engineering analysis. However, it is difficult to
appreciate not only for seniors but for graduate students too. It is possible
to make this subject easier to understand with the help of symbolic manipulation
codes (SMC). The easiness with which these codes provide analytical results
allow for a student or researcher to focus on the ideas rather than on calculational
difficulties. The very process of programming with SMC encourages appreciation
of the qualitative aspects of investigations. Saving time and effort, they enable
undergraduates to deal with the subjects generally regarded as graduate courses.
There is a habitual aspect too. These days it is more convenient for a student
(researcher) to work with a keyboard than with a pencil. Moreover, semantic
features of the codes may allow for generalizations of the standard techniques,
which would be impossible to achieve without the computer's help.
One could argue that the use of SMC would prevent a good command of
calculational techniques. Note that the primary task of engineering schools is to
provide the technological, not the computational knowledge. It has recently been
realized that the overstress on mathematical approaches may have a damaging
effect, as far as engineering is concerned. The engineering students do need a
mathematical and calculational background. However, this must not be achieved
at the expense oftechnological disciplines. It would therefore be rational to use
expert systems at the final stage of undergraduate or duringgraduate studies,
thereby allowing the students to acquire the basic mathematical techniques in
their first years.
The book appears to be the first one which systematically resorts to an expert
system to present engineering subjects. It is about methods of engineering
analysis, not about expert systems. While the latter is an integral part ofthe text,
it is a tool, not a subject.
Chapter 1 presents basic information on SMC and relevant exercises. It does
not repeat the manuals available but focuses on the subjects which are
necessary for the subsequent analysis. Illustrative examples are given which deal
with the linear and non-linear vibrations. Chapter 2 deals with basic concepts
of variational calculus, Hamilton's principle and some of the optimization
VIII Preface
Appendix . 236
Problems. 238
Answers . 243
References 250
Index . .. 253
Chapter I
Symbolic Manipulation Codes
Expression
~
Atom List
~
Number
Symbol
~
Integer Fl oa ti ng-poi nt Figure 1.1 Hierarchy of objects
deals with elementary features of this symbolic manipulations code. A more detailed
description may be found in a Reference Manual.
To enter and leave MACSYMA type macsyma return and quit ( ); return,
respectively. Its prompt is a c-line, while its output is labelled as ad-line.
Each c-line represents a command or expression, which must be ended with; or $.
In the first case, the code output is displayed as a d-line, while in the second case
the output is not displayed at all. To see, say, (c3}-line type string (c3); The
command playback; will cause the display of all previous commands of the session.
The code uses the standard signs to carry out algebraic operations: + (addition),
- (subtraction), * (multiplication), / (division) and' or ** (exponentiation). It does
not differ between the upper and low case letters.
Numbers may be integers or floating-point numbers in the sense explained in
Section 1.1. We may also consider rational numbers which are the quotient of two
integers and the so-called bigfloats. The floating-point number might contain an
integer exponent beginning with the letter e, while bigfloats the letter b. An integer
or rational number are allowed to contain any number of digits, but a non-zero
floating-point number must lie between 2.ge-37 and 1.7e38. The precision of bigfloats
may be properly adjusted by means of the so-called option fpprec, with the default
value of 16 digits. Avoid, if possible, the use of floating-point numbers or bigfloats
with high precision in favour of integers or rational numbers.
The base of the natural logarithms, e, is denoted by %e and n by %pi. The square
root of - 1, i = j=1, is denoted by %i. The predefined constants are summarized
below:
Constant Description
(c4) dl A2;
(d4) (b 2 + 2ab + a 2 )2
(c5) diff(%, a, 3);
(d5) 12(2b + 2a)
Here % is used instead of d4.
The code has various facilities for making substitutions. Say, we have
Suppose we need to compute the function h{x) = xa sin x for various values of
the argument. Then we type in
(cI7) h(x):= x*a*sin(x)$
(cI8) h(I);
(dI8) sin(I)a
(cI9) h(x+c);
(d 19) a(x + c)sin(x + c)
To obtain the numerical value of (dI8) type
(c20) ev{d18, numer);
(d20) 0'8414709848078965a
The number of digits is governed by the option fpprec. Setting
(c21) fpprec:4$
(c22) bfloat{dI8);
(d22) 8·415b - la
we get only four digits.
The following operations illustrate summations:
(c23) sum{a[i]*xAi,i, 1,4);
(d23) a 4 x4 + a 3 x 3 + a 2x 2 + a\x
(c24) sum(sum{b [i, j] *xAi *yA j, i, 0, 2), j, 0, 2);
(d24) b2,2x2y2 + bl,2xy2 + b o,2y 2 + b 2,\X 2y + bl,lxy
+ bo,\Y + b2,ox 2 + bl,ox + bo,o
In (c23) we defined
(1.1)
and in (c24)
2 2
I I bijxiyi (1.2)
j, i=O
With the prime' we impose an implicit operation, the so-called noun form
(c25) 'sum(x Ai, i, 0, 3);
3
(d25) I Xi
i:::D
we type
(c27) j(n):= n*2 + 1;
6 I. Symbolic Manipulation Codes
(d27) j(n):= n 2 + I
(c28) sum (a [j(n)], n, 0, 2);
(d28) as + a 3 + at
The prime plays the same role in the case of differentiation
(c29) 'diff(x~3,x);
dx 3
(d29) ~
Further,
(cl) (a + x)*d;
(dl) (x+a)3
(c2) expand(dl);
(d2) x 3 + 3ax 2 + 3a 2 x + a 3
(c3) factor(%);
(d3) (x + a)3
(c4) %,a = 5;
(d4) (x +W
(c5) ev(d3,a = x**2);
(d5) (x 2 + X)3
(c6) subst(x**2,a,d3);
(d6) (x 2 + X)3
(c7) %pi;
(d7) %pi
(c8) ev(%, numer);
(d8) 3·1415927
(c9) ev(%e, numer);
(d9) 2·7182818
(elO) b:%;
(dIO) 2·7182818
(ell) b + 10;
(dll) 12·718282
(el2) f(x):= x**4 + 6;
(dI2) f(x):= X4 + 6
(cI3) f(l);
(d13) 7
Operations with complex numbers are as easy as with real ones. Here are the
examples of separation of the imaginary and real parts and computation of the
absolute value
8 I. Symbolic Manipulation Codes
(c3) %eA(%i*f);
(d3) %e%i f
(c4) realpart(%);
(d4) cos (f)
(c5) imagpart(d4);
(d5) 0
(c6) imagpart(d3);
(d6) sin(f)
(c7) cabs(d3);
(d7) 1
(c8) cabs(a + %i * b);
(d8) sqrt(b 2 + a 2 )
1.3 Matrices
A matrix may be generated by typing matrix ([ ], ... ,[ ]) where the square
brackets contain the rows of the matrix. Another way is to use entermatrix (n, m)
where nand m indicate the number of rows and columns, respectively. Here are
illustrations of these two commands
(cl) matrix( [a, b, c], [1, 2, 3], [r!, r2, r3]);
(dl) [:1 ! :J
(c2) entermatrix(3,3);
Is the matrix 1. Diagonal 2. Symmetric 3. Antisymmetric 4. General. Answer
1, 2, 3 or 4
4;
Row 1 Column 1: a;
Row 1 Column 2: b;
Row 1 Column 3: c;
Row 2 Column 1: 1;
Row 2 Column 2: 2;
Row 2 Column 3: 3;
Row 3 Column 1: r1;
Row 3 Column 2: r2;
Row 3 Column 3: r3;
(d2) [~ ~ ~J
r1 r2 r3
A convenient way to generate a matrix is through a zeromatrix. For, example,
if we need a 2 x 2 zero matrix we type
(c3) zeromatrix(2,2);
1.3. Matrices 9
(d3) [~~J
Below zeromatrix generates a 3 x 3 matrix whose elements are
(ai)i, i,j = 1,2,3 (1.4)
(c4) (h:zeromatrix(3, 3), for i:I thru 3 do (for j:I thru 3 do h[i,j]:(aAjti»$
(c5) h;
n
(c6) ident(4);
(d6) [~;!
while another "specimen" of the same matrix by copymatrix
U;! ~l
(c7) b:copymatrix(%);
(d~
If we want to delete in the above b-matrix, say, the fourth row and fourth column
n! n
and assign the new matrix to m we type
(c9) m: submatrix (4, b, 4);
(d9)
Algebraic operations perform in a usual way, say, to sum the matrices hand m
we issue
[HI
(clO) m + h;
a2
a'6 ]
(dlO) a2 a4 +I a
a3 a6 a9 + 1
The dot (not*) implies multiplication (non-commutative)
(cII) m.h;
10 I. Symbolic Manipulation Codes
a 3 -2a 2 +a a 6 _as - a 4 +a 3
a2 + I
(dI4)
a3 a6 a9
There are few ways to call an element needed. These are illustrated below
(c21) h[2,3J;
(d21) a 6
(cll) row(col(h, 3), 2);
(d22) [a 6 J
Note that (d22), unlike (d21), yields a matrix.
A useful command is coefmatrix ([eqn l , ... eqnnJ, [var I"" varnJ), which returns
the coefficient matrix for the variables var I' ... Var n of the system of linear equations
eqn I" .. eqnn' Here is an illustration on the example
I aijxj=i, i=I,2 (/.5)
j= I.Z
(c25) sum(a[I,j]*x[j],j, 1,2) = c[IJ;
(d25) a1. 2x2 + XI al.l = c 1
1.4. Solving Equations 11
(d27) [::::
This command also accepts polynomials instead of equations, which facilitates
programming.
The first argument of solve could also be written as the polynomial. Note that the
roots are given in (d I) as a list. To access these values we may type
(c2) first (%);
sqrt(151)%i - 7
(d2) q= - 10
(c3) rest(dl);
(d3)
1 6
[ q = sq rt(l5 1 %i + 7J
(c4) firste~);
sqrt(151)~;';i +7
(d4) q = 10
In a similar way, the SMC treats systems of equations. If these are linear then
linsolve is a somewhat better alternative. The following command yields the solution
to two linear equations
ax 1 +bx z =c
(1.7)
dx 1 +ex Z =j
12 I. Symbolic Manipulation Codes
(c6) linsolve( [a*x[IJ + b*x [2J = c, d *x[IJ + e*x[2J = fJ, [x [IJ, x [2JJ);
(d6) [ __ ce-bi _cd-ai ]
xI - bd _ ae ' x 2 - bd - ae
The solution is again in the form of a list and if we call x I the SMC returns trivially XI
(c7) x[IJ;
(d7) XI
By setting the option globalsolve to true we change the situation and get a direct
access to the roots x I and x 2
(c8) (Iinsolve([a*X[IJ + b*X [2J = c, d*x [IJ + e*x [2J = fJ, [x[IJ, x [2JJ),
globalsolve:true);
. ce - bf cd - af]
(d8) [ x l · - - - - , x2 :-:-bd--:----a-e
bd-ae
(c9) x [IJ;
ce- bf
(d9)
bd-ae
On the other hand, first provides
(elO) first(d6);
ce- bf
(dIO) xl =---
bd-ae
Note the difference between (d8) and (d6).
The command ode deals with ordinary differential equations. In the case of an
equation of the second order it is better to call directly ode2. Since solutions depend
on values of the constants involved, it is a good practice to properly inform the
code before invoking ode or ode2. Here is an example of solving the equation
d2 x
m dt 2 + kx = 0, (m > 0, k > 0) (1.8)
x(t = 0) = Xo (1.9)
dx
Tt(t=O)=x\
We issue
(cI4) ic2(dI3, t = O,x = xO,diff(x, t) = xl);
Sqrt(k)t)
sqrt(m)sin ( - - - xl
(d14) x= sqrt(m) + cos (Sqrt(k)t) xO
sqrt(k) sqrt(m)
The next example deals with the equation
d2 x dx
m-+c-+kx=O (1.10)
dt 2 dt
subjected to the initial conditions (1.9). We type in
(cl) assume(m > 0, c > 0, k > 0);
(dl) [m>O, c>O, k>O]
(c2) n*'diff(x, t, 2) + c*'diff(x, t, 1) + k*x;
(d2)
-c~n
. (Sqrt(4km - C2)t) xO )
2m
I
+ (c 2 _ 4km) cos (Sqrt(4~: - C2)t) Xo) (4km - c2)
Boundary conditions may be incorporated with the help of be2. For example,
if the conditions are
x(t = 0) = 1.
(1.11)
x(t = 1) = 2,
we issue
(c5) bc2(d3, t = 0, x = 1, t = 1, x = 2)$
(c6) ratsimp(d5);
14 I. Symbolic Manipulation Codes
(d6) x= _O'e
/0
, _'.£1- ( (
2m
2m
2
10
cf--)
COS (s q rt(4km - C ) ) _2°/e-m
I
2m 2m
(d47) ;2
b(:x (h2(X))) + aCd (hI (X))) + hI(x) = sin (x)
After questioning about constants involved desolve yields the solution, which is too
long and need not be given here,
This routine may use the Laplace transform and, consequently, it may return
terms which contain the inverse Laplace transform, itt The use of atvalue which
specifies a boundary value, jointly with desolve, simplifies the results, Note, that
atvalue should be formulated before resorting to desolve,
Say, we seek for a solution to (d47) and (d48) which satisfies the following
conditions
dh! dh2
- ( x = 0) = - ( x = 0) = 0
dx dx
h!(x=O)=p (1.12)
We issue first atvalue and then desolve indicating explicitly the functional relationship
(c50) atvalue(,diff(h! (x), x), x = 0,0);
(d50) 0
(c5!) atvalue(,diff(h2(x), x), x = 0,0);
(d5!) 0
(e52) atvalue((hI(x),x= O,p));
(d52) 0
(e53) desolve( [d47, d48], [h! (x), h2(x)]);
l
1.5. Limits and Expansions 15
2 (Sqrt(ak(bS - k))X)
ak pcosh
ak
bs- k k sin (x) bps
-----+--,
ak bs + (a - I)k bs - k
2 2 . (Sqrt(ak(bS - k))X)
a k pssmh
ak
h2(x) = - - - - - - - - - -
(bs - k)sqrt(ak(bs - k))
ak
2 2 (Sqrt(ak(bS - k))X)
a k scosh
ak
b s + (a - 2)bks + (I - a)k2
2 2 s cos (x)
ak bs + (a - I)k
psx (h2(0)b + I)s - h2(0)k]
+--+
bs - k bs - k
where in (c4) the last two arguments, 0 and 4 denote a point of expansion and the
maximal desirable power, respectively. A display of the d-line is labelled with ITI.
1.6 Integration
The command integrate yields the indefinite integral of the given expression with
respect to the given variable. Say, we need
f z
--dz
Z2 +I
(1.l4)
Issue
(cI6) z/(z**2+ I);
(dI6) --!:-
z +I
(cI7) integrate(%,z);
(dI7) 10g(z; + 1)
Another example,
(c18). integrate(sin(xt2*cos(xt3, x);
3 sin 5 (x) - 5 sin 3 (x)
(dI8)
15
We may also define the integrand as a function
(c19) f(x):= x 2$ A
2 2bx + b 2
- log(b - X)X - - - 2 -
b2 log(x - b)
(d24) - - - - - - - - - - - bx
2 2
If the command integrate is given the limits of integration as its arguments, it
will perform definite integration. Multiple integration may also be carried out
°
(c2S) integrate(integrate(integrate(x -3 *y*Z, x, 0,1), y, - 1,1), Z, 0,1);
(d2S)
yields the value of
r II (I x 3 yzdxdydz (US)
Jo -IJO
The command Idefint also returns a definite integral using the indefinite integral
and a limiting procedure to obtain the result. A useful alternative is the command
absint which is contained in the so-called Share Directory. The file which is needed
may be loaded by typing in load (fourie).
For example, for
we may use either integrate or absint with the same efficiency. However for
/
[
(d26) I cos(x)lsin(x 2 )1 dx
]
/
o
Therefore we try absint loading first the file "fourie"
(c27) load(fourie)$
(c28) absint(abs(sin(x'2»*cos(x), x, 0, %pi)$
(c29 ratsimp(%);
(d29) sqrt(%pi)((sqrt(2)%i - sqrt(2»sinW + (sqrt(2)%i + sqrt(2»cosW)
erf( (2 sqrt(2)%i + 2 Sqrt(2»;Pi + sqrt(2)%i + SQrt(2»)
Definite integrals may also be evaluated numerically with the help of romberg
(c30) romberg(x A2,x,0,1)
(d30) 0·3333333333333333
To evaluate
Ii = f 1
-1
Ixil dx, i = 3,4,5 (1.18)
we type in
(c31) f[i](x):= abs(xAi)$
(c32) for i:3 thru 5 do 1 [i]:= romberg(f[i](x), x, - 1,1)$
where we first defined the array of functions fi(X) = Ixil and then integrated
them numerically from - 1 to 1 with the help of do. The values of Ii are now
in the memory and to see them we use do and display
(c33) for i:3 thru 5 do display (I [i]);
13 = 0·5
14 = 0·4
Is = 0'3333333333333333
(d33) done
Our next example involves a double array
,
JoC xCOS(X)i+idx,
3
hij= i=2,3,4; j= 1,2,3 (1.19)
(1.20)
where e is a small value. In the following program the intanalysis-option has been
set to false. We first represent (1.20) as
f q- r foo dx
(1.21)
e
+ q+r x (bx+1)(x
2 2
-q)
because of the singularity at x = q, then compute separately the two integrals, sum
them up, and then find the limit r ~ 0, in agreement with the definition of a principal
value.
(c41) (x**2-q**2)*(1+b*x)u;
(d41) x(bx + 1)(x 2 _ q2)
(c42) 1/%;
(d42) 1
x(bx + 1)(x 2 _ q2)
We begin with the first integral
(c43) integrate(%, x, e, q - r);
is r - q + e positive, negative, or zero? neg; is r - q positive, negative, or zero? neg; is
e positive, negative, or zero? pos; is b(br - bq - 1) positive, negative, or zero? neg; is
20 1. Symbolic Manipulation Codes
Simplifying this with the help ofradcan (see Section 1.7), we get
(c49) radcan(d48);
(d49) ((bq + l)log(q + e) + (1 - bq)log(q - e)
+ (- 2b 2 log(be + 1) + 2b 2 Iog(e) + 2b 2 Iog(b»q2
- 2Iog(e»j(2b 2q4 - 2q2)
Besides the above facilities, the code is capable of performing the Laplace
transform and its inverse. Some examples are given in Section 1.11.
L aix i = L br
i=O j=O
j (1.22)
(c8) lhs(%);
n
(d8) I aix i
i~O
(c9) rhs(d7);
m
(d9) I bjyj
i=O
The same result follows if the command part is applied, which has also been
used earlier
(elO) part(d7, I);
n
(dlO) I aix i
i=O
(ell) part(d7,2);
m
(dll) I bjyj
j=O
(dI8) dg
du
which otherwise would be evaluated as zero.
The command playback plays back c- and d-lines and may be executed in various
ways. In particular, playback (slow), would enforce a slow mode of the display.
Options of a particular interest here are globalsolve and intanalysis, described
in Sections 1.4 and 1.6, respectively, and grind and derivabbrev. The option grind
when set to true, provides a very readable format and is useful to obtain a good
printout. When the command playback is used, grind may be substituted as one of
its arguments with the same effect.
The other option, derivabbrev, when set to true, causes the display of derivatives
as subscripts, as shown below
(cl) a* 'diff(y, x, 3) + b* 'diff(y, x) + c*y = 0;
d3y dy
(dl) a - + b-+ cy =0
dx 3 dx
(c2) derivabbrev:true;
(d2) true
(c3) dl;
(d3) ayxxx + byx + cy = 0
Testing expressions for combinations of semantic and syntactic patterns, we may
use pattern matching capabilities for various purposes. Say, to replace ab by x 2 in
the expressions
(bC)2 + 5ab + (aW (1.24)
we use let and letsimp
(c4) let(a*b,x'2);
(d4) ab-->x2
(c5) (b*c)'2 + 5*a*b + (a*b)'2;
(d5) b 2c 2 + a 2 b 2 + 5ab
(c6) letsimp(%);
(d6) X4 + 5x 2 + b 2 c 2
Note, that let defines a substitution rule for replacing a product of powers by another
expression, as shown in (d4), while letsimp then applies this rule, looking for a literal
match only.
To provide a wider matching, we use matchdeclare and tellsimpafter (or tellsimp).
Say, to install the rule
cos 2 y = 1 - sin 2 y (1.25)
for any y we first type
(c7) matchdeclare(y, true);
(d7) done
24 I. Symbolic Manipulation Codes
where the first argument defines the pattern variable and the second the predicate.
We then define the rule (1.25) with the help of tellsimpafter
(cS) tellsimpafter(cos(yt2,1 - sin(yt2);
(dS) [Arule 1, simpexpt]
where the first argument indicates the pattern and the second its replacement. Note,
that tellsimpafter applies this replacement rule after trying its built-in simplifications.
The pattern variable, y, should be the same in both of the commands.
Now we try the expression
(1.26)
(c9) 2*cos(at2 + sin(at2;
(d9) sin2(a) + 2(1 - sin 2(a))
(clO) ratsimp(%);
(dlO) 2 - sin2(a)
and the expression
cos 2 (b)cos 2 (a) - 1 + sin 2(b) (1.27)
(cll) cos(bt2*cos(at2 - 1 + sin(bt2;
(dll) sin 2(b) + (1 - sin2(a))(1 - sin 2(b)) - 1
(c12) ratsimp(%);
(d12) sin 2(a)sin 2(b) - sin2(a)
we type
(c6) f(y):= if y < = 10 then f:O else f: 1$
°
(c7) f(O);
(d7)
(cS) f(l1);
(dS) 1
The next example deals with the function
g(n) -
_{.f ,=0
aixi , n < 11
(1.29)
b, n ~ 11
(c9) g(n):=ifn< 11 then g:sum(a[i]*xAi,i,O,n) else g:b$
(c1O) g(1O);
(d1O) alOx lO + a 9 x9 + asxs + a 7 x7 + a 6 x6 + asxs
+ a4 x4 + a 3 x3 + a 2x2 + a1x + a o
(cll) g(ll);
(dll) b
1.8. Conditionals, Iterations and Compound Statements 25
a8 = x8
a lO = x lO
(dI5) done
It is possible to combine (cl2) and (cl5) in a single statement, the so-called
compound statement, as shown below
(cl6) for i:2 step 2 thru 10 do (a[i]:xAi, display (a[iJ));
a2 = x2
a4 =x4
a6 = x 6
a8 = x 8
a lO = x lO
(dI6) done
Note that do has been subsequently applied to two substatements properly separated
by and enclosed in brackets. These two substatements constitute a compound
statement. To refer to the previous substatement we use %%. Say we need to
substitute
ax + 5b - 6 (1.30)
for y into
y2 +y (1.31)
We may use
(cI7) (a*x + b*5 - 6, subst(%%, y, yA2 + y));
(d17) (ax+5b-6)2+ax+5b-6
26 I. Symbolic Manipulation Codes
In order to access, say, "quadrrl" we use, while in the expert system mode, the
command load
(ciS) load (" q uadrrl ") $
(cl6) eq;
(d16) ax2+bx+c
In dealing with equations it is usually convenient to put all non-zero terms on
the left-hand side and key in the equations without their right-hand sides, namely,
= O. In any way, solve and other similar commands would treat them as equations.
On the other hand, this representation is more convenient for substitutions,
differentiations and other operations.
Unless one has acquired an extensive experience with the expert system, it is
advisable to have a written draft before starting to key in a program. The use of $
or; to end the statement merits particular comments. The $ saves the space, preventing
the display of the code response, and therefore enables one to have a better overview
of what has been typed in. However, it may be useful to take a look at the code
response and modify properly further commands. The use of; rather than $ facilitates
the discovery of errors. For example, if we typed depend(y, x) instead of depends(y, x)
the code just would reproduce the string without any signal of error
(cl) depend(y, x);
(dl) depend(y,x)
while for the correct command we get
(c2) depends(y, x);
(d2) [y(x)J
Observing the code response may therefore be useful for recogmzmg errors.
Consequently, the use of $ in place of; should be carefully thought over.
Finally, the expert system provides a facility for a Batch mode along with the
on-line mode, as well as a help facility. Batch is particularly convenient for long
programs, since it allows for simple editing. Details may be found in Reference
Manuals. Chapter 4 of this book contains relevant examples.
P{t)
Figure 1.2 Dynamic shock absorber
28 I. Symbolic Manipulation Codes
respectively, while d denotes the dissipation coefficient of the dashpot. Upon proper
adjustment of the values of k 2 , m 2 , d, the vibrations of the main mass, m l , subject
to the periodic force, P(t), can be made arbitrarily small.
To come to this conclusion, consider the forces acting on the masses m l and
m2 • The restoring elastic forces acting on m l are klx l and k 2 (x I - x 2 ), respectively.
Here x I and X 2 are the displacements of the masses from the equilibrium positions.
The elastic force on m 2 is therefore k 2 (X 2 - xd. The friction force acting on m l is
d(x I - x 2 ). Incorporating the inertia forces and the external force P(t) we arrive at
the following equations of motion
mlx l + d(,xI - x2 ) + klx l + k 2 (x I - x 2 ) = P(t)
(1.33)
m 2 x2 + d(X2 - XI) + k 2 (X 2 - XI) = 0
or in the code language
(cl) ml *'diff(xl, t, 2) + d*'diff(xl - x2, t) + kl *xl + k2*(xl - x2) = p$
(c2) m2*dilf(x2, t, 2) + d*'dilf(x2 - xl, t) + k2*(x2 - xl) = 0$
The external force P(t) is given by
P= Poe iwt (1.34)
where w is the forcing frequency. Being interested in a steady-state response, we
assume the displacements, XI and X 2 , to vary as
( 1.35)
where U 1 and U 2 are the complex amplitudes. As (1.35) show, U I and U 2 become the
quantities to be specified. To this end, we substitute (1.35) and (1.34) into (dl) and
(d2) and evaluate the result
(c3) (subst([p = pO*exp(%i*w*t), xl = ulc*exp(%i*w*t),
x2 = u2c*exp(%i*w*t)], [dl, d2J),ev(%%, diff));
(d3) [d(%iulcw%e%itw - %iu2cw%e%itW) + k2(ulc%e%itw - u2c%e%itW)
- mlulcw2%e%ilw + kl ulc%e%itw = pO%e%ilW,
d(%iu2cw%e%itw - %iulcw%e%itW)
k2(u2c%e%itw - ulc%e%itW) - m2u2cw2%e%itw = OJ
where use has been made of the obvious notations
W=W, ulc=u l , u2c=u 2 (1.36)
The next step is to separate the two equations contained in the statement (d3) and
then simplify them by dividing by eiwt
(c4) ratsimp(first(d3)fexp(%i *w * t));
(d4) - mlulcw 2 + (%idulc - %idu2c)w - k2u2c + (k2 + kl)ulc = pO
(c5) ratsimp(last(d3)fexp(%i *w* t));
(d5) - m2u2cw 2 + (%idu2c - %idulc)w + k2u2c - k2ule = 0
Thus, (d4) and (d5) represent two equations with respect to the complex amplitudes,
ulc and u2c, which are obtained by solve
(e6) solve([d4,d5J, [ulc, u2eJ);
(d6) [[ule = (m2pOw 2 - %idpOw - k2pO)/
(mlm2w4 + (- %idm2 - %idml)w 3
1.10. Example: Steady-State Linear Vibrations 29
(cI4) num(rhs(%));
(dI4) - m2pOw 2 + %idpOw + k2pO
The parameters of the second subsystem, m 2 , k2 and d may be so chosen as to make
(d 14) vanish, ensuring the isolation of the mass mi' For example,
(1.38)
We first consider the case when the stiffness, k 2 , is infinitely large. It means that the
system effectively becomes that of a single degree of freedom with the mass (m I + m2)
and the stiffness k l • The dashpot ceases to play any role, since there is no relative
motion between the two masses. Accordingly, the dissipation coefficient d should
not appear in the formulae.
(cIS) d13;
(dIS) ulc = - (m2pOw 2 - %idpOw - k2pO)j(mlm2w4
+ (- %idm2 - %idml)w3 + (- k2m2 - klm2 - k2ml)w2
+ %idkl w + klk2)
(cI6) limit(%,k2,inf);
pO
(dI6) ulc = - (m2 + ml)w 2 _ kl
Equations (dI6) and (dI8) are indeed identical. They confirm the above comments
and show that the resonance occurs if
2 kl
W =---- (1.39)
(m l + m2 )
Another case of interest is the undamped system, d = O. We issue
(c19) limit(dI2,d,O)$
Is k2 positive or negative? pos;
(c20) radcan(%);
m2pOw2 - k2pO
(d20) [ a bs (u 1c) = -----:-------::---;------:------:-:-::-=---:--:-:--::---=-:-::---c-----:-;;---,:-:-:,...-:-
mlm2w4 + « - k2 - kl)m2 - k2ml)w2 + klk2
k2pO . ]
abs(u2c) = - -----;-----------,;:----
4
mlm2w + « - k2 - kl)m2 - k2ml)w2 + klk2
1.10. Example: Steady-State Linear Vibrations 31
which gives the absolute values of the displacements, U 1 and U2' for the undamped
dynamic shock-absorber. As (d9) and (dll) show, 11 = 12 = 0 if d = O. Therefore
(d20) defines the values of U 1 and U2 also.
The denominator in (d20) is precisely the determinant ofthe homogeneous system
of equations, which describes the free vibrations of the undamped system. Let us
verify this by computing the determinant of the system of equations (d15) and (d17)
which govern U 1 and U2
(c21) coefmatrix([d15,d17],[ulc,u2c]);
-mlw 2 + %idw + k2 + kl -%idw-k2 ]
[
(d22) _ %idw - k2 - m2w 2 + %idw + k2
(c22) ratsimp(determinant(%));
(d22) mlm2w4 + (- %idm2 - %idml)w3 + (( - k2 - kl)m2 - k2ml)w2
+ %idklw + klk2
It is seen that, if d = 0, (d22) coincides with the above denominator. Accordingly,
two resonances may occur, when w coincides with the first or second natural
frequency, Wn, given by the quartic equation
(1.40)
which follows from (d22) if d = O.
Further, we again observe that the parameters of the second subsystem, m 2 and
k2' may be chosen so as to make the numerator of ule in (d20) vanish
k2 2
-=W (1.41)
m2
This means that the second subsystem may serve as a dynamic shock absorber, in
agreement with the earlier remark.
Figure 1.3 shows the normalized displacement of the first subsystem as a
function of the dimensionless frequency. Here
2 k2
q=- (1.42)
m2
8 I, I
I
I I
6 I
I I
I
, ,
I I
I
) I
I
I
,
I
*
2
o
.-/
0.5
\V 1.0 1.5
...
-- ---
2.0 2.5
represents the natural frequency of the second subsystem. The curves which have
been computed for
m 2 = 0'2, k 2m 1 = 1 (1.43)
m1 m2kl
show that slight deviations from w/q = 1 can make the shock absorber useless.
The program may be easily modified to apply for other systems. For example,
if the external force, P(t), acts on the second mass, m2, the first of (1.33) becomes a
homogeneous equation, while P(t) appears on the right-hand side of the second
equation of (1.33). To avoid retyping, we construct this new system of equations
from the previous one by
(c23) Ihs(d4) = 0;
(d23) - ml ulcw 2 + (%idulc - %idu2c)w - k2u2c + (k2 + kl)ulc = 0
(c24) Ihs(d5) = pO;
(d24) - m2u2cw 2 + (%idu2c - %idulc)w + k2u2c - k2ulc = pO
The solve-command yields ule and u2e and thereby their absolute values too
(c25) solve([d23, d24], (ulc, u2c])$
(c26) radcan(cabs(first(%)))$
When the stiffness, kl of the first subsystem is infinitely large, we should get the
case of forced vibrations of a damped oscillator. Indeed,
(c27) limit(d25,kl,inf);
(d28) u2c= - m 2w 2 - ~d
01 w-
k2
Equations (d28), (d29) and (d30) thus represent the steady state response of a
damped oscillator. Note, that the phase angle, t, vanishes for d = 0, in accord with
earlier remarks.
1.11. Example: Transient Vibrations 33
t
The convolution integral
yields the transient response of a linear system to the excitation, P(t). In (1.44) xd(t)
is the impulse response of the system. In particular, for a simple damped oscillator
which obeys the equation
mi + dx + kx = 0 (1.45)
the impulse response is
(1.46)
where
d 2 k
n = 2m' wn =-
m
(1.47)
Note that (1.46) holds for t > 0, while xd(t) = 0 for t < O. By changing the variable
of integration (1.44) may be put in the form
As noted earlier, (1.44) and (1.48) assume that the system is at rest for t ~ O. This
means that the impulse response is a particular solution to (1.45) and that it is
necessary to add the solution of free vibrations type
x = e-nt(AsinJw~ - n2 t + BcosJw~ - n2 t) (1.49)
to arrive at the general solution. Then initial conditions allow to specify the
coefficients, A and B.
Assume that P(t) is a "box"-function (see Fig. 1.4)
o t
k gm
m +T
(c8) ratsimp(%);
36 I. Symbolic Manipulation Codes
I
- sqrt(2)sqrt(gh)km sin (sqrt~m)t ) ) (k sqrt(km» ]
The displacement x(t) is thus given by (d8), which may be put in the form
g
x(t)=2(I-coswnt)+
Wn
fffgh
-sinwnt
Wn
(1.57)
(1.58)
describes nonlinear free vibrations of a system with the restoring elactic force given by
F(x) = kx + k 1x 3 (1.59)
The notations in (1.58) are
2 k kl
Wn =-, ml =--2 (1.60)
m mWn
This equation may hold provided the coefficients of the powers of m l vanish
(c5) ratcoef(%, ml, 0);
dZxO
(d5) dt Z + wn2xO = 0
is a small parameter. Assume, that the vibrations described by x(t) are close to
harmonic oscillations with the frequency, w, and put
w = w; + eiX l + e iX
2 2 2 + .. .
(1.67)
x = Xo + eX I + e 2 X2 + .. .
Substituting these relations into (1.65) and equating the coefficients of the powers
of e, we may get the system of equations which governs iXi and Xi in (1.67). For the
sake of certainty, assume that (1.65) is subject to the following initial conditions
X(O) = a, x(O) = 0 (1.68)
These would be satisfied if we put, in view of the second equation of (1.67), that
xo(O) = a, xo(O) = 0
(1.69)
xi(O) = xi(O) = 0, i = 1,2, ...
In (c2) given below, we state the functional dependencies, in (c3) state the
governing equation (1.65), and in (c4) substitute the above expansions (1.67) while
attaining two leading terms only. We then collect separately the coefficients of eO
and e in (c5) and (c6).
(c2) depends([x,xO,x1], t);
(d2) [x(t),xO(t),x1(t)]
(c3) diff(x, t, 2) + wn2*x + e*x 3; A
d2 x
(d3) ~2 + ex 3 + wn2x
dt
(c4) (subst([x = xO + e*x1, wn2 = w2 - e*a1], %),ev(%%,diff));
d 2 x1 d 2 xO
(d4) e -2- + e(ex1 + XO)3 + (w2 - a1e)(ex1 + xO) + - 2 -
dt dt
(c5) ratcoef(%, e, 0);
d 2 xO
(d5) de +w2xO
where
The last three terms in (d8) are the forcing ones. Further, the term cos wt would
again cause the resonance, since its frequency coincides with the natural frequency
appearing in the second term from the left. The value of al = iJ(1 should therefore
be chosen so as to make this forcing term vanish. To make the picture clearer we
substitute
(1.72)
and simplify by
(c9) ratsubst{w 2, w2, %);
A
d1xl
4 -2- + 4w 2 xl + a 3 cos{3tw) + (3a 3 - 4aal)cos{tw)
dt
(d9)
4
It is seen that the coefficient of cos wt must vanish to ensure a physically
meaningful solution
(clO) ratcoef{%,cos{w*t»;
4aal - 3a 3
(dIO)
4
(cll) solve{%, all;
2
(dll) [al = 3: ]
Substituting this into (d9) we get rid of the undesirable term, then solve the
equation by ode2 and then incorporate the initial condition in (1.69) by ic2
(cI2) (subst{%, d9), ratsimp{%%»;
d1xl
4 -2- + 4w 2 xl + a 3 cos{3tw)
dt
(dI2)
4
40 I. Symbolic Manipulation Codes
Hence, Xo is given by (1.71) while Xl by the above (dIS). This eventually gives for X
ea 3
X = a cos cot + ~-2 (cos 3cot - cos cot) (1.74)
32co
where
(1.75)
substitution
d 2x dx
(d2) m de + ddt + klx 3 + kx - pOcos(pt + f)
Noting that (d3) equals zero, we realize that this may be possible if the coefficients
of sin pt and cos pt, which are the leading terms in (d3), vanish. To specify these
coefficients key in
(c4) trigreduce(%);
a 3kl cos(3pt)
(d4) - pOcos(pt + f) + 4 adpsin(pt) - amp2 cos(pt)
3a 3k 1 cos(pt)
+ 4 + ak cos(pt)
Next, expand cos(pt + f)
(c5) part(%, I);
(d5) - pOcos(pt + f)
(c6) trigexpand(%);
(d6) - pO(cos(f)cos(pt) - sin(f)sin(pt))
3a 3k 1 cos(pt)
- amp2 cos(pt) + 4 + ak cos(pt)
As noted earlier, this equation would be approximately satisfied ifthe coefficients
of cos pt and sin pt would vanish
(c8) ratcoef(%, cos(p *t));
4cos(f)pO + 4amp2 - 3a 3kl - 4ak
(d8)
4
(c9) ratcoef(d7,sin(p*t));
(d9) sin(f)pO - adp
which provide two equations for the phase angle, J, and amplitude, a.
We find tan J by
(clO) solve(d8,cos(f));
42 I. Symbolic Manipulation Codes
Invoking (1.7S), (1.73) and (1.66) we get for the frequency of free vibrations, OJ,
2 k 3k, 2
OJ =-+-a (1.78)
m 4m
Substituting this into (dlO) by ratsubst and solving for the amplitude, a, yield
(el3) ratsubst(w'2, kim + 3 * k I *a '2/(4*m), dlO);
amp2 - amw2]
(dI3) [ cos(f) = - pO
where only the positive root may be physically meaningful. The result for the
1.13. Example: Forced Nonlinear Vibrations 43
y F
Now consider the motion of a particle from point 1 to point 2 (Fig. 2.1). The
work, W, done by the external force, F, is defined through the scalar differential
dW12 = F·ds (2.6)
or
W 12 = 12 F·ds (2.7)
tF'dS=O (2.11)
where the dot denotes the derivative with respect to time, Frequently, the internal
forces Fji satisfy Newton's third law of action and reaction.
The kinetic energy, T, introduced in the previous section is an additive quantity.
Consequently, its total value may be obtained by summing the kinetic energy of
the particles
T=1Im vJ j (2.16)
j
(2.17)
which may be split in two parts by making use of the left-hand side of (2.15).
The above equations implicitly assume that there are no constraints imposed
on the motion of the system, which may not be the case in reality. For example, a
particle situated on the cylindrical surface may move only on its surface or in its
exterior region. Rigid bodies are thought of as consisting of an infinite number of
particles, such that the mutual distance, 'ij' for any ij-pair ofthem remains constant.
This also may be viewed as a constraint.
Constraints formulated by equations of the type
(2.18)
which involve coordinates and time only are called holonomic. For example, for a
conventional pendulum we get
(2.19)
where x and yare coordinates of the mass and L the.length of the wire.
Constraints which are not expressible in the form of (2.18) are referred to as
nonholonomic. For example, for the above particle placed on the cylindrical surface
we may write
(2.20)
where a is the cylinder radius.
Constraints may render the coordinates, r i , mutually dependent. Furthermore,
they are associated with usually unknown forces which are needed to impose them.
The analysis of constrained systems may be facilitated by introducing the concept
of generalized coordinates.
To this end, consider a system of N particles, which has 3N independent
2.3 Functional and its Euler-Lagrange Equation 47
coordinates (degrees of freedom). Assume that there exist K equations of the type
(2.18), which describe holonomic constraints imposed on the system. This suggests
that only 3N - K coordinates are independent. Accordingly, we may state that the
system has 3N - K degrees of freedom and introduce 3N - K generalized
coordinates, 1fi, i = 1, 2, ... 3N - K, by properly eliminating "dependent" variables.
Note, that 1fi should not necessarily be cartesian coordinates. For example, in
e,
the above case of pendulum we may choose the angle, as the generalized coordinate
instead of two independent cartesian coordinates x and Y and the constraint (2.19).
Moreover, any independent functions which completely identify the configuration
of the system may be thought of as generalized coordinates.
J(y) = f
X2
XI
f(y,x,y')dx (2.22)
where prime denotes the derivative with respect to x and f is a prescribed function
of the arguments indicated.
Next, assume that there exists a set of functions Yi(X), i = 1,2, ... , each of which
satisfies (2.21). Since the integral in (2.22) is definite, upon substitution of Yi(X) one
arrives at a number, J(Yi)'
(2.23)
Y
XI'YI
,
- ..... " Yi (x) =yO( X)+Eq (X)
"- ----
o X
to comply with (2.21). Now the integral (2.23) may be considered as depending on
e, J(e). Since yO(x) provides an extremum of (2.23) by definition, this implies
dJ
- = 0 for e =0 (2.26)
de
Here use has been made of (2.24).
The parameter, e, enters (2.23) through Yi and y;. Therefore we get
dJ
-=J(e)
de '8
=
f (Of-oy' -oyoe+oy'of- 'oy')
X
2
oe- dx
f (Ofoy + oyo~
Xl
X
= 2 q q')dX (2.27)
Xl
Here we omitted the subscript i associated with the quantities y and y' and used
(2.24) once again. Integrating by parts we get for the second term
f oyof,
X
Xl
2
--;q dx =
of IX2 -
-;::-;q
oy Xl
f
X
Xl
2
-d (Of)
- , qdx
dx oy
(2.28)
The first term on the right-hand side of this expression vanishes because of (2.25),
and (2.26) eventually becomes
fX2[Ofoy -~(o~)JqdX=O
Xl oy dx
(2.29)
This result suggests that the bracketed term in (2.29) should vanish, for q(x), in
accord with (2.24), has been thought of as quite arbitrary a function. Indeed, a more
precise analysis, which will not be pursued here, shows that this conclusion holds
under certain conditions imposed on y, q, and f. Loosely speaking, these conditions
require the functions f and y to be "smooth" enough, namely y must have continuous
derivatives up to the second order, inclusively, and the second partial derivative of
f must exist and be continuous on (XI' x 2 ). As to q, it must have continuous
derivatives of all orders.
Assuming that these conditions are fulfilled, we get from (2.29)
(2.30)
2.4. Hamilton's Principle for Discrete Systems 49
I X2
Xl
(5f(y,x,y')dx = 0 (2.32)
Note that neither the independent variable, x, nor the limits of integration, XI and
X 2 , are affected by this variational process.
The forces acting on the particles are taken to be conservative, thereby implying
that the potential energy of the system, U, does exist and is a function of the
generalized coordinates, U = U('1). As to the kinetic energy, T, we set T = T('1j, r,j)'
Hamilton's principle postulates: the definite integral
1= 1'I
'2
(T - U)dt (2.36)
becomes stationary for the actual motion of the system in comparison with
neighboring admissible motions. Adopting this principle, we may proceed with
derivation of the equations governing the unknown generalized coordinates, '1j(t),
namely, the Euler-Lagrange equations of the functional (2.36). It could be carried
out in a way completely similar to that of the previous section. Nevertheless, we
ha ve first to take care of simplifying our notations, since, this time, a set of functions,
not a single one, is under consideration. Henceforth we use the so-called summation
convention, with respect to a repeated index. For example,
au aZ i au OZI ou OZ2
--=~~+~~+ ... OU
~~
oZn
(2.37)
aZ i oe ozloe l OZ2 010 aZ n Of.
According to Hamilton's principle we set
M=dI(e)le=o (2.38)
de e=O
and represent an admissible motion as in (2.24)
'1j(t) = '17 (t) + eqj(t) (2.39)
where '17(t) denote the actual motion. Note, that qj(t) must vanish at t = tl and
t = t 2 . Then
M= 1'I
'2 (OT aT OU)
~qj+~. qj-~qj dt
0'1j 0'1j 0'1j
(2.40)
where use has been made of (2.39). Integrating the second term in the brackets by
parts, as in (2.28), and introducing the Lagrangian
L=T-U (2.41)
we put (2.40) in the concise form similar to (2.29)
I '2[OL
II o'1j
-~(~~)Jqjdt=O
dt 0'1j
(2.42)
It has been assumed that the functions involved, L, '1j' and qj comply with the
regularity conditions mentioned in Section 2.3. Consequently, Lagrange's equations
of motion follow from (2.42) as
(2.48)
is stationary for the actual motion of the constrained system in comparison with
neighboring admissible motions. Here, A;{t) are unknown functions, which are
referred to as Lagrange multipliers, and the summation convention applies. Note
that the generalized coordinates, I]j(t), are viewed as independent while performing
the variation of (2.48).
In a way completely similar to that of the previous section we get the
Euler-Lagrange equations for (2.48)
Here m is the wheel mass, a its radius, and x the distance. On the other hand, the
potential gravitational energy is
U = mg(L 1 - x)sin</> (2.51)
where the notations Ll and </> should be clear from Fig. 2.3. Since the motion is
pure rolling, the two coordinates, "1 "2
= x, and = fJ, are related by
afJ-x=O (2.52)
which is the single constraint imposed in this case.
Equation (2.49) then yields
maO - A = 0 (2.53)
mx - mg sin </> + A= 0 (2.54)
On differentiating (2.52) twice with respect to time and substituting into (2.53)
we get
A=mx (2.55)
and (2.54) becomes
.. gsin </>
x=-- (2.56)
2
Then we easily obtain
.. gsin </>
(J=-- (2.57)
2a
Equations (2.56) and (2.57) can be integrated with respect to time to provide the
desirable x = x(t) and (J = (J(t).
2.7. D'Alembert's Principle. Nonconservative Systems 53
On splitting the resultant forces Fi in the applied forces F!O) and those associated
with constraints, F!e),
(2.59)
we get
N
L F!o).bri = 0 (2.60)
i~l
The last equation holds for many cases not only because of Newton's third law
but also for the virtual displacement br i is often orthogonal to F!e). For example,
for a particle on a plane br is tangent to the plane, while F(e) is normal to it. Thus,
(2.60) states a new physically meaningful principle, unlike the trivial result (2.58).
Equation (2.60) is referred to as the principle of virtual work. It is shown in the next
section that it also leads to (2.43) as a particular case.
in place of(2.58). Resolving once again the resultant forces, as in (2.59), we eventually
get
N
L (F!O) - tiJbr i = 0 (2.63)
i~ 1
which is referred to as D'Alembert's principle. Here use has been made of (2.61).
54 II. Variational Approach and Equations of Motion
The superscript (a) in (2.63) and (2.60) could now be dropped, on the understanding
that these equations do not contain the forces of constraints.
The question of fundamental importance is as to how the equations of motion
(2.63) relate to the previously derived equations, say, (2.43). To this end, we transform
(2.63) to a form which employs independent generalized coordinates, YJj. Invoking
the discussion of Section 2.2, we write
rj = rj(YJI' '12 ... YJ3N-K, t)
(i= 1,2, ... N) (2.64)
assuming thereby that the system of N particles has K holonomic constraints. The
particle velocity is
y. = 3'I K ar j aYJj + ar j
(2.65)
, j= I aYJj at at
while the virtual displacement, br j , is
br j
ar·
= ~bY{j (2.66)
oY{j
Note that no variation of time, bt, appears in (2.66), which is consistent with
the definition of virtual displacement. Introducing the generalized forces, Qj,
by
N ar.
Qj= I F(-' (2.67)
j= 1 aYJj
we put the static principle of virtual work (2.60) in the form
N 3N-K
I F;"brj= I QjbY{j=O (2.68)
j= I j= I
p·br=mi'·-bY{.
ar (2.70)
aY{j J
where we omitted the subscript i. This may be put in the form
bY{j(mi'.~)
aY{j
= bY{j[~(mt.~) - mt.~(~)J
dt aY{j dt aY{j
(2.71 )
N . ~ _ 3N-K{d[~(N
~ ~
L., p·ur·- L., - -
0 ~ miDi
L., -
2) ~ "
0 NmiDi
- - L., -
2]} .
1517' (2.75)
i=1 ' , j=1 dt O~j i=1 2 0l7ji=l 2 J
-d (OT)
-. oT
--~-= Qj, j= 1,2, ... 3N - K (2.78)
dt Ol7j 0l7j
Note that no assumption of the conservative system has in fact been made. Hence,
D'Alembert's principle in the form of (2.68) or (2.78) holds for nonconservative
systems too.
Now we confine the considerations to conservative systems setting that the
generalized forces, Qj, are deduceable from a potential, U,
Q.= - -
oU (2.79)
J 0l7j
which is in accord with (2.12) and (2.34).
Taking into account that U does not depend on ~j, and introducing the
Lagrangian, L, by (2.41), we get from (2.78) and (2.79)
d(OL) oL (2.80)
dt O~j - ol7j =0
recovering (2.43). We have thus confirmed Hamilton's principle by the direct and
physically meaningful considerations.
56 II. Variational Approach and Equations of Motion
U=tIk('1i+I-'1J 2, (2.82)
i
respectively. Here '1i is the displacement of the i-th mass. The Lagrangian may be
written as
L= tI [m~l- k('1i+ 1 - '1ifJ (2.83)
i
which may be put in the following form convenient for the subsequent limiting
procedure
L -.! ,[m'
2 k ('1i+I-'1i)2]
-2 a L.... -'1i - a
i a a2
(2.84)
i -1 i +1 state of
equi 1i bri urn
J. . .
_..:......:+...
Tli-l
mr:l~]
'I
.........
" ............... PNIII.......I11......."'.IIIIII.III.......I11........
V ....HIV ..."'"
Sta te of
moti on
with p being the mass per unit length and then, introducing the x-coordinate,
write
(IIi + I -11;) --> l1(x + a) - I1(X) (2.86)
Equation (2.86) implies that
. l1i+1 -l1i
I1m dl1
=- (2.87)
a~O a dx
In the strength of materials the above term is referred to as the relative elongation,
£, and the associated stress is
(J = E£ (2.88)
with E being Young's modulus. On the other hand, the force needed to deform the
spring by the same amount is
(l1i+ 1 -11;)
F=k(l1i+I-I1;)=ka---- (2.89)
a
From comparison between (2.88) and (2.89) and in view of (2.87) we get
ka --> E (2.90)
Making use of the above identifications in (2.84) we get the Lagrangian for the rod
(2.91)
where the axial displacement, 11, is considered as a function of x and t, I1(X, t). The
integral appearing in (2.91) is, of course, a replacement for the summation over a
number of particles appearing in (2.84), with 1 being the rod length. It is convenient
to introduce the Lagrangian density, Lo, given by
(2.92)
where prime denotes the derivative with respect to x. Hamilton's principle takes on
M = (j (2.93)
tl tl 0
This representation points out that no variation is assumed of the spatial coordinate
x, and time t, as well as of the limits of integration.
L= Iv Lodv (2.94)
58 II. Variational Approach and Equations of Motion
As (2.31) shows, the variation from a technical point of view may be considered as
differential
(2.99)
In (2.98) five quantities are subject to independent variations, namely, 1], Ij, I],x, I].y'
while r, t and the limits of integration are considered as fixed.
1].=,
In view of (2.99), 6L a , with La, given by (2.96), may be put in the form
oLo aLa. aLa oLo oLo
6L a = - 61] + -. 61] + - 61],x + - 61].y + - 61],z (2.100)
01] 01] Ol],x Ol].y Ol],z
The expression resulting from substitution of (2.100) for 6La in (2.98) simplifies once
again by means of integration by parts, as noted in Sections 2.3 and 2.4. Namely
1"'2 ---!!-
oL 61j dt = - 1'2 d (OL
- ---!!- ) 61] dt (2.101)
01] "dt 01]
and
(2.102)
with similar results for the derivatives with respect to I],y and I].z' The first term on
the right-hand side of(2, 102) vanishes, since 61] = 0 at the limits of spatial integration.
Eventually, (2.98) becomes
Due to the arbitrariness of 15'1 the bracketed term in (2.103) must vanish. On
introducing the notations x = XI' Y = XZ' Z = X 3 , the Euler-Lagrange equation for
(2.103) may be conveniently written as
doLo doLo OLi
--+-----=0 (2.104)
dt o~ dXi 0'1.i 0'1
where the summation convention with respect to the repeated subscript i applies.
Note that (2.104) is a partial differential equation, which governs '1(r,t). This
differs from the case of a discrete system, for which the Euler-Lagrange
equations are ordinary differential equations (2.43) governing the functions '1j(t).
A remarkable similarity in treating the spatial coordinates and time is seen
from (2.104).
In many cases, as mentioned earlier; the system is described by two or three functions,
'1i(r, t). Then the Lagrangian density, L o, would be a function of all these quantities,
their first spatial and temporal derivatives, radius vector, r, and time, t. Nevertheless,
since the variations of '1i(r, t) are independent of each other, (2.104) would
hold for each of them. This case, therefore, does not require an additional
treatment.
Furthermore, (2.104) may be generalized to the case when the Lagrangian density,
L o , depends also on spatial derivatives of higher order. The very structure of (2.1 04)
suggests that if, for example,
Lo = Lo(YJ,~, YJ.x, YJ. y, YJ.Z' '1.xx, YJ. yy, YJ.zz, YJ.xy, YJ.xz, YJ.yz, x, y, z, t) (2.105)
than the Euler-Lagrange equation could be written as
(2.108)
60 II. Variational Approach and Equations of Motion
y
q(x,t)
Too =ZP
1 (0'1i)2
at =zpV 1 2
(2.109)
The potential of external forces, which may be applied within the body and on
its boundary surface, if it exists, depends on the displacement, '1i(r, t). The strain
potential, associated with the energy of deformations, depends on the first spatial
derivatives, and in some theories on higher derivatives. It therefore follows that the
Lagrangian density of elastic solids may belong to the case given by (2.105) on the
understanding that all three functions, '1i(r, t) could be involved. For each of them
(2.106) yields the Euler-Lagrange equation.
Consider the example of a beam of variable cross section subject to a distributed
lateral load, q(x, t), Fig. 2.5. The elementary approach in the frameworks of the
c::r-
strength of materials theory yields
U 0 = EI;X) qw (2.110)
(2.113)
2.11. Minimum of Potential Energy. Boundary Conditions 61
a2 w d 2 [ aZw]
p(x)-z + -dz E1(x)~ = q(x, t) (2.114)
at x ox
which reduces to the well-known result
(2.115)
It has been seen that the equations governing various systems may be derived from
a single variational principle as the condition of its stationarity. For conservative
systems it can be further shown that the above condition is, in fact, the one of
minimum provided the problem is static. Moreover, certain boundary conditions
may also be derived from a variational principle. This stresses the generality of the
approach.
To this end, consider an elastic cantliver beam of a uniform cross-section which
is subject to a concentrated static force P at its end, Fig. 2.6. The boundary conditions
are
wo(x = 0) = w~AO) = 0 (2.1 h6)
where Wo(x) is the deflection function. Introducing the notation
w£ = Wo(x = L) (2.117)
we write the expression for the potential energy (the kinetic energy vanishes for the
static case)
Representing, in the spirit of Sections 2.3 and 2.4, the admissible deflection
function w(x) as
w(x) = wO(x) + eq(x) (2.119)
I ~P
I
we find the increment of (2.118) due to the deviation of w(x) from wO(x). Indeed
Here
qL=q(X = L). (2.122)
The expression for L1 U consists of terms of the first and second order of smallness.
We therefore put it in the form
L1U = bU + 1b 2U (2.123)
where
(2.124)
Since b 2 U given by (2.125) is obviously positive, it is seen from (2.123) that the
condition of stationary
bU=O (2.126)
is the one of a relative minimum for U. This statement can be extended to other
elastic static systems.
Further, integrate (2.124) twice by parts to obtain
a) stable equilibrium
b) unstable
equilibrium
the boundary conditions given by (2.116) may be called imposed or essential ones,
for they do not follow from the variational formulation.
Thus, the variational approach yields not only the differential equations, but
some of the boundary conditions too. These are associated with the boundary term
in the variation of a functional. This question will be further treated in Section 2.21.
The value taken on by U when a conservative system is in equilibrium is
intimately related to the stability of this state. To this end, assume that the system
gets a small perturbation characterized by the initial displacement, '1?, and by the
initial velocity, ~? It then executes vibrations around the equilibrium state. It can
be shown that, if the extremum of U is minimum, the vibrations remain "small"
and the equilibrium is said to be stable. On the other hand, if the extremum of U
is maximum, then the vibrations become unbounded and the system moves away
from the equilibrium, which is said to be unstable. Figure 2.7 illustrates qualitatively
the above notions.
Finally, the reference made to the code expression assumes the one of the same
section. In case of a reference to the code expression appearing in the other sections
this is explicitly indicated.
The program is ready and we may try to use it for various systems of one degree
of freedom. Our first attempt is of course a simple harmonic oscillator, which has
been already considered in Section 2.4.
2.13. Single Degree of Freedom 65
(d7) . (sqrt(k)t)
h = %kl SIn --- + %k2cos (sqrt(k)t)
sqrt(m) sqrt(m)
which is the well-known solution for the harmonic oscillator. The constants %k 1
and %k2 are to be specified from initial conditions.
We may wish to work with differential equations written in indicial notations
rather than in the form of (d6) and (d3). Then we state the following option
true
(c8) derivabbrev:true$
Now, say, (d6) looks like this
(c9) d6;
(d9) - httm - hk = 0
After saving the above program under the name, say, "lagr"
(c1 0) save("lagr", all);
we may use it for analysis of other systems of one degree of freedom, say, a pendulum
66 II. Variational Approach and Equations of Motion
m
Figure 2.8 To non-linear oscillations of a pendulum
and then repeat the previous commands (c5) and (c6), namely
(c13) subst(%, d3);
(cI4) ev(%,diff);
(dI4) - htt l2 m - gsin(h)lm = 0
This is the equation for non-linear (large) oscillations of a pendulum
BL+gsin8=O (2.137)
which follows from (d14).
Attempting to solve (2.137) we invoke ode once again and get a somewhat
disappointing output
(c17) ode(dI4,h,t);
[
1
/ sqrt
(gCOS(~)I- %kl g) dh
(dI7) - - - - - - - - - - - ' - - = t + %k2,
sqrt(2)
]/
[
I
/ sqrt
I
(gCOS(h) - %kl g )
I
dh
- - - - - - - - - - = t + %k2,
1
sqrt(2)
2.14. Two Degrees of Freedom. Double Nonlinear Pendulum 67
The code, in fact, goes through various routines in trying to solve (2.135) but is
only capable of providing the above two expressions for h(t) in the implicit form.
We may therefore appreciate the difference between the linear equation (d6) and
nonlinear one (dI4).
We deal with a more general program of which the previous one is a particular
case. Consider a double pendulum shown in Fig. 2.9, having in mind that a program
should then be used for analysis of other systems too.
The potential (gravitational) energy in the notations of Fig. 2.9 is
U= -m 2g2L 2cos8 2 -(ml +m2)gL1cos8 1 (2.138)
while the kinetic energy is
T = t(m 1 + mz)LiBi + tmzL~8~ + m2L1Lzfl182 cos(8 1 - 8 z ) (2.139)
Introducing the notations 8 1 = hI, 8 z = h2, 81 = hIt and 8z = h2t for the
generalized coordinates and velocities we first establish the relevant dependencies
(cl) depends (la, [hI, h2, hit, h2t], [hI, h2, hI t, h2t], t);
(dl) [la(hl, h2, hit, h2t), hl(t), h2(t), hlt(t), h2t(t)]
The code now knows that the Lagrangian is a function of two generalized
coordinates and their temporal derivatives, while these, in turn, depend on time.
Unlike the previous case, we introduce two Euler-Lagrange equations in agreement
with (2.43)
(c2) diff(la, hl)-'diff(diff(la, hit), t)=O;
dla dZla
(d2) ----=0
dhl dhItdt
(c3) diff(la, h2) - 'diff(diff(la, h2t), t) = 0;
dla dZla
(d3) ----=0
dh2 dh2tdt
where prime has again been used to delay the evaluation of the temporary derivative.
Next, we inform the code that hit and h2t are the first derivatives of hi and h2,
respectively
(c4) hit = 'diff(hl,t);
dhl
(d4) hlt=-
dt
(cS) h2t = 'diff(h2, t);
dh2
(dS) h2t=-
dt
and complete thereby the information of general nature the code must know of.
Note the difference compared with the previous case where tellsimpafter has been
used.
We turn to the particular problem under consideration and inform the code
that the Lagrangian is given by the difference between (2.139) and (2.138)
(c6) la =(ml +m2)*11 '2* h I t'2/2 + m2*12'2*h2t'2/2 + m2*11 *12*hl t *h2t*
cos(hl - h2) + (ml + m2)*g*11 *cos(hl) + m2*g*12*cos(h2);
h It2112(m2 + m I) h2t 212 2m2
(d6) la= 2 +gcos(hl)ll(m2+ml)+--2--
dh~
- cos(h2 - hl)--1112m2 + (dh2
- - -dhl) sin(h2 - hl)h2tll12m2
dt dt dt
+ hltsin(h2 - hl)h2tl1l2m2 = 0
(clO) ev(d8,diff);
dh2t
(dIO) - --12 2m2 - hit sin(h2 - hl)h2tll12m2
dt
dh2 dhl)
+hlt ( - - - sin(h2-hl)11l2m2
dt dt
dhlt
-Ttcos(h2 - hl)11l2m2 - gsin(h2)12m2 = 0
+dh2
- (dh2
- -dh
-1 ) sin(h2-hl)11l2m2
dt dt dt
dhl dh2 dZh z
+ citcit sin (h2 - hl)11l2m2 - de cos(h2 - hl)l1l2m2 = 0
- g sin(h2)12m2 = 0
and thus complete the derivation of the Euler-Lagrange equations. Nevertheless,
we may simplify the appearance of (dll) and (dI2). Since these expressions involve
trigonometric functions we try trigreduce
(c13) trigreduce(dll);
dh2)Z dZh2 d Zhl
(dI3) ( cit sin(h2 - hl)11l2m2 - dt2cos(h2 - hl)11l2m2 - dt2 11Zm2
d Zhl
- gsin(hl)l1m2 - dt211zm1 - g sin(hl)l1ml = 0
The final form of the governing equations is given by (dI3) and (dI4).
where x\ and X 2 are the displacements of the masses m\ and m 2 , respectively, from
the position of equilibrium. The potential energy is
(2.141)
where the first two terms are the elastic energies of the springs while the last term
is the work done by the external force.
Denoting x\ and X 2 by hI and h2, respectively, and .x\ and x2 by hIt and h2t,
respectively, we define the Lagrangian
(cI6) la = (ml *hlt'2 + m2*h2t'2)/2 (kl *hl '2 + kh(h2 - hlr2)/2
+ pO*sin(w*t)*hl;
(h2 - h1) 2 k2 + hl 2 kl h2t 2 m2 + hlt 2 ml
(dI6) la = hlpOsin(tw) - 2 + 2
and substitute this into (d2) and (d3) of the previous section
(el7) subst(%, d2)$
(cI8) subst(dI6,d3)$
The subsequent substitutions and evaluations reproduce the commands
(c9)-(el2) of the previous section and may be simplified in the following way:
(el9) ev(subst([d4, dS], dI7), diff);
2hlkl - 2(h2 - hl)k2 d 2 hl
(dI9) pOsin(tw) - 2 - de m! = 0
The equations are eventually given by (d20) and (d2l). The theory of the shock
absorber has been given in some detail in Chapter 1.
2.16. Continuous Systems 71
d4h d 4h ) (d 4h d4h ) d 2h
(d9) - q (x, y, t) + ( dy4 + dx2 dy2 sd + dx4 + dx2 dy2 sd - dt2 ro = 0
which is the well-known equation governing the plate vibrations in the frameworks
of the linear theory.
Hence, the code now knows that these quantities are functions of time. Let us
supplement this by the list
(c2) [hlt:diff(hl, t), h2t:diff(h2, t)]$
which informs the code that
hIt = hI.! and h2t = h2.! (2.149)
It remains to issue the two Euler-Lagrange equations, according to (2.43). We
carry this out by introducing two functions, eulal(la) and eula2(la) with their
argument, La, being the Lagrangian of the system
(c3) eulal (La):= (diff(La, hI) - diff(diff(La, hlt), t),
trigreduce(%%), ratsimp(%%))$
(c4) eula2(La):= (diff(La, h2) - diff(diff(La, h2t), t),
trigreduce(%%), ratsimp(%%))$
It is seen that the functions are defined as the left-hand side of (2.43) followed
by the commands of simplifications. The general structure is that of a compound
statement. Note, that the simplification commands are not always rational to include
in this statement. It may be more convenient to type them in after executing the
basic program, since their efficiency depends on the particular case under investi-
gation. They appear in (c3) and (c4) for the illustration purposes.
The above four statements allow for an automatic derivation of the Euler-
Lagrange equations upon identification of a particular form of the Lagrangian,
La. To use this program we first specify La and then request eula 1 (La) and eula 2 (La)
to be evaluated. For example, for the double non-linear pendulum (Fig. 2.9) we issue
(c5) La:(ml + m2)*11 A2*hW2j2 + m2*lr2*h2t A2j2 + m2*11 *12*hlt*h2t*
cos(hl- h2) + (mt + m2)*g*11 *cos(hl) + m2*g*12*cos(h2)$
(c6) eulal(La);
(d6) - sin(hl)l1(m2 + ml)g + (( (d:t2r sin(h2 - hI)
d2h2 )
- g sin(h2) ) 12 - dt2122 m2.
where use has been made of (2.138) and (2.139) to define the Lagrangian. The above
expressions (d6) and (d7) coincide with (dI3) and (dI4) of Section 2.14. Note that
the number of statements have been reduced from 14 to 7, compared to the program
given in Section 2.14.
Turning to continuous systems, we adopt a slightly modified formulation to
incorporate new variables. In the notations of Section 2.16 we type in
(cl) depends([h, ht, hx, hxx, hyy, hxy, hy], [t, x, y]);
(dl) [h(t, x, y), ht(t, x, y), hx(t, x, y), hxx(t, x, y), hyy(t, x, y),
hxy(t, x, y), hy(t, x, y)]
2.19. Second Variation and Nature of Extremum 75
where LO has been defined as in (c6) of Section 2.16. The result (d9) coincides with
(d9) of that section. The examples considered show that compound statements make
the programs far more compact and easy to use.
J = fX2
x,
f(y,x,y')dx (2.150)
as J O and assume that yO (x) yields this minimum. Then the quantity AJ, given by
!J.J = J - J O > 0 (2.151)
is the increment of J. We may write
!J.J = f X2
Xl
Af dx (2.152)
with
Af = f(y,x,y') - f(yO,x,yO') (2.153)
To represent AJ in terms of variations by(x) and by'(x), we invoke (2.24) and
76 II. Variational Approach and Equations of Motion
write
by = y - yO = eq
(2.154)
by' = y' - yO' = eq'
where y is an admissible function and e is a small parameter. Assuming in the sequel
that by and by' are small enough, which is known as the case of weak variations,
we use a Taylor expansion for I1J given by (2.153)
I1J = bJ + tb 2 J + ... (2.155)
where
bJ = J. y by + J y ' by' (2.156)
is the first variation of J and
b 2 J = f.yy(by)2 + 2f.yy' by by' + f.Y'y,(by')2 (2.157)
its second variation.
Now we may put (2.152) in the form
I1J = bJ + tb 2 J + ... (2.158)
where
bJ=fx2bJdX (2.159)
x,
is the first variation of the functional J and
(2.160)
its second variation, which has been introduced earlier in Section 2.11. Here use
has been made of (2.152).
Note that according to (2.31)
dJ\ e
bJ=- (2.161)
de £=0
while for the second variation we may write
d-
b2 J =
2
J\ e2 (2.162)
de 2 .=0
(2.169)
15 2J = I X1
where
R= J,y'Y'
Assume that for some Xo (Xl ~ Xo ~ x 2) R(xo) is negative
R(xo) = - 2d (d > 0) (2.172)
Then for an interval (al,a l + h), which contains Xo and is enclosed by the interval
we may get
(X l ,X 2 )
Then
h
1 dx
fa,
x, a,
+h n2 2n(x - a ) dn 2
+ R-sin 2 1 dx<Mh-- (2.175)
a, h2 h h
Indeed,
n(x - a )
Psin 4 1 :::;P:::;M
h
. 2 2n(x - ad . 2 2n(x - ad
R sm h < - d sm h :::; - d (2.176)
(2.184)
2.21. Transversality Conditions 79
y
/
,L-'"
JoT
--- ....
......... ..J
/
x
Figure 2.11 To the transversality conditions
80 II. Variational Approach and Equations of Motion
(2.150), on the understanding that the end points, Xl' Yl and X 2, Y2' this time are
free to move along the above curves.
The rule of differentiation of an integral with variable limits provides
which differs from (2.l59) by the second term on the right-hand side. From (2.l61)
and (2.27)-(2.29), we get
X>
I Of dx =
d)
IX> ( f,y - d f.y. oydx + (J,y'oy) 12 (2.191 )
XI Xl X 1
(2.l93)
(2.l95)
where g is a given function of the end points. It is possible to show that the
Euler-Lagrange equation (2.30) holds for (2.l95) too, while the transversality
2.22. Generalizations and Transformations of Variational Problems 81
condition becomes
[(f - y'f.y·)bx + f.y.byJli + bg = 0 (2.196)
where
(2.198)
The Euler-Lagrange equations for (2.198) were obtained in Section 2.4 while the
transversality condition is as follows:
(2.199)
where
n
J1 = I X2
x,
[f(x,y, w, w') + },(w - y')Jdx (2.203)
where A is the Lagrangian multiplier. The functional J 1 contains only the first
derivatives and may be treated by the above methods. Note that, depending on the
type of constraints imposed, the Lagrangian multiplier may be either a constant or
a function.
Another example is the case when the constraint is an inequality, say
(2.204)
We introduce a real variable, rx, and set instead of (2.204)
y' - K - !X 2 = 0 (2.205)
The problem reduces to finding those y(x) and rx(x) which comply with (2.205) and
82 II. Variational Approach and Equations of Motion
J = IX2
x,
[f(x, y,y') + Jc(y' - K - (X2)]dx (2.206)
I X2
II (x, y, y')dx
I
Xl
X2
(2.207)
12 (x, y, y')dx
Xl
fJJ 1 - yfJJ 2 = fJ I
X
Xl
2 (II - yI2)dx = 0 (2.210)
JI= !a l
y' 2 dx, J 2= !a
l
y 2 dx (2.212)
Consider a body of revolution in a gas flow (Fig. 2.12). The body is being translated
with zero angle of attack. The normal pressure on its surface may be expressed as
p = 2pv 2 sin 2 8 (2.218)
where p is the fluid density and v is relative speed, while the meaning of 8 should
be clear from Fig. 2.13. Considering an elementary ribbon of width (1 + y'2}tdx and
radius y(x) (see Fig. 2.13), we may derive the following force exerted on the ribbon
by the flow:
dF = p [2ny( 1 + y'2)tJ sin 8 dx (2.219)
Integrating this, after substitution of (2.218) for p, we get the force
Yl
gas flow
x
y(x)
.e y' 1
+ y' 2 )+ ~Y
sm =
I
« (2.221)
(1
Then F becomes
This raises the question about such a shape, y(x), that would provide a minimum
for F. The y(x) is also subject to the following conditions at the ends
y(O) =0
(2.223)
Y(Xd=YI
as seen from Fig. 2.12.
The Euler-Lagrange equation (2.30) is
d
y'3 __ 3y'2y=0 (2.224)
dx
which simplifies by the following evaluation of the last term on the right-hand side:
(c3) depends(y, x);
(d3) [y(x)]
(c4) y*diff(y, xr2;
(d4) YG~r
(c5) diff(%, x);
2
dyd y (d y )3
(d5) 2y dx dx 2 + dx
(d6) ( -d
dx
y )3 -3 (2dydxY-ddx-2y2+ (d-dxy )3)
(c7) ratsimp(%);
with the help of ode, while the boundary conditions given by (2.223) may be
incorporated by be2, as follows:
(elO) ode(%,y,x);
:I:JQ..g1yL
3%e 3
(dlO) 0 =x+%k2
4%kl
(ell) radcan(dlO);
3y4/3
(dll) - - = x + %k2
4%kl
(el2) bc2(%,x=O,y=O,x=xl,y=yl);
xly4/3
(d12) y14/3 = x
(c13) solve(%,y);
X )3/4
Y(X)=Yl ( ~ (2.225)
(c14) diff(y,xr3*y;
(d14) y(yy
(el5) diff(d14, diff(y, x), 2);
(d15) 6yyx
(el6) y = yl * (x/x 1t(3/4);
(d16) y=c~r/4Yl
(c17) (subst(%, d15), ev(%%, diff));
9s Qrt(:1) Y12
(d17) 2xl
Since (d17) is obviously positive, Legendre's condition for the above shape is
satisfied. Substituting (2.225) into (2.222) and evaluating the integral, we find the
86 II. Variational Approach and Equations of Motion
minimal value of the force exerted on the slender body of revolution, fmin
(c1S) diff(d16,x);
3yl
(d is)
4(:J /\1 I
(c19) intanalysis:false;
(d19) false
(c20) fmin:4* %pi * ro * v A2 * integrate(d is A3 *d 16, x, 0, xl);
V=n fly 2 dx
S= 2n fl ydx (2.226)
and that the force, F, is given by (2.222), we form the new functional
where Al and ,12 are the constant Lagrange multipliers. Conditions of the integral
type given by (2.226) are known as isoperimetric. It can be shown that the associated
Lagrange multipliers are constants. We thus look for a function, y(x), and the
parameters x I ' AI ' and ,12 which would provide a minimum for <1>, while satisfying
at the same time the constraints (2.226).
Denote the integrand of (2.227) as f
f = yy'3 + AlY + A2y2 (2.22S)
Then the Euler-Lagrange equation (2.30) is
df d df d
-d --d -d,=y'3+AI+2A2Y--d (3yy'2)=A I +2A 2y-6yy'y"-2y'3=0
y x Y x
(2.229)
An attempt to straightforwardly solve this equation with the help of o.de-
command yields complicated results, which are difficult to analyse. This is therefore
a case, which needs a different approach and manual computations may be useful.
2.24. Constrained Minimum Pressure Drag 87
To this end, note that (2.229) does not contain explicitly the independent variable,
x. The Euler-Lagrange equation (2.30) admits in this case the following form
dy dJ
J ---=const=D (2.230)
dxdy'
To prove this we introduce the following convenient abbreviations:
y' = Z, y" = z,x = ZZ,y (2,231)
X= f y ( 2y
o }'IY + A2y2 - D
)1/3 dy (2,240)
We first investigated the particular case when no constraints are imposed and the
end points are fixed. Then
(2.241)
and, as follows from the transversality condition (2.236), D does not vanish,
D #0 (2,242)
Substituting (2.241) into (2,240) and integrating we get
X = Qly 4/3 (2,243)
88 II. Variational Approach and Equations of Motion
where QI is a constant. On specifying QI from the boundary condition y(x = XI) = YI,
this becomes
(2.244)
0.4
0.3
0.2
/
0.1 /
/
/
/
where the quadratic expression in the integrand allows to avoid the mutual
cancellation of possible negative and positive discrepancies. The smaller b is, the
closer U t and U 2 get in the mean. Note, this kind of closeness says nothing about
the local proximity of the functions. Figuratively speaking, b may be thought of as
the average "distance" between the pair offunctions, U t and U2. We may also extend
this approach to measure the distance between derivatives of the functions.
On the other hand, if the local approximation is of interest, than an appropriate
distance is apparently the maximum separation between these functions, e,
e=max{lu t -u 2 1} (3.2)
v
over the above domain. Obviously, e -> 0 implies b -> 0 but not vice versa.
In trying to find an approximate solution we first think of its closeness to the exact
one in the mean. This, being a simpler problem, may nevertheless be satisfactory one
from an engineering point of view.
It is difficult to define precisely what the direct methods of looking for
approximate solutions are. They are mainly the methods which allow to reduce the
mathematical complexity of the problem. For example, a differential equation in
partial derivatives may be "replaced" by an ordinary differential equation or by a
set of algebraic equations. This is achieved by a resort to the information concerning
the unknown solution and to engineering intuition.
The idea of the direct methods was originated by Rayleigh and then extended by
Ritz. Since then various versions bearing different names have been devised. In
essence, all of them may be thought of as modifications ofthe Rayleigh-Ritz method.
The direct methods closely relate to the variational approach. They represent a
convenient way of searching for an extremum of a functional.
3.2. The Method of Least Squares. Trial Functions 91
As has been noted earlier, the functions subjected to variations are to comply
with certain conditions of regularity, like their continuity and differentiability. We
assume these conditions to be satisfied in the following considerations.
q(x)
~EI r-X
lI~i
Figure 3.2 Beam on elastic foundation
92 III. Direct Methods
r
the integral, even though the error itself is large. We therefore chose the square of
(3.8) as a proper measure, similarly to (3.l),
[f(a z , x) - qy dx # 0 (3.9)
Note that (3.9) is positive definite everywhere. If we would preserve the second
coefficient, a3 , then the scheme is naturally generalized to the form
(3.11 )
With a new coefficient added, we always get a new equation, preserving thereby
the necessary correspondence.
Thus, the method is mathematically consistent. Note that (3.9) may also be
thought of as a functional of w, which, upon substitution of (3.6) for w, generates a
function which is quadratic in az, a 3 ... It follows that the system of equations (3.11)
arrived at by this minimizing procedure is linear. The method, known as the one
of least squares, admits natural generalization to two- and three dimensional
problems, in which case the error is integrated over the area or volume, respectively.
Each of the functions (3.5) or the sum (3.6) are called the trial (coordinate)
functions. Their proper choice is crucial for obtaining a sufficiently accurate solution.
Few comments would be in order. These functions must, first of all, satisfy boundary
conditions of the problem. Besides power series of the type (3.6), trigonometric series
may be used too. In doing so, the lowest powers (lowest frequencies), which allow
for satisfying the boundary conditions, must be preserved. By adding higher powers
(higher frequencies) we may obtain approximations of higher accuracy. Recalling
that a sufficiently regular function expands into a Taylor or Fourier series, we may
appreciate better the above remarks. By taking into account a possible symmetry
of the problem it is possible to further simplify the solution.
As noted earlier, the direct methods may be thought of as subsequent approxima-
3.3. Beam on Elastic Foundation, Part I 93
») - q
+ k(a4 (1- X)2X 4 + (1- X)2 (a 3 x 3 + a 2X2
(c13) ev(%,difT)$
(el4) integrate(%A2, x, 0, L)$
(el5) difT(dI4,a[2])$
(cI6) difT(dI4,a[3])$
(cI7) difT(dI4,a[4])$
Eventually we solve the system of three algebraic equations just obtained to find
the values of the coefficients a2 , a 3 and a4
(el8) solve([dI5, d16, d17], [a[2], a[3], a[4]]);
The appearance of the solution provided is quite a complicated one. We therefore
resort to bigfloat numbers setting first the option fppree to 3 digits.
(el9) fpprec: 3$
(c20) bfloat (dI8)
(d20) [[a 2 = (4.95b2k 3 Jl2 + 1.92b7eik 2l8 + 9.42blOei 2k14 +
+ 4.32b 13eP)qf(5.0bOk4 11 6 + 1.68b5eik 3 l 12
+ 4.23bgei 2k 2l8 + 4.1lb12ei 2kI4 + 1.04bI5ei4 ),
a 3 = - 1.0bO (1.72b3k 3 l 11 + 6.92b7eik 2l 7 + 3.43blOei 2 kI 3 )
qf(5.0bOk 4 116 + 1.68b5eik 3 l 12 + 4.23bgej2k 2 l8 + 4.11b12ei 3 kI 4
+ 1.04b15ei 4 ),a4 = (1/72b 3 11o + 6.92b7eik 2 l6 + 3.43blOei 2kI 2)q
/(5.0bOk 4 Jl6 + 1.68b5eik 3 l 12 + 4.23bgej2k 2l8
+ 4. llb12ei 3 kl 4 + 1.04b15ei4 )]]
This solution, based on minimization ofthe error with respect to three coefficients,
should ensure a "stronger" minimum of the functional, which is quadratic in ai.1t may
therefore yield a more accurate approximation.
integrate the square residual over the beam length, and then take its
derivatives with respect to the unknown coefficients appearing in the trial function.
Consider, say, an example of a uniform beam subjected to the distributed load
given by
(3.14)
To get the second approximation, we call the Ii-function, while using the same trial
function, setting n = 3, and substituting (3.14) for q
(c2) 1i((L - xt2*sum(a[jJ *XAj,j, 2, 3), 3, s* x A2, ei)$
Now we may call the expressions for the derivatives, denoted by bj , and solve them
for aj
(c3) [b[2J, b[3J J$
(c4) solve(%, [a[2J, a[3J J);
Though the simplicity of the idea underlying the least squares method is appealing,
it is based on quite formal considerations of the residual and lacks an explicit
physical reasoning. Methods which would make use of a certain physical principle
are therefore worthy of investigations. One of these is known as the Bubnov-Galerkin
method.
The previous example of a beam on elastic foundation provides a convenient
means for illustrating this method. Since the system is conservative, we may look
at the governing equation (3.3) as the Euler-Lagrange equation following from
Hamilton's principle.
Consequently, we get for a uniform beam using (2.103)
where we omitted the integration with respect to time because the problem at hand
is static. We also substituted W for 1'/. Assuming that W is again given by (3.6), we
3.6. Beam on Elastic Foundation, Part III 97
Since ba z and ba 3 are arbitrary, this provides the following two equations
On substituting (3.6) into (3.18) we arrive at the two equations for a 2 and a3'
Obviously, for a higher approximation we would get an additional equation
approximation
(c2) (L-xt2*a[2]*x 2$ A
To find a 2 insert this into (dl), perform the differentiation and then evaluate the
first of (3.18). This may be done as the compound statement
(c3) (subst(%, w, dl),ev(%%, diff), %%*(L - xt2*x 2, A
and type in
(c5) b[2]*(1- cos (2*x*%pi/L))$
and then repeat the above steps
(c6) (subst(d5, w, dl),ev(%%, diff), %%*(1 - cos(2 *x *%pi/L)),
integrate (%%, x, 0, L));
Is I positive or negative? pos; Is b 2 K positive, negative, or zero? pos; Is b 2 ei
positive, negative or zero? pos; Is q positive, negative or zero? pos;
21 4q - 3b 2 kl 4 - 16%pi4 b 2 ei
(d6)
21 3
(c7) solve(%, b[2]);
(d7)
We shall show in Section 3.11, which is concerned with evaluation of the accuracy
of direct methods, that despite the different appearances, the results obtained here
are consistent with those following from the least squares method.
We are interested in a program which, as in Section 3.4, would allow for more
convenient calculations of higher order approximations including the cases of
variable loading and stiffness. The generalization of (3.20) is obviously given by
w(x) = I00 2j
gj 1- cos--
( 1tX) (3.21)
j=1 L
with unspecified yet constants, gj.
We introduce the function, bq (w, n, q, ei), which substitutes (3.21) into the left-hand
3.7. The Rayleigh-Ritz Method 99
side of (3.3), performs the necessary spatial differentiation, and then integrates the
weighted residual over 0 ~ x ~ L
(c1) bq(w,n,q,ei):= (wxx:'diff(w, x, 2), 'diff(ei* wxx, x, 2) + hw - q,
ev(%%, diff),
for j: 1 thru n do h[j]:integrate(%%*(l- cos(2*%pi*x*j/L)), X, 0, L»$
Hence, upon speCification of its arguments, w, n, q, and ei, the bq-function yields
the expressions equivalent to (3.18) and (3.19). The number of these expressions
equals the number of unknown coefficients, n, while their left-hand sides are denoted
as h[j].
Let us call this function while specifying w as in (3.21), with j = 1,2, and taking
q and El as constants
(c2) bq(sum(g[j]*(l- cos(2*j*%pi*x/L»,j,I,2),2,q,ei)$
The code, as in the previous case, begins to ask about the sign of various constants
needed to perform the integration. Some of them are "naive", for example,
Is 1 positive or negative?
which is replied
pos;
Other questions may deal with unknown yet quantities, for example, gj' In such
cases one must investigate all alternatives and their influence on the answer.
Now we call the expressions corresponding to the left-hand sides of (3.18) and
solve them
(c3) [h[I],h[2]]$
(c4) solve(%,[g[I],g[2]]);
(2k18 + 512%pi4eil4)q
(d4) [[
gl = 5k218 + 816%pi4eik14 + 4096%pi 8ei 2 '
(2k1 8 + 32%pi4eil4)q ]]
g2 = 5k218 + 816%pi4eik14 + 4096%pi 8ei 2
thereby completing the solution.
f
tl> = oL(El
-2 w2,xx + -K2 w2 - qw ) dx (3.22)
100 III. Direct Methods
where the first term describes the strain energy of the beam, the second describes
the strain energy of the foundation, and the third is the work done by the external
distributed load, q. The boundary conditions are
w(O) = w(L) = 0
(3.23)
w.xx(O) = w.xAL) = 0
In the spirit of the above methods we look for a simple function which would
satisfy (3.23). In terms of trigonometric functions, this may be specified as
. nx
w""a1sln- (3.24)
L
with a I being a free coefficient. On substituting (3.24) for w into (3.22), the functional,
<1>, becomes a function of ai' <1>(a l ). We therefore set
d<1>
-=0 (3.2S)
da l
to approach a minimum. Solving (3.2S) for a l and substituting back into (3.24) we
obtain an approximate solution. Note that higher approximations may be carried
out in the form
nnx
w"" I
n=I,Z
ansin-
L
(3.26)
1716k1 2 q ]]
4
a = Sk 2 ls + 839S2eikl 4 + 40772160ei 2
Note that (dS) agrees with the appropriate expression of the previous section.
The above considerations show that the Bubnov-Galerkin and Rayleigh-Ritz
methods are closely related and represent two ways of minimizing the same
functional, as far as conservative problems are concerned. As a matter of fact, there
is a difference with respect to the boundary conditions. In the case of the Rayleigh-
Ritz procedure, the natural boundary conditions may not be accounted for while
setting the trial functions. Further discussions on this aspect will be given in the
sequel, in the context of plate response. Also the Bubnov-Galerkin method applies to
nonconservative systems too, since no functional is explicitly involved in its
formulation.
If we set
N>4 (3.33)
we could then try to specify some ofthe coefficients, aj' from the boundary conditions
(3.28)-(3.31), and the rest from a variational procedure.
Furthermore, one of the beam ends should always be fixed. Situating there the
reference point, x = 0, we would satisfy this condition if we put ao = O. We thus rewrite
(3.32) as
N
W~ L ajx j (3.34)
j: 1
Here N> 3 on the understanding that one of the conditions, namely, w(x = 0) = 0,
has just been taken care of.
In anticipation of the subsequent variational procedure, we have to attain in
(3.34) a sufficient number of "free" coefficients. If we put
N=5 (3.35)
then we may still have two coefficients to adjust in the above cases (ii), (iii) and (iv)
and four in the case (i).
We first type in (3.34) with N = 5, then prepare the first and second derivatives
and then formulate the boundary quantities appearing in (3.28)-(3.31) except for
W(x=O)=o (3.36)
which has already been satisfied
(c1) sum(a[j] *X Aj,j, 1,5)$
(c2) diff(%, x)$
(c3) diff(%, x)$
(c4) fL:ev(d1,x = L)$
(c5) flO:ev(d2, x = 0)$
3.9. Applications 103
integrate(%%, x, 0, L))$
It is seen that the ri-function evaluates by the subsequent steps the functional, CI>,
given by (3.22), provided its arguments are specified. It remains to find its stationary
value by taking the derivatives with respect to the free coefficients.
This program has the flexibility of that based on the so-called finite elements
method to be treated in Chapter 4. By increasing the number of terms in the sum
given by (cl) one may obtain higher approximations,. as shown in the Section 3.10.
3.9 Applications
For a hinged beam (the ii-case) the boundary conditions are given by (3.29). We
therefore solve these equations, except for w(x = 0) = 0, and first find at, a2 and a 3 ,
so as to satisfy these conditions.
Taking into account that fL, f20, and f2L are given by (d4), (d7) and (d8),
respectively, we issue as a sequel to the previous program
(cll) solve([d4, d7, d8], [a[l], a[2], a[3]]);
and then find the associated deflection, w, by substituting these for at, a2 and a3
into (dl)
(el2) (subst(%,dl), w:%%);
s 4 (lOa sl2 + 6a41)x 3 (7as14 + 3a413)x
(dI2) asx + a4x - 3 + 3
It is seen that a4 and as remain "free". Now we call the ri-function substituting
the above expression for w, which is its first argument,
(el3) ri(%,q,ei)$
At this stage we have found the value of the functional, CI>, given by (3.22) as it
depends on the remaining coefficients a4 and as. Note that since q and El are
prescribed constants, we consider a uniform beam under a uniform load. Nevertheless,
the case of q = q(x) and EI = EI(x) may be treated similarly.
104 III. Direct Methods
We take the derivatives, solve the generated system of two equations and
substitute their solution back to (dI2) to find the deflection, W,
(cI4) diff(d13, a[4])$
(cIS) diff(dI3, a[S])$
(cI6) solve([dI4, dIS], [a[4], a[S]]);
conditions, may be united in a single list. Further, (c14)-(c15), which yield stationarity
for the functional, <1>, could be introduced in the main routine. We may also add a
new term in the sum representing the deflection to obtain a higher order
approximation.
We therefore issue
(c1) sum(a[j)*xAj,j, 1,6J$
(c2) diff(%,x)$
(c3) diff(%, x)$
(c4) [fL:ev(dl,x = L), flO:ev(d2,x = 0), flL:ev(d2,x = L),
f20:ev(d3, x = 0), f2L:ev(d3, x = L)] $
and then formulate a function, ria(w, q, ei), which, unlike the previous function,
ri(w, q, ei), also performs differentiations with respect to the remaining free coefficients
with the help of do
(c5) ria(w, q,ei):= (ei*'diff(w, x, 2t2/2 + bw A2/2 - q *w, ev(%%, diff),
integrate (%%,x,O,L), for j:4 thru 6 do b[j):diff(%%,a[j]))$
Then all what is needed to obtain a solution is mainly to issue the commands
solve and subst. Consider, say, a beam with the hinged ends. We invoke (3.29), which
formulate the boundary conditions, and type in
(c7) solve([fL, f20, f2LJ, [a[IJ, a[2J, a[3JJ)$
(c8) subste;';,dl)$
which is not different from the corresponding steps of the previous example. Now
call the ria-function, which, this time, also takes the derivatives with respect to the
remaining three coefficients. Then solve the system of equations, and find the solution
which is of a higher order of accuracy than the previous one
(c9) ria(%,q,ei)$
(c10) solve([b[4J, b[5J, b[6JJ, [a[4J,a[5J,a[6JJ)$
(cll) ratsimp(subst(%,d8));
(dll) (31746kJ2qx 6 - 95238kl 3 qx 5 + (97515k1 4 + 8494200ei)qx4
+ (- 36300kl 5 - 16988400eil)qx 3 + (2277kF + 8494200eil 3 )qx)/
(251k 2 18 + 2117280eikI 4 + 203860800ei 2 )
The program similarity treats other cases of the end supports. Note that for a
cantiliver, additional derivatives of the functional, <1>, should be taken after calling
the ria-function, since the number of free coefficients in this case will be greater
than 3. Furthermore, the command (c10) may, in general, be introduced at the end
of the compound statement (c5), which would make the use simpler. A proper
example will be given later.
The program also applies to approximations of lower order than that of N = 6
by setting to zero the coefficients of higher powers in (c1). Consider a beam of a
variable stiffness (Fig. 3.3), the exact solution of which may not be particularly easy,
EI(x)=r+sx (3.39)
with rand s constants.
We first repeat the above commands (c7) and (c8) but then issue
(c9) subst(a[6J = 0, %)$
106 III. Direct Methods
r+sx
to obtain an approximation of lower order. Then call the ria-function and solve
two equations only
(elO) ria(%, q, r + s*x)$
(ell) solve([b[4], b[5]], [a[4],a[5]])$
Note that (3.39) has been substituted for El in (elO). We eventually get the solution
for the non-uniform beam by
(el2) ratsimp(subst(%, d9));
(d12) - (598752qsx 5 + (- 1995840lqs - 997920qr - 630k14q)x4
+ (199584Wqs + 1995840lqr + l260k1 5 q)x 3
+ (- 598752l 4qs - 997920l 3 qr - 630kFq)x)/(5l32l60Fs2
+ (23950080lr + 130320kI 5)s + 23950080r 2 + 260640k14r + l55k 2 l 8 )
(3.46)
108 III. Direct Methods
yields 0·12007624L2 q.
Of course, the accuracy is not always as satisfactory as in these cases, particularly
in two- and three-dimensional problems errors may be more appreciable. Some of
these problems will be dealt with in subsequent sections.
The above methods naturally extend to the case of two or three dimensions, but
calculations become more involved. Consider an example of elastic plate
occupying the domain 0:::; x :::; a, 0 :::; y :::; d. It is subjected to a uniform transverse
load, q, (Fig. 3.4). Assume that the plate rests on elastic foundation with the
stiffness KO.
The governing equation for K = 0 was derived in Section 2.16 and given by
(d 10). Adjusting the notations, adding the force exerted by the elastic foundation
on the plate, Ff,
(3.50)
and dropping the inertial term, we get the equilibrium equation for the deflection, w,
V4 w + Kw = qjD with K = KOjD (3.51)
3.12. Plate on Elastic Foundation 109
~~~--------------~7~~----X
On solving (3.55) for VI and V 2 and substituting back into (3.53), we obtain the
solution.
It will be shown later that for the elastic problems under consideration bji given
110 III. Direct Methods
We therefore set
while a more accurate series solution, which can be found in literature, gives
~q('.YJ
s
m(o)
Figure 3.5 Plate subjected to a load q(x, y) distributed over the area S and to tractions m(.5) and
Q(.5) distributed over the boundary .5.
where S denotes the plate area, db is the element of the contour and n is the unit
normal. On the other hand, the strain energy is shown in the elasticity theory
ff
to be
substituting (3.67) for W into (3.66) and performing the necessary calculations, we
would obtain
<1> = <1>(d 1 , d 2 , .••. d n ) (3.68)
This leads to the stationarity conditions
a<1>
-=0, i= 1,2, ... n (3.69)
ad j
W = 21tY )
21tX) ( 1 - cosT
d 1 ( 1 - cos----;- (3.70)
which satisfies the boundary condition (3.58). Substituting (3.70) into (3.65) and (3.64)
3.13. Further Investigations of Plates 113
we get
3a4 + 3d4 + 2a 2 d 2
U SIr = D8i2n 4 a3 d3
U ex ! = - 8 1qad. (3.71)
which yields after substitution in (3.69)
qa 4 d4
8 ---~--~--~--~~ (3.72)
1 - D4n4(3a4 + 3d4 + 2a 2 d 2 )
Note that the contour integral in (3.64) vanishes since W = w,n = 0 at the boundary.
In order to obtain a more accurate result, we could set
(3.74)
which, like (3.61), is larger than the exact solution in series given by (3.62). This
confirms the remarks of Section 3.11 that the bounding property of the Rayleigh-Ritz
method may not hold for the value taken on by the displacement function at a
particular point. Nevertheless, it can be shown that the work done by the external
prescribed forces on the displacement following from this method remains less than
the work done by these forces on the exact displacement. In other words,
(3.75)
which brings about an over-estimation of the overall stiffness of the plate.
As noted earlier, only the imposed boundary conditions must be accounted for,
while applying Rayleigh-Ritz method. This makes it particularly convenient for
analysis of plates with a free edge and/or internal holes and cuts. Figure 3.6 shows a
semicircular plate clamped along the line ¢ = 0 and subjected to a concentrated
force P. Thus, the imposed boundary conditions are
w(x = 0) = w.Ax = 0) = 0 (3.76)
nK Oa2 (A +~)
n+2
P =
nDC 1 n 2
---::---B+nK a °2( -2A- + -
2B)
- =0 (3.93)
a (n-l)
2 n+22n+2
with
C 1 = 1 + 2v(n -1) + (n - nz
which may be solved for A and B.
In particular, the deflection at the center, r = 0, is
w(r = 0) = - - {
nK Oa2
P 1-
--- +n
2
4
---::------,:----;:--.=-----------=>
(n + 2)2 (n + 2)2 D [ 1 ]
n-l +2v +--
}-l (3.94)
n+l KOa 4 n-l
where n is not yet specified. For a given value of P the deflection (3.94) must be an
upper bound for the actual deflection. We therefore find n so as to minimize this
upper bound
dw(r = 0) = 0
(3.95)
dn
The appropriate root is n = 1·3 if v = 0·26 and D = Ka 4 • This gives
w(r = 0) = 0'3348P/Ka 2 (3.96)
compared to the exact result
w(r = 0) = 0'3355P/Ka 2 (3.97)
which can be found in literature. Note that, like the Kantorovich method, the present
one also requires a more involved analysis.
The considered methods assume the trial functions to satisfy the imposed
kinematic boundary conditions in case of the Rayleigh-Ritz method and also the
natural boundary conditions in case of the Bubnov-Galerkin method. Then the
error in satisfying the governing equation is minimized in one sense or another. A
different approach suggests that the trial functions are so chosen as to comply with
the governing equation, while the residual in fulfilling boundary conditions is then
minimized in one sense or another. This approach will not be pursued herein.
3.14. Other Direct Methods 115
V4 w= qo (3.88)
D
has approximately been replaced by the simpler equation (3.87). This technique
provides better results than the Rayleigh-Ritz method at the expense of a more
involved analysis.
Another method to improve the accuracy is to introduce another free
parameter in trial functions, in addition to the linear coefficients ai . As an example,
consider a circular plate resting on elastic foundation and free at its edge (Fig. 3.7).
It is subjected to a concentrated force, P, at the center.
As in earlier considerations, the strain energy consists of that associated with
the plate deformations and that associated with the foundation deformations. The
r-
strain energy of the plate in polar coordinates rand 0 is given by
where KO is the foundation stiffness coefficient. Also taking into account the work
116 III. Direct Methods
nKOaZ(A+~)=P
n+2
nDC 1 n 2
-=----'-B + nK a
aZ(n-1)
0 z(- - + - -
2A
n+2
2B) = 0
2n+2
(3.93)
with
C 1 = 1 + 2v(n -1) + (n - nz
which may be solved for A and B.
In particular, the deflection at the center, r = 0, is
where n is not yet specified. For a given value of P the deflection (3.94) must be an
upper bound for the actual deflection. We therefore find n so as to minimize this
upper bound
dw(r = 0) = 0
(3.95)
dn
The appropriate root is n = 1·3 if v = 0·26 and D = Ka 4 . This gives
w(r = 0) = 0·3348P/Ka z (3.96)
compared to the exact result
w(r = 0) = 0·3355P/Ka z (3.97)
which can be found in literature. Note that, like the Kantorovich method, the present
one also requires a more involved analysis.
The considered methods assume the trial functions to satisfy the imposed
kinematic boundary conditions in case of the Rayleigh-Ritz method and also the
natural boundary conditions in case of the Bubnov-Galerkin method. Then the
error in satisfying the governing equation is minimized in one sense or another. A
different approach suggests that the trial functions are so chosen as to comply with
the governing equation, while the residual in fulfilling boundary conditions is then
minimized in one sense or another. This approach will not be pursued herein.
3.15. Shock Absorber, Preliminary Considerations 117
While rubber may easily undergo large elastic deformations without failure, the
case of small deformations, which is amenable to a linear analysis, is also of interest.
Experiments show that, unlike metals, rubber obeys well a linear behavior up to
the deformations about 8-10%. The natural rubber is practically incompressible
and its Poisson's ratio is taken as v = 0·5. If we denote the displacement along the
axis Xi by Ui (i = 1, 2, 3) then the incompressibility condition reads
div U = u t • t + U 2 ,2 + U 3 ,3 = 0 (3,99)
Turning to the problem at hand, shown in Fig, 3.8, we note that the boundary
conditions for the deformations of the rubber block are of the mixed type. The
external vertical planes of the block are free of stresses, while for its external
horizontal planes we get the following conditions for the components of the
displacement
Ut (X3 = ± h) = U2(X 3 = ± h) = 0 (3.100)
Ll
U3(X3= ±h)= +'2 (3.101)
Equations (3.100) and (3.101) express the conditions of the welded contact at the
interface between the two materials.
Due to the complexity of the boundary conditions, an attempt at the exact
solution appears unreasonable and we therefore resort to approximate methods.
The Rayleigh-Ritz method seems particularly suitable, since the condition of the
traction free external vertical planes is a natural one and may therefore be omitted
while formulating the trial functions. Also, the deformations of the metal plates can
be neglected as compared to the deformations of the rubber block. The strain energy
is therefore associated with that of the rubber only, while the external potential is
merely
V eXI = - PLl (3.102)
We may begin with a plane problem assuming that b t »a t , b t »h, (see Fig. 3.8),
in which case the displacement U 2 along the x 2 -axis should be much less than the
other two displacements, U t and U 3 • Further, under these conditions U t and U 3 may
be taken as independent of the coordinate X 2 • We therefore set
U2 =0 (3.103)
Ut = u t (x t ,x 3 ), U3 = u3(X t ,X 3) (3.104)
thereby reducing the problem to the plane one.
118 III. Direct Methods
metal
a)
rubber
Situating the origin of the coordinate system at the center of mass, we note that
Ul should then be an even function of X3 and odd function of Xl' It must also comply
with the boundary condition (3.100). The simplest polynomial representation for U l
is therefore
(3.105)
with A being a free coefficient. A trial function for U 3 should be so chosen as to
comply with the incompressibility condition (3.99), which for the plane problem
reduces to
Ul,l + U 3 ,3 = 0 (3.1 06)
Substituting (3.105) into (3.106) we get the representation for U3
A=- 3~
4h 3
(3.108)
3.15. Shock Absorber, Preliminary Considerations 119
U2 =0 (3.109)
U 3= -
3 ~ h
4h3 (2 X3
X~)
-"3
It remains to specify ~ so as to minimize the functional of potential energy. The
strain energy, US!" is given by
If the shock absorber is not long enough we have to incorporate the displacement
U2 along the x 2 -axes. We may also generalize the earlier analysis so as to allow for
120 III. Direct Methods
the expression for U3 follows again from the incompressibility condition (3.99)
as
U3 = - f<UI.1+ U2 •2 ) dx 3 (3.120)
while the minimization procedure yields the unknown coefficients through the
equations
d<l> d<l>
-=0 -=0 (3.121)
daj , db j
In the following section we carry out this analysis with the help of the SMC.
(d2) l a(h 2 -
(c3) w: - integrate (ditT(u, x[1]), x [3]);
°
which is in accord with (3.105) and (3.107). Next, integrate the specific strain energy,
given by energy (u,O, w) over the volume < XI < a1, 0 < X 2 < b1, 0 < X3 < h, because
of the symmetry. The integral obviously exists and we first properly adjust the
3.16. Shock Absorber, Program and Results 121
intanalysis and assume_pos options to avoid questions, which may be asked by the
code
(c4) assume_pos:true;
(d4) true
(c5) intanalysis:false;
(d5) false
(c6) integrate (integrate (integrate (energy (u, 0, w), x [1], 0, ai),
x [3], 0, h), x [2], 0, b 1);
bl (4Sa 2a1hs + lOa 2a1 3 h 3 )
(d6)
45
Note, that this must be multiplied by S to provide the strain energy of the entire
elastic body. Now define the decrease in the height, A, in accord with (3.101) and
then differentiate the functional «I> with respect to the single free coefficient, a
(c7) delta:- 2*ev(w,x[3] = h);
(d7)
Sb1g(96aa1hs + 20aa1 3 h 3 ) 4h 3 p
(dS)
45 3
Here g == G, while the multiplier S in the argument of diff accounts for the entire
volume of the rubber block. In order to complete the solution, solve this for a and
substitute the result into the expression for A
(c9) solve(%, a);
(d9) [ 15p ]
a = 192a1b1gh2 + 40a1 3 b1g
(elO) (subst(%, delta), ratsimp(%%));
(d10) 5h 3 p
4Sa1b1gh 2 + lOa1 3 b1g
Thus, the dependence A = A(P) is given by (d10) and reads
P 5h 3
A = ----=-------,,- (3.122)
Gb1 (4Sa1h 2 + 10a1 3 )
Let us derive the solution of a higher order approximation than in the above
considerations, which would also be applicable to the three dimensional problem.
In agreement with (3.119) and (3.120) issue the functions u, v, and w
(cll) u:x[1]*(h"'2 - x[3]"'2)*sum(a[i] *x[3]",i,i,0, 1);
(dll) Xl (a l x3 + ao)(h 2 - xn
(el2) v:x[2]*(h"'2 - x[3]"'2)*sum(b[i]*x[3]"'i,i,0, 1);
(d12) x2(b l x 3 + b o)(h 2 - x5)
122 III. Direct Methods
2a
2a
since the velocity vanishes on the boundaries of the duct. Note that in the problem
at hand the last term in (3.126) is a constant.
It can be verified by the direct computation that"the functional
generates the Euler-Lagrange equation, which coincides with the equation under
consideration (3.126). Consequently, we seek for a stationary value of (3.128) by the
Rayleigh-Ritz method instead of trying to directly solve (3.126).
A proper trial function is
v = (xi - a2)(x~ - a2)f(XI ,X 2) (3.129)
which satisfies the boundary conditions (3.127) and reflects the obvious symmetry
of the problem, provided the function, f(X I ,X2), is specified so as to account for
this symmetry. Restricting the analysis to the case of three free coefficients we set
v = (xi - a2)(x~ - a 2)[bo + b l (xi + xn + b2xi xD (3.130)
Substituting (3.130) into (3.128) and taking the derivatives of 1 with respect to bo, b l
and b2 , we may obtain the system of linear equations, which specifies the solution.
In the first steps of programming we state the dependence v = V(XI ,x2 ) and then
formulate (3.130) and the integrand of (3.128)
(c2) depends(v, [xl, x2]);
(d2) [v(x1, x2)]
(c3) (xl A2 - a A2)*(xr2 - a A2)*(b[0] + b[1]*(x1 A2 + x2 A2)
+ b[2]*xr2*xr2);
(d3) (x12 - a 2)(x22 - a 2)(b l (X22 + x12) + b 2x1 2x2 2 + b o)
(c4) diff(v, xlf2 + diff(v, x2r2 + m*v;
(cll) eV(%,numer);
= -12 fa fa dX 1 dX 2 (3.132)
-a-a
V,V V
4a
which is
(el3) (integrate(integrate(%, xl, - a, a), x2, - a, a)/(4*a A2), ev(%%, numer »;
(d13) - 0·07027777777777778a 2m
The obtained solution compares favourably with the exact one, as shown in the
following Table.
126 III. Direct Methods
Table I
XI = 0'2a XI = 0'8a
X2 =0 X2 =0 XI = X 2 = 0'4a XI = X 2 = 0'8a
(V/Vav ) approximate 2'026 0·823 1·562 0·367
(v/v av ) exact 2'025 0·826 1·561 0·372
Consider a plate which radiates heat at the rate f(x,y) per unit area and whose
edges are kept at zero temperature. Assume that under a proper normalization of
coordinates the plate occupies the region 0:::; x:::; 1, 0:::; y:::; n and that the above
radiation rate is given by
f(x, y) = b sin nx sin y (3.133)
The temperature, T, obeys the equation
82 T 82 T f(x,y) b. .
--2 + -- = - - = - sm nx sm y (3.134)
8x 8y2 k k
which is subjected to the following homogeneous boundary conditions:
T(x = O,y) = T(x = l,y) = T(x,y = 0) = T(x,y = n) = 0 (3.135)
Here k is the thermal conductivity.
As can be verified directly, (3.134) is the Euler-Lagrange equation for the following
functional:
This might be used to obtain a solution, say, by the Kantorovich method given
earlier in Section 3.14.
We seek for the solution as follows:
T = x(1 - x)f(y) (3.137)
which satisfies those boundary conditions from (3.135) which are concerned with
the x-coordinate. The explicit form of f (y) may then be obtained from the stationarity
of the functional (3.136) and the remaining boundary conditions.
In the program given below we put b/k = 1, (and also T = t), state the
dependencies involved, formulate the integrand of (3.136), the trial function (3.137)
and then integrate with respect to x only
(c2) depends(t, [x, y],f, y);
(d2) [t(x, y), f(y)]
(c3) dilf(t,xr2 + dilf(t,yf2 + 2*t*sin(%pi*x)*sin(y);
cl> defined by (3.136) in (c2), the trial function (3.140) in (c3), then substitute and
integrate with respect to x in (c4) and (c7), respectively.
(c1) derivabbrev:true;
(d1) true
(c2) ('ditT(t, x, 1)t2 + ('diff(t, y, 1)t2 + 2*t*sin(%pi*x)*sin(y);
(d2) 2t sin (%pix) sin (y) + (t y)2 + (t.)2
(c3) t:x*(1- x) * f(y) + x 2*(1- xf2*g(y);
A
where the integrand this time contains two unknown functions, J(y) and g(y). The
Euler-Lagrange equations may be derived automatically in a way described in
Section 2.18.
We first introduce the convenient notations for J,y as Jy and for g,y as gy, and
then formulate two Euler-Lagrange equations with the help of eola-function.
(c9) [fy:diff(f(y), y), gy:diff(g(y), y)];
(d9) [f(y)y, g(Y)yJ
(elO) eula1 (la):= diff(la, f(y)) - diff(diff(la, fy), y)$
(c11) eula2(la):= diff(la, g(y)) - diff(diff(la, gy), y)$
We define the argument, la, in agreement with (3.141) and then call for eolal
and eola2.
(el2) la:d7$
(el3) (eula1(la),ratsimp(%%));
(d13) - (3%pi3g(y)yy + 14%pi 3f(y)yy - 1680 sin(y)
- 28%pi3g(y) - 140%pi3f(y))/(210%pi 3)
(el4) (eula2(la), ratsimp(%%));
(d14) - (2%pi5g(y)yy + 9%pi 5f(y)yy + (5040%pi2 - 60480)sin(y)
- 24%pi5g(y) - 84%pi 5f(y))/(630%pi 5)
The Euler-Lagrange equations are thus given by (d13) and (d14). These may be
solved with the help of ahaloe and desolve. As follows from the boundary conditions
3.19. Temperature Field in a Plate, Part II 1.29
Ivar,y) ]
The above solutions contain the inverse Laplace transform, ilt, with respect to
Ivar with y as a parameter. Noting that the remaining conditions at y = n,
g(y = n) = f(y = n) = 0 (3.143)
would be met if we select in (dI7) only the terms containing siny, we omit the terms
containing the inverse Laplace transform. This is a correct procedure because of
the linearity of the system.
We obtain separately f(y) and g(y)
(cI8) first (%)$
(cI9) last (dI7)$
and then extract from these the sin-terms
(c20) part(rhs(d18),2);
(199920%pi 2 - 1874880)sin(y)
(d20) - 1121%pi5
(c21) part (rhs(d 19), 1)
(9324oo%pi 2 - 9313920)sin(y)
(d21) I 121%pi5
Hence, f(y) is given by (d20), g(y) by (d21), and the solution is
T = x(1 - x)(d20) + x 2 (1 - xf(d21) (3.144)
130 III. Direct Methods
J i'2
'I
(T - U)dt = 0 (3.152)
Note that the instants of time, tl and t z are not subjected to variation in this relation.
We may therefore consider the time interval (tz - t 1 ) as the period of vibrations.
Substituting (3.149) and (3.151) into (3.152) we get
(3.153)
3.20. Free Vibrations by the Rayleigh-Ritz Method l~l
Then prescribing
(3.154)
1
since
2"/ro n COS2 W t 1t
n dt=- (3.156)
o sin 2 w nt Wn
mo = tL pu 2 dx (3.164)
r
The maximum of potential energy is given by
Um • x =t Elu~xxdx (3.165)
p= Po (1-2:)
(3.166)
EI = 1-2: )
J0 (
Substituting (3.163) and (3.166) into (3.164) and (3.165) and evaluating the integrals,
p=p (1- ~)
o 2L
J~t L
we obtain
mo -_ Po L(a8i + 8a9naz + 3a~)
8
l Z
(3.167)
_ n J o(3ai 32a a
4
l Z z)
U max - 2L3 8+~+6az
Substituting these into (3.158) and taking derivatives with respect to a l and a z , we
get two homogeneous equations. This provides the determinantal equation
3({JZ - 1) 8({Jz - 4)
4 9n z
f(w;;) = =0 (3.168)
8({Jz - 4) 3 ({Jz - 16)
9n z 4
where
WZP L4
{J=_n_o_ (3.169)
n4 J o
The roots of this equation are
{Ji = 0·0013, {J~ = 16·14 (3.170)
which, because of (3.169), provide the following natural frequencies
(3.171)
w(Z)
n
= 4.017 n Z Va
LZ~ Po
Note that the method easily extends to the case of beams resting on an elastic
foundation by adding in (3.165) the term,
f L
o
Kuz
--dx
2 '
(3.172)
A program, which performs the analysis, similar to that given in the previous section,
but for various end supports is given below. Its first part, which deals with the
boundary conditions, may be taken identical to that of Section 3.10. We therefore
key in w, its first and second derivatives, and the expressions involved in the boundary
conditions
(c1) sum(a[j] *x'j,j, 1,5)$
(c2) difT(%, x)$
134 III. Direct Methods
These results are in agreement with (3.171). The slight difference follows from
the fact that the trial functions applied in the previous section are trigonometric,
unlike a polynomial given by (el).
Our next example deals with a uniform beam clamped at the ends
(el5) solve([fL, flO, flL], [a[I], a[2], a[3]])$
(el6) subst(%,dl)$
3.22. Master Program 135
(el7) rid(%,r,ei);
504ei 3960eiJ
[ wn2=~,wn2=~
(d17)
Note that in agreement with the previous comments, the Rayleigh-Ritz prediction
is higher than the exact one and that its accuracy is better for the lower natural
frequency.
The program modifies so as to treat the beams resting on an elastic foundation.
In this case, as commented on earlier, the strain energy, Urna., becomes
Urna• =2:
1 fL (Elu. xx + Ku
0
2 2
)dx (3.174)
We may therefore issue a new function, say, ridel (u,r,e,k), which includes K as one
of its arguments and incorporates (3.174) in the definition of the strain energy
(el8) ridel(u, r, ei, k):= ('diff(u, x, 2),ev(%%, diff),
umax:integrate(%%A2/2*ei + u A2/2*k,x,0, L),
mO:integrate(r*u A2, x, 0, L),
for j:4 thru 5 do b[j] :wn2/2*diff(mO,a[j])-diff(umax,a[j]),
coefmatrix([b[4], b[5]], [a[4], a[5]]), determinant (%%),
solve(%%, wn2))$
This, along with the previously given statements (el)-(c4) constitutes an independent
program of which the previous one is a particular case.
Consider a uniform beam clamped at x = 0 and hinged at x = L, which rests on
an elastic foundation with the variable stiffness given by
K=sx (3.175)
The boundary conditions are
w(x = 0) = w(x = L) = 0
(3.176)
w,x(x = 0) = w,xix = L) = 0
where the first of these equations, w(x = 0) = 0, has been satisfied in (el). We issue
(c19) solve([fL, flO, f2L], [a[l], a[2], a[3]])$
(c20) subst(%, d1)$
It may be useful prior to integration involved in the ridel-function to let the
code know about the nature of the quantities involved. Indeed, the integration
process might provide results in various forms, depending on this information.
We therefore type in
(c21) assume(ei > 0, r > O,k > 0);
(d21) [ei > 0, r > 0, k > 0]
(c22) intanalysis:false $
136 III. Direct Methods
and then invoke the above ridel-function with (3.175) substituted for K. This yields
the squares of the natural frequencies, which are then evaluated by
(c24) ev(%, numer);
(d24) [wn2= 1·7482517e-03 (-3'3166248(8111 1 °s2
- 2135232eil 5s + 40597438464ei 2)0'5 + 3081 5s + 804672ei)/(14r),
wn2 = 1·7482517e-03 (3'3166248(8111 1 0s 2 - 2135232eil 5s
+ 40597 438464ei 2)0' 5 + 3081 5s + 804672ei)j(l4r)]
For a particular case of K = 0, we get
(c25) %,s=O;
238-482ei 2575.0564eiJ
(d25) [ wn2 = l4 r ' wn2 = 14r
d ( dUa) d 2 ua (3.179)
dx EA dx - P dt 2 = 0
where the first term represents the elastic force, while the second the inertial force.
The boundary conditions are
Ua(x = L) = 0
(3.180)
ua'x(x = 0) = 0
The first of these relations prohibits the displacement at the built-in end, while the
second ensures zero stress at the opposite free end.
Representing once again the dynamic displacement as a product of spatial and
temporary functions, set
u.(x, t) = f(x) sin wnt (3.181)
with Wn the natural frequency. Substituting this into (3.179) we get
~(EA
dx
df ) + pw;f= 0
dx
(3.182)
r
is given by
t/I(f(X))fidx=O (3.184)
i= 1,2,oo.k.
A solution exists ifthe determinant of this system vanishes, which yields the frequency
equation for Wn'
Confining the analysis to the first two frequencies, we put
(3.185)
which satisfy (3.180). Substituting this into (3.184) yields two equations
r [(EAfJ + pw nfjdx
Jo
L
2 = 0 (3.186)
i,j = 1,2
where prime denotes differentiation with respect to x. The natural frequencies follow,
as mentioned earlier, from the determinant associated with (3.186).
r
If we denote
r
T;j = pfJj dx
(3.187)
Vij = (EAf;),fj dx
j T ll w; + V ll T12W; + V12j =
0 (3.188)
T21 Wn
2
+ V21 T22 w n + V22
2
The program which performs these calculations makes use of arrays of functions
138 III. Direct Methods
and is as follows:
(el) f[s](x):= 1 - (x/Lt(s + 1)$
(c2) t[i,j]:integrate(rO*(1 + x/L)*f[i](x)*f[j] (x), x, 0, L)$
(c3) p[s](x):= diff(e*aO*(1 + x/L) * diff(f[s] (x),x,x) $
(c4) v[i,j]:= integrate(p [i] (x)*f[j] (x), x, 0, L)$
(c5) genmatrix(t, 2, 2)*wn2 + genmatrix(v, 2, 2)$
In (el) we generate the coordinate functions given by (3.185) with s = 1 or s = 2,
and then formulate the first of (3.187) in (c2) while taking into account (3.178). The
command (c3) defines the derivative of the bracketed term in the second equation
of (3.187) which is then used in (c4). It remains to create the matrix expression
associated with (3.188). For a second order matrix this may be done as in (c5). For
a higher order one entermatrix could be more convenient.
Next, we find the determinant and solve the frequency equation, which yields
the natural frequencies
(c6) determinant(%)$
(c7) solve(%, wn2);
[ n2 = _ (21sqrt(218141) - 12663)eaO
(d7) w 88712rO' .
Here wn2 = w; .
To assess how satisfactory this solution is, we consider the first order approxima-
tion, setting a2 = a 3 = ···ak = 0 in (3.183). Then (3.186) generates the single equation
Tllw; + VII =0 (3.189)
in notations of (3.187), and we issue
(elO) solve(t[l, 1]*wn2 + v[l, 1], wn2);
Comparing (dll) with (d8) we conclude again that the higher order approxima-
tion, given by (d8), not only provides the second natural frequency too but it also
better· estimates the first one. Indeed, since the discussed method yields an upper
bound, the first natural frequency predicted by (d8) is more accurate than that given
by (dll).
3.24. Nonlinear Vibrations by the Bubnov-Galerkin Method 139
F(x) / k1=O
a)
/ (linear case)
./ /
/
j/
./
If
.~
b) a
unlike k, the coefficient kl in (3.192) may be either positive or negative, as Fig. 3.12a
shows.
Periodic solutions to (3.193) are of primary interest from the engineering point
of view. We therefore try, as a first approximation, the simple harmonic solution
x = acoswt (3.194)
which is well-known from the linear theory. Here the unspecified yet frequency w
and period, T, are related by
211:
T=- (3.195)
w
It is convenient to denote
f(x) = F(x)
m
k (3.196)
w n2 =_
m
and write (3.193) in the form
XU + w;(x + m 1 x 3 ) = 0 (3.197)
where
(3.198)
Note, that Wn as given by the second equation of (3.196) is the natural frequency of
the associated linear system.
In the framework of Bubnov-Galerkin method, we may consider (3.194) as a
trial function. Substituting it for x into (3.197), multiplying the result by cos wt and
integrating over the period, T, we may obtain a relation between the amplitude, a,
and frequency, w.
The program given below carries out the above operations. Here
w=w, wn2 =w;, m1 =m l (3.199)
(c2) 'diff(x, t, 2) + wn2*(x + m1 *x 3);
A
d2 x
(d2) dt 2 + wn2(mlx3 + x)
(c3) (subst(a*cos(w*t), x, %), ev(%%, diff»;
(d3) (a 3 ml cos 3 (tw) + acos(tw»wn2 - aw 2 cos (tw)
(c4) intanalysis:false;
(d4) false
(c5) assume pos:true;
(d5) true
(c6) integrate(d3*cos(w*t), t,0, 2*%pijw) = 0;
(3%pia 3 ml + 4%pia)wn2 - 4%piaw2
(d6)
4w
o
3.24. Nonlinear Vibrations by the Bubnov-Galerkin Method 141
As (c5) shows, this result follows for the case m, > 0 which corresponds to the
"rigid" characteristic (Fig. 3.12a). Repeating the computations for m, < 0 we get
(c8) assume(m I < 0);
(d8) [ml < OJ
(c9) integrate(d3 *cos (w *t), t, 0, 2*%pi/w);
(3/~pia3ml + 4%pia)wn2 - 4%piaw2
(d9)
4w
which is identical to (d6).
Hence, the result given by (d7) holds either for m, > 0 or for m, < O. It shows
that, unlike the linear systems, free vibrations of the nonlinear system exhibit the
dependence between the frequency of oscillations and their amplitude. Fig. 3.12b
shows this dependence according to (d7).
It is possible to improve this result by adding a term in the trial function (3.194).
However, its particular form is not immediately clear. The following heuristic
iteration scheme may therefore be useful.
Write (3.197) as
(3.200)
where k denotes the number of iteration. Choosing for k = I
x, = a cos OJt (3.201)
where a and OJ are related by (d7), we solve (3.200) for x 2 , which may be an improved
solution
(elO) 'diff(x, t,2) + wn2*x= -a'3*cos(w*tr3*mhwn2;
d2x
(dIO) -2 +wn2x= -a 3 mlcos 3 (tw)wn2
dt
(ell) ode(%,x,t);
(dll) x = - (cos(tw)(3a 3 mlwn22 - 27a 3 mlw 2wn2)
+cos(3tw)(a 3 mlwn22 - a 3 mlw2wn2))/(4wn22 - 40w 2wn2
+ 36w4 ) + %k I sin (t sqrt(wn2)) + %k2 cos (t sqrt(wn2))
The last two terms in (dll) must vanish, since we look for a steady-state solution,
without any influence of initial conditions,
(el2) subst([%kl = 0, %k2 = OJ, %);
(dI2) x = - (cos(tw)(3a 3 mlwn22 - 27a 3 mlw 2wn2)
+ cos (3tw)(a 3 mlwn22 - a 3 mlw 2wn2))/(4wn2 2 - 40w 2wn2 + 36w4 )
This relation shows the generation of higher harmonics with the frequency 3M,
which is another feature typical of nonlinear system. Note that the parameters a
and OJ are still related by (d7). Substituting (dI2) for X2 into the right-hand side of
(3.200), one may get the next approximation, x 3 , and so forth. We conclude, in
142 III. Direct Methods
agreement with the earlier results of Chapter 1, that unlike the linear oscillator, the
nonlinear system investigated shows the dependence of amplitude on frequency of
vibrations and generation of higher harmonics.
The direct variational methods are essentially heuristic and need to be examined
and justified from a more rigorous point of view. This and following sections of this
chapter are concerned with this question.
To clarify the conditions under which the direct methods may hold, we have to
restrict the nature of the functions and mathematical operations involved. This may
be done with the help of rigorously stated definitions, which is one of the subjects
of subsequent considerations. Furthermore, it has been shown in Chapter 2 how a
function may be found, which yields an extremum to a certain functional. The inverse
problem, which deals with the question how to find a functional, an extremum of
which is provided by a given function, is, of course, of similar interest. This will also
be considered in the following considerations.
The mathematical consistency requires a function to be defined in some domain,
V. This domain arises when the points of a solid are given the coordinates in a
reference frame. The boundary of a domain, Q, is the set of points in any proximity
of which there are points which do belong to the domain and which do not belong
to it. This is, of course, a formal definition of the intuitively clear concept. The
domain and its boundary constitute together a closed domain, Vo'
Confining the analysis to functions continuous in Vo we introduce the so-called
scalar product of two of them. If Q is a point of Vo and u and v are two functions,
then their scalar product (u, v) is given by
It can be shown that the scalar product of two functions just introduced has the
properties similar to those of the scalar product of two vectors. For example, the
functions, u and D, may be interchanged without affecting the product
(u, v) = (v, u) (3.203)
as follows from (3.202).
Next, the scalar product of any function with itself is obviously non-negative
and may be zero if and only if this function is equal to zero. Also, the following
relation holds
(atu t +a 2 u 2 ,b t v t +b 2 v2 )
= at b t (u t , v t ) + a t b 2 (u t , v2 ) + a 2 b l (u 2 , bd + a 2 b 2 (u 2 , V2) (3.204)
if at, a z , b t and b z are constants. The proof is based on the straightforward appliction
of (3.202). All of the above relations are common for the functions and vectors.
To further extend this analogy, we need to introduce the quantity similar to the
length of the vector, a,
lal = a = (a'a)t (3.205)
3.26. Operators and Functionals 143
An operator which has zero as its field of values is called a null operator, while
an operator which results again in the function it acts upon is called an identity
operator, T. Furthermore, we may define the sum of two operators (A + H) and their
product AH by
(A + H)f= Af+ Hf (3.214)
AHf= A(Hf) (3.215)
where f denotes a function from the fields of definition of A and H. If
AHf=HAf (3.216)
the operators A and H are said to be permutable. The inverse operator A- I is
defined by
AA- I =[ (3.217)
The linear systems are particularly known to possess features facilitating their
analysis. We therefore introduce the concepts of linear set of functions and of linear
operator.
If for any functions fl and f2' belonging to a set of functions, fl + f2 and afl
also belong to the same set, then the set is called linear. Here a is any constant. The
examples are endless: the set of continuous functions, the set of polynomials, the
set of functions which take on zero value at a certain point. A counterexample is,
say, the set of functions for which
f(x = 3) < 5 (3.218)
which may not satisfy either of the above conditions and is therefore nonlinear.
In turn, the operator A is linear, if for any number n and constants aI' a2, ... an
the following equation holds
n n
A I
i;;::1
aJ;= I
i=l
AaJ; (3.219)
where the functions f; belong to the linear set of the field of definition of A. The
identity operator, [, and the null operator are obviously linear. For example
n n
II aJ;= I
;=1 i=l
aJ;
(3.220)
n n
I
;=1
IaJ;= I
i=}
aJ;
The biharmonic operator (3.213) is linear if applied to a linear set, say, to functions
having continuous derivatives up to the fourth order and vanishing at the boundary.
The functionals dealt with earlier now appear as a particular case of operators.
Indeed, an operator which generates a constant from any function, which belongs
to its field of definition, is a functional. The definition of a linear functional follows
therefore from the above definition of a linear operator.
We define the so-called quadratic functional by
(Af, f) + If +C (3.221)
where A is a linear operator, I is a linear functional and C a constant. Quadratic
functionals playa major role in the subsequent considerations.
3.27. Symmetric and Positive Definite Operators 145
This operator is defined for functions, which have continuous derivatives up to the
second order in the closed segment, say, 0,;:; x,;:; 1. Then
(3.225)
Furthermore, it follows that the equality in (3.233) is possible only for f == O. Hence
A is positive definite. On the other hand, as (3.22) shows the strain energy of the
beam differs from (3.223) only by a constant multiplier. To point out this fact, the
scalar product
(3.234)
with A being positive definite is referred to as the energy of the function f.
These considerations enable us to define a new measure of the closeness of the
functions, fl and f2' from the field of definition of A, namely, the following quantity
(A(fl - f2),(fl - f2))t (3.235)
which is the square root of the energy of their difference. In turn, this leads to a
new type of convergence. The sequence, fn' converges in energy to f if
lim (A(fn - f), (fn - f)) -+ 0 (3.236)
Note, that the operator A in (3.236) must be positive definite and, if it is differential,
then the functions involved must be continuous and have continuous derivatives of
the necessary order. Further, the functions must satisfy the homogeneous boundary
conditions. The energy convergence does not automatically imply the uniform
convergence.
Next, consider the quadratic functional associated with the equation (3.237)
F(f) = (Aj, f) - 2(f, 1jJ) (3.243)
or in the explicit form
where A is positive definite. We show that of all its values provided by the functions
from the field of definition of A, the least is the value provided by the above unique
solution of (3.237).
To this end, let u be the solution to (3.237)
Au=1jJ (3.245)
Replacing IjJ in (3.243) by Au we get
F(f) = (Af, f) - 2(f, Au) (3.246)
It can be verified by direct calculations that (3.246) is equal to
F(f) = (A(f - u),(f - u)) - (Au, u) (3.247)
Since A, appearing in both of the above terms, is positive definite the minimum of
(3.247) is given by
F(u) = - (Au, u) (3.248)
which follows from
f=u (3.249)
This is known as the minimum functional theorem. It provides a rule to actually
construct the functional, if an equation is given, thereby replacing the latter by a
variational prinCiple. Note that this result may not apply to dynamic problems.
Indeed, it can be shown that the quadratic functional (3.243) is proportional to the
static potential energy of a system. The theory of Euler-Lagrange equations, treated in
Chapter 2, provides a "reverse" way from the functional to the equation.
Consider some functional, <l>(u), with the exact lower bound, c. Then the sequence,
Un' is said to be minimizing if
Now we may show that a minimizing sequence for the functional, F(f) given by
(3.243), converges in energy to the solution of (3.237). In fact, adjusting (3.247) we get
F(u n ) = (A(u n - u),(u n - u)) - (Au,u) (3.251 )
which has the limit
lim F(u n ) = c = - (Au, u) (3.252)
as n --> 00, as (3.248) shows. Consequently,
(A(u n - u),(u n - u))-->O (3.253)
which illustrates the convergence typical of direct methods. Unfortunately, the
148 III. Direct Methods
statements as rigorous as arrived at in this section, are only possible for quite a
narrow class of operators. Nevertheless, they clarify the mathematical basis of these
methods.
Various comments concerning the choice of coordinate functions have been made
earlier. To bring to light other relevant aspects, we introduce the concept of
orthogonal functions. Two functions, II and 12, are said to be orthogonal over
V if
(3.254)
For example, the functions
1, cos x, sin x, cos 2x, sin 2x .... (3.255)
°
all orthogonal in the interval < x < 2n, as may be verified by the direct integration.
If all functions of an orthogonal set are normalized, the set is referred to as
orthonormal. This may be achieved by dividing each function of the set by its norm.
Hence, for the orthonormal set, Ii, we get
(f",fk) =
{a,1, n #k
n= k (3.256)
A point to note is that the cases when an orthonormal and complete set is used
to construct trial functions correspond mostly to problems of a purely academic
nature. In practices, trial functions, which satisfy the necessary boundary conditions
and symmetry and contain sufficiently low powers (frequencies), may yield a
satisfactory solution, without being orthonormal or complete.
Chapter IV
Introduction to the Finite Element
Method
Compared to the direct methods considered earlier, the finite element technique
further extends the idea of discretization, this time of the very structure or solid
under investigation. This allows to broaden the class of problems amenable to
solution so as to include those dealing directly with modern technology. On the
other hand, a sufficiently fine mesh and/or high order of approximation within
elements, ensure that the error is kept reasonably small. This technique requires the
processing of extensive data and may efficiently be implemented with the help of
computers only.
It could be useful to go over the Appendix at the end of the book before reading
this chapter. Programs given in various sections are interrelated. This is illustrated
in the diagram given below (Fig. 4.0), and should be taken into account while saving
these programs.
Methods presented in Chapter 3 suggest that the trial functions satisfy, at least, the
imposed (essential) boundary conditions all over the domain. For complex geo-
metrical shapes this may be the requirement difficult to comply with, even though
techniques for automatization of this process, the master programs, have been given
earlier. Also, these methods may not be appropriate, if there are abrupt spatial
variations in the distributions of elastic and inertial properties.
A natural way to bypass this difficulty is to think of the structure (solid) as an
assemblage of finite, sufficiently small elements, which are properly connected with
each other. Then trial functions for an element may be chosen in a simple way, since
the necessity to satisfy the conditions all over the boundary is not relevant anymore.
Further, this allows for an efficient use of digital computers and standardization of
the computational procedure. It is seen that the idea of discretization, this time of
the spatial domain occupied by the structure, once again finds applications in
engineering analysis.
We have considered earlier the bending of beams by formulating trial functions,
which span the entire interval, 0 :s; x :s; L. Let us now assume that a beam is composed
of finite elements of the length, h, (Fig. 4.1). In order to implement the idea of the
method, we first consider a single element. The analysis should be carried out in
4.1. Finite Elements. The Element Stiffness Matrix 151
~I
Sect.4.2 I - - -...... Sect.4.11I.... --~..a-tl Sect.4. 12 1
I Sect.4.7 a-tl
I - - - -...... SeCt.4.9\1- --....,·a--tl Sect.4.10\
------
terms of the deflections, rotations, moments, and transverse forces at the ends of
the elements. Indeed, these quantities are necessary for formulating the potential
energy. They should be matched across the boundary of the element to ensure their
discontinuity. Solutions for separate elements are then to be properly assembled to
yield the result for the entire beam. In the sequel, we first consider the procedures
for finding the relevant elemental matrices and later deal with the assembling
process.
Figure 4.1 shows a finite element subjected to the end transverse forces q I and
q3 and moments q2 and q4' The deflections at the ends are denoted as WI and W3
and the rotations as 12 and 14' respectively. These quantities are referred to as the
nodal ones. For convenience, we introduce the so-called nodal displacement vector
152 IV. Finite Elements Method
(matrix)
(4.1)
(4.2)
Note, the entries of {w} as well as {q} may have different dimensions"For example,
W t and W3 have the dimension oflength, while 12 = W 2 and 14 = w4, being the angles,
are dimensionless. For convenience, {w} is also referred to as the generalized
displacements and {q} the generalized forces.
It is seen that, as far as the elementary theory is concerned, the nodal force
vector {q} uniquely defines the loading of the element, while the nodal displacement
vector {w} its geometrical configuration. The crucial fact in specifying (4.1) and (4.2)
is that the work done on the element can be stated in terms of {w} and {q}, as will
be shown later.
Invoking the example of the linear spring
F= kx (4.3)
as an analogue, we would like to express the dependence between {q} and {w} as
{q} = [k]{w} (4.4)
where [k] is a 4 x 4 matrix which is called the element stiffness matrix. The nodal
forces, {q}, should be understood as those acting on the element. Equation (4.4)
shows that the stiffness matrix, [k], characterizes the response of the element to the
extent to which k in (4.3) characterizes that of the spring.
Bearing in mind that the kinematic conditions at the ends given by (4.1) involve
four quantities, the simplest approximation for the deflection, w(x), is
(4.5)
Note, this is in accord with the governing equation, w,xxxx = 0, and with the earlier
comments on the selection of trial functions. The coefficients, ai' do not have,
however, an explicit physical meaning. It is desirable to express these coefficients in
terms of the nodal displacement, {w}, taking into account that the rotation angle,
I, is given by
1 = dw (4.6)
dx
This may be done by using the boundary conditions.
The following program performs the necessary computations using the notations
wx = w,x, wxx = w. xx , wxxx = w,xxx (4.7)
4.1. Finite Elements. The Element Stiffness Matrix 153
(c2) w:sum(a[i]*x'i,i,0,3);
(d2) a 3 x3 + a 2x2 + ajx + ao
(c3) wx:diff(w, x);
(d3) 3a 3 x2 + 2a 2x + a j
(c4) [wi = ev(d2, x = 0), w3 = ev(d2, x = h), f2 = ev(d3, x = 0),
f4 = ev(d3, x = h)] $
(c5) linsolve(%, a [0], a[l], a[2], a[3]]);
(c6) w:subst(%,d2);
(-2w3 + 2wl + (f4 + f2)h)x 3 (- 3w3 + 3wl + (f4 + 2f2)h)x2
(d6) h3 2 + f2x+ wi
h
(c7) wx:subst(d5,d3);
3( - 2w3 + 2wl + (f4 + f2)h)x 2 2( - 3w3 + 3wl + (f4 + 2f2)h)x
(d7) h3 h2 +f2
In (d2) and (d3) we stated wand w,x, respectively, while in (c4) formulated the
boundary conditions
WI =w(x=O), = w(x = h)
W3
(4.8)
12 = W 2 = w,Ax = 0), 14 = W 4 = w,Ax = h)
T~e next command, linsolve, finds the expression for a i in terms of Wi' as shown in
(d5). Substituting these expressions for ai in (d2) and (d3), we find wand w,x,
respectively, in terms of x and the nodal displacement vector, {w}, These are given
by (d6) and (d7), respectively.
Noting that the nodal force vector, {q}, and the nodal displacement vector, {w},
are related by the system of equations
qj = Elw,xxAx = 0), q2 =- Elw,xAx = 0)
(4.9)
q3 = - Elw,xxAx = h), q4 = Elw,xAx = h)
we find the element stiffness matrix, [k]. To this end, state w,xx and w,xxx by
(c8) wxx:diff(d7, x);
6( - 2w3 + 2wl + (f4 + f2)h)x 2( - 3w3 + 3wl + (f4 + 2f2)h)
(d8) h3 - h2
(4.10)
4.2. Energy Analysis of a Finite Element 155
ll2
-~J
EI 4 -6
[k] =];3
-I~ -6
2
12
-6
(4.l1 )
{d(x)} ={ ~:~:~}
d3 (x)
(4.l4)
d4 (x)
is known as the interpolation (shape) functions vector. The very form of (4. 13) shows
that di(x) is the ratcoef of Wi in the expression for w as given by (d6),
(c13) [d[1](x):= ratcoef(w, w1),d[2](x):= ratcoef(w,f2),
d[3](x):= ratcoef(w, w3),d[4](x):= ratcoef(w,f4)];
The explicit form of di(x) follows from a resort to the do and display-commands
(c14) for i:1 thru 4 do display(d[i](x));
2x 3 - 3hx 2 + h 3
dJ(x)= h3
x3 _ 2hx 2 + h 2 x
d 2 (x) = h2
(d14)
2x 3 - 3hx 2
d 3 (x) = - h3
x 3 - hx 2
d4 (x) = - - : : - -
h2
Interpolation functions playa major role in the finite element method.
The considerations of the previous section show that either the coefficients, ai' or
the nodal displacement matrix, {w}, may be considered as the generalized degrees
of freedom of the element. Indeed, once this matrix is given, the deflection, w, at
156 IV. Finite Elements Method
any point x of the element follows from (4.13) and (4.14). It is of a major interest
to express the kinetic and potential energies of the element in terms of the generalized
coordinates, {w}. Note, that in the dynamic case {w} = {w(t)}. The above energies
allow for natural definitions of relevant element matrices.
Considering the above beam under bending, we get for the kinetic energy
T = -
1 fh p(x)w 2 (x, t)dx (4.15)
2 0
where p(x) is the mass density per unit length. It is seen from (4.13) that
W'w = w2 = {w(t)}T{d(x)}{d(x)}T{~V(t)} (4.16)
Thus, the kinetic energy is
T = Hw(t)}T[m] {w(t)} (4.17)
f:
with
em] = p(x){d(x)}{d(x) Vdx (4.18)
U = f:
~ EI(x)w~xxdx (4.19)
On taking the second derivative of (4.13) with respect to x and substituting this into
the above equation, we get
U= Hw(t)} T[k] {w(t)} (4.20)
with
being the 4 x 4 element stiffness matrix, Note a remarkable similarity, which (4.17)
and (4.20) bear with the kinetic energy of a particle and the potential energy of a
spring, respectively,
It has been assumed so far that the forces acting on the element are applied at
its ends, If there is a distributed load, b(x, t), then this should be lumped in a proper
way at the ends too.
It is seen from (4.13) that the virtual deflection, bw, may be written as
bw = {d(x)Vb{w(t)} (4.22)
and, consequently, the virtual work done by the above external load is
being the nodal "distributed" force matrix. These nodal forces yield the same virtual
work as the distributed force, b(x, t) does, and in this sense are equivalent to the latter.
Note, that once the mass density, p(x), and the stiffness, EI(x), are given, the
kinetic and potential energies follow from (4.17) and (4.20), respectively, in terms of
the nodal displacement vector, {w(t)}, since {d(x)} is given by (d14), Section 4.1.
The same holds for the work done by the distributed load, b(x, t), as follows from
(4.23). This equation is valid for the concentrated forces too, since in this case a
delta-function may be invoked to describe the intensity of a distributed load. Also,
as follows from their definitions, the matrices, Em] and [k], are symmetric, in
agreement with the earlier remark.
Let us carry out the necessary calculations and find Em], [k], and {p} for a
uniform beam, as a sequel to the previous program. With the help of do we now
compute the elements of Em] as the array m[i,j] in accord with (4.18),
(c15) for i:1 thru 4 do for j:1 thru 4 do m[i,j]:
uintegrate(d [i](x)*d [j] (x), x, 0, h)$
Here r denotes the density, p. Then put the above result in a matrix form taking
into account that Em] is symmetric
(c16) entermatrix(4,4);
Is the matrix 1. Diagonal 2. Symmetric 3. Antisymmetric 4. General Answer 1,2,3
or 4
2;
Row 1 Column l:m[l, 1];
Row 1 Column 2:m [1,2];
Row 1 Column 3:m[1, 3];
Row 1 Column 4:m[1,4];
Row 2 ColUl.nn 2:m[2,2];
Row 2 Column 3:m[2,3];
Row 2 Column 4:m[2,4];
Row 3 Column 3:m[3,3];
Row 3 Column 4:m[3,4];
Row 4 Column 4:m[4,4];
Matrix entered.
Accordingly, we compute the array, p[i], and then the matrix {p} by typing in
(cI9) for i:l thru 4 do p[i]:eO*integrate(d[i](x),x,O,h)$
(c20) entermatrix(4, 1); etc.
where eQ = 8 0 , This yields {p}
heO
2
h 2eO
12
(d20)
heO
2
~ ph
[
156
22
22
4
54
13
- 13
-3
J (4.26)
[m] = 420 54 13 156 - 22
-13 -3 -22 4
4.3. Truss Element 159
(4.27)
y
y
Global
reference
x frame
X
h
element 1
y
x element
node 2 node 3
y WI = UI
W2 = Vt
W3 U2
W4 = V2
WI
X
/ node 1
Figure 4.3 Truss element
160 IV. Finite Elements Method
We begin the analysis of this finite element on the understanding that it may
apply, perhaps with necessary modifications, to any of the bars, which the truss
consists of. Denoting the axial coordinate as x, we define the two components of
the displacement, u(x) and v(x), in accord with the earlier comments. Since
the element has four degrees of freedom, the simplest possible approximations
are
(4.28)
with ao, aI' bo and b l being unknown coefficients. If we introduce the 4 x 1 matrix
of the nodal displacement, {w}, by (see Fig. 4.3)
(4.29)
we may express (4.28) in terms of {w} to obtain, as in the earlier sections, a physically
meaningful representation.
On substituting x = 0 and then x = h, we get from (4.28)
(4.30)
are the interpolation (shape) functions. Equations (4.31) may be put in a matrix form
u(x) = {wf{DI(x)}, v(x) = {wf{D2(X)} (4.33)
{DI(x)} ={ ::t:},
o
{D2(X)} ={d'~XJ }
d2 (x)
(4.34)
where use has been made of (4.33). The elemental mass matrix is given by
Consequently, the expression for the potential energy becomes identical to (4.20).
We go over to computations of em] and [k], assuming, for certainty, that we
deal with the bar 2 (Fig. 4.2) and the xy-reference frame is that shown in the figure.
According to (4.32) and (434), the interpolation matrices, {Dl(X)} denoted below
as del and {D2(X)} denoted as dcl are
(c2) dc1 :matrix([l - x/h], [0], [x/h], [0];
x
1--
h
0
(d2)
x
h
0
x( 1-~)
(1-~r 0
h
0
x( 1-~)
0 (1-~r 0
h
(d4)
x( 1-~) 0
x2
0
h h2
x( 1-~) x2
0 0
h h2
For a uniform bar the mass matrix, Em], given by (4.36), is
Denoting p = r we key in
(e5) intanalysis: false$
(e6) m:integrate(d4, x, 0, h)*C;
hr hr
o o
3 6
hr hr
o 3
0
6
(d6)
hr hr
6
o 3
o
hr hr
o 6
o 3
l
which may be put in the form
ph
[m]2 ="6
02 02
1 0
01 1
2 0
°l (4.41)
o 1 0 2
The elemental stiffness matrix, [k], is defined by (4.39). Preparing first {Dl,x(x)}
denoted below as delx
4.4. Physical Meaning of the Element Matrices 163
I
--
h
0
(d7)
I
-
h
0
ea ea
0 0
h h
0 0 0 0
(d8)
ea ea
0 0
h h
0 0 0 0
l' ~J
0 -I
EA 0 0 0
[k]2 =T
(4.42)
~~ 0 I
0 0
Note that upon proper orientation of the reference frame, the obtained results apply
to the other bars of the truss too.
The stiffness matrix, [k], governs the relation between the nodal force vector, {q},
acting on the element, and the nodal displacement vector, {w}, according to (4.4).
To appreciate better the physical meaning of its elements consider again, without
any loss of generality, the beam element shown in Fig. 4.1, for which [k] is given
by (d 18), Section 4.2, and assume that {w} T is given by [1000], In other words,
the deflection at the node I is given as unity, while all other "displacements" vanish.
In order to find {q}, load the program of Section 4.2 and then recall [k]
164 IV. Finite Elements Method
(c22) k:d18;
which yields [k]. Next, key in {w} given above and find {q}
(c23) w:matrix([1], [0], [0], [0]);
(d23) m
(c24) q:k.w;
12ei
h3
6ei
h2
(d24)
12ei
h3
6ei
h2
It is seen from (d24) and (d22) that {q} is merely the first column of [k]. Consequently,
the elements of this column should be interpreted as the components of the nodal
force vector, {q}, when {w} is given as in (d23).
Similarly, if we define {w} as
(c25) w:matrix( [0], [1], [0], [0]);
(d25) LJ
then {q} is given by
(c26) q:k.w;
4.4. Physical Meaning of the Element Matrices 165
6ei
hZ
4ei
h
(d26)
6ei
hZ
2ei
h
which is precisely the second column of [k]. The identification of other elements of
[kJ is made in the same way.
Next, compute the determinant of [kJ
(c27) determinant (k);
(d27) 0
Hence, [kJ is a singular matrix. The reason is that it describes the stiffness of a
structure, which is "floating" in space and includes thereby the translation of the
structure as a rigid body. Such motions cause no strains. To confirm these comments
define {w} as follows:
fa
(c28) w:matrix( [zJ, [OJ, [zJ, [OJ);
(d28)
This nodal displacement vector prescribes, as (4.1) shows, a pure rigid body motion,
since it forbids the rotations of the cross-sections given by W z and w4 , and implies
the translation in the transverse direction, defined by z. The nodal forces associated
with (d28) vanish, as expected,
m
(c29) q:k.w;
(d29)
On the other hand, the mass matrix, [mJ, describes the inertial properties of the
finite element, or in more precise words, the "distribution" of the inertia over its
degrees of freedom given by {w}. In the dynamic case, the latter is a function of
time, {w} = {w(t)}.
Without any loss of generality, assume that the time-dependence is given by
sin wt, as in case of free vibrations, for example, and define {w(t)} as follows:
166 IV. Finite Elements Method
sin (tWl)l
(d30) [ ~
o
where wI = OJ. Next, define the matrix of acceleration of the nodes, wt2, as follows:
(c31) wt2:diff(w, t,2);
m
The coordinate transformation is given by
{;l~[nl (4.43)
(4.44)
Here, say, nxx is the cosine of the angle between the x and X -axes. This induces the
following transformation of the displacements
Ws
z
z
"-
"-
'\
,
y-----:iI
x
Figure 4.4 Local and global coordinate systems
168 IV. Finite Elements Method
[NJ = [[n0JTnJ
J l OJ (4.46)
° ° ~J
cosa sina
[n J = [ - sin a cos a (4.54)
In order to illustrate the application of the above formulae, consider the truss
shown in Fig. 4.2. For the bar 3 the angle, a = 3n/4, relatively to the bar 2 and
[n J3 becomes
[nJ3 = -
1[1
j2 1 (4.55)
4.5. Global Reference Systems 169
r -~J
-1 0
1 1 0
[N]3 = - j2 ~ (4.56)
0 1
0 1
Turning to symbolic computations of the elemental matrices for the bar 3 in
the global coordinates, we type in first [N]3' as given by (4.56), and then [m]3 and
[k]3' making use of (4.41) and (4.42), respectively. In the latter case, we adjust
properly the length which is h j2.
(c1) matrix([l, -1,0,0], [1, 1,0,0], [0,0, 1, -1], [0,0,1,1])$
(c2) N: - %/sqrt(2)$
Thus (c1) and (c2) have formulated [N]3 in accord with (4.56). We now state the
elemental mass and stiffness matrices, both in the local coordinates, as follows:
(c3) matrix([2,0, 1,0], [0,2,0,1], [1,0,2,0], [0, 1,0,2])$
(c4) m:%*sqrt(2)/6$
(c5) matrix([l,O, -1,0], [0,0,0,0], [-1,0,1,0], [0,0,0,0])$
(c6) k:d5/sqrt(2)$
It is seen that (c3) and (c4) yield [m]3 (without the multiplier ph). They have been
obtained from (4.41) by substituting j2h for h to take into account the difference
in lengths. Similarly, (c5) and (c6) formulate [k]3 (without the multiplier EA/h). This
has been obtained from (4.42) by the above substitution.
Now we compute [M]3' the mass matrix in the global coordinates, using (4.51)
(c7) M3:transpose(N).d4.N;
·2
0 0
3 sqrt (2) 3 sqrt (2)
2
0 0
3 sqrt (2) 3 sqrt (2)
(d7)
2
0 0
3 sqrt (2) 3 sqrt (2)
2
0 0
3 sqrt (2) 3 sqrt (2)
l
which should be mUltiplied by ph to give [M]3 as follows:
[M]3 = P3 h
2 02 01 OJ
0 1 (4.57)
3j2 1 0 2 0
o 102
It is seen that as far as the difference in the lengths of the beams 2 and 3 is
neglected, the elemental mass matrix in global coordinates, [M]3 is equal to that
in local coordinates, which is given by (4.41). A more general investigation, which
170 IV. Finite Elements Method
-~j
-1 -1
r
EA3 -1
[KJ3 = rn
2.,,; 2h -
1 1 -1
(4.58)
1 -1 -1 1
Finally, as noted earlier the elemental matrix for the bar 1 may also be derived
by rotation of the known matrix for the bar 2. For this element Ct. = - n/2. The
matrix [NJ I, according to (4.54) and (4.46), is
il
(c9) Nl: matrix ([0, -1,0, OJ, [1,0,0, OJ, [0,0,0, -IJ, [0, 0, 1, OJ);
(d9) [~ t ~ -
-
while [kJI' on omitting the multiplier EA/h, is given by (d5) (see also (4.42)).
(elO) k1:d5;
(clIO) [r ~: ]
Consequently, the element stiffness matrix, [KJ I ' in the global coordinates follows
from (4.52) as
(ell) Kl :transpose(Nl).kl.Nl;
4.6. Generalizations. Governing Equations of a Structure 171
(dIll r~ J~ -~l
where the multiplier EAJ/h has been omitted.
a)
o~------~o~---------o
1 3 2
6
1 4 2
d) e) 4
f)
~-----~7
In the sequel we shall neglect the effect of residual stresses described by the last
term in (4.61).
Note that the method of finite elements introduces various approximations.
Lumping the forces at the nodes and satisfying the equilibrium (motion) equations
for a discrete system of points only, do not necessarily ensure that these equations
are satisfied everywhere throughout the domain. Certain compatibility conditions,
such as continuity of the displacement across the boundary between the elements,
should be complied with. Finally, a way must be indicated of assembling the elements,
in other words, a way of constructing the assembly matrices [MJa and [KJa from
4.6. Generalizations. Governing Equations of a Structure 173
the element matrices [M]e and [K]e. Preliminary discussions of this question are
given below.
Assume that an elastic continuum or structure has been represented by a mesh
of finite elements, for each of which we get
{ Q } e = { K ]e { W} e (4.62)
nxl nxn nxl
The {W}e and {Q}e are n x 1 matrices, where n is the number of degrees of
freedom of the element. Consequently, [K]e is a square n x n matrix.
Denote the number of elements as Z and the number of degrees of freedom
of the entire structure as N. Obviously,
N<Zn (4.63)
since assembling the elements is accompanied by the imposition of constraints.
Consider an example of assembling four plane finite elements, A, B, C, and D,
shown in Fig. 4.6. The displacement at the node, which is 3 for A, 4 for B, 1 for C
and 2 for D, must be made the same regardless of the element to ensure the
compatibility. Assuming, for simplicity, that the element has four degrees offreedom,
one degree per node, we get 16 degrees of freedom for the set of independent elements,
but only 9 degrees of freedom for the assembly shown in Fig. 4.6b. Consequently,
the nodal displacement vector of the assembly, {W}a = [WI W2 ••• W9 Y, may be
introduced, which accounts for this fact.
Next, the displacement (a field variable) should be matched not only at the nodes,
but across the entire boundary between the adjacent elements. These comments are
relevant, of course, for two- or three-dimensional elements only.
This interelement continuity at the interface may be achieved by a proper choice
of the polynomial approximation for the field variable. In general, the number of
terms in such an approximation must fit the number of nodes. Consider, say, a
triangle with six nodes shown in Fig. 4.5b (without the internal node). The field
variable, u, may be given as
(4.64)
At the interface between the two adjacent elements, the so-called nodal line (see
QO,
434 3
7 I~ 9
0 C
do
4 5 6
A B
1 2 3
121 2
Figure 4.6 Assembling four elements
174 IV. Finite Elements Method
1 4
element 1 element 2
2
Figure 4.7 To the continuity of the field variable across the nodal line 2-3.
Fig. 4.7), u is given by a parabolic curve with three coefficients only. Identifying
these in terms of the values of u at the nodes, which are equal for both of the
elements, we ensure the continuity of u across the nodal line.
Figure 4.8 illustrates the situation for a simple case of two triangular elements
having four nodes all together. For each of the elements, we use the linear
approximation
(4.65)
shown in the Figure 4.8 as the vertical dimension. Along the nodal line 2-3 this
function is governed by the nodal values U2 and U3 which are the same for both
elements. This ensures the continuity across this line.
Note, that the continuity of the field variable does not necessarily imply the
continuity of its slope at the interface. The view A-A in Fig. 4.8 displays this fact.
Consequently, if needed, a special care should be taken to enforce the slope continuity.
We shall not investigate this question in more detail.
Denote the external forces applied at the nodes and acting on the elements of
the structure as {R}a (in global coordinates). Then {R}a is a N x 1 matrix, as well as
the nodal displaCement vector of the assembly, {W}a. Thus, if we would find the
stiffness 'matrix of the assembly, [KJa, it would be a square N x N matrix
{R }a=[ K Ja{ W}a (4.66)
Nxl NxN Nxl
Also, taking into account the inertia forces and distributed loads, represented by
node 1 p:J
element 1 element 2
view A-A
node 2
Figure 4.8 Field variable along the 2-3 line is governed by U2 and U3, but this does not ensure the
continuity of the slope.
4.7. Assembling 175
which is the governing equation of a structure and is similar to (4.61). Here [MJa
is the N x N mass matrix of the assembly.
4.7 Assembling
Although considerations of the previous section have provided a general form of
the equations governing the entire assembly, namely (4.67), we still have to develop
a technique for the actual construction of the assembly stiffness matrix [KJa' The
construction of the assembly mass matrix [MJa can be shown to follow the same
rules and will be dealt with later.
Note that the equations of equilibrium of the element are incorporated (in the
overall sense, at least), while specifying the element stiffness matrix, [KJe.1t therefore
becomes clear that it sufficies to ensure the equilibrium of the nodes ofthe assembly.
To this end, consider a typical node, i, which may be subjected to the external force,
R i . On the other hand, the elements sharing the node, i, exert the forces, which are
opposite to the nodal force vector {Q}i' The equilibrium equation for the node may
be put in the following symbolic form
(4.68)
where the right-hand side of the equation includes the forces due to all elements
sharing the node. Equations of this type allow to construct the assembly stiffness
matrix [KJa' Note that assembling techniques apply a global coordinate system.
To illustrate the procedure, consider the truss shown in Fig. 4.9, which is similar
to that shown in Fig. 4.2. The arrows indicate the components of the displacement
(degrees offreedom) associated with the nodes. Write first explicitly three equations
2L
node 1 1
node 20--_.....;0:::;.2__-4:>6
L3 node 3
L 5
(4.62) for the three available elements in the global coordinates shown in the figure
WI Q~I)
WZ Q~I)
[KJI
W3 Q~I)
W4 Q~)
W3 Q~Z)
W4 Q<f)
[KJz (4.69)
WS Q~Z)
W6 Q~Z)
WS Q~3)
W6 Q~3)
[KJ3
WI Q~3)
Wz Q~3)
Figure 4.10 shows the components of the external forces matrix {R}a and the
assembly nodal displacement vector {W}a. Fig. 4.11 shows the components of the
nodal force vector {Q};, i = 1,2,3, acting on each of the elements. These figures are
helpful for writing the equilibrium equations of the nodes given below.
Observing from Figs. 4.9 and 4.10 and referring to (4.69) that these are the
elements 1 and 3, which share the node 1, we get
Here the superscript indicates the element, the subscript indicates the component
of the force in the global coordinates, while Rl and R z are the components of the
tR6 ,W 6
node 2 <>----_-__ ~_
node 3 Rs ,Ws
Figure 4.10 External forces and displacements associated with the nodes
4.7. Assembling 17,7
I_ -------<1
.
Q_(2_)
.
o~
: element 2
2)
•
element 1 0(1) CD G) 0(2)
3
q(2)
5
4
(Do::----
'0-_ _"'0(3)
5
external force RI applied at the node. Similarly, for the other nodes we get
Q~I) + Q~2) = R3}
node 2
Q4 + Q4 - R4
(I) (2) _
Substituting for the Q-components from (4.69) into (4.71), we get the assembly
stiffness matrix, [KJa, as relating between {W}a and {R}a, in agreement with (4.66).
To this end, setting for convenience that EA/h = 1 for all bars and turning to
symbolic computations, formulate the element stiffness matrices [K];, i = 1,2,3,
defined earlier in (4.42), (4.58), and (dl1), Section 4.5. These matrices are denoted
-
below as Ki, i = 1,2,3
(c2) K1:matrix([O,O,O,OJ, [0,1,0, -lJ, [0, 0, 0, OJ, [0, -1,0, 1J);
(d2)
l °°~ ~ °°~ ~J°
-1
0
1
(c3) K2:matrix([1,0, -l,OJ, [0, 0, 0, OJ, [-1,0, 1, OJ, [O,O,O,OJ);
(d3) ~ -~ ~J
° 1 °
° °°
178 IV. Finite Elements Method
(c4) matrix([I, -1, -1,1], [ -1,1,1, -1], [ -1,1,1, -1], [1, -1, -1,1]);
l-: -:]
-1 -1
1
(d4)
-1 1 -1
1 -1 -1 1
(c5) K3:%/(2*sqrt(2»;
1 1
2 sqrt (2) 2 sqrt (2) 2 sqrt (2) 2 sqrt (2)
1
2sqrt(2) 2sqrt(2) 2 sqrt (2) 2 sqrt (2)
(d5)
1 1
2sqrt(2) 2 sqrt (2) 2sqrt(2) 2 sqrt(2)
1 1 1 1
2sqrt(2) 2sqrt(2) 2 sqrt (2) 2 sqrt (2)
Next, state the element nodal displacement vectors, {W} i' i = 1,2,3 in the global
coordinates. These matrices are denoted below as Wi, i = 1,2,3
(c6) WI :matrix([Wl], [W2], [W3], [W4]);
(d~ l~~]
(c7). W2:matrix([W3], [W4], [W5], [W6]);
(dn l~~]
(c8) W3:matrix([W5], [W6], [WI], [W2]);
(d8) l~!]
This allows to formulate the elemental equilibrium equations (4.69) as follows:
(c9) Ql :Kl.Wl;
(d9) l::;::J
4.7. Assembling 179
(elO) Q2:K2.W2;
(d9)
[W3~Wl
w5-w3
0
(ell) Q3:K3.W3;
w6 w5 w2 wI
2 sqrt(2)
+ 2 sqrt (2) + 2 sqrt(2) 2 sqrt (2)
w6 w5 w2 wI
2 sqrt (2) 2 sqrt (2) 2 sqrt (2)
+ 2 sqrt (2)
(dll)
w6 w5 w2 wI
2 sqrt (2) 2 sqrt (2) 2 sqrt (2)
+ 2 sqrt (2)
w6 w5 w2 wI
2 sqrt (2)
+ 2 sqrt (2) + 2 sqrt (2) 2 sqrt (2)
The equilibrium equations of the nodes are given by (4.70) and (4.71) and may
now be restated in the language of the code. Fig. 4.12 yields the transformation of
the physical components of the nodal forces Q)i), i = 1,2,3, j = 1,2, ... 6, shown in
Fig. 4.11, to the code language. Referring to Fig. 4.12, we define the six equations
01 [2,1]
02 [2,1] 02 [4, IJ
01 [1, IJ
node 1 0 - - - - -
element 2
element 1 01[4,1] node 2 02 [1,1] node 3 02 [3,1]
node 2 0 - - - - - 03 [4, IJ
01[3,1]
node 1 0 - - - .
03 [2, IJ
node 3 03 [1,1]
Figure 4.12 Components of external nodal forces in the notations of the code
180 IV. Finite Elements Method
(dI7) w6 _ w5 w2 wI
---+ =r6
2 sqrt (2) 2 sqrt (2) 2 sqrt (2) 2 sqrt (2)
It is seen that (dI2)-(dI7) interrelate between {R} a and {W} a' In agreement with
(4.66) the assembly stiffness matrix [K]a = Ka is given by
0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 2sqrt(2) + 1 1
2sqrt(2)
o -1
2sqrt(2) 2sqrt(2) 2sqrt(2)
0 0 0 -1 0
(d 18) 0 -1 0 0 0
2sqrt(2)+ 1
-1 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 1 1
0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
. -ni
1 2 3 4
[K]. ~ l~ ~ ~
U ~l
3 4 5 6
0 -1 3
[KJz = 0 0 4 (4.73)
0 1 5
II
0 0 6
5 6 2
-1 -1 5
j2
-:l
[KJ3 = 1 -1 6
2 2 _ 1 -1 1
1 -1 -1 1 2
Note the global degrees of freedom which are associated with each row and column
of the matrices and which are indicated in the above equations. Fig. 4.10 is helpful
in defining these degrees of freedom.
Next, since the truss has six degrees of freedom, set three 6 x 6 null matrices
and then insert the entries from (4.73) referring to the degrees of freedom indicated
in (4.73). We obtain the so-called expanded element matrices,
1 2 3 4 5 6
0 0 0 0 0 0
0 0 -1 0 0 2
[KJ~xp = 0 0 0 0 0 0 3 a)
0 -1 0 0 0 4
0 0 0 0 0 0 5
0 0 0 0 0 0 6
182 IV. Finite Elements Method
1 2 3 4 5 6
0 0 0 0 0 0 1
0 0 0 0 0 0 2
[KJ~xp= 0 0 1 0 -1 0 3 b) (4.74)
0 0 0 0 0 0 4
0 0 -1 0 1 0 5
0 0 0 0 0 0 6
2 3 4 5 6
-1 0 0 -1 1 1
-1 1 0 0 1 2
1
[KJ3xP = 2J2 0 0 0 0 0 0 3 c)
0 0 0 0 0 0 4
-1 1 0 0 -1 5
1 -1 0 0 -1 6
2 3 4 5 6
1 1 1 1
2J2 -2J2 0 0
2J2 2J2
1 1 1 1
1+-- 0 -1 2
2}2 2}2 2}2 -2}2
0 0 1 0 -1 0 3 (4.75)
0 -1 0 0 0 4
1 1 1 1
-1 0 1+-- 5
-2}2 2}2 2}2 -2}2
1 1 1 1
0 0 6
2}2 2}2 -2}2 2}2
Note that [KJa just specified coincides with the result obtained for the truss in
Section 4.7 and given by (dI8). In the next section, we deal with the programming
of this procedure.
4.9 Truss
Turning to symbolic computations, as a sequel to the program of Section 4.7, define
three 6 x 6 zero matrices in the form of a compound statement
4.9. Truss 183
(c 19) (Kex 1:zeromatrix( 6, 6), Kex2: zeromatrix (6, 6), Kex3: zeromatrix( 6,6)) $
The expanded elemental stiffness matrices [KJ~xp, i = 1,2,3 follow from the above
zero matrices upon a proper substitution for the entries from (4.73). To this end,
denote the rows and columns, of [KJ~xp by I and J, respectively, and the rows and
columns of [KJ; by i and j, respectively. Then the degrees of freedom indicated in
(4.73) and (4.74) show the following correspondence
i. =_ I i. =_ 1,2,3,4
element 1 {
}- J } - 1,2,3,4
f+2=I i=1,2,3,4
element 2 (4.76)
j+2=J j=I,2,3,4
f+4=I i = 1,2
element 3
j+4=J j = 1,2
f - 2 =I i= 3,4
j-2=J j= 3,4
The do-statement allows for a convenient substitution of the elements of [KJ;,
i = 1,2,3 into the above zero matrices, according to the scheme described by (4.76).
In the code given below Kexi denotes [KJ~x
(c20) (for i:1 thru 4 do for j:1 thru 4 for do Kex1 [i,j]:K1[i,j], Kex1);
0 0 0 0 0 0
0 0 -1 0 0
0 0 0 0 0 0
(d20)
0 -1 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
IF j < = 2 THEN Kex3 [i + 4,j + 4]: K3 [i,j] ELSE Kex3 [i + 4,j - 2]:
K3[i,j]),
(for i:3 thru 4 do
(for j: 1 thru 4 do
IF j < = 2 THEN Kex3 [i - 2,j + 4J: K3 [i,j] ELSE Kex3 [i - 2,j - 2]:
K3 [i,j]), Kex3);
0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 1 1
0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
0 0 0 0 0 0
(d22)
0 0 0 0 0 0
0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 1 1
0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
Note that (d20), (d21), and (d22) coincide with (4.74a), (4.74b), and (4.74c), respectively.
Summing these matrices yields the assembly stiffness matrix, [KJa
(c23) Ka:Kexl + Kex2 + Kex3;
0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 1 1
+1 0 -1
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
0 0 1 0 -1 0
(d23) 0 -1 0 0 0
1
-1 0 +1
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1
0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
wI
w2
w3
(d24)
w4
w5
w6
(c25) Ra:matrix([RIJ, [R2J, [R3J, [R4J, [R5J, [R6J);
r1
r2
r3
(d25)
r4
r5
r6
(c26) B:Ka.Wa-Ra;
(d26) . ([
matrIX w6 w5 w2 + wI r1 J ,
2 sqrt(2) 2 sqrt(2) 2 sqrt(2) 2 sqrt(2)
[_ w6 +( I +1)W5-W3+ w2 __w_l_
2 sqrt(2) 2 sqrt(2) 2 sqrt(2) 2 sqrt(2)
w6 w5 w2 wi
[
2 sqrt(2) - 2 sqrt(2) - 2 sqrt(2) + 2 sqrt(2)
where in (d26) we obtain the left-hand side of the equation (4.77) in the form of the
6 x 1 B-matrix. It is convenient to introduce a one-dimensional array, say, s[iJ,
i = 1,2,3,4,5,6 instead of the rows of the B-matrix
(c27) for i:l thru 6 do s[i]:B[i, IJ$
Note that (4.77) and, consequently, (d26) describe, in general, a "floating" truss
with [KJ. being a singular matrix. A similar feature has been earlier shown to
characterize the element stiffness matrix. The solution to (4.77) (or (d26)) may be
obtained, provided the boundary conditions are properly specified.
To this end, consider the truss shown in Fig. 4.l3a. It is seen that
WI = W 2 = W3 = W4 = ° (4.78)
Rs =0, R 6 =-P
Introducing this into (d27) and then solving for the unknown quantities, we get
(c28) subst([Wl = 0, W2 = 0, W3 = 0, W4 = 0, R5 = 0, R6 = - PJ,
[s[lJ, s[2J, s[3J, s[4J, s[5J, s[6JJ);
186 IV. Finite Elements Method
a) b)
5 5
w6 w5 w6 w5
(d28) [ - - rl - + - r2 - w5 - r3 - r4
2 sqrt(2) 2 sqrt(2) , 2 sqrt(2) 2 sqrt(2)' "
( 1 + I )W5 _ w6 , w6 w5 + p ]
2 sqrt(2) 2 sqrt(2) 2 sqrt(2) 2 sqrt(2)
(c29) linsolve(%, [R1, R2, R3, R4, W5, W6J);
(d29) [rl = - p, r2 = p, r3 = p, r4 = 0, w5 = - p, w6 = - 2 sqrt(2)p - pJ
Note that the results for {W}a obtained above should be multiplied by h/EA, which
has been omitted earlier.
Another example is shown in Fig. 4.13b, for which
R 1 =-Pcosrx, R 2 =-Psinrx, R3=0, W4 =WS =W6 =0
We get
(c30) subst([Rl = - P*cos(alpha), R2 = - P*sin(alpha), R3 = 0, W4 = 0,
W5 = 0, W6 = OJ, [s[lJ, s[2J, s[3J, s[4J, s[5J, s[6JJ);
w2 wI
(d30) [- + + cos(alpha)p,
2 sqrt(2) 2 sqrt(2)
r 2
a)
• X
node 3
node 1
x
element 1
node 2 node 3
•x y l
node 1
Elements in local coordinates
Figure 4.15 Two elements representing the truss shown in Fig.4.14a
188 IV. Finite Elements Method
since IX = 1t. The element has 6 degrees of freedom and the expanded matrix, [NJ, is
[NJ2 =
[n J 0
[ 0 0
0
[nJ
0
0
OJ
0 (4.80)
o 0 0 0 [nJ
Continuing the program of Section 4.9, we issue
(c32) (N2:zeromatrix(6,6),
for i: 1 thru 6 do for j: 1 thru 6 do (IF i = j THEN N2[i, j]:
- 1 ELSE N2[i,jJ:0), N2);
-1 0 0 0 0 0
0 -1 0 0 0 0
0 0 -1 0 0 0
(d32)
0 0 0 -1 0 0
0 0 0 0 -1 0
0 0 0 0 0 -1
thereby generating [NJ2' Next, redefine [KJa given by (d23), Section 4.9, as [kJ2
and then find its form in the global coordinates in agreement with (4.52)
(c33) k2:Ka$
(c34) K2:transpose (N2).k2.N2;
0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 1 1 1
+1 0 -1
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
0 0 1 0 -1 0
(d34) 0 -1 0 0 0
-1 0 +1
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 1 1 1
0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1
2sqrt(2)
+1
2sqrt(2)
o0 ---
2sqrt(2)
--
2sqrt(2)
-1 0
1 1 1 1
2sqrt(2) 2sqrt(2)
o0 --
2sqrt(2) 2sqrt(2)
0 0
0 0 o0 0 0 0 0
0 0 00 0 0 0 0
(d37)
2sqrt(2) 2sqrt(2)
o0 - -
2sqrt(2)
---
2sqrt(2)
0 0
1 1 1
2sqrt(2)
00
2sqrt(2) 2sqrt(2)
+1 o -1
2sqrt(2)
-1 0 00 0 0 0
0 0 00 0 -1 0
The sum of [K]~XP and [K]zXP yields the assembly stiffness matrix [K]a
(c38) Ka:Kex1 + Kex2;
190 IV. Finite Elements Method
1
--+1 --- 0 0 --- --- -I 0
sqrt(2) sqrt(2) sqrt(2) sqrt(2)
1 1 1
--- --+1 0 -1 --- 0 0
sqrt(2) sqrt(2) sqrt(2) sqrt(2)
0 0 0 -1 0 0 0
0 -1 0 0 0 0 0
(d38)
1
--- -I 0 --+1 - - - 0 0
sqrt(2) sqrt(2) sqrt(2) sqrt(2)
1 1 1 1
--- 0 0 --- ---+1 0 -1
sqrt(2) sqrt(2) sqrt(2) sqrt(2)
-1 0 0 0 0 0 0
0 0 0 0 0 -1 0
State the assembly displacement vector {W} a' the external nodal force vector {RL
and the equations of equilibrium (4.66) as follows:
(c39) (Wa:zeromatrix(8, 1), Ra:zeromatrix(8, 1),
for i:l thru 8 do Wa[i, I]:W[i], for i:l thru 8 do Ra[i, I]:R[i])$
which define
{W}a = [WI··· WsY
(4.82)
{R}a = [RI ... RsY
and
-WS+W3- r3
(d40)
w 4 - r 4 -w 2
w7 +r 7 -WI
w S - r S -w 6
which defines, as earlier, the right-hand sides of the equilibrium equations. These
may again be restated as an array Sj, i = 1,2, ... 8
4.11. Composite Beam 191
Note, once again, that the above values of {W}a must be multiplied by the omitted
factor hjEA.
i----
CD
Ell
2
-
@
El2
6
--~ YL X
hi h2
b)
As Fig. 4.17a shows, there are three nodes in the global scheme, each node having
two degrees offreedom. The beam has consequently six degrees of freedom. Introduce
therefore the nodal displacement vector of the assembly
(4.83)
The beam may be subject to external forces and moments applied at the nodes.
We therefore define the nodal force vector of the assembly as
{R}a = [R1R z ·.·R 6 Y (4.84)
The above quantities are related by (4.66)
[ K ]a { W} a - { R } a = 0 (4.85)
6x66xl 6xl
where [K]a is the stiffness matrix of the assembly. To deduce [K]a we need to
formulate the matrices of the elements, [K] \ and [K]z, then their expanded matrices
[K]~XP and [K]~XP, and then sum them up. Note, that since the elements are aligned
along the same axis, no rotation of coordinates is necessary, and the element matricies
deduced in Section 4.2 in the local coordinates hold for the global coordinates
too.
The program given below symbolically computes [K]a. It is written as a sequel
to the program of Section 4.2.
In the first two steps we formulate [K] \ and [K]2 by referring to (d 18), Section 4.2,
which yields the stiffness matrix for a beam with the length h and stiffness EI.
Accordingly, [K] 1 and [K]z follow from proper substitutions for these quantities
in (dI8)
(c19) Kl:subst([h = hl,ei = el],dI8)$
(c20) K2:subst([h = h2,ei = e2],dI8)$
Here, for brevity we denoted (E1}1 by el and (EI}z by e2.
Next, construct two 6 x 6 null matricies, to comply with the six degrees offreedom
of the beam
(c21) Kex I: zeromatrix(6, 6)$
(c22) Kex2: copymatrix(%)$
and then, to obtain the expanded matrices, insert properly the elements of [K]\
and [K]z from (d19) and (d20).
(c23) for i: 1 thru 4 do for j: 1 thru 4 do (Kexl [i,j]:d19[i,j], Kex2[i + 2,j + 2]:
d20[i,j])$
Note the shift of indicies i and j for the element 2, is in agreement with the degrees
of freedom shown in Fig. 4.l7a. It remains to sum the expanded matrices to obtain
[K]a, the stiffness matrix of the assembly,
(c24) Ka:Kexl + Kex2;
4.12. Particular Cases 193
t
=-
'1=~---=CD==[""1F-2 -=~®==-}13
a) b)
2hlh2p+h12p
w4= - ,
2el
elh2 3p+3e2hlh2 2p+ 3e2h12h2p+e2h13p
w5=---~~------~------~----~
3ele2
w6= _ elh22p+ 2e2hlh2P +e2h1 2p ]
2ele2
Note that these results reduce to the well-known case of a homogeneous cantiliver
upon substitution for the stitTnesses e 1 = e2 = E1. For example, we get for the
deflection at the end
p 3 2 2 3 pU
Ws = --3 (hi + 3hlh2 + 3hlh2 + hi) = --3- (4.86)
el E1
where L = hi + h2 is the beam length.
The next example is a hinged beam shown in Fig. 4.18b. Once again, substituting
the boundary conditions and external loading into s[i] and solving for the unknown
quantities we get
(c31) subst([WI =O,R2=O, W5=O,R6=O,R3= -P,R4= -M],
[s[l], [s[2], [s[3], [s[4J, [s[5], [s[6]])$
(c32) linsolve(%, [Rl, W2, R5, W6, W3, W4]);
h2p-m
(d32) [ r1 = h2+hl ' w2= -(h12(3e2h22p-3e2h2m) + h13(e2h2p-e2m)
iii) formulation of the expanded elemental stiffness matricies and their summa-
tion to obtain the stiffness matrix of the beam, [K]a. shice the elements are
parallel to each other, no rotation-of-axes transform is required.
The program is given below. Here Z is the number of elements and N is the
number of degrees of freedom of the beam.
(el) w:sum(a[i] *XAi, i, 0,3)$
(c2) wx:diff(%, x)$
(c3) linsolve([w[l] = ev(w, x = 0), w[2] = ev(wx, x = 0),
w[3] = ev(w,x = h), w[4] = ev(wx, x = h)], [a[O] , a[l], a[2], a[3]])$
(c4) subst(%, w)$
(c5) for i: 1 thru 4 do d[i] (x):= ratcoef(d4, w[i])$
(c6) for i:l thru 4 do (for j:l thru 4 do k[i,j]:
ei*integrate (diff(d[i] (x), x, 2)*diff(dOJ (x), x, 2), x, 0, h))$
(c7) (kf: zeromatrix (4, 4), for i: 1 thru 4 do
(for j:l thru 4 do kf[i,j]:k[i,j]))$
(c8) Ka(Z,N):= (for q:l thru Z do (subst([ei = e[q],h = h[q],kf),
kff[q] :copymatrix(%%), ke[q] :zeromatrix(N, N), for i: 1 thru 4 do
(for j: 1 thru 4 do ke[q] [i + (q -1)*2,j + (q -1)*2]:kff[q] [i,j])),
sum(ke[q],q,l,Z))$
The commands (el)-(c6) are similar to those of Sections 4.2, namely, in (el) we
stated (4.87), then w,x and then eXpressed the coefficients, ai' in terms of the nodal
displacement vector, {w}, given by (4.88). In (c4) we found w in terms of {w} and
in (c5) the interpolation functions, {d(x)}, in agreement with (4.89). Next, (c6) yields
the element stiffness matrix [k] in the form of array k[i,j] and (c7), formulates [k]
denoted as kf by defining a 4 x 4 null matrix and then inserting properly the entries
196 IV. Finite Elements Method
from the previously defined array k[i,j]. Thus, the computation of [kJ, has been
completed in (c7) and the result has been denoted as /if.
The compound statement in (c8) has introduced the stiffness matrix of the
composite beam, as the function Ka(Z, N) of two arguments. Upon prescribing the
number of elements, Z, and the number of degrees of freedom, N, this statement
yields the desirable quantity, Ka(Z, N). The operations performed by this compound
statement are described below.
Assuming that each of Z elements of the beam may have its own stiffness and
length we first constructed Z elemental stiffness matrices by making substitutions
EI = e[qJ and h = h[qJ, q = 1,2, ... Z into the original elemental stiffness matrix, kJ,
and denoted the result as the array of matrices, kff[q]. The next step is to construct
Z expanded elemental matrices. This is achieved by introducing first the array of
N x N null matrices denoted as ke[qJ and then inserting properly the entries from
liff[q]. Note (see Fig. 4.18) that the transformation from the local i,j-scheme to the
global I, J-scheme obeys the rule
i-d + (q -1)2
q = 1,2, ... Z (4.91)
j -+ J + (q - 1)2'
It remains to sum the expanded matrices, ke[qJ, to obtain [KJa' which is performed
by the last substatement of (c8). For example, if we issue Ka(2,6), then we get [KJa
for the case of two elements investigated earlier.
Note that the program provides an analytical representation of [KJa, which may
then be used for optimization purposes or other needs requiring an analytical
evaluation. The next section illustrates the usefulness of this representation. Now
consider several examples.
A clamped beam shown in Fig. 4.19 suffers the bending under the concentrated
force Po. In agreement with the discussion of Section 4.2, this force should be lumped
at the nodes of element 2, which are 1 and 2 in the local numbering scheme and 2
and 3, in the global numbering scheme, respectively. For the statically equivalent
nodal forces, {p}, we get from (4.24)
{p} = Po f
h2
0 (j(x - e){d(x)} dx (4.92)
in the local coordinates. Here (j(x - e) is the delta-function with e indicating the
point of application, while {d(x)} is the matrix of interpolation functions given by
(d14), Section 4.1. This yields for the element 2
(4.93)
hi e
PC)
YL
~
--CD .@ X
h2
( i-,--e-le-m-e-nt-2---i, )
Pod2(~) Pod4(~)
Now we substitute the boundary conditions and then solve for the unknown
quantities
6e t w4 12e t w 3
-------rt
hi hf
2e t w 4 6e t w 3
------r
ht hi 2
pO (6ez 6e t ) (12e 2 12e t )
--2 + -h
2 --h
2 w4 + h"3+h"3 W3
2 t Z I
(dIS)
_ h 2PO + (4e 2 _ 4e t )W4 + (6e22 _ 6ez1 )W3
S hz ht hz hI
pO 6eZw4 12ezw 3
-2-r5-~-~
4.14 Optimization
Consider the hinged composite beam consisting of the alternating elements with
the same length h and the stiffnesses (EI), and (EI)z, respectively, (Fig. 4.21). The
beam is subject to a force Po applied at the midpoint
L
x = - = 2h, L = 4h (4.95)
2
The overall stiffness of this composite beam, f, is given by
Po
(4.96)
f= w(x=2h)
which is a function of the ratio (El)d(El)2'
f = f(El)d(EI)z) (4.97)
The subject of interest here is that value of this ratio, which would provide the
maximum to f. In the sequel we first solve the problem and then investigate the
extremum of f.
Noting from Fig. 4.21 that the number of elements, Z, and the number of degrees
of freedom, N, are
Z=4, N= 10 (4.98)
respectively, issue, as a sequel to the main routine of the program of the previous
section,
(c9) Ka(4, 10)$
which yields [KJa for the composite beam. Next, formulate the matrices {W}a and
{R}a
(clO) (Wa:zeromatrix(IO, I), Ra:zeromatrix(lO, 1))$
(cll) for i: I thru 10 do (Wa[i, I]:W[iJ, Ra[i, I]:R[iJ)$
and the equilibrium equations
(cI2) b:d9.Wa-Ra$
(c13) for i: I thru 10 do s[i]:b[i, IJ$
Hence, as in the earlier considerations, the array s[iJ, i = 1,2, ... 10 represents the
left-hand sides of the equilibrium equations for the nodes.
degrees
of freedom
® 5,6 @ 7,8
The next commands introduce the boundary conditions in s[i] and solve for the
unknown quantities. While performing the latter step we set the option globalsolve
true in order to get access to the solutions provided earlier by linsolve
(c14) subst([W[I] = 0,R[2] =0, W[9]=0,R[10] =0, R[3] =0, R[4] =0,
R[5] = - P, R[6] =0, R[7] =0, R[S] =0, [s[I], s[2],s[3],s[4], s[5],
s[6],s[7],s[S],s[9],s[10]])$
(c15) (linsolve(%, [R[I], W[2], R[9], W[IO], W[3], W[4], W[5], W[6],
W[7], W[S]]), globalsolve: true)$
At this stage we have at our disposal the analytical representations for the above
previously unknown quantities, which hold for arbitrary parameters of the. four
finite elements, i = 1,2,3,4. The desirable quantity, according to the statement of
the problem is the deflection at the midpoint x = 2h given by w[5]. We therefore
recall w[5] and make the necessary substitutions for the parameters of each of the
elements to take into account the given structure of the composite beam
(c16) W[5]$
(c17) subst([h[l] =h, h[2] =h,h[3] =h,h[4] =h,e[l] =ei,e[3] =ei,
e[2] =a*ei,e[4]=a*ei],dI6)$
where EI denotes the stiffness of the elements 1 and 3 and aEI that of the elements
2 and 4. The length of the elements is set to h. The expression for w[5] may be too
lengthy, so issue ratsimp to obtain a more compact form
(c1S) W[5] :ratsimp(%);
(2a + 2)h 3 p
(dIS)
3aei
where
(EI}z
a=-- (4.99)
(E/)1
Consequently, the function of interest given by (4.96) becomes
P I
f= Iw[5] 3aEI
= 2(a + l)h 3
(4.100)
Note that it is possible to solve the first and third equations in (d4) independently
of the second equation. In other words, one may eliminate the second row and
column in [K]a and the second row in {W}a and {R}a. The obtained entities are
called the reduced ones and denoted as [K]" {W}" and {R}r. The reduced
202 IV. Finite Elements Method
(d5)
(d6) [::J
(c7) Rr:submatrix(2, Ra);
(d7) G:J
and then the reduced equilibrium equations
(c8) Kr.Wr = Rr;
Note that (d8) coincides with the first and third equations of (d4). On solving (d8),
the second equation of (d4) may be treated independently to obtain r2 •
To illustrate this approach, consider again the problem of Section 4.14 dealing
with the hinged beam made of four alternating elements. The boundary conditions
imply, among others,
(4.106)
Therefore, as a sequel to the main routine of Section 4.13, call for Ka(4, 10) and
then state the reduced quantities
(c9) . Ka(4, 10)$
(elO) Kr:matrix(l, 9, d9, 1,9)$
(ell) Rr:matrix([OJ, [OJ, [OJ, [ - PJ, [OJ, [OJ, [OJ, [OJ)$
(el2) Wr:matrix([W2J, [W3J, [W4J, [W5J, [W6J, [W7J, [W8J, [W10J)$
Next formulate the reduced equilibrium equations which contain only eight
equations compared to ten given in Section 4.14. Solving this system and making
proper substitutions, recover the earlier result as follows:
(el3) (B:Kr.Wr-Rr, for i:1 thru 8 do s[iJ:B[i,IJ)$
(cI4) ev(linsolve([s[l], s[2J, s[3J, 8 [4J, s[5J, s[6J, s[7J, s[8JJ,
[W2, W3, W4, W5, W6, W7, W8, WlOJ), globalsolve:true)$
(cIS) ratsimp(W5);
4.15. Reduced Stiffness Matrix 203
l
WI = W2 = Ws = W6 = 0 (4.107)
(cI9) Kr:submatrix(l, 2, 5, 6, dIS, 1,2, 5, 6);
J
12e2 + l2e l 6e 2 - 6e l
(d19) h 32 h3
I
h 3 "h 2
2 I
6e 2 6e l 4e 2 4e l
--- -+-
h~ hi h2 hi
(c20) Wr:matrix([w[3]], [w[4]]);
(d20) [::J
(c2l) Rr:matrix([R[3]], [R[4]]);
(d2l) [::J
(c22) Pr:matrix([pOj2], [h[2]*pOjS]]);
(d22) lh~]
where use has been made of (dll) Section 4.13.
The reduced equilibrium equations and their solutions are
(c23) B:Kr.Wr - Rr - Pr;
204 IV. Finite Elements Method
+ 2e 1hihi - 2hie2h~)POJJ
+ 32e 1hfe 2 h 2 + 8hie~
This yields for the homogeneous beam
(c26) (subst([e[2J = e[lJ, h[lJ = h, h[2J = hJ, d25), ratsimp(%%));
h3pO
[[ w3=48e h 2pO]]
(d26) l ' w4 =64e l
The equations of motion are given in (4.67) where [MJa is the assembly mass matrix.
This is constructed from the element mass matricies [mJe in the same way in which
the assembly stiffness matrix [KJa follows from [kJe. Equations (4.67) may be thought
of as describing the motion of a system with N degrees of freedom.
Consider the case of free vibrations for which the assembly nodal displacement
vector, {w}~yn, becomes
(4.108)
with w being the natural frequency of vibrations. Also, the external forces in (4.67)
vanish and, upon substitution of (4.108), we get
[MJaUV(t)}~yn + [KJa{W}~yn = { - w 2 [MJa + [KJ}{ W}a = 0 (4.109)
4.16. Free Vibrations of Beams 405
This equation does not reflect yet the kinematic boundary conditions, which
would uniquely specify a particular problem under consideration. Only upon
incorporation of these conditions, we arrive at the system of equations, which can
be solved. This incorporation may be carried out by the method of reduced matricies
given in the previous section. Consequently, (4.109) becomes
(4.110)
This equation is well-known as a typical "eigenvalue" problem. In general, for
a system with n degrees of freedom, there will be n values for ())2, which are referred
to as the natural frequencies. These values are defined as those for which the
determinant of (4.110) vanishes, thereby ensuring the existence of the solution.
Substituting each of these values back into (4.110) yields a particular mode,
{WL, of vibrations, in other words, the ratio of nodal displacements, not their
magnitudes.
Interested in an automatic generation of [M]a along with that of [KJa, we may
apply similar commands in both of these cases. For example, in the case of the
composite beam we define, as a sequel to the main routine of Section 4.13, the
computation of the element mass matrix and then of the assembly mass matrix
(c9) for i:1 thru 4 do (for j:1 thru 4 do m[i,jJ:
ro * integrate (d [i] (x)*d [j] (x), x, 0, h))$
(elO) (mf:zeromatrix(4,4), for i:1 thru 4 do
(for j:1 thru 4 do mf[i,j]:m[i,j]))$
(ell) Ma(Z,N):=(for q:1 thru Z do
(subst([ro = r[q], h = h[qJ], mf), mff[q]:copymatrix(%%),
me[q] :zeromatrix(N, N),
for i: 1 thru 4 do
(for j: 1 thru 4 do me [q] [i + (q - 1)*2, j + (q - 1)* 2]: mff[q] [i,jJ)),
sum(me[q], q, 1, Z))$
where (4.18) has been used in (c9). Note the similarity between these commands and
(c6)-(c8), Section 4.13.
In case of two elements (Fig. 4.17) the assembly mass matrix is as follows:
(el2) Ma(2,6);
13h,r, llhir,
--
35 210
llhir, hir,
--
210 105
9h,r, 13hir,
(d12) Col1= -- Co12=
70 420
13hir, hir,
---
420 140
0 0
0 0
206 IV. Finite Elements Method
9h l f l 13h l f l
-- ---
70 420
13hif l hif l
--
420 140
13h2f2 13h l rl _ 1h~f2 _ 11hirl
~+~ 210 210
Co13= Co14=
llh~f 2 11hirl h~f2 hif l
-----
210 210
-+--
105 105
9h2f2 13h~f 2
--
70 420
13h~f2 h~f2
---
420 140
0 0
0 0
9h2f2 13h~f 2
-- ----
70 420
13h~f 2 hif 2
Co15= -- Co16=
420 140
13h 2f 2 11 h~f 2
- - ---
35 210
11 h~f 2 h~f2
---
210 105
Here r i and hi afe the mass densities and lengths of the elements. The assembly
stiffness matrix, [KJa, follows, as earlief, from
(c13) Ka(2,6);
12e l 6e l 12e l 6e l
0 0
hi hi hi hi
6e l 4e l 6e l 2e l
- -- - 0 0
hi hi hi hi
12e l 6e l 12e 2 12e l 6e 2 6e l 12e 2 6e 2
---
h 3I h 2I hi + hi h 22 h 2I h~ h~
(d13)
6e l 2e l 6e 2 6e l 4e 2 4e l 6e 2 2e 2
- ---
h 22 hi
-+- h 22
-
hi hi h2 hi h2
12e 2 6e 2 12e 2 6e 2
0 0
h 32 h~ hi h~
6e 2 2e 2 6e 2 4e 2
0 0 .. - -
h~ h2 h 22 h2
4.16. Free Vibrations of Beams 207
Therefore, state first the reduced mass and stiffness matricies with the help of
submatrix, formulate {W}, in agreement with (4.112) and then define the equations
of motion given by (4.110)
(c14) Mr:submatrix(l, 2, 5, 6, d12, 1,2,5,6);
13h2r2 13hlrl llh~r2 _ llhtrl]
35 + 35 210 210
[
(d14) 2 2 3 3
llh 2r 2 llhlr l h 2r 2 hlr l
2iO - 2iO 105 + 105
(c15) Kr:submatrix(l, 2, 5,6, d13, 1,2, 5, 6);
(dI5) [1~~2
2
+ 1~~1 ~22 _ ~e21]
6e 2 6e l
I 2 I
4e 2 4e l
---- -+-
h~ hi h2 hI
(cI6) Wr:matrix([W[3]], [W[4]]);
(dI6) [::J
(c17) (-wn2*Mr+Kr).Wr$
where wn2 denotes w 2 •
Note that the system has been reduced to that of two degrees of freedom, as
(d16) shows. Two natural frequencies are therefore anticipated, W~I) and W~2).
For the solution to exist the determinant ofthis homogeneous system of equations
must vanish, which yields the frequency equation,
(c18) coefmatrix([%[I, 1], %[2,1]], [w[3], w[4]]);
(dI8)
208 IV. Finite Elements Method
(c20) (subst([h[l] = h, h[2] = h, E[l] = EI, E[2] = EI, r[l] = rO, r[2] = rO],
d18), determinant(%%), solve(%%), ratsimp(%%));
(4.114)
Thus, the prediction for (J)~2) is very crude. A finer mesh of elements with a greater
number of degrees would provide an improved accuracy (see Problem 4.14).
Figure 4.22 shows a rectangular plate element with four nodes. At each node there
are three components of displacement: the deflection, w, the rotation about the
x-axis, ex, and the rotation about the y-axis, ey. These are given by
ex = --
ow e =ow- (4.115)
oy' oxY
with positive directions defined by the right-hand screw law (Fig. 4.22). Hence, at
t7'------x
al al
z w
Figure 4.22 Rectangular plate element
4.17. Plate Element, Part I 209
f ~l. (4.116)
18
{W}j=
y •
This provides twelve degrees offreedom for the entire element, which is characterized
by the nodal displacement vector {w} e
{W}l
{ } = {w}z (4.117)
We {wh
{W}4
Accordingly, at each node there are three "force" factors: the force, qw, and two
couples, qx and qy,
{qL= f!:}
l qy j
(4.118)
(4.120)
(12 x 1) (12 x 12)(12 x 1)
02W
2--
oxoy
210 IV. Finite Elements Method
and
{a} = (4.123)
[1~
with
Eh 3 v
(4.125)
[HJ = 12(1 - v2 ) 0
2--
a 2
axay
This strain-displacement B-matrix may be thought of as an operator transforming
the nodal displacements into the generalized strains. Upon substitution of (4.126)
into (4.124) we get the stresses too,
{a} = [HJ[BJ{w}e (4.127)
When the nodal displacement vector, {w} e gets a virtual increment, b {w}", the
associated increment in the deflection, w, is
bw = {d(X,y)}T b{w}e (4.128)
as (4.121) shows. The virtual strains b{e} follow from (4.126) as
b{e} = [BJb{w}e (4.129)
and the virtual work done per unit area of the plate is
b{e}T {a} = ([BJ b{w}e)T {a} = b{w};"[BJY{a} (4.130)
Consequently the total virtual work is given by
Comparing this result with (4.120), we get for the element stiffness matrix
(4.137)
where use has been made of (4.121) and the column matrix {p} given by
where use has been made of (4.140). On the other hand, it follows from (c5)
that
W(x, y) = [poJ{ a} (4.143)
Equating the last two equations we get
{d(X,y)}T = [poJ [crt (4.144)
The {d(x, y)} T denoted as interpoltr is given below in (d9)
(c9) (invc:c"( -I), interpoltr:po.%%)$
where invc is the inverse of the c-matrix.
Next, state the generalized stresses {e} according to (4.122), and then the s-matrix
which relates between {a} and {e}
{e} = [sJ {a} (4.144)
by the following commands:
(c10) (ex:-diff(w, x, 2), ey:-diff(w, y, 2), exy:2*diff(w, x, I, y, 1))$
(c11) s:coefmatrix( [ex, ey, exy J, [bo[lJ, bo[2J, bo[3J, bo[ 4J, bo[5J,
bo[6J, bo[7J, bo[8J, bo[9J, bo[10J, bo[llJ, bo[12JJ);
I m
(d13) [ m 1
o 0
where m = v, m! = (I - v)/2 and the common multiplier, D, has been omitted.
Eventually, compute the elements of the stiffness matrix kij in agreement with
(4.135)
(c14) (g:transpose(B).H.B, assume pos:true, intanalysis:false,
for i: 1 thru 12 do for j: 1 thru 12 do (if j > = i then
(k[i,j] :integrate(integrate(g[i,j], x, - aI, a1), y, - a2, a2),
display(k[i,j])) )$
214 IV. Finite Elements Method
For example,
I4aI 2 a2 2 mI +5aI 2 a2 2 m+ IOa2 4 + lOaI 4
k 1 . 1 = -------1O:-a-I-:;c3- a2"'3:;-------
Consider a square plate, which occupies the domain -1:::;; x:::;; 1, -I:::;; y:::;; 1,
(Fig. 4.23), and assume that the plate is clamped and subjected to a concentrated
force, P, at the center. .
Representing the plate as an assemblage of four elements, we first construct its
stiffness matrix, [K]a. Because of a considerable number of the steps to program,
it would again be convenient to use a Batch mode, which allows for easy editing.
Further, since the program is quite time consuming to run, this mode has an
additional advantage.
Instead of constructing the asemblage stiffness matrix, [K]a, via expanded
elemental matrices, we use below a more direct way, given in Section 4.7. In other
words, the matrix follows from the equations of equilibrium written for each of the
nodes in the global coordinate system. The orientations oflocal and global reference
frames coincide and [K]I = [k]I'
Name the file, say, as "plateelemtl" and proceed as follows in the Editor mode of
the operational system:
load ("plateelemt")$
to get access to the element stiffness matrix, [k] I, and the transpose of interpolation
functions matrix, interpoltr, computed earlier. Referring to the global degrees of
freedom shown in Fig. 4.23, state then the nodal displacement vector for each of
the four elements
(WI :zeromatrix(I2, I), for i: I thru 6 do Wl[i, I]:W[i],
for i:7 thru 9 do WI[i, 1]:W[i + 18], for i: 10 thru 12 do Wl[i, I]:W[i + 12])$
(W2:zeromatrix(I2, I), for i: 1 thru 9 do W2[i, 1] :W[i + 3],
4.19. Particular Cases. Batch Mode 215
element 2 element 3
<J5.2~.27
y
1,2,3 10,11,12 1,2,3 10,11,12
4,5,6 7,8,9 4,5,6 7,8,9
x
element 1 element 4
s3[8J, s3[9J, s3[1 OJ + s4[7J, s3[IIJ + s4[8J, s3[12J + s4[9J, s4[IOJ, s4[IIJ,
s4[ 12J, s I [IOJ + s4[IJ, s I [IIJ + s4[2J, sl [12J + s4[3J, s I [7J + s2[IOJ + s3[IJ
+ s4[4J, sl [8J + s2[IIJ + s3[2J + s4[5J, sl [9J + s2[12J + s3[3J + s4[6J J,
[w[IJ, w[2J, w[3J, w[4J, w[5J, w[6J, w[7J, w[8J, w[9J, w[IOJ, w[IIJ,
w[12J, w[13J, w[14J, w[15J, w[16J, w[17J, w[18J, w[19J, w[20J, w[2IJ,
w[22J, w[23J, w[24J, w[25J, w[26J, w[27JJ)$
Since the plate is clamped, the deflection, w, and its first derivatives vanish at
the boundary. It is therefore convenient to work with the reduced quantities. We
formulate the reduced stiffness matrix, [KJ, by
Kr:submatrix(l, 2, 3,4,5,6,7,8,9,10, II, 12, 13,14, IS, 16, 17, 18, 19,20,
21,22,23,24,Ka, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,
20,21,22,23,24)$
the reduced matrices of the nodal displacement {W}" and external force, {R} r'
respectively, by
Wr:matrix([W[25JJ, [W[26JJ, [W[27JJ$
Rr:matrix([PJ, [OJ, [OJ)$
The assembly equilibrium equations and their solutions are given by
b:Kr.Wr-Rr$
fpprec:6$
linsolve([b[l, IJ, b[2, IJ, b[3, IJJ, [W[25J, W[26J, W[27JJ)$
bfloat(%);
In order to run this program, call the expert system, MACSYMA, and then
key in
(cl) batch("plateelemtl");
This yields
(diS) [W 25 = 2'36743b-2p, W 26 = O'ObO, W 27 = O'ObOJ
Note that these values should be divided by the stiffness coefficient, D, omitted
in the statement of the H-matrix, (d13), Section 4.18. An analytical solution yields
PL2
W25 = 0,0056- (4.147)
D
with L being the plate length. For L= 2 this gives
P
W 25 = 0·0224- (4.148)
D
which is close to the result given in (diS).
The next example deals with a cantiliver plate clamped along the Y-axis
(Fig. 4.23). The plate is subject to a uniform load, 8 0 , This load should be lumped
at the nodes with the help of the vector {PL. To this end, find the elemental vector
{P} 1 with the help of the interpolation functions
where use has been made of (4.138). In the code language we get, omitting the
4.19. Particular Cases. Batch Mode 217
multiplier eo
(c16) (subst([a1 = 1/2,a2= 1/2J,interpoltr),interpol:
ra tsimp (transpose (% %) ))$
(c17) assume _ pos: true$
(c18) intanalysis: false$
(c19) P1:integrate(integrate(interpol, x, - 1/2, 1/2), y, -1/2,1/2)$
To construct {P}. refer to Fig. 4.23 and sum up the components associated with
the finite elements, which share the same node. To make this procedure more
convenient, introduce the array hi and proceed as follows:
(c20) h[i]:= P1[i, IJ$
(c21) (Pa:zeromatrix(27, 1), for i: 1 thru 3 do Pa[i, l]:h[iJ,
for i:7 thru 9 do Pa[i, IJ :h[i - 3J, for i: 13 thru 15 do
Pa[i, l]:h[i - 6J, for i: 19 thru 21 do Pa[i, l]:h[i - 9J,
for i:4 thru 6 do Pa[i, l]:h[iJ + h[i - 3J, for i: 10 thru 12 do
Pa[i, l]:h[i - 3J + h[i - 6J, for i: 16 thru 18 do
Pa[i, l]:h[i - 6J + h[i - 9J, for i:22 thru 24 do
Pa[i, l]:h[i - 12J + h[i - 21J, for i:25 thru 27 do
Pa[i, l]:h[i - 18J + h[i - 15J + h[i - 24J + h[i - 21J$
Next, state the reduced quantities and the equilibrium equations taking into account
that
Wi=O, i=I,2,3 ... 9 (4.150)
(c22) Kr:submatrix(l, 2, 3, 4, 5, 6, 7, 8, 9, Ka, 1,2,3,4,5,6,7,8,9)$
(c23) Pr:submatrix(l, 2, 3,4,5,6,7,8,9, Pa)$
(c24) (Wa:zeromatrix(27, I), for i: 1 thru 27 do Wa[i, I]:W[iJ,
Wr:submatrix(l, 2, 3,4,5,6,7,8,9, Wa))$
(c25) br:Kr.Wr - Pr$
The solution to (c25) is as follows:
(c26) for i:l thru 18 do s[i]:br[i, IJ$
(c27) linsolve([s[IJ,s[2J,s[3J,s[4J,s[5J,s[6J,s[7J,s[8J,s[9J,
s[10J,s[IIJ,s[12J,s[13J,s[14J,s[15J,s[16J,s[17J,s[18JJ,
[w[lOJ, w[IIJ, w[12J, w[13J, w[14J, w[15J, w[16J, w[17J, w[18J, w[19J,
w[20J, w[21J, w[22J, w[23J, w[24J, w[25J, w[26J, w[27JJ)$
(c28) bfloat(%);
(d28) [w 10 = 6·87805b - 1, w 11 = 1·27822b - 1, w 12 = l-16097bO,
w 13 = 1'9965bO, W 14 = 9·83856b - 2, w 15 = 1'36107bO,
W 16 = 2'05157bO, W 17 = O'ObO, W 18 = 1'3646bO,
W 19 = 1'9965bO, w 20 = - 9·83856b - 2, W 21 = 1'36107bO,
W 22 = 6'87805b -1, W 23 = - 1·27822b -1, W 24 = 1'16097bO,
W 25 = 7-35963b - 1, W 26 = O'ObO, W 27 = 1·19366bOJ
(4.151)
Compared to the direct methods considered in the previous chapter, the finite
element technique introduces a new dimension, which is the spatial partitioning of
the structure. Consequently, the nature of the obtained solutions should be discussed
from another viewpoint.
The compatibility requirements have been commented on in Section 4.6. Note
that the compatibility is satisfied at the nodes and within the element, provided the
displacement field is continuous. It is not necessarily complied with along the
interelement boundaries. Matching the displacement and its first derivatives does not
ensure the consistent fields for higher derivatives, as indicated in Section 4.6.
Consider, for example, the above rectangular plate element (Fig. 4.22).
Along the line 1-4, we set y = const and get from (4.139)
w = No + NIx + N 2X2 + N 3X3 (4.152)
while along the line 1-2 we set x = const and get
w = Mo + M1y + M2y2 + M 3y 3 (4.153)
Here N i , M i , i= 1,2,3,4 are constant coefficients, depending on {w}. It becomes
clear that the mixed second derivatives at the node 1, w,xP), found from (4.152)
and from (4.153), respectively, are not necessarily the same. This is an obvious
violation of the compatibility condition. Such elements are called non-conforming
or incompatible. Nevertheless, this particular element provides satisfactory results
and incompatibility, in general, should not be considered as a fatal drawback, if the
analysis is confined to the overall response of the structure. Moreover, allowing for
discontinuities or non-uniqueness at the limited number of points or surfaces, can
render the assembly "softer". This, in turn, may reduce the error, since direct methods
tend to overestimate the stiffness. The bounding feature ofthe result is no longer valid.
As far as the equilibrium is concerned, it is fully satisfied at the nodes, but because
of the approximate trial functions may be violated within the elements.
The ways of improving the accuracy are to refine the finite element mesh or/and
to apply a higher order approximation within the element. Depending on the
particular problem, there mayor may not be the convergence to the exact solution.
The so-called convergence requirements include, besides compatibility, the
capability to support a state of a rigid motion with zero strain. Indeed, since the
element may be thought of as traversing the entire structure or solid, it must be
capable of representing the various states possible. Among these, the above states
are most trivial, a realistic model must comply with.
Next, an element should be geometrically (spatially) isotropic in the sense
described immediately below. Assume that the displacement functions along the
axes x and y, U x and uV ' respectively, are prescribed as
The use of specific reference frames, the so-called natural coordinate systems, which
are adjusted to a particular finite element, simplifies the analysis and brings about
more general formulations. In a natural coordinate system any point of the element
is specified by dimensionless numbers whose magnitudes do not exceed unity. These
systems depend on the dimensionality and shape of the element.
A one-dimensional line element is shown in Fig. 4.24. The natural coordinates
(L l , L 2 ) of a point A of the element and its cartesian coordinate, x, are related by
(4.155)
(d2) [Xl]
(c3) natural:matrix([Ll], [Ll]);
(d3) [~~]
(c4) transform:matrix([I, 1], [xl, x2]);
I
(d4) [xlI X 2]
a)
e
1
I----::l
'I
0 ro
X=Xl X=X2 x
(1,0) (0,1)
b)
0 I 0
X=Xl X=X3 X=X2
(-1) 0 (1)
Figure 4.24 One-dimensional line elements
220 IV. Finite Elements Method.
(d7)
X2~X1 X2~X1]
xl 1
l
x2 - xl x2 - xl
(c8) natural=d7.cartesian;
3 (0,0,1)
~ _ _ _ _ _~~~(0,1,0)
2
(X2,Y2)
Figure 4.25 Triangular element
For a triangular element shown in Fig. 4.25 natural coordinates are given by
(4.160)
where A is the total area of the element and Ai' i = 1, 2, 3 are the areas of smaller
triangles shown. Obviously, only two of the above coordinates are independent. The
transformation law is given by
1:)=[:1YI :z :3J!~:)
Y Yz Y3 L3
(4.161)
(dI4) [;]
[m
(ciS) natural:matrix([LlJ, [UJ, [L3J);
(dI5)
l
(dI6) [:1 xl2 X 3J
yl y2 y3
Then (4.161) yields
(c 17) cartesian = transform.natural;
(dI7) IJ [ L3+U+Ll J
[ x = L3x3+Ux2+Llxl
y L3y3 + Uy2 + Llyl
222 IV. Finite Elements Method
The first of these three equations merely states the dependence among the natural
coordinates
1= Lt + L z + L3 (4.162)
while the other two provide the transformation law
x = Ltx t + Lzxz + L3X3
(4.163)
Y = LtYt + LzYz + L 3Y3
The inverse relations Li (x, Y), i = 1,2,3 are given below by (dI9) and follow from
(cI8) transform~( - 1)$
(cI9) (natural = d 18.cartesian, ratsimp(%%));
m
(c20) (subst([x = xI,y=yl], %), ratsimp(%%));
(d20) [~~J ~
(c2I) (subst([x = x2, y = y2],dI9], ratsimp(%%));
(d21) [~}m
(c22) (subst([x = x3, y = y3], dI9), ratsimp(%%));
(dn) G~}m
These coordinates are shown in Fig. 4.25.
Generalizing (4.161) to the case of three dimensions yields
{ ~}-r:l :2 :3 :4l{~:}
Y -
Z
Yl
Zl
Y2
Z2
Y3
Z3
Y4
Z4
L3
L4
(4.164)
where L;, i = 1, 2, 3, 4 are the tetrahedral natural coordinates for the tetrahedron
4.21. Natural Coordinate Systems 223
(L 1,L2 ,L3.L.)
A(x,y,z)
~Y
x
3
(0,0,1,0)
(X3 'Y3 ,Z3)
element shown in Fig. 4.26. Here Xi' Yi' Zi' i = 1, 2, 3 are the coordinates of the
verticies. The Li are given by
Li= VdV, i= 1,2,3,4 (4.165)
where V is the element volume and Vi the volume of the smaller tetrahedrone.
Formulating the matricies involved in (4.164) as follows:
(c23) cartesian:matrix([1], [x], [y], [z]);
(d23) Ul
(c24) natural:matrix([Ll], [L2], [L3], [L4]);
(d24) [m
(c25) transform:matrix([l, 1, 1, 1], [xl, x2, x3, x4], [y1, y2, y3, y4],
[zl, z2, z3, z4]);
~ \ x~]
1
(d25) x12 x3
y1 y2 y3 y4
zl z2 z3 z4
we find, in agreement with (4.164), the transformation laws X = x(L" L 2 ,L3 ,L4 ),
Y = y(L" L 2 , L 3 , L 4 ), and Z = z(L" L 2 , L 3 , L 4 )
224 IV. Finite Elements Method
L
d26 [!J= [L4X4 :
( ) y
~3~~: ~~~ ~lLlXIJ
L4y4 + L3y3 + L2y2 + Llyl
z L4z4 + L3z3 + L2z2 + Llzl
The first of these equations shows that only three of the four natural coordinates
are independent, since
1 = LI + L2 + L3 + L4 (4.166)
The inverse relations stem from
(c27) transform AA
1)$
( -
[ttl m
(c32) (subst([x = x4, y = y4, z = z4], d28), ratsimp(%~~));
(d32)
fA
L)L~L; dA =
(p
p'q'r'
. . .
+ q + r + 2)!
2A (4.167)
where O! = 1.
In the earlier considerations the expression for the field variable, say, the beam
deflection, w, have been first written as a polynomial with the coefficients, ai • Then
by a proper procedure these coefficients have been expressed in terms of the nodal
displacement vector, {w}, and excluded thereby from the further analysis. The use
of natural coordinate systems allows to avoid this step.
Consider a one-dimensional element and define the interpolation functions (in
natural coordinates) as those which take on unity at one nodal point and at the
same time vanish at all other nodal points. If we use only the nodes 1 and 2 with
L = - 1 and L = 1, respectively, then we may define the interpolation functions in
a simple way
l-L I+L
d 1(L)=-2-' d z (L)=-2- (4.168)
we set
u = {d(L)}T {u} = -W - L)u 1 + t(1 + L)u 2 (4.171)
where the interpolation functions matrix is
(4.172)
(4,175)
X= {d(L)V tJ (4.176)
where {d(L)} is given by (4.172) and (4.168). Comparing (4.176) and (4.171), we note
that the geometry of the element and the field variable both are given by the same
transformation. Such an element is referred to as isoparametric.
Nevertheless, the model applied to define the geometry and that applied to define
the field variable should not necessarily be of the same order. For the subparametric
elements the geometry model is of a lower order than the field variable, while for
the superparametric elements the converse is true. For example, defining the
geometry by (4.176), which employs two nodes, and the field variable by (4.174) and
(4.175), which employ three nodes, we get a sub parametric finite element.
Furthermore, a transformation similar to (4.176)
(4.177)
may define curved elements in the cartesian space X, Y, Z. In other words, given
the "parent" element with a simple form in a natural coordinate system, we may
consider various curved elements in the global coordinate system X, Y, Z, which
arise from (4.177). These curved elements may fit better a surface of the solid under
consideration.
As an example, consider the axial load finite element shown in Fig. 4.27. The
natural coordinate, L, is given by (dlO), Section 4.21, which implies that the ends
given by x = Xl and X = X 2 , get the coordinates, L = - 1 and L = 1, respectively.
The cross sectional area, A(L) is a linear function of L and may be put in the form
A={d(L)V{A} (4.178)
where {d} is the matrix of interpolation functions given by
(1 - L)/2}
{d(L)}= { (I+L)/2 (4.179)
4.22. The Concept of Isoparametric Elements 227
node 1 o
"-....1Al
!
Xl
\
I e
node 2
/ Az
Figure 4.27 Axial load element
and {A} is the geometry matrix given by
with A 1 and A 2 being the end cross sectional areas. Consequently, (4.178) states the
geometry of the element in terms of the natural coordinate, L, and the matrix {A}.
On neglecting the possibility of buckling, the only field variable is the axial
displacement, u(L), which is put in the form similar to (4.174)
u = {d(L)V{u} (4.181)
where
{u} = tJ (4.l82)
is the nodal displacement vector. The strain now follows from (4.159) and (dIO),
Section 4.21, as
8=-=--=--
du
dx
du dL
dL dx
2 du
edL
(4.183)
which, after incorporating (4.l81), (4.168) and (dl0), Section 4.21 becomes
I
The potential energy, U, is
U=-1
X
2
EAe 2 dx (4.l87)
2 XI
228 IV. Finite Elements Method
with
e2 = ee = {uV {B} {BV {u} (4.188)
and
e
dx ="2.dL (4.189)
Hence,
U=1{uV[kJ{u} (4.190)
with
[kJ = [2 {B}EA{BV dx
[kJ=~
E[ 1
4e - 1
Y,V
3
~ degrees
freedom
of
x,u
Figure 4.28 Triangular element
4.23. Some Plane Elements 229
for u and v should contain six free coefficients. The u and v are therefore to be linear
functions of x and y. This, in turn, gives rise to a constant strain within the element,
which is called the constant strain triangle. The representations should be similar
for u and v to ensure their invariance in the sense discussed in Section 4.20.
Below we construct the polynomials for u and v
(c3) Z:matrix([I,x,y]);
(d3) [1 x y]
(c4) Au:matrix([al], [a2], [a3]);
(d4) [~J
[;n
(c5) Av:matrix( [a4], [a5], [a6]);
(d5)
(c6) u:Z.Au;
(d6) a3y + a2x + al
(c7) v:Z.Au;
(d7) a6y + a5x + a4
Thus, (d6) and (d7) state u and vas linear functions of x and y and the coefficients
aj,j= 1,2, ... 6.
The next step is to represent u and v in terms of the nodal displacements, U j and
Vj, i = 1,2,3, respectively, and interpolation functions dj(x,y). To this end, substitute
the nodal coordinates, Xj and Yj, for x and y into U and v to find Uj and Vj as follows:
(c8) for i:l thru 3 do (subst([x= x[i], y=y[i]], u), u[iJ:%%)$
(c9) for i:I thru 3 do (subst([x= x[i], y=y[i]], v), v [iJ:%%)$
The results given by (c8) and (c9) may be put in the form
{::}
3x 1
[cu]
3x3
{::}
(4.194)
3x 1
and
{::}
3x 1
[cv]
3x3
G:} (4.195)
3x1
respectively. To find the cu and cv matrices key in
(etO) (cu:coefmatrix([u[I], u[2], u[3]], [aI, a2, a3]),
kill(u[I], u[2], u[3]), cu);
230 IV. Finite Elements Method\
I XI YI}
(dIO) { I x 2 Y2
I X3 Y3
(cIO) (cv:coefmatrix([v[I], v[2], v[3]], [a4, a5, a6]),
kill (v [I], v[2], v[3]), cv);
I XI YI}
(dIO) { 1 x2 Y2
1 X3 Y3
(c13) s:Z.invc$
(cI4) u:s.matrix([u[I]], [u[2]], [u[3]])$
(cI5) v:s.matrix([v[I]], [v[2]], [v[3]])$
where use has been made of $ to prevent a lengthy display. The interpolation
functions are the same for u and v, like the [cu] and [cv], and follow from the
commands,
(cI6) for i: I thru 3 do (d[i](x,y):= ratcoef(u, u[i]),
display(d [i] (x, y)));
(dI6) done
It is also possible to obtain these functions in a matrix form by
(cI7) d: ratsimp(Z.invc); .
4.23. Some Plane Elements 231
At this junction the expressions for u and v may be put in the standard form
HI
VI
0 dz 0 d3
~J
Hz
(4.196)
dl 0 dz 0 V2
H3
V3
where d; are the interpolation functions given in (dI6) or (dI7). Consequently, the
element stiffness matrix may be derived in the way indicated earlier. The
strain vector, {s}, follows from (4.196) by applying a differential operator,
which depends on the type of problem under consideration. Say, in case of plain stress,
we get
(4.197)
(4.198)
where
[EJ=--2
E [1v (4.199)
I-v
o
Substituting (4.196) into (4.197) and using (4.198), we get the strain-displacement
relation
{s} = [BJ {w} (4.200)
where the nodal displacement vector {w} is
HI
VI
H2
{w} = (4.201)
V2
H3
V3
ajax 0 ] d
[BJ = [ 0 ajay [ 1 (4.202)
~ja
o y 0~j~
ox 0
232 IV. Finite Elements Method
y,v
V3
b
t4 3
u3
a
x,u
1
-
2
(d4) r~iJ
(c5) Av:matrix([a5], [a6], [a7], [a8]);
(d5) mJ
(c6) u:Z.Au;
(d6) a4xy + a3y + a2x + al
(c7) v:Z.Av;
(d7) a8xy + a7y + a6x + as
4.23. Some Plane Elements 233
[:
(elO) (c:coefmatrix([u[l], u[2], u[3], u[4]], [aI, a2, a3, a4]),
kill(u[l], u[2], u[3], u[4], v[l], v [2], v[3], v[4]), c);
(dlO) ;~ ~: ;~~:l
1 X3 Y3 X 3 Y3
1 x4 Y4 X 4 Y4
(el2) s:Z.invc$
(el3) u:s.matrix([u[l]], [u[2]], [u[3]], [u[4]])$
(c14) v:s.matrix([v[l]], [v[2]], [v[3]], [v[4]])$
(el5) (subst([x[l] = - b, y[l] = - a, x[2] = b, y[2] = - a, x[3] = b, y[3] = a,
x [4] = - b, y[4] = a], u), u:ratsimp(%%»$
(el6) for i:1 thru 4 do (d[i](x,y):= ratcoef(u, u[i]), display(d [i](x, y));
(x - b)y - ax + ab
ddx,y)= 4ab
(x + b)y - ax - ab
d 2 (x, y) = - ---4--c ab,---------
(x + b)y + ax + ab
d 3 (x,y)= 4ab
(x - b)y + ax - ab
d 4 (x, y) = - 4ab
(d16) done
The U and V now assume the standard form
Ut
VI
U2
0 d2 0 d3 d4
t}=[~
0
~J
V2
(4.205)
dl 0 d2 0 d3 0 U3
V3
u4
V4
and the strain-displacement B-matrix may now be set up in the way indicated earlier.
234 IV. Finite Elements Method
Y,V
n
1
4 3
E. 2
1 2
u,x
(a) (b)
The above elements do not take full advantage of the idea underlying the finite
elements method, namely, the idea of partitioning, in the sense that the element
shape has been taken as a trivial one. Also, the elimination of free coefficients in
the polynomial approximations appears tedious and should be avoided. We therefore
adopt the concept of isoparametric plane element and think, say, of the rectangular
element of Fig. 4.29, as a "parent" one, which generates isoparametric elements upon
certain transformations.
First, introduce the local natural coordinates 11 and ¢, thereby normalizing the
element as shown in Fig. 4.30a. The appropriate transformation is
11=-_c
y-y e x-x c (4.206)
- b
'-=~~-
a
where Xc and Yc are global coordinates of the element centroid. The four
interpolation functions, di (¢,I1), in the natural coordinates are
dl = (l - ¢)(l -1])/4 d2 = (I + ¢)(I -11)/4
(4.207)
d3 = (I + ¢)(I + 11)/4 d4 = (I - ¢)(I + 1/)/4
It is seen that, say, d l vanishes at each node, but node 1, where it takes on unity, etc.
Now map the element of Fig. 4.30a into the global XY-space by the trans-
formation
{~}=[d(¢,1])J{ct} (4.208)
where
0 d2 0 d3 0 d4
[d(¢,I1)] = [d0l
dl 0 d2 0 d3 0 ~J (4.209)
{ct} = [Xl Yl X2 Y2 X3 Y3 X4 Y4 Y
Thus, the nodal coordinates, given by {ct}, define the shape of the "distorted" element
4.24. Concluding Remarks 235
Matrices
A rectangular array of real or complex numbers
... a2n
...
alllJ
(Ai)
amn
is called a matrix, with aij being its elements. A matrix with m rows and n columns
is referred to as (m x n) matrix. In the double-subscript abbreviations for the elements,
the first subscript denotes the row and the second subscript the column, which
contain the above element.
A row matrix (vector) is
[a l a2 ... an] (A2)
while a column matrix (vector) is as follows:
(A3)
If a matrix has the same number of rows and columns, it is called a square matrix.
Two matricies [a] = [a jk ] and [b] = [b jk ] are said to be equal iffor all occurring
j and k
(A4)
If the matrices have the same number of rows and the same number of columns,
their sum is [c] = [a] + [b] with the elements given by
(AS)
The product of an (m x n) matrix, [a ik ], by a scalar s is merely the matrix, [saikl
The transpose, [ay of an (m x n) matrix [a] = [aiJ is the (n x m) matrix, which is
Appendix 237
1 0 0)
[1]= ( 0 1 0 (AI2)
001
We go over to the definition of matrix multiplication. Let [a] = [aJk ] be (m x n)
matrix, and [b] = [b jk ] an (r x p) matrix. Then the product [a][b] = [e] is defined
only when r = n and is the (m x p) matrix, whose elements are given by
" ajibik
ejk = ajl blk + aj2 b2k + ... + aj"b"k = L (A13)
i= 1
In other words, ejk is merely the scalar product of the j-th row vector of [a] and
the k-th column vector of [b].
Note that, in general,
[a][b];e[b][a] (AI4)
and
[a] ([b] [e) = ([a] [b])[e] (AI5)
However,
[a] [I] = [I] [a] = [a] (AI6)
Unlike the scalar case, the relation
[a][b] =0 (AI7)
does not necessarily imply that
[a]=O or [b]=O (AIS)
238 Appendix
n
= L biai =
i=l
{aV{b} (A2l)
Problems
Chapter 2
2.1
2.2
1= r
Find the variation of the functional given by
w~xx(x)dx
Find the natural boundary conditions for a beam clamped at its ends and
subjected to a distributed load.
2.3 Find the natural boundary conditions for a beam with simply supported ends.
2.4 Derive the equation governing the motion of an incompressible fluid with the
density p in a uniform u-tube with the cross sectional area A. (Fig. P.l).
2.5 Derive the equation governing the mechanism shown in Fig. P.2 with the help
of the program given in Section 2.13. Verify the result.
2.6 Modify the program of Section 2.13 to include the case of pendulum with the
time variable length, L(t). Obtain the Euler-Lagrange equation.
2.7 Consider the system shown ·in Fig. P.3 which consists of a mass, m, moving
along a rigid beam AB. The moment of inertia of the beam with respect to A
is J, and the spring coefficient is k. Derive the governing equations by means
of the program given in Section 2.14, while neglecting the friction. Assume
that mass moves under the action of the force p(t).
Problems 239
Figure P.I
L- x
mz Figure P ..2
p(t)
A
Figure P.3
2.8 Derive the equations of motion for the governor shown in Fig. P.4 with the
help of the program given in Section 2.14.
2.9 Suggest modifications which would simplify the program of Section 2.14.
2.10 Consider an elastic beam of a variable moment of inertia, which is subjected
to a time- and space-dependent distributed lateral load with the help of the
r(
program given in Section 2.18. The potential energy is given by
U= ~I w~xx - qw ) dx
2.11 Modify the previous equations (Problem 2.10) for the case when the distance
between the ends of the beam is fixed giving rise to the axial force. Consider
the beam as uniform.
240 Appendix
Figure P.4
1
U = 2.
fL [EI(w,xx -
0 !3,J 2 + kT!3 2 ] dx
and the kinetic energy is
J= f XIj1?
r. dx, y(O)=Y(X1)=Yl
o yY
and verify Legendre's condition,
2.15 Find the general solution to (2.233), which governs the constrained minimum
pressure drag, and derive the results for a particular case when the diameter
and surface are prescribed.
Problems 241
Chapter 3
3.1 Analyze a beam with the clamped ends resting on elastic foundation by the
least squares method if EI = a + bx with a, b, constants. Use a program given
in Section 3.4.
3.2 Consider a uniform beam under the load given by (3.14) by the least squares
method making use of trigonometric trial functions. Use a program given in
Section 3.4.
3.3 Write a program which performs calculations given by (3.22), with K = 0, (3.24)
and (3.25) for a beam hinged at the ends.
3.4 Apply the Bubnov-Galerkin method to the problem of bending a cantiliver
by a concentrated force. Compare the result with the exact solution.
3.5 Solve the above problem by the Rayleigh-Ritz method too and compare the
solutions with the exact one.
3.6 Use the program of Section 3.8 to obtain a solution to the uniform cantiliver
under a distributed constant load.
3.7 Use the program of Section 3.8 to obtain a solution to the non-uniform beam
with the clamped ends, q = sx 2 , EI = z + gx.
3.8 Consider a hinged-clamped uniform beam with the help of the program of
Section 3.8.
3.9 Consider a uniform beam clamped at its ends with the help of the ria-function
given in Section 3.10.
3.10 Write a master program based on the least squares method for a beam resting
on elastic foundation.
3.11 Derive a second order approximation for the clamped plate considered in
Section 3.12. Compare the deflection at x = a12, y = al2 of the square plate,
d = a, with that following from the first order approximation.
3.12 Consider the deflection of a plate with three sides hinged and one side free
under the uniform transverse load, q. (Fig. P.5).
3.13 Prove (3.204)
3.14 Prove (3.208)
hinged
~------\o-.........".--x
/
y free
Figure P.S
242 Appendix
Lf 2dV
Chapter 4
4.1 Derive the stiffness matrix for a truss element directly in global coordinates
X and Y. Use Hooke's law to relate the axial force and elongation (Fig. 4.3).
4.2 Find the values which the interpolation functions given by (dI4), Section 4.1,
take on when x= 0 or x = h. Explain the result in view of (4.13).
4.3 Which of the equations given in the Appendix is used while deriving (4.16)?
4.4 Derive (4.25) from (4.24).
4.5 Find the nodal forces associated with the nodal displacement vector {w} =
[OzOzy, and the stiffness matrix given by (d22), Section 4.4. Explain the results.
4.6 Verify whether the elemental mass matrix for a beam depends on the orientation
angle.
4.7 Derive the elemental stiffness matrix for the bar 1 of the truss shown in
Fig. 4.2 by rotation of that for the bar 2.
4.8 Verify whether the determinant of the stiffness matrix of the truss shown in
Fig. 4.2 vanishes.
4.9 Use the program of Section 4.9 to analyze the truss shown in Fig. P.6.
4.10 Consider a clamped beam using a single finite element. Explain the result.
4.11 Verify the results of Section 4.12 with the help of the program given in
Section 4.13.
4.12 Consider a cantiliver beam by the technique of reduced quantities (use the
program for the composite beam).
4.13 Find the mass and stiffness matricies of the composite beam for the case of
three elements.
4.14 Consider free vibrations of a clamped beam using three finite elements and
the program of Section 4.16. Obtain numerical results for hi = h2 = h3 = hand
El 1= E12 = E13 = r l = r2 = r3 = 1.
Answers 243
P Figure P.6
4.15 Investigate a cantiliver plate USIng two finite elements and modifying the
program of Section 4.19.
4.16 What are the values taken on at the nodes by the interpolation functions
dJx,y) given by (d16), Section 4.23?
4.17 Find the Jacobian matrix associated with (4.210).
Answers
Chapter 2
2.5
d '
2.6 .- (mL2fi)
dt
+ mgL
.
sin (! = 0
X= i y
o
( 2y
-D+A l y+ A2y2
)1/3~
Denote
f q
I'/1/3(N - N 11'/- N 21'/2)-1 /3dl'/
f:
e=~o-----------------
I'/1/3(N - N 11'/- N 21'/2)-1 /3dl'/
and we get
+ ~ tan - 1 _-=J=3=-Y=---II-----=j
J3 2-y1 -11 --YII
Chapter 3
3.1 Call the Li-function of Section 3.4 as
Li((L- xr2*sum(a[jJ *xAj, 2, 3), 3, q, a + b*X)
3.2 Replace the lower limit in the do statement of the Li-function of Section 3.4
from 2 to 1 and call
Li( (sum(a[j] *(1 - cos(2 *j * %pi * x/L) ),j, 1,2),2, s * x A2, ei).
Then solve the equations b[lJ and b[2J for a[lJ and a[2].
3.3 (cl) ei*diff(w,x,2r2/2-q*w$
(c2) sum(a[j]*sin(%pi*j*x/L),j, 1,2)$
(c3) subst(%, w,dl)$
(c4) ev(%, diff)$
(c5) (assume(L > 0), integrate(d4,x,0,L))$
(c6) diff( d5, a[ 1J)$
(c7) diff(d5,a[2J)$
(c8) solve([d6, d7J, [a[lJ, a[2JJ);
(d8) [[ a 1 - -4l4q
- a -0
- %pi 5 ei' 2 -
jj
3.4 and 3.5
(cl) sum(a[jJ*x Aj,j,2,4)$
for the Rayleigh-Ritz method
(c2) diff(%, x, 2)$
(c3) ei/2*integrate(%A2, x, 0, b) - P*ev(d1, x = b)$
(b is the beam length)
(c4) for j:2 thru 4 do s[j]:diff(d3,a[j])$
(c5) solve ([s[2J, s[3J, s[4J J, [a[2J, a[3J, a[ 4J J);
for the Bubnov-Galerkin method (c3) and (c4) take the form
(c3) ei*diff(d1,x,2)-p*(b-x)$
(c4) for j:2 thru 4 do s[jJ:integrate(d3*x Aj,x,O, b)
Both methods provide
bP P
a 2 =2EI' a 3 =-6EI' a4 =0
246 Appendix
Better results for this problem may be derived by placing the origin at the
centre of the plate and choosing symmetrical coordinate functions, as shown
in the end of Section 3.12.
3.12 The function satisfying the kinematic boundary conditions is
w = Ay sin nx/a
Substitute this into the energy potential and find A. Note that w does not
satisfy the natural boundary condition at the free side.
3.13 Making use of the definition of scalar product, we get
3.19 f fb sin -
a mnx Lnx nny
- sin - - sin -
kny
sin - dx dy
o 0 a a b b
eq uals zero if m oF Lorn oF k
248 Appendix
Chapter 4
AE
F v = K 22 = - h sin IX sin IX
.
4.2 Only dl(x) and d3 (x) govern the values of w for x = 0 and x = 4.
4.3 (A2l)
4.4 Use the focusing property of a delta-function.
4.S It is not a rigid body motion and the nodal forces do not vanish.
4.6 It does not depend.
4.7 IX = n/2 and the N-matrix is
rr -~ ~
lo
-noj
-
0 1
Use (4.S2) and (4.42) to obtain kl as follows:
l~ o
o
0
-1
~ ~ ~J0
0
0
1
4.8 Use ratsimp(radcan(determinant( ... ))) to obtain zero.
4.9 [rl = - sin (alfa) p, r2 = sin (alfa) p, r3 = (sin (alfa) + cos(alfa)) p,
W 4 = 0, Ws = (-sin(alfa) - cos(alfa)) p,
W6 = ( - sin (alfa) - cos(alfa)) p - sqrt(2) sin (alfa) p, W 7 = 0,
Ws = (-sin(alfa) - cos(alfa)) p - sqrt(2)sin(alfa) p]
4.10 There are no degrees of freedom. One needs two finite elements at least.
4.13 Call Ka(3,8) and M a(3, 8) (Program of Section 4.16).
4.14 As a sequel to the program of Section 4.16, type in
(c2l) kill(d12, d13)$
(c22) Ka(3,8)$
(c23) Ma(3,8)$
(c24) Kr:submatrix(I,2, 7,8,d22, 1,2,7,8)$
(c2S) Mr:submatrix(l, 2, 7,8,d23, 1,2,7,8)$
(c26) Wr:matrix([W[3]], [W[4]], eWeS]], [W[6]])$
Answers 249
cu auiJx iJucy
-=--+--
cry iJxiJry iJyiJry
or in a matrix form
with
Chapter 1
Char, B.W., Geddes, K.O., Gonnet, G.H., Monagan, M.B. and Watt, S.M. (1988) First Leaves: A
Tutorial Introduction to MAPLE, Univ. of Waterloo, Waterloo, Ontario, Canada.
Davenport, J.R., Siert, Y. and Tournier, G. (1988) Computer Algebra, Academic Press.
DERIVFM, A Mathematical Assistant (1988), Softwarehouse, Inc.
MACSYMA Reference Manual (1985) Version 11, Symbolics, Inc.
MACSYMA User's Guide (1987) Symbolics, Inc.
Pavelle, R. and Wang, P.S. (1985), MACSYMA from F to G, J. Symbolic Computation, Vol. 1,
pp. 69-100, Academic Press.
REDUCE User's Manual (1983) Version 3.0, Edited by A.C Hearn, The Rand Corporation.
Thomson. W.T. (1981) Theory of Vibration with Applications, Prentice-Hall.
Winston, P.R. and Horn, B.K.P. (1984) LISP, Addison-Wesley.
Chapter 2
Chapter 3
Bert, CW. (1987) Application of a Version of the Rayleigh Technique to Problems of Bars, Beams,
Columns, Membranes, and Plates, J. Sound Vibration, Vol. 119, No.2, pp. 317-326.
Langhaar, M.L. (1962) Energy Methods in Applied Mechanics, J. Wiley.
Mikhlin, S.G. (1964) Variational Methods in Mathematical Physics, MacMillan.
Schechter, R.S. (1967) The Variational Method in Engineering, McGraw Hill.
Shames, I.H. and Dym, CL. (1985) Energy and Finite Element Methods in Structural Mechanics,
McGraw Hill.
Chapter 4
The number of relevant sources is almost endless. Only a few are given below.
Cook, R.D. (1981) Concepts and Applications of Finite Element Analysis, J. Wiley.
Huebner, K.M. (1975) The Finite Element Method for Engineers, Wiley.
252 References
Noor, A.K. and Andersen, C.M. (1979) Computerized Symbolic Manipulation in Structural
Mechanics-Progress and Potential, Compo Struct. Vol. 10, pp. 95-118.
Shames, I.M. and Dym, C.L. (1985) Energy and Finite Element Methods in Structural Mechanics,
McGraw Hill.
Timoshenko, S. and Woinowsky-Krieger, S. (1959) Theory of Plates and Shels, McGraw-Hili.
Zienkiewich, O.c. (1986) The Finite Element Method, McGraw-Hili.
Index