sci.math.num-analysis SUNA41, 1-D introduction to FEM =============================== A good, readable book to start with is: Norrie D.H. & de Vries G.; "An Introduction to Finite Element Analysis"; Acad. Press 1978. However, only the first few chapters of it are truly usefull, IMHO. The following example could easily be worked out in a FEM class. Consider the equation: dQ/dx = 0 where Q = C(x).dT/dx It describes for example heat conduction in a rod: x = coordinate , Q = heat flow , T = temperature , C = conductivity . Some understanding of variational principles is required in the first place, because the standard approach to Finite Elements is always via such principles. For the problem at hand: / | C(x).(dT/dx)^2.dx = minimum ; integral is taken over the whole 1-D grid / *---*---*---*---*---*---*---*---*---*---* 1 2 3 4 5 6 7 8 ... Next split it in pieces over linear elements, with shape functions (h, 1-h), where x = (1-h).x1 + h.x2 . 1*---*2 A little algebra gives: h = (x-x1)/(x2-x1) The same for temperatures: T = (1-h).T1 + h.T2 and C(h) = (1-h).C1 + h.C2 This simplifies calculation of the integrals: /1 | C(h).(dT/dh.dh/dx)^2.(x2-x1).dh = (C1+C2)/2 . {(T2-T1)/(x2-x1)}^2.(x2-x1) 0/ _______constant________ Here we neglected the boundary conditions. The _SUM over_ all these algebraic expressions for all elements must reach a minimum, as a function of T1 and T2. Differentiate (partial) to the latter, everywhere on the grid: d/dT1 -> + (C1+C2)/(x2-x1) . T1 - (C1+C2)/(x2-x1) . T2 d/dT2 -> + (C1+C2)/(x2-x1) . T2 - (C1+C2)/(x2-x1) . T1 Rearranging: | +1 -1 || T1 | SUM (C1+C2)/(x2-x1) . | || | = 0 (: matrix!) elements | -1 +1 || T2 | 1 2 3 : global Assemble TWO of these for neighbouring elements; *-A-*-B-* don't forget to change local into global numbers: 1 2+1 2 : local - (C1+C2)/(x2-x1).T1 + {(C1+C2)/(x2-x1)+(C2+C3)/(x3-x2)}.T2 - (C2+C3)/(x3-x2).T3 A A B B For a point off the boundary, this expression must be zero: an "F.D." scheme. If specialized for (x2-x1) = (x3-x2) = 1 , then: ^^^^ - (C1 + C2).T1 + (C1 + 2.C2 + C3).T2 - (C2 + C3).T3 = 0 Which EXACTLY matches the (equivalent) Finite Volume scheme for this problem. Which is NO coincidence at all ... - * Han de Bruijn; Applications&Graphics | "A little bit of Physics * No * TUD Computing Centre; P.O. Box 354 | would be NO idleness in * Oil * 2600 AJ Delft; The Netherlands. | Mathematics" (HdB). * for * E-mail: Han.deBruijn@RC.TUDelft.NL --| Fax: +31 15 78 37 87 ----* Blood