This chapter is the key one: here we lay the foundation of the finite element method. Having mastered it, you will be able to apply the same approach to equations of other types containing a linear operator.
We have considered the analytical approach to solving the heat conduction equation; however, for more complex geometries it quickly becomes cumbersome or altogether inapplicable, so now we proceed to our main topic — the numerical solution of the heat conduction equation. Let us write equation (1.8) for convenience, replacing by
We need to find a function satisfying the equation and the boundary conditions; we first homogenize the boundary conditions, as was done in the analytical part: the inhomogeneity goes into the heat source density function and the initial condition, and is added back to the solution at the end. The problem itself can be represented as the Euler equation
where is the linear operator of the differential equation, is the unknown function, is the load function. As I said above, our equation also fits this form, which means we can apply the well-known approach to solving the Euler equation. That approach is the Bubnov–Galerkin method: in the weak form it is required that for any trial function at any moment of time the following equality holds
Why is all this needed, and what are these trial functions? Above, when constructing the analytical solution, we saw how the solution is expanded into a Fourier series — the same thing happens here: if the functions are chosen orthogonal, the problem splits into several solutions independent of each other, which finally add up to the sought one. The freedom of choice is very large, so the functions can be taken as simple and convenient for computation as possible. One glance at the equation above makes it clear that the solution can be represented by the sum , where are the coefficients to be found, and are the basis functions; in the Bubnov–Galerkin method the trial functions are taken from the same family. The approach to the numerical solution is analogous to the analytical one and essentially also reduces to finding the coefficients of known basis functions. I would say more: there is no fundamental distinction between analytical and numerical methods — they are essentially the same thing.
Writing integrals is inconvenient, so let us write (5.2) in the form of a scalar product
It is known that the Euler equation is related to the functional as follows
Minimizing this functional brings us back to the Euler equation, and the function on which the minimum is attained is precisely the sought solution . Let us show this.
If on the function the functional attains its minimum, let us give it the increment , where is a small number, and is an arbitrary function, and carry out the transformations taking into account the obvious relation
When expanding the brackets we used the self-adjointness of the operator: . For the time derivative this is, strictly speaking, not the case — a careful treatment of this point is given in the appendix “The Bubnov–Galerkin functional”. Since can be negative, for the minimum condition to hold it is necessary that the term linear in vanish, that is, that (5.3) holds. Thus, to solve the Euler equation by the Bubnov–Galerkin method, one needs to minimize the functional (5.4).
Solving equations analytically showed us the approach of separation of variables, so let us try to apply that knowledge here. Logically, nonstationarity adds no complexity related to the geometry: geometry separately, time separately. Ideally, solving the nonstationary equation should reduce to successively solving stationary problems. In the appendix “The Bubnov–Galerkin functional” we obtained the functionals whose minimization yields the solution of the nonstationary (I.6) and the stationary (I.5) problems.