Weighted Residual Methods Introductory Course on Multiphysics Modelling TOMASZ G. ZIELIŃSKI bluebox.ippt.pan.pl/ tzielins/ Table of Contents Problem definition. oundary-value Problem.................. oundary conditions.................... Weighted Residual Method. General idea......................... Approximation........................ Error functions........................4 Minimization of errors................... 4.5 System of algebraic equations.............. 4.6 Categories of WRM.................... 5 ODE example 6. A simple VP approached by WRM........... 6. Numerical solution..................... 7. Another numerical solution................ 8 Problem definition. oundary-value Problem Let be a domain with the boundary, and: L(.) be a (second order) differential operator defined on functions u(x), x, f f(x) be a known source term in, n n(x) be the unit vector normal to the boundary.
Weighted Residual Methods ICMM lecture oundary-value Problem Find u u(x)? satisfying PDE L(u) f in () and subject to (at least one of) the following boundary conditions u û on, x n ˆγ on, x n + ˆα u ˆβ on, () where û û(x), ˆγ ˆγ(x), ˆα ˆα(x), and ˆβ ˆβ(x) are known fields prescribed on adequate parts of the boundary Remarks: the boundary parts are mutually disjoint, i.e.,,, and, for f the PDE is called homogeneous.. oundary conditions There are three kinds of boundary conditions:. the first kind or Dirichlet b.c.:. the second kind or Neumann b.c.:. the third kind or Robin b.c.: u û on, () x n ˆγ on, (4) x n + ˆα u ˆβ on, (5) also known as the generalized Neumann b.c., it can be presented as x n ˆγ + ˆα( û u ) on. (6) Indeed, this form is obtained for ˆβ ˆγ + ˆα û. Now, one can easily notice that the third kind is just a linear combination of the first two kinds. However, in this case the fields û and ˆγ are prescribed simultaneously on the same fragment of boundary, and their effect is controlled by another known boundary value, ˆα, which usually can be interpreted as an essential property of the surrounding medium. Finally, notice that the Dirichlet condition is obtained for the limit ˆα, while the Neumann condition for ˆα.
ICMM lecture Weighted Residual Methods Weighted Residual Method. General idea Weighted Residual Method (WRM) assumes that a solution can be approximated analytically or piecewise analytically. In general, a solution to a PDE can be expressed as a linear combination of a base set of functions where the coefficients are determined by a chosen method, and the method attempts to minimize the approximation error (for instance, finite differences try to minimize the error specifically at the chosen grid points). In fact, WRM represents a particular group of methods where an integral error is minimized in a certain way. Depending on this way the WRM can generate: the finite volume method, finite element methods, spectral methods, and also finite difference methods.. Approximation Assumption: the exact solution, u, can be approximated by a linear combination of N (linearly-independent) analytical functions, that is, u(x) ũ(x) N U s φ s (x) (7) s Here: ũ is an approximated solution, and U s are unknown coefficients, the so-called degrees of freedom, φ s φ s (x) form a base set of selected functions (often called as trial functions or shape functions). This set of functions generates the space of approximated solutions. s,... N where N is the number of degrees of freedom.. Error functions In general, an approximated solution, ũ, does not satisfy exactly the PDE and/or some (or all) boundary conditions. The generated errors can be described by the following error functions:
4 Weighted Residual Methods ICMM lecture. the PDE residuum R (ũ) L(ũ) f, (8). the Dirichlet condition residuum R (ũ) ũ û, (9). the Neumann condition residuum. the Robin condition residuum R (ũ) ũ n ˆγ, () x R (ũ) ũ x n + ˆαũ ˆβ. ().4 Minimization of errors Requirement: Minimize the errors in a weighted integral sense R (ũ) ψ r + R (ũ) ψ r + R (ũ) ψ r + R (ũ) ψ r. () Here, ψ r,,, and (r,... M) are sets of weight functions. Note that M weight functions yield M conditions (or equations) from which to determine the N coefficients U s. To determine these N coefficients uniquely we need N independent conditions (equations). Now, using the formulae for residua results in L(ũ) ψ ũ r + ũ ψ r + x n ψ r + f ψ r + û ψ r + ( ũ x n + ˆα ũ ) ˆγ ψ r + ˆβ ψ r. ().5 System of algebraic equations y applying the approximation (7) to Eq. (), and using the properties of linear operators, N N ũ L(ũ) U s L(φ s ), x n φ s U s x n, (4) s s
ICMM lecture Weighted Residual Methods 5 the following system of algebraic equations is obtained: N A rs U s r (5) where A rs r L(φ s ) ψ r + f ψ r + φ s û ψ r + s ψ r + ˆγ ψ r + φ s x n ψ r + ˆβ ( ) φs x n + ˆα φ s ψ r, (6) ψ r. (7).6 Categories of WRM Assume that the boundary conditions are met and approximated must be only the PDE in the domain. The error of this approximation is minimized by zeroing an integral of weighted residuum. There are four main categories of weight functions which generate the following categories of WRM: Subdomain method. Here the domain is divided in M subdomains r where x r, ψ r (x) (8) outside, such that this method minimizes the residual error in each of the chosen subdomains. Note that the choice of the subdomains is free. In many cases an equal division of the total domain is likely the best choice. However, if higher resolution (and a corresponding smaller error) in a particular area is desired, a non-uniform choice may be more appropriate. Collocation method. In this method the weight functions are chosen to be Dirac delta functions (x) δ(x x r ). (9) such that the error is zero at the chosen nodes x r. Least squares method. functions in the form This method uses derivatives of the residual itself as weight ψ r (x) R (ũ(x)). () U r The motivation for this choice is to minimize R of the computational domain. Note that (if the boundary conditions are satisfied) this choice of the weight function implies ( ) R () U r for all values of U r.
6 Weighted Residual Methods ICMM lecture Galerkin method. In this method the weight functions are chosen to be identical to the base functions. (x) φ r (x). () In particular, if the base function set is orthogonal (i.e., φ r φ s if r s), this choice of weight functions implies that the residual R is rendered orthogonal with the minimization condition R () for all base functions. ODE example. A simple VP approached by WRM oundary Value Problem (for an ODE) Find u u(x)? satisfying d u dx du dx in [a, b], (4) subject to boundary conditions on a b: u du xa û (Dirichlet), dx ˆγ (Neumann). (5) xb WRM approach: Residua for an approximated solution ũ R (ũ) d ũ dx dũ dx, R (ũ) ũ xa û, R (ũ) dũ dx ˆγ. (6) xb Minimization of weighted residual error ψ r (x), r,... N) b a (for weight functions ψ r (x), ψ r (x), and ( dũ dx dũ ) [ (ũ ) ] [( ) ] dũ ψ r + û + dx xa dx ˆγ ψ r. (7) xb System of algebraic equations(for the approximation ũ(x) N U s φ s (x)) s N A rs U s r (8) s
ICMM lecture Weighted Residual Methods 7 where b ( d φ s A rs dx dφ ) ] [ ] s dφs ψ r + [φ s + ψ r, (9) dx xa dx xb a ] ] r [û ψ r + [ˆγ ψ r. () xa xb. Numerical solution oundary limits and values: a, û, b, ˆγ. Shape functions (s, ): φs, e x. Weight functions (r, ):, x. System of equations: [ ] [ ] [ ] ( + e) U. e U u(x).5.5 φ (x) e x ũ(x) ex +e e (exact solution) ψ (x) ψ (x) ψ (x) φ (x) Coefficients: U e, U e. Approximated solution:.5 ψ (x) ψ (x) ψ (x) x a.5 b x ũ U + U e x ex + e e. One can check that this approximation is in fact the exact solution. Such result is obtained thanks to the choice of shape functions (the simple subspace generated by the shape functions happens to contain the exact solution).
8 Weighted Residual Methods ICMM lecture. Another numerical solution oundary limits and values: a, û, b, ˆγ. Shape and weight functions (s,, ): φs ψs ψs ψs, x, x. u(x) ( ũ(x) ) 7 5 + 4x + 4x u(x) ex +e e (exact solution) System of equations: 7 Coefficients: 6 U U U. U 5 7, U 7, U 7. Approximated solution:.5 φ (x) φ (x) x.5 φ (x) x x a.5 b ũ U + U x + U x 7( 5 + 4x + 4x ).