
<p>Numerical Integration => Quadrature.</p><p>1 1 d x d y J d d 1 1 </p><p>Gaussian Quadrature is based on -1< () < 1 domain. 1 Dimensional:</p><p>1 N G x d x x k w g h t k 1 k 1 { Exact polynomial of order (2NG - 1)} wghtk = 2 since if integrate a constant (1) over range [-1, 1] want solution of 2. An integral over [a, b] must be changed into an integral over [−1, 1] before applying the Gaussian quadrature rule. This change of interval can be done in the following way:</p><p>After applying the Gaussian quadrature rule, the following approximation is obtained:</p><p>ME 515 (Sullivan) Numerical Integration - Quadrature </p><p>1 In 2-D same idea:</p><p>1 1 1 x , y d x d y x k , y w g h t k d y 1 1 1 k </p><p> x k , y m w g h t k w g h t m m k </p><p>G a u s s I n t e g r a t i o n P o i n t s</p><p> o r</p><p>N W j i w i t h d x d y x x N, W, are functions of </p><p> 1 y y x J </p><p>N j C o n s t a n t a l o n g a n y l i n e </p><p>y N y k k in x, y space J> in space.</p><p>ME 515 (Sullivan) Numerical Integration - Quadrature </p><p>2 N W T h u s , j i c a n b e e x p r e s s e d a s : x x</p><p>1 y N y N 1 y W y W j j i i J J </p><p>x y y x w i t h J 4 4 N N N N o r | J | x y k m m k k m k 1 m 1</p><p> and each of these terms can be evaluated at the Gauss points such that the integration can be determined via: 2 2 w g h t w g h t k m k m k 1 m 1</p><p>Some low-order rules for solving the integration problem are listed below.</p><p>Number of Points, Weights, points, n xi wi</p><p>1 0 2</p><p>2 1</p><p>8 3 0 ⁄9</p><p>5 ⁄9</p><p>ME 515 (Sullivan) Numerical Integration - Quadrature </p><p>3 Consider the following PDE:</p><p>U V U f U g</p><p>The Galerkin finite element formulation of this is:</p><p>抖N N 抖 N N 轾 j抖Wi j W i j j 犏< -K( + ) > + < ( Vx + V y ) W i >+ < fN j W i > { U j } 臌 抖x x 抖 y y 抖 x y</p><p>{<gWi >} - K Ugn W i dS S K, Vx, Vy, f, and g are known values that may vary with (x, y).</p><p>A skeleton program outline for the solution of this problem is:</p><p>Main Program Dimension N(4), dNx(4), dNy(4), xl(4), yl(4) Call Element Subroutine (Apply Boundary Conditions ) Call banded matrix solver End</p><p>Element Subroutine for L = 1 : NE ! Loop over each element for k = 1 : 4 ! Assign 4 local node XL(k) = X(in(k,L)) ! coordinates YL(k) = Y(in(k,L)) end (k loop) Gauss point loops : For GPx = 1 : 2 ! quadrature in one direction Wx = Weight (GPx) xi = GValue (GPx) For GPy = 1 : 2 ! quadrature in the other direction Wy = Weight (GPy) eta = GValue (GPy) [N, dNx, dNy, DJ] = GP2DLF ( XL, YL, xi, eta)</p><p>ME 515 (Sullivan) Numerical Integration - Quadrature </p><p>4 ! assemble coefficients at the current Gauss Point</p><p> for k = 1 : 4 KM => K(in(k,L)) * N(k) VXM => VX(in(k,L)) * N(k) VYM => VY(in(k,L) * N(k) ! etc. End (k Loop) ! Now evaluate each local node I, J contribution within the element L at the ! Gauss Point (GPx, GPy) for i = 1 : 4 IRow = in(i,L) for j = 1 : 4 JCol = NDiag + (in(j,L) - IRow) Band (IRow,JCol) = Band (IRow,JCol) + DJ * Wx * Wy { - KM * [ dNx(j) dNx(i) + dNy(j) * dNy(i)] + [ VXM * dNx(j)+VYM * dNy(j)] * N(i) + FM * N(j) * N(i) } end (j Loop) Rhs(IRow) = RHS(IRow) +DJ * Wx * Wy * (GM * N(i)) end (i Loop) end (L Element Loop) % Apply BC’s % Call Solver End of code</p><p>ME 515 (Sullivan) Numerical Integration - Quadrature </p><p>5</p><p>ME 515 (Sullivan) Numerical Integration - Quadrature </p><p>6</p>
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages6 Page
-
File Size-