The description of the solver for heat transfer problem. First we read the input data, which come both from user and mesher. Then make their pre-processing in some way to get acceptable data structure and perform the computation. Then we forward the results to post-processor.
Initial data - the physical parameters of soil, different parameters of the environment (some of them are not involved directly in the problem), mesh parameters coming from mesher.
On the left side you can see heat transfer problem statement with boundaries Г1, Г2, Г3, heat equation and the boundary conditions of the first order for this equation, boundary conditions in case of an exchange with the environment (convective heat transfer) and boundary conditions in case of radiation. Then data coming to solver input are processed. What does it mean? Some stability criteria are defined, i.e. limitation of time step, limitation of volume step, because otherwise we can just compute everything, spend a lot of time and get a solution inappropriate at all. I would also like to point to another important moment. Due to the fact that some data, in particular, physical parameters input the solver in the form of table functions in order to get data for the computation it is necessary to interpolate them at the correct time points. It is also made during pre-processing. Also there can be nodes reindexation and geometrical information processing.
So, we have got some data structure, computed and processed everything. Now we want to get a solution. For this we do discrete problem formulation, compute all the integrals and obtain the equation in the form of matrix multiplied by a vector of the unknown, minus matrix from previous time step multiplied by a known vector and equals to the right side of the equation. In general, we get a system of linear equations. Here on this slide you can see formulas, which are used to compute matrices in this formulation of the problem. Matrices on the left are computed over the whole element because matrices on the right side correspond to the boundary conditions, they are computed only on edges.
The main feature of this system of equations is that it has no more than 27N non-zero elements. It means that there is it not necessary to store the whole matrix. It can be stored in a sparse matrix form. One of the easiest ways is to store the rows indices that contain non-zero elements, columns indices, and the elements themselves. This matrix doesn't necessarily have diagonal dominance -- it's when the magnitude of elements on the main diagonal is larger than the sum of magnitudes of all other elements in the row, and because of this we can't use some methods for SLAE solving. Also, if we know how the mesh numbering is organized we can find coordinates of nonzero matrix elements over constant time just by substituting indices in the formula. Many matrices, which can be obtained by elements and are further assembled, can be computed on pre-processing step. As we know basis functions it's possible to compute them once, without computing at every iteration.
Has it computed correctly? Again we ask this question when we have already received system solution. Again, the following problems are possible. In the finite element method it is enough difficult to guarantee stability by boundary data, just try to check the maximum principle for complex system. So if our solution contains oscillations and it's not precise enough, we refine mesh and resolve again or sometimes it is possible to get a more precise solution by reducing time step.
Here is an example of a well-computed problem. We see that there are no oscillations and due to good meshing we can see cooling devices in the ground. Here you can see isolines of this solution. Here is our site in cross-section.
There are also several methods of finite element method application. You can use either explicit or implicit scheme, i.e. if we return to discrete formulation of the problem, we can see that we have a parameter T (theta), which can be varied, and depending on its value we can obtain an explicit or implicit scheme. In case of implicit scheme, we need to solve a system of linear equations. In case of explicit scheme we have just the solution for the next time step by iterating and multiplying matrix on vector.
For those who will deal with the finite element method, I would say that a big trouble is to determine - which method to choose, because the implicit scheme can solve with much bigger time steps, but we need to solve the system of linear algebraic equations, i.e. to choose an effective method for solving SLAE, while the explicit scheme can save time in finding recurrent solution, but it is necessary to reduce time step to provide stability. That's all, I hope, that mathematics has been perceived well.