Variational formulation of the problem

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 TT by uu

u(M,t)t\displaystyle \frac{\partial u(M, t)}{\partial t} =a2Δu(M,t)\displaystyle = a^2 \cdot \Delta u(M, t) +f(M,t).\displaystyle + f(M, t).

We need to find a function u(M,t)u(M, t) 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

L[u]\displaystyle L[u] =f,\displaystyle = f,
(5.1)

where LL =t= \frac{\displaystyle \partial}{\displaystyle \partial t} a2Δ- a^2 \cdot \Delta is the linear operator of the differential equation, uu is the unknown function, ff 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 υ(M,t)\upsilon(M, t) at any moment of time tt the following equality holds

ML[u(M,t)]υ(M,t)dM\displaystyle \int_M L[u(M, t)] \cdot \upsilon(M, t) \,dM =Mf(M,t)υ(M,t)dM.\displaystyle = \int_M f(M, t) \cdot \upsilon(M, t) \,dM.
(5.2)

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 u(M,t)u(M, t) =i=1naiυi(M,t)= \sum_{i=1}^n a_i \cdot \upsilon_i(M, t), where aia_i are the coefficients to be found, and υi(M,t)\upsilon_i(M, t) 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

(L[u],υ)\displaystyle (L[u], \upsilon) =(f,υ).\displaystyle = (f, \upsilon).
(5.3)

It is known that the Euler equation is related to the functional as follows

I(υ)\displaystyle I(\upsilon) =(L[υ],υ)\displaystyle = (L[\upsilon], \upsilon) 2(f,υ).\displaystyle - 2 \cdot (f, \upsilon).
(5.4)

Minimizing this functional brings us back to the Euler equation, and the function υ\upsilon on which the minimum is attained is precisely the sought solution uu. Let us show this.

If on the function uu the functional attains its minimum, let us give it the increment uu +ϵυ+ \epsilon \cdot \upsilon, where ϵ\epsilon is a small number, and υ\upsilon is an arbitrary function, and carry out the transformations taking into account the obvious relation I(u)I(u) I(u+ϵυ)\leq I(u + \epsilon \cdot \upsilon)

I(u+ϵυ)\displaystyle I(u + \epsilon \cdot \upsilon) =(L[u+ϵυ],u+ϵυ)\displaystyle = (L[u + \epsilon \cdot \upsilon], u + \epsilon \cdot \upsilon) 2(f,u+ϵυ),\displaystyle - 2 \cdot (f, u + \epsilon \cdot \upsilon),
I(u+ϵυ)\displaystyle I(u + \epsilon \cdot \upsilon) =I(u)\displaystyle = I(u) +2ϵ[(L[u],υ)(f,υ)]\displaystyle + 2 \cdot \epsilon \cdot \left[ (L[u], \upsilon) - (f, \upsilon) \right] +ϵ2(L[υ],υ).\displaystyle + \epsilon^2 \cdot (L[\upsilon], \upsilon).

When expanding the brackets we used the self-adjointness of the operator: (L[υ],u)(L[\upsilon], u) =(L[u],υ)= (L[u], \upsilon). 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 ϵ\epsilon can be negative, for the minimum condition to hold it is necessary that the term linear in ϵ\epsilon 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 NN 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.