Solving one dimension steady state heat equation with finite differences

In summary: O(δt).This estimate is quite good enough to get the integration underway. Say to within a factor of 2. You can make the factor of 2 smaller by using a more accurate estimate.In summary, this conversation is about solving a steady state heat conduction/radiation problem using finite differences in Matlab. The non-linearity of the equation is a difficulty, and the participants propose different approaches such as solving it as a transient problem or using an implicit method. One participant also suggests solving for both the values of t_i and t_i^' at different intervals, while another participant presents a numerical solution method using B2 and α. Finally, they discuss methods for approximating the initial value of the integral to
  • #1
Arkady87
1
0
I have a project where I need to solve

T''(x) = bT^4 ; 0<=x<=1
T(0) = 1
T'(1) = 0

using finite differences to generate a system of equations in Matlab and solve the system to find the solution

So far I have:
(using centred 2nd degree finite difference)
T''(x) = (T(x+h) - 2T(x) + T(x-h)) / h^2 = bT(x)^4
and
(using 2 order backward difference)
T'(x) = (3T(x) - 4T(x-h) + T(x-2h)) / 2h

I just don't know how to write the code that will make the system of n non-linear equations to solve. I have a function that will solve them if I can get there...

any help or nudge in the right direction is appreciated
 
Physics news on Phys.org
  • #2
Are you sure the equation is right? Doesn't look like any heat equation I know. It looks like a diffusion equation on the left and a radiation equation on the right.
 
  • #3
Arkady87 said:
I have a project where I need to solve

T''(x) = bT^4 ; 0<=x<=1
T(0) = 1
T'(1) = 0

using finite differences to generate a system of equations in Matlab and solve the system to find the solution

So far I have:
(using centred 2nd degree finite difference)
T''(x) = (T(x+h) - 2T(x) + T(x-h)) / h^2 = bT(x)^4
and
(using 2 order backward difference)
T'(x) = (3T(x) - 4T(x-h) + T(x-2h)) / 2h

I just don't know how to write the code that will make the system of n non-linear equations to solve. I have a function that will solve them if I can get there...

any help or nudge in the right direction is appreciated

This is a steady state heat conduction/radiation problem. The non-linearity is a difficulty. You might try to solve it as a transient heat conduction/radiation problem by addition a time derivative to the equation in the appropriate place, and solving for how the temperature varies with time as x. Here, you would use the so-called Method of Lines. You might try an explicit finite differencing approach, and, with small enough time steps should get convergence. Alternately, you could try an implicit method (temperatures at forward time step), and use an automatic package ODE solver to do the integration. For this problem, the non-stiff option should be adequate. Try as the initial condition T = (1-x)^2
 
  • #4
Does this help?
T'' T' = b T' T4
(T')2 = 2b T5/5 + c
x = ∫(2b T5/5 + c)-1/2dT
 
  • #5
Arkady87 said:
I just don't know how to write the code that will make the system of n non-linear equations to solve.

Yeah me neither but I got an idea before I try to find it in a book. How about you solve for both the values of [itex]t_i[/itex] and [itex]t_i^'[/itex] all the way down the line and for starters, just break it up into 10 intervals.

So you have:

[tex]t_{i+1}-2t_i+\frac{t_{i-1}}{0.1^2}=bt_i^4[/tex]

as well as compute the derivative at each point:

[tex]d_i=\frac{3t_i-4 t_{i-1}+t_{i-2}}{0.2}[/tex]

and then solve for the set [itex](t_i, d_i)[/itex]

Not sure though ok but it's a start and in math, starts are important. :)
 
  • #6
Assuming you just want to solve the equation numerically, whether using Matlab or otherwise...
x = ∫(2b t5/5 + c)-1/2dt
Writing B2 = 2b/5, T'(1) = 0 implies c = -B2α5, where α = T(1). T(0) = 1 gives:
[tex]x = B^{-1}∫^1_{t=T}(t^5 - α^5)^{-1/2}dt[/tex]
It remains to find [itex]\hat{α}[/itex] s.t.
[tex]B = ∫^1_{t=\hat{α}}(t^5 - \hat{α}^5)^{-1/2}dt[/tex]
Consider
[tex]I(α) = ∫^1_{t=α}(t^5 - α^5)^{-1/2}dt[/tex]
[tex]I(α/k) = ∫^1_{t=α/k}(t^5 - (α/k)^5)^{-1/2}dt = ∫^k_{t=α}((t/k)^5 - (α/k)^5)^{-1/2}d(t/k)[/tex]
[tex] = k^{3/2}∫^k_{t=α}(t^5 - α^5)^{-1/2}dt[/tex]
So we can proceed as follows:
Choose an arbitrary [itex]α, \check{α}[/itex] = 0.1 say.
Perform the integral [tex]F(k) = ∫^k_{t=\check{α}}(t^5 - \check{α}^5)^{-1/2}dt[/tex] stepwise on k. At each step, check whether F(k)k3/2 exceeds B. When it does, backtrack one step and binary chop the last step size to refine the value of k. Then [itex]\hat{α} = \check{α}/k[/itex]
Note that starting the calculation of the integral is interesting because the integrand is infinite initially. This can be managed by approximating
[tex]((α+δt)^5 - α^5)^{-1/2} = (5α^4δt)^{-1/2}[/tex]
and integrating to produce
[tex]F(\check{α}+δt) = 2(5\check{α}^4δt)^{1/2}[/tex]
 

Related to Solving one dimension steady state heat equation with finite differences

1. What is the one dimension steady state heat equation?

The one dimension steady state heat equation is a mathematical model used to describe the distribution of heat in a one-dimensional system over time. It takes into account the temperature, thermal conductivity, and heat generation within the system.

2. How is the one dimension steady state heat equation solved with finite differences?

In order to solve the one dimension steady state heat equation with finite differences, the system is divided into a grid of discrete points. The temperature at each point is then calculated using the values at neighboring points and the equation is iteratively solved until a steady state solution is reached.

3. What are the assumptions made when solving the one dimension steady state heat equation with finite differences?

Some of the key assumptions made when solving the one dimension steady state heat equation with finite differences include a constant thermal conductivity, no heat sources or sinks, and a steady state system (meaning the temperature does not change over time).

4. What are the applications of solving the one dimension steady state heat equation with finite differences?

The one dimension steady state heat equation with finite differences is commonly used in a variety of engineering and scientific fields, such as heat transfer analysis, thermodynamics, and materials science. It can also be applied to problems involving conduction, convection, and radiation of heat.

5. What are the limitations of solving the one dimension steady state heat equation with finite differences?

One of the main limitations of using finite differences to solve the one dimension steady state heat equation is that it can only be applied to simple, one-dimensional systems. It also assumes a steady state and does not take into account any transient effects that may occur. Additionally, the accuracy of the solution depends on the size of the grid used, so a smaller grid may result in a less accurate solution.

Similar threads

Replies
4
Views
1K
  • Differential Equations
Replies
3
Views
1K
  • Differential Equations
Replies
3
Views
566
Replies
6
Views
2K
  • Differential Equations
Replies
7
Views
2K
  • Differential Equations
Replies
1
Views
770
  • Differential Equations
Replies
2
Views
2K
Replies
5
Views
1K
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
260
Back
Top