Download presentation

Presentation is loading. Please wait.

Published byDraven Weatherley Modified over 2 years ago

1
Norms and spaces Definition: The space of all square integrable funcions defined in the domain is a finite number not infinity L2 norm of f Examplecompute

2
Definition: The function and its first derivatives are square integrable Example Def: Norms and spaces

3
Example Def: Norms and spaces Energy norm Example Compute the energy norm of the function

4
Norms and spaces Example Which of the following belongs to Definition:

5
Triangle inequality Norms and spaces Cauchy-Schwartz inequality (Real numbers) Triangle inequality Cauchy-Schwartz inequality

6
the space of all continuous piecewise linear polynomials the space of all continuous piecewise linear polynomials which vanishes on the boundary Definition: Norms and spaces Relations:

7
1 23 45 the length of the longest edge on K Mesh size h local mesh size Example: mesh size Example:

8
A Priori Error Estimates in what sense the error e becomes small

9
A Priori Error Estimates variational formulationfinite element method

10
Galerkin Orthogonality The finite element approximation u h, satisfies the orthogonality Theorem 1 (Galerkin Orthogonality). Proof: from the variational formulation we have: subtract variational formulation finite element method

11
Best Approximation The finite element approximation u h, satisfies Theorem 2 (Best Approximation). Proof: This shows that the finite element solution uh is the closest of all functions in Vh to the exact solution u when measuring distance using the energy norm.

12
Energy Norm Error The finite element approximation u h, satisfies the a priori error estimate Theorem 3 ( error depends on meshsize ). Proof: This shows that how the error depends on the mesh size. with a constant C independent of Start from the best approximation choosing v= πu the gradient of the error tends to zero as the maximum mesh size h tend to zero. Remark

13
Error Depends on h For any function Theorem (Poincare Inequality). These constants C’s are different Remark

14
L2 error is h2 we expect that the L2 error to be h2 and not h The finite element approximation u h, satisfies the a priori error estimate Theorem 4 (The L2-error) with a constant C independent of The proof uses a well-known technique called Nitsche’s trick, Dual problem or adjoint problemMain problem

15
Remark: Continuous Piecewise Linear Interpolation Definition: we define its continuous piecewise linear interpolant by Let approximates by taking on the same values in the nodes Ni.

16
L2 error is h2 The finite element approximation u h, satisfies the a priori error estimate Theorem 4 (The L2-error) with a constant C independent of Proof: let ϕ be the solution of the dual problem Multiplying by e and integrating using Green’s formula Cauchy-Schwartz inequality Dividing by ∥ e ∥

17
Error norms The finite element approximation u h, satisfies the a priori error estimate Theorem (L2 Norm) with a constant C independent of The finite element approximation u h, satisfies the a priori error estimate Theorem (Energy Norm) with a constant C independent of

18
Calcuate the L2 error

19
Exact solution

20
function [l2error] = compute_error(p, t, uh, u, u_x, u_y) % calculates the error nt = size(t, 2); % number of triangles np = size(p,2); t1 = t(1,:); t2 = t(2,:); t3 = t(3,:); x1 = p(1, t1); x2 = p(1, t2); x3 = p(1, t3); y1 = p(2, t1); y2 = p(2, t2); y3 = p(2, t3); xc = (x1 + x2 + x3)/3 ; % x-coord of element midpoints yc = (y1 + y2 + y3)/3 ; % y-coord of element midpoints exact = feval(u, xc, yc); % exact sol at the midpoints uhc = pdeintrp(p, t, uh); % FE sol at the midpoints l2error2 =0; for K = 1:nt loc2glob = t(1:3,K); x = p(1,loc2glob); y = p(2,loc2glob); area = polyarea(x,y); loc_er = (exact(loc2glob) - uhc(loc2glob)).^2; l2error2 = l2error2 + sum(loc_er)*area end l2error = sqrt(l2error2); [exact', uhc', abs(exact-uhc)'] function [p,e,t,uh] = solveE(hmax) % Poisson's equation on a square [-1,1]X[-1,1] is solved % and the resulting finite element solution is stored in % the vector uh. % g = 'squareg'; % domain b = 'squareb1'; % Dirichlet data f = '-2*((x.^2 - 1) + (y.^2 - 1))'; % right hand side [p, e, t] = initmesh(g,'Hmax',hmax); % triangulation uh = assempde(b, p, e, t, 1, 0, f); % solve pde u = inline('(x.^2 - 1).*(y.^2 - 1)', 'x', 'y'); % exact sol u_x = inline('2*x.*(y.^2 - 1)', 'x', 'y'); % u_x exact u_y = inline('2*y.*(x.^2 - 1)', 'x', 'y'); % u_y exact h1=0.2; [p1,e1,t1,uh1] = solveE(h1); [l2error1] = compute_error(p1, t1, uh1, u, u_x, u_y) h2=0.1; [p2,e2,t2,uh2] = solveE(h2); [l2error2] = compute_error(p2, t2, uh2, u, u_x, u_y) log(l2error1/l2error2)/log(h1/h2)

21
Calcuate the energy norm of the error function [energy_error] = energy_error(p, t, uh, u, u_x, u_y) a) Write matlab file to compute the energy norm of the error b) Write matlab file to compute the energy norm of the error for two different meshes with meshsizes h1 and h2 and verify the rate of convergence Exercise

Similar presentations

Presentation is loading. Please wait....

OK

Weak Formulation ( variational formulation)

Weak Formulation ( variational formulation)

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Slideshare ppt on cloud computing Ppt on self development skills Ppt on market friendly state name Ppt on idiopathic thrombocytopenia purpura signs Ppt on symbols of french revolution Ppt on fiscal policy in india 2010 Ppt on art and craft movement designs Download ppt on community planning for disaster management Ppt on population and economic development Ppt on cross docking meaning