Examples of solutions to the heat equation. Thermal conductivity equation Using the Fourier method to solve the heat conduction equation examples

Solving algebraic equations using Newton's method

A fairly popular method for solving equations is tangent method, or Newton's method. In this case, an equation of the form f(x) = 0 is solved as follows. First, the zero approximation (point x 0). At this point a tangent to the graph is constructed y = f(x). The point of intersection of this tangent with the x-axis is the next approximation for the root (point x 1). At this point a tangent is again constructed, etc. Sequence of points x 0 , x 1 , x 2 ... must lead to the true value of the root. The condition for convergence is .

Since the equation of a line passing through a point is x 0 , f(x 0) (and this is the tangent), is written in the form

and as a next approximation x 1 for the root of the original equation, the point of intersection of this line with the abscissa axis is taken, then we should put at this point y = 0:

from which the equation immediately follows for finding the next approximation through the previous one:

In Fig. Figure 3 shows the implementation of Newton's method using Excel. The initial approximation ( x 0 = -3), and then all intermediate values ​​are calculated in the remaining cells of the column up to the calculation x 1 . To perform the second step, the value from cell B10 is entered into cell C3 and the calculation process is repeated in column C. Then, with cells C2:C10 selected, you can drag the handle in the lower right corner of the selection to extend it to columns D:F. As a result, the value 0 is obtained in cell F6, i.e. the value in cell F3 is the root of the equation.

The same result can be obtained using cyclic calculations. Then after filling the first column and getting the first value x 1, enter the formula =H10 in cell H3. In this case, the computational process will be looped and in order for it to be executed, in the menu Service | Options on the tab Computations checkbox must be checked Iterations and indicate the limiting number of steps of the iterative process and the relative error (the default number of 0.001 is clearly insufficient in many cases), upon reaching which the computational process will stop.

As is known, physical processes such as heat transfer and mass transfer during diffusion obey Fick’s law

Where l- coefficient of thermal conductivity (diffusion), and T– temperature (concentration), and – flow of the corresponding value. From mathematics it is known that the divergence of the flow is equal to the volumetric density of the source Q this value, i.e.

or, for the two-dimensional case, when the temperature distribution in one plane is studied, this equation can be written as:

Solving this equation analytically is possible only for areas of simple shape: rectangle, circle, ring. In other situations, an exact solution of this equation is impossible, i.e. It is also impossible to determine the distribution of temperature (or concentration of a substance) in complex cases. Then you have to use approximate methods for solving such equations.

An approximate solution of equation (4) in a domain of complex shape consists of several stages: 1) construction of a mesh; 2) construction of a difference scheme; 3) solving a system of algebraic equations. Let's consider each of the stages sequentially and their implementation using the Excel package.

Grid construction. Let the area have the shape shown in Fig. 4. With this form, an exact analytical solution of equation (4), for example, by the method of separation of variables, is impossible. Therefore, we will look for an approximate solution to this equation at individual points. Let's apply a uniform grid to the area, consisting of squares with sides h. Now, instead of looking for a continuous solution to equation (4), defined at each point of the region, we will look for an approximate solution, defined only at the nodal points of the grid applied to the region, i.e. in the corners of the squares.

Construction of a difference scheme. To construct a difference scheme, consider an arbitrary internal grid node C (central) (Fig. 5). Four nodes are adjacent to it: B (upper), N (lower), L (left) and P (right). Recall that the distance between nodes in the grid is h. Then, using expression (2) to approximately write the second derivatives in equation (4), we can approximately write:

from which it is easy to obtain an expression relating the temperature value at the central point with its values ​​at neighboring points:

Expression (5) allows us, knowing the temperature values ​​at neighboring points, to calculate its value at the central point. Such a scheme, in which derivatives are replaced by finite differences, and to search for values ​​​​at a grid point, only the values ​​​​at the nearest neighboring points are used, is called a central-difference scheme, and the method itself is called the finite-difference method.

It is necessary to understand that we obtain an equation similar to (5) FOR EACH grid point, which, thus, turn out to be connected to each other. That is, we have a system of algebraic equations in which the number of equations is equal to the number of grid nodes. Such a system of equations can be solved using various methods.

Solving a system of algebraic equations. Iteration method. Let the temperature at the boundary nodes be set and equal to 20, and the power of the heat source equal to 100. The dimensions of our region are set and equal vertically to 6 and horizontally to 8, so the side of the grid square (step) h= 1. Then expression (5) for calculating the temperature at internal points takes the form


