An example of solving the heat equation. Examples of solutions. Fourier method for the heat equation

Heat equation for the unsteady case

non-stationaryif the body temperature depends both on the position of the point and on time.

Let us denote by and = and(M, t) temperature at point M homogeneous body bounded by the surface S, at time t... It is known that the amount of heat dQabsorbed in time dt, expressed by the equality

where dS - surface element, k - coefficient of internal thermal conductivity, - derivative of the function and in the direction of the outer normal to the surface S... Since it propagates in the direction of decreasing temperature, then dQ \u003e 0 if\u003e 0, and dQ < 0, если < 0.

Equality (1) implies

Now we will find Q another way. Select the element dV volume Vbounded by the surface S... Quantity of heat dQreceived by element dVduring dt, proportional to the temperature rise in this element and the mass of the element itself, i.e.

where is the density of the substance, the coefficient of proportionality, called the heat capacity of the substance.

Equality (2) implies

In this way,

where. Considering that \u003d,, we get

Replacing the right-hand side of the equality with the help of the Ostrogradsky - Green formula, we obtain

for any volume V... From this we obtain the differential equation

which is called the heat conduction equation for the nonstationary case.

If the body is a bar directed along the axis Oh, then the heat conduction equation has the form

Consider the Cauchy problem for the following cases.

1. Unlimited rod case. Find a solution to equation (3) ( t \u003e 0,) satisfying the initial condition. Using the Fourier method, we obtain a solution in the form

Is the Poisson integral.

2. Rod case, limited on one side. The solution of equation (3), satisfying the initial condition and the boundary condition, is expressed by the formula

3. Rod case, limited on both sides.The Cauchy problem is that for x \u003d 0 and x = l find a solution to equation (3) satisfying the initial condition and two boundary conditions, for example, or.

In this case, a particular solution is sought in the form of a series

for boundary conditions,

and in the form of a series

for boundary conditions.

Example.Find a solution to the equation

satisfying the initial conditions

and boundary conditions.

□ The solution to the Cauchy problem will be sought in the form

In this way,

Heat equation for the stationary case

The distribution of heat in the body is called stationaryif body temperature and depends on the position of the point M(x, at, z), but does not depend on time t, i.e.


and = and(M) = and(x, at, z).

In this case, 0 and the heat equation for the stationary case becomes laplace equation

which is often written as.

So that the temperature andin the body was determined unambiguously from this equation, you need to know the temperature on the surface S body. Thus, for equation (1) the boundary value problem is formulated as follows.

Find function andsatisfying equation (1) inside the volume V and receiving at each point M surfaces Starget values

This task is called dirichlet problem or the first boundary taskfor equation (1).

If the temperature on the surface of the body is unknown, and the heat flux at each point of the surface is known, which is proportional, then on the surface Sinstead of boundary condition (2), we have the condition

The problem of finding a solution to Eq. (1) satisfying the boundary condition (3) is called neumann's task or the second boundary problem.

For flat figures Laplace's equation is written as

The Laplace equation has the same form for space, if and does not depend on the coordinate z, i.e. and(M) keeps constant value while moving point M in a straight line parallel to the axis Oz.

By substitution, equation (4) can be transformed to polar coordinates

The concept of a harmonic function is associated with the Laplace equation. The function is called harmonic in the area of Dif in this region it is continuous together with its derivatives up to the second order inclusive and satisfies the Laplace equation.

Example.Find the stationary temperature distribution in a thin rod with a thermally insulated lateral surface if, at the rod ends,.

□ We have a one-dimensional case. You want to find a function andsatisfying the equation and boundary conditions,. The general equation of this equation has the form. Considering boundary conditions, we get

Thus, the temperature distribution in a thin rod with a thermally insulated lateral surface is linear. ■

Dirichlet problem for a circle

Let a circle of radius be given R centered at the pole ABOUT polar coordinate system. It is necessary to find a function that is harmonic in the circle and satisfies the condition on its circle, where is a given function that is continuous on the circle. The required function must satisfy the Laplace equation in a circle

Using the Fourier method, one can obtain

Is the Poisson integral.

Example.Find the stationary temperature distribution on a uniform thin circular plate of radius R, the upper half is kept at a temperature and the lower half at a temperature.

□ If, then, and if, then. The temperature distribution is expressed by the integral

