ENDEPL

FEM accuracy and mesh convergence

Fedorov S. V., Candidate of Technical Sciences, Omsk

FEM in plain words. Imagine a wall cut into cubes. In each cube the program calculates one temperature, and neighboring cubes pass heat to each other, like neighbors along a radiator. The smaller the cubes, the more accurate the picture, but the longer the calculation. This is the finite element method (FEM). Below, a numerical experiment shows how to tell that the cubes are already small enough. How Temper-3D checks this now: the “Result” help page.

In short#

  • When the mesh is refined, the solution converges monotonically to the exact one. In the example below, the temperature of the inner corner changes from 11.9099 °C on a 5*5 mesh to 11.3281 °C on a 640*640 mesh (Table 2).
  • Element size alone is not a criterion: a three-layer structure needs only three elements, while a corner needs thousands.
  • The criterion: the temperature distortion in an element and the change of the result when the mesh is refined. In Table 2, a distortion of 0.82 °C corresponds to an absolute temperature error of 0.031 °C, and a distortion of 0.35 °C to 0.010 °C.
  • Check the balance of incoming and outgoing flows: up to 1 % is acceptable; in the example it does not exceed 0.0424 % (Table 2, column 7).
More: how Temper-3D checks this now

In the current version (in the browser), below the result card there are the lines “Balance” (the heat balance residual, %) and “ISO 10211 criterion”: the program also calculates the flow on a coarser mesh, and if it hardly changed, the mesh is dense enough. By EN ISO 10211, the flow must change by no more than 1 %. More details: the “Result” help page, the tutorial, the results of checking the program on the tests of the standard: the validation report and the 2017 article.

Recently the finite element method (FEM) has become very popular for calculating temperature fields of building envelopes. There are many software packages (Russian and foreign) that solve this problem both in two and in three dimensions. FEM implementations use different finite elements. In a plane model these are usually triangles and quadrilaterals, and in a volumetric model they are tetrahedra and parallelepipeds, not necessarily rectangular (isoparametric), see Table 1. Sometimes higher-order elements (cubic) are used, and special so-called singular elements can be used as well, for example in fracture mechanics. Table 1 also does not include one-dimensional elements, bars and others.

The user may choose which types of elements to use, of course taking into account whether a plane or a volumetric problem is being solved. However, the law of the shape function distribution gives no particular advantages *.

Table 1. Types of finite elements

No.Element typeNumber of nodesTemperature distribution law (shape function)Figure no.
Plane
1Triangle3linear1
2Triangle6quadratic2
3Rectangle4linear3
4Isoparametric4linear4
5Rectangle8quadratic5
6Isoparametric8quadratic6
Volumetric
7Tetrahedron4linear7
8Tetrahedron10quadratic8
9Parallelepiped8linear9
10Isoparametric8linear10
11Parallelepiped20quadratic11
12Isoparametric20quadratic12

* Author’s note.

In the numerical experiment, no type of element turned out to be superior to the others. For example, using a larger number of linear elements does not increase the calculation time needed to reach a preset accuracy, compared with quadratic ones. As for triangular or quadrilateral elements, for a complex shape use triangles (tetrahedra), and for simple bodies use quadrilaterals (parallelepipeds).

It has been proved [3] that when the FE mesh is refined, the solution converges monotonically to the exact one (the finer you cut, the higher the accuracy). However, where is the limit of refinement? And how do we know that a calculation with a given degree of discretization can be considered acceptable? That is, an estimate is needed at the discretization stage.

This work analyzes the effect of the degree of FE discretization on calculation accuracy. A three-dimensional eight-node FE is used as the example, but the analysis can be extended to other types of elements.

It is known that sometimes only a few FEs are needed to obtain an “exact” solution (just 3 elements are enough to calculate a three-layer envelope), while a homogeneous “corner” structure needs several thousand FEs.

The user sometimes (and, as a rule, always) refines the FE mesh where it is not needed at all and, conversely, uses a coarse division where the FE mesh should be refined. The results of the calculations are then distorted: in the example below, on the coarsest mesh (Table 2, row 1) the corner temperature differs from the exact one by 0.58 °C, which is 3-6 times more than the tolerance of 0.1-0.2 °C.

In the FEM calculation, several notions of accuracy are introduced:

  1. Accuracy in choosing (idealizing) the calculation domain.

  2. Accuracy in solving the system of linear equations.

  3. Accuracy of the balance of incoming and outgoing flows.

  4. Accuracy of the results obtained for the given calculation scheme.