Let's assign each NODE a cell on the Excel sheet. In the cells corresponding to the boundary points, we enter the number 20 (they are highlighted in gray in Fig. 6). In the remaining cells we write formula (6). For example, in cell F2 it will look like this: =(F1 + F3 + E2 + G2)/4 + 100*(1^2)/4. Having written this formula in cell F2, you can copy it and paste it into the remaining cells of the area corresponding to the internal nodes. In this case, Excel will report the impossibility of performing calculations due to looping of the results:

Click "Cancel" and go to the window Tools|Options|Calculations, where check the box in the “Iterations” section, specifying 0.00001 as the relative error, and 10000 as the maximum number of iterations:

Such values ​​will provide us with a small COUNTABLE error and guarantee that the iteration process will reach the specified error.

However, these values ​​DO NOT ensure a small error of the method itself, since the latter depends on the error when replacing second derivatives with finite differences. Obviously, this error is smaller, the smaller the grid step, i.e. the size of the square on which our difference scheme is based. This means that the accurately CALCULATED temperature value at the grid nodes, presented in Fig. 6, in fact, may turn out to be completely untrue. There is only one method to check the found solution: find it on a finer grid and compare it with the previous one. If these solutions differ little, then we can assume that the found temperature distribution corresponds to reality.

Let's reduce the step by half. Instead of 1 it will become equal to ½. Our number of nodes will change accordingly. Vertically, instead of 7 knots (there were 6 steps, i.e. 7 knots) there will be 13 (12 squares, i.e. 13 knots), and horizontally instead of 9 there will be 17. It should not be forgotten that the step size has been halved and now in formula (6) instead of 1 2 you need to substitute (1/2) 2 on the right side. As a control point at which we will compare the solutions found, we will take the point with the maximum temperature, marked in Fig. 6 in yellow. The result of the calculations is shown in Fig. 9:

It can be seen that decreasing the step led to a significant change in the temperature value at the control point: by 4%. To increase the accuracy of the solution found, the grid step should be further reduced. For h= ¼ we get 199.9 at the control point, and for h = 1/8 the corresponding value is 200.6. You can plot the dependence of the found value on the step size:

From the figure we can conclude that further decreasing the step will not lead to a significant change in temperature at the control point and the accuracy of the solution found can be considered satisfactory.

Using the capabilities of the Excel package, you can construct a temperature surface that visually represents its distribution in the study area.

Thermal conductivity- This is one of the types of heat transfer. Heat transfer can be carried out using various mechanisms.

All bodies emit electromagnetic waves. At room temperature it is mainly infrared radiation. This is what happens radiant heat transfer.

In the presence of a gravity field, another mechanism of heat transfer in fluids can be convection. If heat is supplied to a vessel containing a liquid or gas through the bottom, the lower portions of the substance are heated first, their density decreases, they float up and transfer part of the resulting heat to the upper layers.

With thermal conduction, energy transfer occurs as a result of the direct transfer of energy from particles (molecules, atoms, electrons) with higher energy to particles with lower energy.

Our course will examine the transfer of heat by conduction.

Let us first consider the one-dimensional case, when the temperature depends on only one coordinate X. Let two media be separated by a flat partition of thickness l(Fig. 23.1). Media temperatures T 1 and T 2 are kept constant. It can be established experimentally that the amount of heat Q, transmitted through a section of the partition with an area S during t equals

, (23.1)

where the proportionality coefficient k depends on the wall material.

At T 1 > T 2 heat is transferred in the positive axis direction X, at T 1 < T 2 – negative. The direction of heat propagation can be taken into account if in equation (23.1) we replace ( T 1 - T 2)/l on (- dT/dx). In the one-dimensional case, the derivative dT/dx represents temperature gradient. Recall that the gradient is a vector whose direction coincides with the direction of the fastest increase in the scalar coordinate function (in our case T), and the module is equal to the ratio of the increment of the function at a small displacement in this direction to the distance at which this increment occurred.

To give the equations describing heat transfer a more general and universal form, we consider heat flux density j - amount of heat transferred through a unit area per unit time

Then relation (23.1) can be written in the form

Here the minus sign reflects the fact that the direction of heat flow is opposite to the direction of the temperature gradient (the direction of its increase). Thus, the heat flux density is a vector quantity. The heat flux density vector is directed towards decreasing temperature.

If the temperature of the medium depends on all three coordinates, then relation (23.3) takes the form

Where , - temperature gradient ( e 1 ,e 2 ,e 3 - unit vectors of coordinate axes).