Let the point be located in the upper semicircle, i.e. ; then changes from to, and this length interval contains no dots. Therefore, we introduce a substitution, whence,. Then we get

So the right side is negative, then and at satisfies the inequalities. For this case, we obtain the solution

If the point is located in the lower semicircle, i.e. , then the change interval contains a point, but does not contain 0, and we can make a substitution, whence,, Then for these values \u200b\u200bwe have

Carrying out similar transformations, we find

Since the right side is now positive, then. ■

Finite Difference Method for Solving the Heat Equation

Let it be required to find a solution to the equation

satisfying:

initial condition

and boundary conditions

So, it is required to find a solution to equation (1) satisfying conditions (2), (3), (4), i.e. it is required to find a solution in a rectangle bounded by straight lines,,, if the values \u200b\u200bof the desired function are given on its three sides,,.

Let's build a rectangular mesh formed by straight lines

- step along the axis Oh;

- step along the axis Ot.

Let's introduce the notation:

From the concept of finite differences, one can write

similarly

Taking into account formulas (6), (7) and the introduced designations, we write equation (1) in the form

From here we get the calculation formula

From (8) it follows that if three values \u200b\u200bof k are known k-th mesh layer:,,, then you can define the value in ( k+ 1) th layer.

The initial condition (2) allows you to find all values \u200b\u200bon the line; boundary conditions (3), (4) make it possible to find values \u200b\u200bon lines and. Using formula (8), we find the values \u200b\u200bat all internal points of the next layer, i.e. for k\u003d 1. The values \u200b\u200bof the required function at the extreme points are known from the boundary conditions (3), (4). Passing from one layer of the grid to another, we determine the values \u200b\u200bof the desired solution at all nodes of the grid. ;

with initial conditions

and boundary conditions

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

those. decomposition

while considering 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 for all t\u003e 0 the conditions

Suppose now that the functions f(x, t) and
can be expanded in a Fourier series in sines

, (117)

(118)

, (119)

. (120)

Substituting (116) into equation (113) and taking into account (117), we obtain

.

This equality is fulfilled 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 inhomogeneous first-order differential equation. Using Euler's formula, we can write down the general solution of equation (122)

,

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

.

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


(124)

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

Example 14. Find a solution to the inhomogeneous parabolic equation

with the initial condition

(14.2)

and boundary conditions

. (14.3)

▲ Let's select such a function first to satisfy the boundary conditions (14.3). Let, for example,  = xt 2. Then

Therefore, the function is defined as

satisfies the equation

(14.5)

homogeneous boundary conditions

and zero initial conditions

. (14.7)

Applying the Fourier method to solve the homogeneous equation

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

.

We arrive at the following Sturm-Liouville problem:

,
.

Solving this problem, we find the eigenvalues

and their corresponding functions

. (14.8)

We seek the solution of 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 the function T n (t) we expand the function (1- x) into the Fourier series in 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 by 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)

Self-study assignments

Solve initial boundary value problems

3.4. Cauchy problem for the heat equation

First of all, consider cauchy problem for homogeneous heat equation.

satisfying

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

where
is the Green's function defined by the formula

, (127)

and possessing the 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 integration by parts of equality (132) over within the range from -∞ to + ∞ and by ranging from 0 to t, we get

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

Replacing in this equality by
, and
on
, we get the ratio

.

Hence, using formula (127), we finally obtain

. (135)

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

The solution is cauchy problem for the inhomogeneous heat equation

satisfying inhomogeneous initial condition

is the sum of the solutions:

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

Example 15. Find a solution to the equation

(15.1)

for the following temperature distribution of the rod:

▲ The rod is infinite, so the solution can be written using the 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 the integral of probabilities, then the final solution of the original problem (13.1), (13.2) can be expressed by the formula

.▲

