Nonlinear finite elements/Weighted residual methods

From testwiki
Revision as of 16:18, 5 March 2022 by imported>Dave Braunschweig (Remove math tags from headings)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Weak Formulation : Weighted Average Methods

Weighted average methods are also often called "Rayleigh-Ritz Methods". The idea is to satisfy the differential equation in an average sense by converting it into an integral equation. The differential equation is multiplied by a weighting function and then averaged over the domain.

If v(t) is a weighting function then the weak form of Equation (1) is

(5)01(dudt+u)v(t)dt=0;u(0)=1.

The weighting function v(t) can be any function of the independent variables that is sufficiently well-behaved that the integrals make sense.

Recall that we are looking for an approximate solution. Let us call this approximate solution uh. If we plug the approximate solution into equation (5) we get

(6)01(ddt(uh)+uh)v(t)dt=01R(t)v(t)dt=0;uh(0)=1.

Since the solution is approximate, the original differential equation will not be satisfied exactly and we will be left with a residual R(t). Weighted average methods try to minimize the residual in a weighted average sense.

Finite element methods are a special type of weighted average method.

Examples of Weighted Average Methods

Let us assume the trial solution for problem (6) to be

uh(t)=a0+a1t+a2t2++antn.

After applying the initial condition we get a0=1, and the trial solution becomes

uh(t)=1+a1t+a2t2++antn.

Let us simplify the trial solution further and consider only the first three terms, i.e.,

(7)uh(t)=1+a1t+a2t2.

Plug in the trial solution (7) into (6). Then, the residual is

(8)R(t)=1+a1(1+t)+a2(2t+t2).

If R(t)=0, then the trial solution is equal to the exact solution. If R(t)0, we can try to make the residual as close to zero as possible. This can be done by choosing a1 and a2 such that R(t) is a minimum.

Minimizing R(t): Collocation Method

In the collocation method, we minimize the residual by making it vanish at n points t1,t2,,tn within the domain.

For our problem, the domain of interest is 0t1. Let us pick two points in this domain t1 and t2 such that 0t1<t21 (see Figure 1). In this example we choose t1=1/3 and t2=2/3.

File:FEcoll.jpg
Figure 1. Discretized domain for Problem 1.

The values of the residual (8) at t1 and t2 are

R(t1)=1+43a1+79a2;R(t2)=1+53a1+169a2.

If we now impose the condition that the residual vanishes at these two points and solve the resulting equations, we get a1=27/29 and a2=9/29. Therefore the approximate solution is

uh(t)=12729t+929t2.

Figure 2 shows a comparison of this solution with the exact solution.

You can see that the collocation method gives a solution that is close to the exact up to t=1. However, the same results cannot be used up to t=2 without re-evaluating the integrals.

If you think in terms of equation (6) you can see that a weighting function v(t) was used to get to the solution. In fact, it is the choice of weighting function that determines whether a method is a collocation method! The weighting function in this case is

v(t)=δ(ttj)

where tj is a node and δ is the Dirac delta function.

Minimizing R(t): Subdomain Method

The subdomain method is another way of minimizing the residuals. In this case, instead of letting the residual vanish at unique points, we let the "average" of the residual vanish over each domain. That is, we let,

1ΔtiΔtiR(t)dt=0

where Δti is the subdomain over which averaging is done. From this definition it is clear that the weighting function for the subdomain method is

v(t)={1iftΔti,0otherwise.

Let us apply the subdomain method to Problem 1. We discretize the domain by choosing one point between 0 and 1 at t=1/2. For the two subdomains (elements) we have,

1Δt1012R(t)dt=1+54a1+712a2;and1Δt2121R(t)dt=1+74a1+2512a2.

Setting these residuals to zero and solving for a1 and a2 we get a1=18/19 and a2=6/19. Therefore the approximate solution is

uh(t)=11819t+619t2.

Figure 2 shows a comparison of the exact solution and the subdomain and the collocation solutions.

File:CollSubExact.jpg
Figure 2. Subdomain solution versus exact solution for Problem 1.

Minimizing R(t): Galerkin Method

In this case, instead of writing our trial function as,

uh(t)=1+a1t+a2t2++antn

we write it as

uh(t)=N0(t)+i=1naiNi(t)

where N0,N1,,Nn are (n+1) linearly independent functions of t. These are called basis functions, interpolation functions, or shape functions. The first term N0 is left outside the sum because it is associated with part or all of the initial or boundary conditions (i.e., we put everything that can be fixed by initial or boundary conditions into N0).

Then the trial function in equation (7) can be rewritten using basis functions as

uh(t)=N0(t)+a1N1(t)+a2N2(t)

where

(12)N0(t)=1,N1(t)=t,andN2(t)=t2.
Important:

In the Galerkin method we choose the basis functions Ni(i=1n) as the weighting functions.

If we use Ni(t) as the weighting functions v(t), equation (6) becomes

(13)01(duhdt+uh)Ni(t)=001R(t)Ni(t)=0,i=1,2.

Plugging in the value of R(t) from equation (8) into equation (13) and using the basis functions from (12) we get

01[1+a1(1+t)+a2(2t+t2)]tdt=0and01[1+a1(1+t)+a2(2t+t2)]t2dt=0.

After integrating and solving for a1 and a2 we get a1=32/35 and a2=2/7. Therefore, the Galerkin approximation we seek is

uh(t)=13235t+27t2.

Figure 3 shows a comparison of the exact solution with the Galerkin, subdomain, and collocation solutions.

File:AllWResExact.jpg
Figure 3. Galerkin solution versus exact solution for Problem 1.

All the approximate solutions diverge from the exact solution beyond t=1. The solution to this problem is to break up the domain into elements so that the trial solution is a good approximation to the exact solution in each element.

Minimizing R(t): Least Squares Method

In the least-squares method, we try to minimize the residual in a least-squares sense, that is

(15)01R(t)2aidt=012R(t)R(t)aidt=001R(t)R(t)aidt=0

where ai=(a1,a2). The weighting function for the least squares method is therefore

v(t)=R(t)ai.

Plugging in the value of R(t) from equation (8) into equation (15) and using the basis functions from (12) we get

01[1+a1(1+t)+a2(2t+t2)](1+t)dt=0and01[1+a1(1+t)+a2(2t+t2)](2t+t2)dt=0.

After integrating and solving for a1 and a2 we get a1=576/611 and a2=190/611. Therefore, the least squares approximation we seek is

uh(t)=1576611t+190611t2.

Figure 4 shows a comparison of the exact solution with the Galerkin, subdomain, and collocation solutions.

File:PlotWRSols.png
Figure 4. Least squares solution versus other solutions for Problem 1.

Template:Subpage navbar