Relations (23.3) and (23.4) represent the basic law of thermal conductivity (Fourier’s law): The heat flux density is proportional to the temperature gradient. The proportionality factor k is called thermal conductivity coefficient(or simply thermal conductivity). Because dimension of heat flux density [ j] = J/(m 2 s), and the temperature gradient [ dT/dx] = K/m, then the dimension of the thermal conductivity coefficient [k] = J/(m×s×K).

In general, the temperature at different points of an unevenly heated substance changes over time. Let us consider the one-dimensional case when the temperature depends on only one spatial coordinate X and time t, and we get heat equation- differential equation satisfied by the function T = T(x,t).

Let us mentally select in the medium a small volume element in the form of a cylinder or prism, the generatrices of which are parallel to the axis X, and the bases are perpendicular (Figure 23.2). Base area S, and the height dx. The mass of this volume dm= r Sdx, and its heat capacity c×dm where r is the density of the substance, With- specific heat capacity. Let in a short period of time dt the temperature in this volume changed by dT. To do this, the substance in the volume must receive an amount of heat equal to the product of its heat capacity and the change in temperature: . On the other hand, d Q can enter the volume only through the base of the cylinder: (heat flux density j can be both positive and negative). Equating expressions for d Q, we get

.

Replacing the ratios of small increments with the corresponding derivatives, we arrive at the relation

. (23.5)

Let us substitute expression (23.3) for the heat flux density into formula (23.5)

. (23.6)

The resulting equation is called heat equation. If the medium is homogeneous and the thermal conductivity k does not depend on temperature, the equation takes the form

, (23.7)

where the constant is called thermal diffusivity coefficient environment.

Equations (23.6) – (23.8) are satisfied by an infinite number of functions T = T(x,t).

To isolate a unique solution to the heat conduction equation, it is necessary to add initial and boundary conditions to the equation.

The initial condition is to specify the temperature distribution in the medium T(X,0) at the initial moment of time t = 0.

Boundary conditions may be different depending on the temperature regime at the boundaries. Most often, situations occur when the temperature or heat flux density is specified at the boundaries as a function of time.

In some cases, there may be heat sources in the environment. Heat can be released as a result of the passage of electric current, chemical or nuclear reactions. The presence of heat sources can be taken into account by introducing the volumetric energy density q(x,y,z), equal to the amount of heat released by sources per unit volume of medium per unit time. In this case, the term will appear on the right side of equation (23.5) q:

.