Let us deal with the solution of the first mixed problem for the heat equation: find a solution u (x, t) of the equation satisfying the initial condition and boundary conditions. Start with the simplest task : find a solution u (x, t) of a homogeneous equation satisfying the initial condition and zero (homogeneous) boundary conditions Fourier method for the heat equation We will seek nontrivial solutions of equation (4) satisfying boundary conditions (6) in the form of Psdstaap in the form (7) into equation (4), we obtain or whence we have two ordinary differential equations.To obtain nontrivial solutions u (x, *) of the form (7) satisfying boundary conditions (6), it is necessary to find nontrivial solutions of equation (10) satisfying the boundary conditions Thus , to determine the function X (x), we come to the eigenvalue problem: find those values \u200b\u200bof the parameter A for which there are nontrivial solutions to the problem. This problem was considered in the previous chapter. It was shown there that only when there are nontrivial solutions When A \u003d A „, the general solution of Eq. (9) has the form satisfy Eq. (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) is an expansion of the given function in a Fourier series in sines in the interval (O, I). Expansion coefficients a „are determined by the well-known formulas Fourier method for the heat equation Let us assume that charge (13) with coefficients determined by formulas (14) will converge to the function absolutely and uniformly. Since for then the series for also converges absolutely and uniformly. Therefore, the function u (x, t), the sum of series (12), is continuous in the domain and satisfies the initial and boundary conditions. It remains to show that the function u (x, t) satisfies Eq. (4) in region 0. For this, it suffices to show that the series obtained from (12) by term-by-term differentiation with respect to t once and term-by-term differentiation with respect to x twice are also absolute and converge uniformly for. But this follows from the fact that for any t\u003e 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 were already established earlier. Thus, for t\u003e 0 problem (4) - (6) is posed correctly; on the contrary, for negative t this problem is incorrect. Comment. In contrast to the home equation, the equation is non-symmetric about the time t: if we replace t with -t, then we get an equation of a different kind describes irreversible processes: We can predict what the given will become after a time interval of a given t, but we cannot say with certainty how m was also the time t before the considered moment. This relationship between prediction and prehistory is typical of the parabolic equation and does not hold, for example, for the wave equation; in the latter case, looking into the past is as easy as looking into the future. Example. Find the temperature distribution in a homogeneous bitch of length x if the initial temperature of the rod and at the ends of the rod is zero temperature. 4 The problem is reduced to solving the equation under the initial condition and boundary conditions Applying the Fourier method, we look for nontrivial solutions of equation (15), satisfying the boundary conditions (17), in the form Substituting u (x, t) in the form (18) into equation (15) and dividing the variables, we get whence the Eigenvalues \u200b\u200bof the problem. eigenfunctions Xn (x) \u003d mn nx. For A \u003d A „, the general solution of equation (19) has the form Tn (t) \u003d ape a n \\ so that we seek the solution of problem (15) - (17) in the form of a series. Therefore, the solution to the original problem is 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. Suppose that the function / is continuous, has a continuous derivative, and for all t\u003e 0 condition is met. We will seek the solution of 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 Section 1. We will seek a solution v (x, t) of problem (5 ) - (7) in the form of a series in eigenfunctions (boundary value problem. By adding t) in the form of equation (5), we obtain Expand the function / ОМ) in a Fourier series in sines, where Comparing two expansions (12) and (13) function f (x, t) in the 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) into series (11), we obtain the solution Function will be a solution to the original problem (1) - (3). 3. Consider the problem: to find in the domain the solution of the equation under the initial condition and inhomogeneous boundary conditions The Fourier method is inapplicable directly due to the inhomogeneity of conditions (20). We introduce a new unknown function v (x, t), setting where Then the solution of problem (18) - (20) reduces to the solution of problem (1) - (3), considered in Sec. 2, for the function v (x, J). Exercises 1. An infinite homogeneous bar is specified. Show those that if the initial temperature is then the front moment is the temperature of the rod 2. The ends of the rod of length x are maintained at a temperature equal to zero. The initial temperature is determined by the formula Determine the temperature of the rod for any moment of time t\u003e 0. 3. The ends of the rod of length I are maintained at a temperature of zero. The initial temperature of the rod is determined by the formula Determine the temperature of the rod for any moment t\u003e 0. 4. The ends of the rod of length I are maintained at a temperature of zero. Initial temperature distribution Determine the temperature of the rod for any moment t\u003e 0. Answers

Solving algebraic equations by 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) \u003d 0 is solved as follows. First, the zero approximation (point x 0). At this point, a tangent to the graph is drawn y = f(x). The point of intersection of this tangent with the abscissa axis is the next approximation for the root (point x 1). At this point, the tangent is drawn again, etc. Sequence of dots x 0 , x 1 , x 2 ... should result in the true root value. The convergence condition is.

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

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

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