The correctness of the choice of the calculation domain is a separate, very important question, which is not considered in this work.

The accuracy of solving the system of linear equations, as a rule, does not greatly affect the final accuracy, but keep in mind that if this accuracy is set too high, the calculation time grows significantly (with iterative methods of solving the system). It is recommended to use an accuracy of 1.0E-05 to 1.0E-06 of the overall size of the calculation domain for this parameter [1].

When estimating the accuracy of the incoming and outgoing flows, a value up to 1 % is acceptable [2]; in the 2010 desktop version of “Temper-3D” the permissible accuracy was 0.01 %, and beyond that a warning was shown [2]. In the current version the balance residual is shown in the result card, the “Balance” line (help). The warning can be ignored, but if the error is more than 1 %, the correctness of the calculation is in doubt. Keep in mind that unjustified refinement of the FE mesh increases the error of this parameter. See Table 2 and Fig. 16; still, it is desirable that the error does not exceed 0.1 %.

As for the accuracy of the results obtained, this question is not covered in the literature, and not even a parameter by which this error should be estimated is given. Estimating the error in % (relative error) is not correct, because if, for example, the “exact solution” is 0.01 °C and the calculation gave 0.03 °C, the error is 300 %, while the absolute error is only 0.02 °C.

Therefore this work considers not the relative but the absolute error, which is quite reasonable. The acceptable range of this parameter is 0.1 °C to 0.2 °C. Demanding higher accuracy is not quite justified, since the other parameters (dimensions, indoor air temperature, thermal conductivity and others) cannot be given with sufficient accuracy. In reality, even an error of 0.2 °C is quite acceptable.

A numerical experiment was carried out to estimate the effect of the degree of discretization on the accuracy of the calculation of the calculation domain (not to be confused with real accuracy, since real accuracy depends on many other parameters, such as the correct choice of the calculation domain, the choice of element type and others).

In this work the calculations were made with the program “Temper-3D”. A three-dimensional eight-node finite element is used.

The calculations were made (for simplicity) in a plane formulation, but they were later applied to a volumetric model without any changes; a homogeneous structure was also used.

It should be noted right away that a parameter such as FE size cannot serve as an objective estimate (a statement like “the FE size must not exceed 20 mm” cannot be objective, because, for example, calculating a single-layer or three-layer envelope takes just one (three) FEs, regardless of the size of the envelope).

A criterion (estimate) must be chosen that would guarantee the accuracy of the calculations.

Fig. 13. Calculation domain

Fig. 13. Calculation domain

Fig. 13 shows the calculation domain.

The thermal conductivity was taken as , the indoor temperature 20 °C, the outdoor temperature -37, and the surface heat transfer coefficients 8.7 and 23 respectively.

The parameters studied were the temperature of the inner corner and Ro.

The calculations were made at different degrees of discretization: a uniform mesh was used (rows 1-8), as well as a non-uniform FE mesh (row 9).

Table 2. Calculation results at different degrees of discretization

No.N*NNzL, mmTminRoRo error, %Q errorDt, °CTmax error, °C
123456789
15*531212811.90992.63560.24220.00003%7.7500.582
210*101 1226411.57562.63930.10220.00005%3.7000.247
320*204 2423211.42032.64050.05680.00079%1.7800.092
440*4016 4821611.35892.6410.03790.00505%0.8200.031
580*8064 962811.3382.64110.03410.00364%0.3500.010
6160*160257 922411.33172.64120.03030.00763%0.1600.004
7320*3201 027 842211.32942.64150.01890.01935%0.0690.001
8640*6404 103 682111.32812.6420.00000.04240%0.0290.000
912*12858n/a11.372.64050.05680.00020%0.7500.042

As Table 2 and Fig. 14 show, the solution converges monotonically, even at more than 4 million nodes, which confirms that the calculations are correct.

Where:

1- N*N is the number of elements in the 640*640 mm domain

2- Nz is the number of nodes of the FE mesh

3- L is the FE size in mm

4- Tmin is the temperature of the inner corner

5- Ro of the structure, calculated for the outer surface of the envelope

6- Error in calculating Ro, % (calculation no. 8 is taken as the exact solution)

7- Error of the incoming and outgoing flows, %