Let's solve the first mixed problem for the heat equation: find a solution u(x, t) of the equation satisfying the initial condition and boundary conditions Let's start with the simplest problem: find a solution u(x, t) of the homogeneous equation satisfying the initial condition and zero (homogeneous) boundary conditions Method Fourier for the heat equation We will look for nontrivial solutions to equation (4) that satisfy the boundary conditions (6) in the form of Psdstaapya in the form (7) into equation (4), we obtain or from where we have two ordinary differential equations To obtain nontrivial solutions u(x, *) of the form (7), satisfying the boundary conditions (6), it is necessary to find non-trivial solutions to equation (10), satisfying the boundary conditions. Thus, to determine the function X(x), we come to the eigenvalue problem: find those values ​​of the parameter A, for which non-trivial solutions to the problem exist. This problem was considered in the previous chapter. There it was shown that only for there are nontrivial solutions. When A = A„, the general solution of equation (9) has the form satisfy equation (4) and boundary conditions (6). Let us form a formal series Having required that the function u(x) t), defined by formula (12), satisfy the initial condition, we obtain Series (13) represents the expansion of the given function into a Fourier series in terms of sines in the interval (O, I). The coefficients a„ of the expansion are determined by known formulas. The Fourier method for the heat equation. Let us assume that Then series (13) with coefficients determined by formulas (14) will converge to the function absolutely and uniformly. Since then the series at also converges absolutely and uniformly. Therefore, the function u(x, t) - the sum of series (12) - is continuous in the region and satisfies the initial and boundary conditions. It remains to show that the function u(x, t) satisfies equation (4) in the region 0. To do this, it is sufficient to show that the series obtained from (12) by term-by-term differentiation with respect to t once and by term-by-term differentiation with respect to x twice are also absolutely and converge uniformly at. But this follows from the fact that for any t > 0 if n is large enough. The uniqueness of the solution to problem (4)-(6) and the continuous dependence of the solution on the initial function have already been established earlier. Thus, for t > 0, problem (4)-(6) is formulated correctly; on the contrary, for negative t this problem is incorrect. Comment. In contrast to the house equation, the equation is non-hommetric about time t: if we replace t by -t, we get an equation of a different type that describes irreversible processes: We can predict what the given will become after a period of time given t, but we cannot say with certainty how m this happened at time t before the moment in question. This relationship between prediction and history is typical for a parabolic equation and does not occur, for example, for a wave equation; in the case of the latter, it is as easy to look into the past as into the future. Example. Find the temperature distribution in a homogeneous rod of length x if the initial temperature of the rod and zero temperature is maintained at the ends of the rod. 4 The problem is reduced to solving the equation with the initial condition and boundary conditions. Using the Fourier method, we look for non-trivial solutions to equation (15) that satisfy the boundary conditions (17) in the form Substituting u(x,t) in the form (18) into equation (15) and separating the variables, we get the Eigenvalues ​​of the problem. eigenfunctions Xn(x) = mp nx. When A = A„, the general solution to equation (19) has the form Tn(t) = ane a n\ so we look for the solution to problem (15)-(17) in the form of a series. Requiring the fulfillment of the initial condition (16), we obtain from this. Therefore, the solution to the original problem will be function 2. Let us now consider the following problem: find a solution rx(x, t) of the inhomogeneous equation _ satisfying the initial condition and homogeneous boundary conditions. Assume that the function / is continuous, has a continuous derivative, and for all t > 0 condition is met. We will look for a solution to problem (1)-(3) in the form where we define it as a solution to the problem and the function - as a solution to the problem Problem (8)-(10) is considered in paragraph 1. We will look for a solution v(x, t) to problem (5 )-(7) in the form of a series in eigenfunctions (of the boundary value problem. Subgaaaya t) in the form in equation (5), we obtain Expand the function /OM) into a Fourier series in sines, where Comparing the two expansions (12) and (13) functions /(x, t) in a Fourier series, we get! Using the initial condition for v(x, t), the Fourier method for the heat equation, we find that Solutions of equations (15) under initial conditions (16) have the form: Substituting the found expressions for Tn(t) in series (11), we obtain the solution Function will be a solution to the original problem (1)-(3). 3. Consider the problem: find a solution to the equation in the domain under the initial condition and inhomogeneous boundary conditions. The Fourier method is not directly applicable due to the inhomogeneity of conditions (20). Let us introduce a new unknown function v(x, t), setting where Then the solution to problem (18)-(20) will be reduced to the solution of problem (1)-(3), considered in paragraph 2, for the function v(x, J). Exercises 1. An infinite homogeneous rod is given. Show that if the initial temperature then immediately the temperature of the rod 2. The ends of the rod of length w are maintained at a temperature equal to zero. The initial temperature is determined by the formula Determine the temperature of the rod for any time t > 0. 3. The ends of a rod of length I are maintained at a temperature equal to zero. The initial temperature of the rod is determined by the formula Determine the temperature of the rod for any time t > 0. 4. The ends of the rod of length I are maintained at a temperature equal to zero. Initial temperature distribution Determine the temperature of the rod for any time t > 0. Answers

Derivation of the heat equation

Let's imagine a homogeneous body and isolate from it an elementary volume with sides (Figure 1).

Figure 1. Control volume in a rectangular coordinate system

We denote incoming heat flows located perpendicular to the surfaces as, . We express the flows on opposite surfaces from Taylor series:

There may also be internal sources of heat inside the body, if there are drains, if:

Change in internal energy:

Let us substitute equations (1.1.1) into the resulting equation (1.1.5):

Substituting them into equation (1.1.6), we obtain the heat conduction equation in general form for three-dimensional space:

Let us introduce the thermal diffusivity coefficient:

and lower the internal heat sources. We obtain the equation of thermal conductivity in three-dimensional space without internal heat sources:

Uniqueness conditions

Equation (1.1) describes the process in general form. To apply it to a specific problem, additional conditions are required, called unambiguity conditions. These conditions include geometric (shape and size of the body), physical (physical properties of the body), time (initial temperature distribution) and boundary conditions (describe the process of heat exchange with the environment).

Boundary conditions can be divided into three main types:

1. Dirichlet boundary conditions: the value of the function on the boundary is given.

In the case of the thermal conductivity problem, the temperature values ​​on the surface of the body are specified.

2. Neumann boundary conditions: the normal derivative of the function on the boundary is specified.

Set the heat flux density on the surface of the body.

3. Robin's boundary conditions: a linear combination of the value of the function and its derivative on the boundary is specified.

