Høgskolen i Narvik Sivilingeniørutdanningen STE637 ELEMENTMETODER Oppgaver Klasse: 4.ID, 4.IT Ekstern Professor: Gregory A. Chechkin e-mail: chechkin@mech.math.msu.su Narvik 6
PART I Task. Consider two-point boundary value problem D): { u x) = x for < x < u) = ; u) =. a) Show that the solution u is also the solution of a variational problem V). Derive the integral identity. Multiplying the equation by the test-function v V, integrating over [, ], we obtain u x)vx) dx = x vx) dx, and finally integrating by parts and using the fact that v) = v) =, we deduce u x)v x) dx + u )v) u )v) = which is valid for any function v. The formulation is: Find u V such that u, v ) = x, v) v V, u x)v x) dx = x vx) dx, where f, g) = fx)gx) dx. b) Show that the solution u is also a solution of the minimization problem M). Find the functional and formulate the minimization problem.
The formulation is: Find u V such that Fu) Fv) for any v V, where Fv) = v, v ) x, v). The solution u of the variational problem V ) is also a solution of the problem M) since the variational formulation and the minimization formulation are equivalent see the problem below). c) Prove the equivalence of these formulations, i.e. M) V ) D). By the tasks a) and b) we proved that D) = V ), D) = M) Now let us check that V ) = M). Assume that u is a solution of V), let v V and set w = v u so that v = u + w and w V. We have Fv) = Fu + w) = u + w, u + w ) x, u + w) = = u, u ) x, u) + u, w ) x, w) + w, w ) = = Fu) + + w, w ) Fu), since u, w ) x, w) = and w, w ). Let us show that M) = V ). Assume that u is a solution of M), let v V and denote by gt) the function gt) = Fu + tv) = u, u ) + tu, v ) + t v, v ) x, u) tx, v). 3
The differentiable function gt) has a minimum at t = and hence g ) =. It is easy to see that and hence u is a solution of V). Summing up, we have shown that g ) = u, v ) x, v) D) = V ) M). Finally, if u is a smooth weak solution, then from the integral identity of V) integrating by parts in the back direction we can obtain the equation of D). Everything is proved. d) Show that a solution to V) is uniquely determined. Suppose that we have two solutions u and u, i.e. u, v ) = x, v) u, v ) = x, v), v V. Subtracting these equations and choosing v = u u V, we get From this formula we have or u u ) dx =. u u ) = u x) u x) = C = const x [, ]. But from the boundary conditions u ) = u ) = and hence C =. Thus we checked that u x) = u x) x [, ]. e) Show that u u h ) ) dx 4 u v) ) dx
for any v V h. Here V h = {v V : v is piecewise linear functions} and u h is the approximate solution of the respective variational problem V h ). Recall that u is a solution of D) respectively V) ) and u h is a solution of V h ) that is u h, v ) = x, v) v V h. Subtracting the integral identities for V) and V h ) we obtain u u h ), v ) = v V h. ) Let v V h be an arbitrary function and set w = u h v. Then w V h and using ) with v replaced by w, we get, using Cauchy-Schwarz-Bunyakovski s inequality Dividing by u u h ) ) dx = u u h ), u u h ) ) + u u h ), w ) = = u u h ), u u h + w) ) = u u h ), u v) ) u u h ) ) dx u v) ) dx u u h ) ) dx we obtain the statement. Task. Consider boundary value problem D): { u x) = x for < x < u) = ; u ) =. a) Show that the solution u is also the solution of a variational problem V). Derive the integral identity.,. 5
Multiplying the equation by the test-function v V, integrating over [, ], we obtain u x)vx) dx = x vx) dx, and finally integrating by parts and using the fact that v) = u ) =, we deduce u x)v x) dx + u )v) u )v) = u x)v x) dx = x vx) dx, which is valid for any function v. The formulation is: Find u V such that u, v ) = x, v) v V, where f, g) = fx)gx) dx. The solution u of the variational problem V ) is also a solution of the problem M) since the variational formulation and the minimization formulation are equivalent see the problem below). b) Show that the solution u is also the solution of a minimization problem M). Find the functional and formulate the minimization problem. The formulation is: Find u V such that Fu) Fv) for any v V, where Fv) = v, v ) x, v). c) Show that u u h ) ) dx u v) ) dx 6
for any v V h. Here V h = {v V : v is piecewise linear functions} and u h is the approximate solution of the respective variational problem V h ). Let v V h be an arbitrary function and set w = u h v. Then w V h and using ) with v replaced by w, we get, using Cauchy-Schwarz- Bunyakovski s inequality Dividing by u u h ) ) dx = u u h ), u u h ) ) + u u h ), w ) = = u u h ), u u h + w) ) = u u h ), u v) ) u u h ) ) dx u v) ) dx u u h ) ) dx we obtain the statement. Task 3. Definition. A sequence {u k }, u k V is called the minimization sequence for the functional F if for any ε > there exists a number K such that Fu k ) < Fu) + ε k > K, where u gives a minimum to the functional. Using the fact that and keeping in mind that ) ) a b a + b + = a + b Fu) = u, u ) f, u),,. 7
prove that for a minimization sequence we have an estimate u l u m < ε l, m > K. Let us calculate. Note that f, u l ) f, u m ) + f, u ) l + u m =. u l u m u = l u m, u l ) u m = 4 u l, u l) u l, u m) + 4 u m, u m) = = u l, u l ) + u m, u m ) 4 u l, u l ) 4 u m, u m ) u l, u m ) = = u l, u l) + u u m, u m) l + u m, u l + ) u m f, u l ) f, u m ) + f, u ) ) l + u m ul + u m = Fu l ) + Fu m ) F < < Fu) + ε + Fu) + ε Fu) = ε. Here we used the following: Fu l ) < Fu) + ε l > K; Fu m ) < Fu) + ε m > K; ) ul + u m F Fu) l, m because u gives a minimum. Task 4. Consider the boundary value problem { d 4 u dx 4 = B, for < x <, u) = u ) = u) = u ) =. 8
Determine the approximate solution in the case of two intervals, assuming that the space W h consists on piecewise cubic functions. Compare with the exact solution. Let us remind that there exists only two basis functions for the partition onto two subintervals in the space W h see figures) Figure : First basis function. Figure : Second basis function. It is possible to calculate them. They are cubic then they have the form on each subinterval. The first function ϕ x) = ax 3 + bx + cx + d { ax 3 + bx + cx + d on, ) αx 3 + βx + γx + δ on, ) 9
satisfies the conditions: ϕ ) =, ϕ ) =, ϕ ) =, ϕ ) =, ϕ ) =, ϕ ) =. After the calculations we find { 6x ϕ x) = 3 + x on, ) 6x 3 36x + 4x 4 on, ) The second function { ax ϕ x) = 3 + bx + cx + d on, ) αx 3 + βx + γx + δ on, ) satisfies the conditions: ϕ ) =, ϕ ) =, ϕ ) =, ϕ ) =, ϕ ) =, ϕ ) =. After the calculations we find { 4x ϕ x) = 3 x on, ) 4x 3 x + 8x on, ) Now we calculate the stiffness matrix ϕ A =, ϕ ) ϕ, ϕ ϕ, ϕ ) ϕ, ϕ ) ) ). ϕ, ϕ ) = 4 ϕ, ϕ ) = 6 ϕ, ϕ ) = 96 4x) dx + 4 6x ) dx + 6 4x 3) dx = 4 3 = 9, 4x)6x )dx + 96 6x 5) dx = 6, 4x 3)6x 5)dx =,
and the load vector b = B, ϕ ) B, ϕ ) ) B, ϕ ) = B B, ϕ ) = B 6x 3 + x )dx + B 4x 3 x )dx + B The corresponding linear system of equations has the form 9 6 A ξ = b ) ξ ξ 6x 3 36x + 4x 4)dx = B, 4x 3 x + 8x )dx =. ) = B and ξ = B 384, ξ =. Substituting these constants obtained coefficients) into the linear combination u h = ξ ϕ + ξ ϕ, we get, 4x 3 +, 3x on, u h B ),, 4x 3, 9x +, 6x, on, ), ) The exact solution u = Bx + c, u = B x + cx + c, u = B x3 6 + cx + c x + c,
u = B x4 4 + cx3 6 + c x + c x + c 3. From the boundary conditions we deduce c 3 = c =, c = B, c = B and finally ux) = 4 Bx4 Bx3 + 4 Bx. Task 5. Show that v P 3, ) is uniquely determined by the values v), v ), v), v ). To determine a cubic polynom, which has the form a 3 x 3 + a x + a x + a, in the unique way it is necessary to have four different conditions. Let us write the given conditions and check that they are different. We have a 3 3 + a + a + a = v) 3a 3 + a + a = v ) a 3 3 + a + a + a = v) 3a 3 + a + a = v ) They are different if det A, where A is a matrix of the system. The determinant of the matrix A is equal the the following: =. 3 Then there exists only one solution of the system and consequently the cubic polynom is determined uniquely.
Task 6. Consider the problem D) { u x) = x for < x < u) = ; u) =. And assume that V h is a finite-dimensional space of piecewise linear functions. Moreover the partition of the interval consists of M points. a) Formulate the problem V h ), which corresponds to problem D) in terms of stiffness matrix, load vector and coefficients of unknown function. The variational formulation in V h is V h ) Find u h V h : u h, v ) = x, v) v V h. It is easy to prove that instead of considering this identity for any v V h one can consider only M equations with basic functions u h, ϕ ) = x, ϕ ) u h, ϕ M ) = x, ϕ M ) Let us prove that from the system of equations the integral identity follows for any v V h. Suppose that the representation of v has the form: then v = η ϕ +... + η M ϕ M, u h, v ) = u h, η ϕ +... + η Mϕ M ) = η u h, ϕ ) +... + η Mu h, ϕ M ) = = η x, ϕ ) +... + η M x, ϕ M ) = x, η ϕ +... + η M ϕ M ) = x, v). And we complete the proof. Now let us consider the representation of an unknown function u h = ξ ϕ +... + ξ M ϕ M and substitute it in the system ). We get ξ ϕ +... + ξ Mϕ M, ϕ ) = x, ϕ ) ξ ϕ +... + ξ M ϕ M, ϕ M) = x, ϕ M ) 3 )
or ξ ϕ, ϕ ) +... + ξ M ϕ M, ϕ ) = x, ϕ ) ξ ϕ, ϕ M ) +... + ξ Mϕ M, ϕ M ) = x, ϕ M ). Finally the variational problem was reformulated in the form. Find unknown vector ξ, which satisfy the problem 3) Aξ = b, Here the stiffness matrix A is the matrix of system 3) and the load vector b is the vector of the right-hand-sides of system 3). b) Formulate the problem M h ), which corresponds to problem D) in terms of stiffness matrix, load vector and coefficients of unknown function. From the representation we have v = η ϕ +... + η M ϕ M, av, v) = aη ϕ +... + η M ϕ M, η ϕ +... + η M ϕ M ) = = η aϕ, ϕ )η + η aϕ, ϕ )η +... + η M aϕ M, ϕ M )η M = η Aη, Lv) = x, η ϕ +... + η M ϕ M ) = b η, where the dot denotes the usual scalar inner) product in IR M : ζ η = ζ η +... + ζ M η M. Minimization problem may be formulated as: Find unknown vector ξ IR M, such that [ ] ξ Aξ b ξ = min η IR M η Aη b η. 4
Task 7. Consider piecewise linear finite element space V h with basis elements {ϕ j x)}. Find the element stiffness matrix for the triangle K with vertices at, ),, ),, ). Without loss of generality let us denote by ϕ the function which is equal to in the point, ), by ϕ the function which is equal to in the point, ) and by ϕ 3 the function which is equal to in the point, ). The element stiffness matrix has the form where a K ϕ, ϕ ) a K ϕ, ϕ ) a K ϕ, ϕ 3 ) a K ϕ, ϕ ) a K ϕ, ϕ ) a K ϕ, ϕ 3 ) a K ϕ 3, ϕ ) a K ϕ 3, ϕ ) a K ϕ 3, ϕ 3 ) a K ϕ i, ϕ j ) = ϕ i ϕ j dx. K, Let us calculate the gradient of each basic functions. In fact they are ϕ = ), ϕ = Finally the element stiffness matrix is equal to ), ϕ 3 =. ). 5
PART II Task 8. Consider the convection diffusion problem { 5 u + u x + u x + u = x + x in ; u = on Γ. a) Derive the variational formulation V), which corresponds to this problem. By multiplying the equation by a test function v V = H ), integrating over and using the Green s formula for the Laplace term as usual, we get the following: v 5 u + u + u ) + u dx = x + x )v dx, x x then 5 u v + u + u ) ) + u v dx = x x x + x )v dx. Respectively, the variational formulation has the form Find u V such that au, v) = Lv) v V, where au, v) = 5 u v + Lv) = x + x )v dx. u + u ) ) + u v dx, x x b) Derive the minimization formulation M), which corresponds to this problem. 6
There is no associated minimization problems because the bilinear form is not symmetric. c) Verify V -ellipticity and continuity of the bilinear form and continuity of the linear form. Let us check V -ellipticity. By the Green s formula we have v v + v ) v dx = v n + n ) ds x x v v + v v ) x x From which we get the following: v + v ) vdx. 4) x x dx. Using 4) we rewrite the bilinear form as follows: av, v) = 5 v v + = v + v ) ) + v v dx = x x 5 v v + v ) dx v H ), i.e. α =. Now the continuity of the linear form. By the Cauchy-Schwarz-Bunyakovski s inequality we obtain Lv) = x + x )v dx x + x ) dx v dx and Λ = x + x ) L ). x + x ) L ) v H ) 7
Finally, the continuity of the bilinear form. By the Cauchy-Schwarz-Bunyakovski s inequality we get au, v) = 5 u v + u + u ) ) + u v x x dx ) u 5 u L ) v L ) + dx v x dx+ ) u + dx v x dx + u dx v dx 5 u H ) v H ) + u H ) v H )+ i.e. γ = 8. + u H ) v H ) + u H ) v H ) = 8 u H ) v H ), Task 9. Consider the convection diffusion problem { u + u x u x + u = sinx + x ) in ; u = on Γ. a) Derive the variational formulation V), which corresponds to this problem. By multiplying the equation by a test function v V = H ), integrating over and using the Green s formula for the Laplace term as usual, we get the following: v u + u u ) + u dx = sinx x x + x ) v dx, 8
then u v + u u ) ) + u v dx = x x sinx + x ) v dx. Respectively, the variational formulation has the form Find u V such that au, v) = Lv) v V, where au, v) = u v + u u ) ) + u v dx, x x Lv) = sinx + x ) v dx. b) Verify V -ellipticity and continuity of the bilinear form and continuity of the linear form. Let us check V -ellipticity. By the Green s formula we have v v v ) v dx = x x From which we obtain 4) and hence, i.e. α =. av, v) = v v + = v v v v ) x x v n + n ) ds dx. v v ) ) + v v dx = x x v v + v ) dx = v H ), 9
Now the continuity of the linear form. By the Cauchy-Schwarz-Bunyakovski s inequality we obtain Lv) = sinx + x ) v dx sin x + x ) dx v dx sinx + x ) L ) v H ) and Λ = sinx + x ) L ). Finally, the continuity of the bilinear form. By the Cauchy-Schwarz-Bunyakovski s inequality we get au, v) = u v + u u ) ) + u v x x dx ) u u L ) v L ) + dx v x dx+ ) u + dx v x dx + u dx v dx u H ) v H ) + u H ) v H )+ i.e. γ = 4. + u H ) v H ) + u H ) v H ) = 4 u H ) v H ), Task. Consider some rectangular finite elements. Let K be a rectangle with sides parallel to the coordinate axis in IR, for simplicity we consider K = [, ] [, ]. a) Find the number of element degrees of freedom for biquadratic functions Q K)).
A general form of the biquadratic function of two variables is vx) = a ij x i xj = i,j= = a +a x +a x +a x x +a x +a x +a x x +a x x +a x x. We have 9 unknown coefficients. Hence 9 element degrees of freedom. b) Prove that a function v Q K) is uniquely determined by the values at the vertices, midpoints of the sides and the value at the midpoint of the rectangle. Assume that we have two different functions v and v ) with the same given values in the nod-points, mid-points and in the center of the square. Consider the difference v = v v. It vanishes in all the 9 points of the square. Consider one side of the square I = {x IR : x =, x }. Quadratic function on this side is equal to a + a x + a x an it vanishes in three different points. Hence, it is identically equal to zero, i.e. a + a x + a x and we can factor out the function x, i.e. vx) = x w x, x ), where w is quadratic with respect to x and linear with respect to x. It is easy to calculate that w = a + a x + a x + a x x + a x + a x x. Consider the second side of the square I = {x IR : x =, x }. Quadratic function on the side vanishes in three points. Hence
it is identically equal to zero on this side. Hence we can factor out the function x, i.e. vx) = x x )w x, x ), where w is a bilinear function. Consider the third side of the square I = {x IR : x =, x }. Quadratic function on the side vanishes in three points. Hence it is identically equal to zero on this side. Hence we can factor out the function x, i.e. vx) = x x ) x )w 3 x, x ), where w 3 is a linear function with respect to x. Consider the last side of the square I = {x IR : x =, x }. Quadratic function on the side vanishes in three points. Hence it is identically equal to zero on this side. Hence we can factor out the function x, i.e. vx) = x x ) x )x w 4, where w 4 is a constant. Then, let us consider the value of v in the center of the square. From one hand v, =, ) from the other hand v, ) Hence w 4 = and v, i.e. v v. = w 4. c) Find one basis element if the vertices have the following coordinates:, ),, ),, ),, ), for instance, ψ x) = {, x =, x =, otherwise
This function is equal identically to zero on the sides I and I, hence we can factor out the function x x ), i.e. ψ x) = x x )a + a x + a x + a x x ). In the point, ) we have in the point, ) we have a + a =, a + a ) =, in the point, ) we have and in the point, ) we have a + a + a + a ) = 4 a + a + a + 4 a ) =. Solving this system of algebraic equations, we deduce a =, a =, a =, a = 4 or vx) = x x ) + x + x 4x x ). Task. Let πv P I) be the linear interpolant that agrees with v C I) at the end points of the segment, where I = [, h]. Prove that v πv L I) h max v L I). Denote the basis functions on the segment by ψ x) := h x h 3
and ψ x) := x h. A general function z P I) then has the following representation: hence, in particular zx) = z)ψ x) + zh)ψ x), x I, πvx) = v)ψ x) + vh)ψ x), x I, 5) since πv) = v), πvh) = vh). Using the Taylor expansion at x I: vy) = vx) + v x)y x) + Rx, y), where Rx, y) = v ξ)y x) is the remainder term of order and ξ I is a fixed point. In particular by taking y = and y = h, we get where v) = vx) + p) + Rx, ), vh) = vx) + ph) + Rx, h), 6) p) = v x)x, ph) = v x)h x). It is easy to see that x h and h x h, if x I. Hence, the estimate for the remainder term is Combining 5) and 6) we obtain Rx, ) h max v L I), Rx, h) h max v L I). πvx) = vx) ψ x) + ψ x)) + +p)ψ x) + ph)ψ x) + Rx, )ψ x) + Rx, h)ψ x), x I. 7) In the analysis we need the following Lemma: 4
Lemma For x I the following identities ψ x) + ψ x), 8) are valid. p)ψ x) + ph)ψ x) 9) By 7) and Lemma we get πvx) = vx) + Rx, )ψ x) + Rx, h)ψ x), x I and hence, vx) πvx) = Rx, )ψ x) Rx, h)ψ x). Keeping in mind 8) and the estimates for the remainder term, we deduce vx) πvx) Rx, ) ψ x) + Rx, h) ψ x) max { Rx, ), Rx, h )} ψ x) + ψ x)) h max v L I), x I, which leads to the estimate v πv L I) h max v L I). Proof of Lemma. To prove both statements we can use direct calculations: and ψ x) + ψ x) = x h + h x h h h = p)ψ x) + ph)ψ x) = v x)x ψ x) + v x)h x) ψ x) = = v x)x h x h + v x)h x) x h. 5