8- DT is the maximum temperature distortion in an FE (), °C. That is, how much the arithmetic mean of the diagonally located nodes differs (is distorted) from the other pair of diagonally located nodes (a four-node element; in the case of a volumetric FE, each face is considered)

9- Tmax is the absolute error, °C

Fig. 14. Dependence of the temperature Tmin on the calculation number

Fig. 14. Dependence of the temperature Tmin on the calculation number

Fig. 15. Dependence of Ro on the calculation number

Fig. 15. Dependence of Ro on the calculation number

Fig. 16. Dependence of the heat flow imbalance on the calculation number

Fig. 16. Dependence of the heat flow imbalance on the calculation number

Analyzing the results of the calculations, we can conclude that to obtain the required calculation accuracy (below 1 %, with the accuracy of the temperature calculation below 0.1 °C, which is quite acceptable), the discretization must use a uniform step of no more than 32 mm; the error of the Ro calculation is then below 0.05 %, and 4242 FEs must be used. With a non-uniform FE mesh, only 858 FE mesh nodes are needed to obtain no lower accuracy.

At higher accuracy the gain is even greater. Note how non-uniform the FE mesh is (the ratio of the largest element to the smallest is about 40).

When calculating in “TEMPER-3D”, set the maximum temperature distortion in an FE; after that, the FEs on the screen where the difference is large are highlighted in black. Fig. 17 shows the temperature field with the FEs whose distortion is more than 0.1 °C, calculation no. 3. Fig. 18 shows the temperature field with the FEs marked whose temperature distortion is more than 0.2 °C.

Fig. 17. Temperature field with the FEs shown

Fig. 17. Temperature field with the FEs whose distortion is more than 0.1 °C, calculation no. 3

Fig. 18. Temperature field with the FEs marked whose temperature distortion is more than 0.2 °C

Fig. 18. Temperature field with the FEs marked whose temperature distortion is more than 0.2 °C

Conclusions:#

  1. When calculating the temperature field of an envelope, pay special attention not only to how closely the idealized structure approximates the real object (which is very important), but also to the rational way of discretizing the structure into FEs. The ratio of the size to the minimum FE size can be 20-100 or more, which saves a substantial number of FEs even in a plane model, let alone a three-dimensional one. The “saved” FEs can later be used for more detailed discretization. The saving can amount to several thousand %. The statement that accuracy is determined by FE size is not correct.

  2. To confirm that the calculations are correct, make sure that the maximum temperature distortion in any element does not exceed a preset value (1-0.1 °C); the absolute temperature error is then small: in Table 2, a distortion of 0.82 °C or less (rows 4-8) corresponds to an error of no more than 0.031 °C, and a distortion of 1.78 °C (row 3) to 0.092 °C. The distortion here is column 8 (Dt) of Table 2. This method has been used successfully for many years in calculations of three-dimensional envelopes.

References:#

1. On the choice of the time step in solving non-stationary heat conduction problems by the finite element method. (Article). Deposited at VINITI No. 8493, B 87, 1988.

2. A software package for calculating two-dimensional temperature fields in building envelopes. Ministry of Science and Technology Policy of the Russian Federation, Rotaprint of the Omsk Center of Scientific and Technical Information, Rosinformresurs, Omsk, 1995. 4 pp.

3. O. Zienkiewicz. The Finite Element Method

4. Oden. Nonlinear continuum mechanics

5. Certificate of official registration of the computer program "TEMPER-3D" No. 2006610359 of 20.01.2006 (copyright holder: Fedorov S. V.)

Frequently asked questions

What is the finite element method in plain words?

The structure is divided into small cells (elements). The program calculates a temperature at each node of a cell, and neighboring cells exchange heat. The smaller the cells, the more accurate the picture and the longer the calculation.

How do I know the mesh is fine enough?

Cell size alone is not a criterion: a three-layer wall needs only three elements, while a corner needs thousands. Compare the result on the mesh with the result on a finer one: if the temperature and the heat flow hardly changed, the mesh is sufficient. In Temper-3D this is the "ISO 10211 criterion" line in the result card.

What accuracy is needed in a thermal calculation?

According to the article: the balance of incoming and outgoing flows is acceptable up to 1 %, preferably no more than 0.1 %; the absolute temperature error is 0.1-0.2 °C. Demanding more is not justified: dimensions, air temperature and λ are given with lower accuracy. The criterion of a correct mesh in the international standard: EN ISO 10211.