Weak Form of Boundary Value Problems

Weak Form of Boundary Value Problems

Weak form of Boundary Value Problems Simulation Methods in Acoustics Note on finite dimensional description of functions I Approximation: N X f (x) ≈ f^(x) = qj φj (x) j=1 I Residual function: r(x) = f (x) − f^(x) I Collocation and Galerkin with test functions i (x) h i ; ri = 0 for all i = 1; 2 ::: N I Collocation: i (x) = δ(xi ) I Galerkin: i (x) = φi (x) I Other { φ choices are possible, but not used often in practice The boundary value problem I Given a BVP (PDE + BCs) Afu(x)g = f (x) x 2 Ω (1) [ Bi fu(x)g =g ¯i (x) x 2 Γi Γi = Γ (2) i I A and Bi are differential operators I Example (Poisson equation) @2u(x) − = 1 x 2 Ω = [0; 1] (3) @x2 u(x) = 0 x = 0 (Dirichlet) (4) @u(x) = −1 x = 1 (Neumann) (5) @x I In our example: 2 2 I A = −@ =@x , f (x) ≡ 1 I B1 = 1,g ¯1(x) ≡ 0 I B2 = @=@x,g ¯2 ≡ −1 Weak form construction I Construction steps: 1. Multiply PDE by a “sufficiently well behaved"1 function (x) 2. Integrate over the whole domain Ω 3. Integration by parts as much as possible (shift derivatives) 4. Apply BC 1. Multiply the PDE by the test function (x) (x)Afu(x)g = (x)f (x) 8x 2 Ω 2. If the equality holds, the integrals must be also equal Z Z (x)Afu(x)g dx = (x)f (x) dx 8 (x) Ω Ω I Statement: The solution of the weak form must also be the solution of the strong (original) form of the PDE I Proof: The weak form must hold for all (x). We can choose test functions that are nonzero only in Bδ(x0) for any x0 2 Ω. Thus, the original equation must hold for all x0 2 Ω. I Then, why it is a weak form? 1The definition well behaved depends on the type of PDE and BC Weak form example I. I Look at the Poisson equation example: @2u(x) − = f (x) x 2 Ω = [0; 1] ; f (x) ≡ 1 @x2 1. Multiply by the test function (x) @2u(x) − (x) = (x)f (x) @x2 2. The weak form is written as Z @2u(x) Z − (x) 2 dx = (x)f (x) dx Ω @x Ω 3. Apply integration by parts on the l.h.s. R x2 0 x2 R x2 0 I Recall that f g dx = [fg] − fg dx x1 x1 x1 I With f = @u=@x and g = (x) @u(x)1 Z 1 @ (x) @u(x) Z 1 − (x) + dx = (x)f (x) dx @x 0 0 @x @x 0 Weak form example II. 4. Apply boundary conditions I u(0) = 0 @u(x) I @x = −1 x=1 Z 1 Z 1 @u @ @u jx=1 + + dx = (x)1 dx @x x=0 0 @x @x 0 I Let's compare the strong and weak forms I Strong: 2nd derivative of u, Weak: 1st I Strong: f continuous on Ω, Weak: integrable (f integrable) I The weak form imposes less strict criteria on u and f ! But it requires some conditions for (x). I We can express these criteria using function space definitions: 2 0 I Strong: u 2 C (Ω), f 2 C (Ω) 1 −1 2 I Weak: u 2 C (Ω), f 2 C (Ω), u;@u=@x 2 L (Ω) Sobolev space definition I Square-integrable functions (in Lebesgue sense) Z 2 2 2 L (Ω) = f :Ω ! R kf k = f dx < 1 Ω p I Sobolev space ∼ the function and its derivatives are in L @f H1(Ω) = f 2 L2(Ω); 2 L2(Ω) @x I Note: derivatives are meant in a weak sense I g(x) is the weak derivative of u, i.e. g = @u=@x if and only if Z Z @ (x) 1 (x)g(x) dx = − u(x) dx 8 (x) 2 C0 (Ω) Ω Ω @x I The weak derivative is unique 1 I Note: C0 (Ω) means infinite times differentiable functions having a compact support on Ω Example: solve the weak form I Let's search the solution in the form: 2 I u(x) = Ax + Bx 2 I (x) = Ax^ + Bx^ I Find A, B such that the weak form is satisfied for all A^, B^ I Substitute: ((( 2 2 (( Ax^ + Bx^ + Ax^ + (Bx^ ((A(+ 2Bx + x=1 ((( x=0 Z 1 Z 1 A^ + 2Bx^ A + 2Bx dx = Ax^ + Bx^ 2 dx 0 0 I Rearrange (A and B on l.h.s.) Z 1 Z 1 1 A x 1 A^ B^ 1 2x dx = A^ B^ 2 dx − 0 2x B 0 x 1 I Evaluating the integrals 1 1 A −1=2 A^B^ = A^B^ 8 A^ B^ 1 4=3 B −2=3 I We obtain the solution: A = 0; B = −1=2, thus u(x) = −x2=2 How did we solve? 2 I By choosing the trial functions (u(x) = Ax + Bx ) the trial function space was discretized (x and x2 are its two elements). Thus, we arrived at a finite dimensional problem (number of dimensions is d = 2 in this example) 2 I By letting (x) = Ax^ + Bx^ we used the Galerkin method. I Note that we cannot apply the collocation method 2 ( i = δ(xi )) as @ =@x must be in L I By means of the discretization the BVP was reduced to an algebraic set of linear equations! Thus, in the end a system of linear equations was solved. I In this case, we \luckily" got the analytical solution, however, in general we only get an approximate solution Another solution I Let's solve with a different right hand side: @2u(x) 1 − = − u(0) = 0; u0(1) = 0 @x2 1 + x2 I All the same until we get Z 1 " −x # 1 1 A 1+x2 A^ B^ = A^ B^ 2 dx 8 A^ B^ 1 4=3 B −x 0 1+x2 I By \dropping" A^ B^ 1 1 A − log(2)=2 A −0:7425 = ! = 1 4=3 B π=4 − 1 B 0:3959 I The discretized weak form gives an approximate solution Visualization of the example I The approximation gets better if we increase the dimensionality of our function space, e.g. by adding higher order polynomials Order = 2 Order = 5 0 0 Weak solution u(x) -d2u(x)/dx2 -0.2 -0.2 f = -1/(x2 + 1) -0.4 -0.4 -0.6 u(x) u(x) -0.6 -0.8 Weak solution u(x) -0.8 -1 -d2u(x)/dx2 f = -1/(x2 + 1) -1 -1.2 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 x x Beam example I. I Solve the following BVP (static deflection of a clamped{free Euler{Bernoulli beam) EIu0000(x) = f (x) u(0) = 0 u0(0) = 0 (Dirichlet) u00(L) = 0 u000(L) = 0 (Neumann) I Construct the weak form Z L Z L EI (x)u0000(x) dx = (x)f (x) dx 0 0 I Integration by parts once . Z L ! Z L 000 L 0 000 EI [ u ]0 − u dx = f dx 0 0 I . and twice Z L ! Z L 000 L 0 00 L 00 00 EI [ u ]0 − [ u ]0 + u dx = f dx 0 0 Beam example II. I Choose the test and trial function spaces as iπ φ = = sin i = 1 ::: n i i 2L (i − n)π φ = = cos i = n + 1 ::: 2n = N i i 2L I Note: by letting i = φi we use the Galerkin method I The approximations using the above spaces reads as N X u(x) ≈ u^(x) = qj φj (x) = φ(x)q j=1 N X T T (x) ≈ ^(x) = wj φj (x) = w φ (x) j=1 I Note: φ is a row vector, q and w are column vectors Beam example III. I Notice that the expressions Z L 000L 0 00L 00 00 u 0 u 0 u dx 0 I Can all be written in a similar form 2 (α) (β) (α) (β)3 8 9 φ φ ··· φ φ q1 1 1 1 N <> => T 6 . .. 7 . w 4 . 5 . (α) (β) (α) (β) > > :qN ; φN φ1 ··· φN φN R L (α) (β) I Integration 0 dx or evaluation of φi φj (product of shape functions and their derivatives) at a fixed point is needed. Each term gives an N × N matrix in the square brackets. I On the r.h.s. we have a column vector in the brackets 2φ (x)f (x)3 Z L 1 T . T w 6 . 7 dx = w b 0 4 5 φN (x)f (x) Beam example IV. I Write the system in matrix notation: T T EI w (A1 + A2 + A3) q = w b Note that this is a scalar equation T I This must hold for all vectors w , which is only possible if EI Aq = b I Thus, we arrive at a system of linear algebraic equations Beam example V. I Satisfying the BCs I Contrary to the previous example, our trial (shape) functions 0 do not satisfy the Dirichlet BCs. (φi (0) 6= 0, φi (0) 6= 0) I Constraints must be imposed: 8 9 q1 > > φ (0) φ (0) ··· φ (0) <>q2 => 0 1 2 N = 0 0 0 . φ1(0) φ2(0) ··· φN (0) > . > 0 > > :qN ; I The same in matrix form: Acq = 0 I We already know some methods for constraints .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    17 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us