View
218
Download
3
Tags:
Embed Size (px)
Citation preview
Classical Solution Technique
The fundamental problem in calculus of variations is to obtain a function f(x) such that small variations in the function f(x) will not change the original function
The variational function can be written in general form for a second-order governing equation (no first derivatives) as
Where and are prescribed values
22
V
1 dfJ(f ) f 2 f dV
2 dx
Classical solution (continued)
An equation containing first-order derivatives may not have a corresponding variational function. In some cases, a pseudovariational function can be used
where C=C(x)
22
r
V
1 dC dCJ(C) D Cu K C 2mC dV
2 dx dx
Classical solution (continued)Example:
Consider a rod of length L. The equation defining heat transfer in the rod is
with boundary conditions
Integrating twice, one obtains
Applying boundary conditions, the final result is
2
2
d T Q
dx k
T(0) T(L) 0
2
1 2
QxT C x C
2k
2Q(Lx x )T
2k
Rayleigh-Ritz MethodFEM variational approach attributed to Lord Rayleigh
(1842-1919) & Walter Ritz (1878-1909)
Let
Assume a quadratic function
with boundary conditions
ni 1
i ii 1
T(x) C x (where C are the unknowns)
21 2 3T C C x C x
1
2 3
T(0) 0 C 0
T(L) 0 C C L
R-R Method (continued)Hence,
Now integrate
Thus
23T C (x Lx)
3
dTC (2x L)
dx
22
V
1 dfJ f 2 f dV (let f T, k, 0, Q)
2 dx
2 2 23 3
V
1J kC (2x L) 2QC (x Lx) Adx
2
R-R Method (continued)which becomes
To find the value of C3 that makes J a minimum,
Therefore,
2 3 33 3AkC L AC QL
J6 6
3 33
3
2AkC LJ AQL0
C 6 6
2
3
Q Q(Lx x )C or T
2k 2k
Variation Methods
Given a function u(x), the following constraints must be met
– (1) satisfies the constraints u(x1)=u1 and u(x2)=u2
– (2) is twice differentiable in x1<x<x2
– (3) minimizes the integral2
1
x
x
duJ F x,u, dx
dx
Variational methods (continued)
Then it can be shown that u(x) is also the solution of the Euler-Lagrange equation
where
(1)
d F F0
dx u u
i(i)
i
d uu
dx
Variational methods (continued)
For higher derivatives of u,
Hence,
2
1
x(1) (2) (n)
x
J F x,u,u ,u ,..., u dx2 n
n(1) 2 (2) n (n)
F d F d F d F( 1) 0
u dx u dx u dx u
Variational methods (continued)In 2-D, the constraints are
– (1) satisfies the constraint u = u0 on – (2) is twice differentiable in domain A(x,y)– (3) minimizes the functional
and
u uJ F x, y,u, , d
x y
F F F0
u x ( u / x) y ( u / y)
Variational methods (continued)Example:
Find the functional statement for the 2-D heat diffusion equation
Applying the Euler-Lagrange relation
x y
T Tk k Q 0
x x y y
x y
F d F d F0
u dx u dy u
Variational methods (continued)we find that
which yields the final functional form
x yx y
22yx
1 2 3
22yx
F T F T Fk , k , Q
u x u y u
kk dT dTF C ,F C ,F QT C
2 dx 2 dy
kk dT dTJ(T) QT d
2 dx 2 dy
A Rayleigh-Ritz Example
Begin with the equation
with boundary conditions
First find the variational statement (J)
2
2
d uu x 0 0 x 1
dx
u(0) u(1) 0
R-R example (continued)The variational statement is
Assume a quadratic approximation
with boundary conditions
1 22
0
du duJ x,u, u 2xu dx
dx dx
20 1 2u(x) a a x a x
0
1 2
u(0) a 0
u(1) a a 0
R-R example (continued)Thus,
Now,
To be a minimum,
Finally
1 1 1
1
u(x) a [x(1 x)] a (x)
dua (1 2x)
dx
1 2 2 2 2 2 21 1 1 10
J(a ) a (1 2x) a x (1 x) 2a x (1 x) dx
11
1
J 3a 1 50 a
a 10 6 18
5u(x) x(1 x)
18
The Weak Statement• Method of Weighted Residuals - one does not
need a strong mathematical background to use FEM. However, one must be able to integrate.
• To illustrate the MWR, let us begin with a simple example - Conduction of heat in a rod of length L with source term Q.
2
2
L
d TK Q 0 x LdxdTK q for x 0dx
T T for x L
weak statement (continued)
Integrating,
or
This analytical solution serves as a useful benchmark for verifying the numerical approach.
L y
L x 0
q 1T x T L x Q z dz dyK K
2 2L
q QT x T L x L xK 2K
weak statement (continued)
There are basically two ways to numerically solve this equation using the FEM: Rayleigh – Ritz Method and the Galerkin Method ( which produces a “weak” statement)
Consider
T2 0
20
A f 0 in Bu=g on
A B= , ,x x x x
weak statement (continued)Since u = cii(x,y) is an approximate function,
substitution into the above equation may not satisfy the equation. We set the equation equal to an error ()
We now introduce a set of weighting functions (test functions) Wi, and construct an inner product (Wi,) that is set to zero – this forces the error of the approximate differential equation to zero (average).
Au f
weak statement (continued)Hence,
Example:
The inner product becomes
i i j jd A c f d 0
2 2
2 2
u uf x, y
x y
2 2
i i i 2 2
u u, dxdy f x, y dxdy 0
x y
weak statement (continued)
Integrating by parts (Green-Gauss Theorem)
Problem: Use Galerkin’s Method to solve
i ii i
u u u udy dx f x, y dxdy 0
x y x x y y
2
2
d uf 0 0<x<L
dxu=0 x=0
du=0 x=L
dx
weak statement (continued)
The inner product is
or
The weak statement becomes
1
i i0, dx 0
2L 2
i 1 1 120
d uf dx 0 where u=c c x 2xL
dx
L LL 1 1 11 0 10 0
du d dcdx fdx 0
dx dx dx
weak statement (continued)Since
we obtain
This is the same as the Rayleigh-Ritz Method but no variational principle is required.
du0 at x=L
dx
1
2
fc
2f
u x 2xL2
Weighting Function Choices• Galerkin
• Least Squares
• Method of Moments
i i
i
W
, 0
i
, which is the square of the errorc
i
i
x , 0 i=0,1,2,
W any set of linearly independent functions
Weighting Function Choices (continued)
• Collocation
• Sub domain
i
i i
i x
W x x
x x , 0
i
1 for x in subinterval iW
0 for x outside i
Least Squares ExampleLet
For the previous example problem
2
i i i
, dxdy 2 dxdy 0c c c
21 1 1
1
2
12
u c c x 2xL
uc 2x 2L
x
u2c
x
i i
1
, 2 dx 0c c
2c f
Least Squares Example (continued)
Thus,
Some observations:(1) no integration by parts required – not a weak form(2) the Neumann boundary conditions do not appear naturally
(3) in this case i must satisfy global boundary conditions, which is difficult in most problems
L
10
1
2
2 2c f 2dx 0
fc
2f
u x 2xL2