Describe the heat exchange between the surface of the body and the environment according to the Newton-Richmann law.

In this work, only Dirichlet boundary conditions will be used, due to the complexity of implementing the remaining boundary conditions.

with initial conditions

and boundary conditions

We will look for a solution to this problem in the form of a Fourier series using the system of eigenfunctions (94)

those. in the form of decomposition

considering at the same time t parameter.

Let the functions f(x, t) is continuous and has a piecewise continuous derivative of the 1st order with respect to X and in front of everyone t>0 conditions are met

Let us now assume that the functions f(x, t) And
can be expanded into a Fourier series in terms of sines

, (117)

(118)

, (119)

. (120)

Let us substitute (116) into equation (113) and taking into account (117), we obtain

.

This equality is satisfied when

, (121)

or if
, then this equation (121) can be written in the form

. (122)

Using the initial condition (114) taking into account (116), (117) and (119) we obtain that

. (123)

Thus, to find the required function
we arrive at the Cauchy problem (122), (123) for an ordinary first-order inhomogeneous differential equation. Using Euler's formula, we can write down the general solution to equation (122)

,

and taking (123) into account, the solution to the Cauchy problem

.

Therefore, when we substitute the value of this function into expression (116), we will ultimately obtain a solution to the original problem


(124)

where are the functions f(x, t) And
are defined by formulas (118) and (120).

Example 14. Find a solution to an inhomogeneous equation of parabolic type

under initial condition

(14.2)

and boundary conditions

. (14.3)

▲ Let’s first select the following function , so that it satisfies the boundary conditions (14.3). Let, for example,  = xt 2. Then

Therefore, the function defined as

satisfies the equation

(14.5)

homogeneous boundary conditions

and zero initial conditions

. (14.7)

Using the Fourier method to solve the homogeneous equation

under conditions (14.6), (14.7), we set

.

We arrive at the following Sturm-Liouville problem:

,
.

Solving this problem, we find the eigenvalues

and their corresponding eigenfunctions

. (14.8)

We look for a solution to problem (14.5)-(14.7) in the form of a series

, (14.9)

(14.10)

Substituting
from (14.9) to (14.5) we obtain

. (14.11)

To find a function T n (t) let's expand the function (1- X) into a Fourier series using the system of functions (14.8) on the interval (0,1):

. (14.12)

,

and from (14.11) and (14.12) we obtain the equation

, (14.13)

which is an ordinary inhomogeneous linear differential equation of the first order. We find its general solution using Euler’s formula

and taking into account condition (14.10), we find a solution to the Cauchy problem

. (14.14)

From (14.4), (14.9) and (14.14) we find the solution to the original problem (14.1)-(14.3)

Tasks for independent work

Solve initial boundary value problems

3.4. Cauchy problem for the heat equation

First of all, let's look at Cauchy problem for homogeneous heat equation.

satisfying

Let's start by replacing the variables x And t on
and introduce into consideration the function
. Then the functions
will satisfy the equations

Where
- Green's function, defined by the formula

, (127)

and having properties

; (130)

. (131)

Multiplying the first equation by G* , and the second on And and then adding the results obtained, we obtain the equality

. (132)

After integrating by parts of equality (132) by ranging from -∞ to +∞ and according to ranging from 0 to t, we get

If we assume that the function
and its derivative limited when
, then, due to properties (131), the integral on the right side of (133) is equal to zero. Therefore, we can write

Replacing this equality with
, A
on
, we get the relation

.

From here, using formula (127), we finally obtain

. (135)

Formula (135) is called Poisson's formula and determines the solution to the Cauchy problem (125), (126) for a homogeneous heat equation with an inhomogeneous initial condition.

The solution Cauchy problem for the inhomogeneous heat equation

satisfying inhomogeneous initial condition

represents the sum of solutions:

where is the solution to the Cauchy problem for the homogeneous heat equation . , satisfying the inhomogeneous initial condition, is a solution satisfying the homogeneous initial condition. Thus, the solution to the Cauchy problem (136), (137) is determined by the formula

Example 15. Find the solution to the equation

(15.1)

for the following rod temperature distribution:

▲ The rod is infinite, so the solution can be written using formula (135)

.

Because
in the interval
equal to constant temperature , and outside this interval the temperature is zero, then the solution takes the form

. (15.3)

Assuming in (15.3)
, we get

.

Because the

is an integral of probabilities, then the final solution of the original problem (13.1), (13.2) can be expressed by the formula

.▲

Up