In Fig. 3 shows the implementation of Newton's method by means of Excel. In cell B3, the initial approximation ( x 0 \u003d -3), and then the remaining cells of the column are calculated all intermediate values \u200b\u200bup 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, having selected cells C2: C10, you can extend it to columns D: F by dragging the marker in the lower right corner of the selection area. As a result, the value 0 is received in cell F6, i.e. the value in cell F3 is the root of the equation.

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

As you know, such physical processes as heat transfer, mass transfer during diffusion, obey Fick's law

where l is the coefficient of thermal conductivity (diffusion), and T Is the temperature (concentration), and is the flow of the corresponding value. It is known from mathematics that the divergence of the flow is equal to the volumetric density of the source Q this value, i.e.

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

The solution of this equation is analytically possible only for regions of a simple shape: rectangle, circle, ring. In other situations, the exact solution of this equation is impossible, i.e. it is impossible to determine the distribution of temperature (or concentration of a substance) in difficult cases. Then one has to use approximate methods for solving such equations.

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

Meshing. Let the region have the shape shown in Fig. 4. With such a form, the exact analytical solution of equation (4), for example, by the method of separation of variables, is impossible. Therefore, we will seek an approximate solution to this equation at separate points. Apply a uniform grid to the area, consisting of squares with a side h... Now, instead of looking for a continuous solution to Eq. (4), defined at each point of the region, we will seek an approximate solution defined only at the nodal points of the grid plotted on 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 Ts (central) (Fig. 5). Four nodes adjoin it: B (top), H (bottom), L (left) and P (right). Recall that the distance between nodes in the grid is h... Then, using expression (2) for an approximate representation of the second derivatives in equation (4), we can approximately write:

from which it is easy to obtain an expression connecting the temperature value at the central point with its values \u200b\u200bat neighboring points:

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

You need to understand that an equation similar to (5), we get FOR EACH point of the grid, which, thus, turn out to be connected with 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. This system of equations can be solved using various methods.

Solution of 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 is equal to 100. The dimensions of our region are set and equal vertically to 6, and horizontally to 8, so that the side of the grid square (step) h \u003d 1. Then expression (5) for calculating the temperature at the internal points takes the form


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

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 limit number of iterations:

Such values \u200b\u200bwill provide us with a small COUNTABLE error and guarantee that the iterative process reaches the specified error.

However, these values \u200b\u200bDO NOT PROVIDE a small error of the method itself, since the latter depends on the error when replacing the second derivatives with finite differences. Obviously, this error is the smaller the less step grids, i.e. the size of the square on which our difference scheme is built. This means that exactly the CALCULATED value of the temperature at the nodes of the grid, shown 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 with the previous one. If these solutions differ little, then we can assume that the found temperature distribution corresponds to reality.

Reduce the step by half. Instead of 1, it becomes equal to ½. The number of nodes will change accordingly. Vertically, instead of 7 nodes (there were 6 steps, i.e. 7 nodes), there will be 13 (12 squares, i.e. 13 nodes), and horizontally instead of 9 will become 17. At the same time, one should not forget that the step size has 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 found solutions, we take the point with the maximum temperature marked in Fig. 6 yellow... The calculation result is shown in Fig. nine:

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

From the figure, we can conclude that a further decrease in 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 build a temperature surface that visually represents its distribution in the study area.

The heat equation in a homogeneous medium, as we have seen, has the form

Internal thermal conductivity coefficient, c - heat capacity of a substance and - density. In addition to Eq. (1), one must keep in mind the initial condition that gives the initial temperature distribution and at

If the body is bounded by a surface (S), then on this surface we will have a limiting condition, which can be different, depending on the physical circumstances. So, for example, the surface (S) can be kept at a certain temperature, which can change over time. In this case, the limiting condition is reduced to specifying the function U on the surface (S), and this specified function can also depend on the time t. If the surface temperature is not fixed, but there is radiation into the environment of a given temperature, then according to Newton's law, although far from accurate, the heat flux through the surface (S) is proportional to the temperature difference between the surrounding space and the surface of the body (S). This gives a limiting condition of the form

where the proportionality coefficient h is called the coefficient of external thermal conductivity.

In the case of heat propagation in a body of linear dimensions, i.e., in a homogeneous rod, which we consider to be located along the axis, instead of equation (1), we will have the equation

With this form of the equation, of course, the heat exchange between the surface of the rod and the surrounding space is not taken into account.

Equation (S) can also be obtained from equation (1), assuming U is independent of. Initial condition in the case of a bar