Heat equation/Solution to the 1-D Heat Equation

From testwiki
Revision as of 10:57, 16 February 2018 by 152.71.164.44 (talk) (For Assumption 1)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Definition

For the 1-dimensional case, the solution takes the form u(x,t) since we are only concerned with one spatial direction and time. Thus the heat equation takes the form:

ut=kuxx+h(x,t)

where k is our diffusivity constant and h(x,t) is the representation of internal heat sources. For our example, we impose the Robin boundary conditions, the initial condition, and the following bounds on our variables:

(x,t)[0,L]×[0,)
u(x,0)=f(x)
α1u(0,t)β1ux(0,t)=b1(t)
α2u(L,t)+β2ux(L,t)=b2(t)
αj,βj0,αj2+βj20

Notice that the boundary conditions are non-homogeneous and time-dependent. The next few steps will illustrate one way to achieve a solution.

Solution

Step 1: Partition Solution

In order to get a solution, we can partition the function into a "transient" or "variable" solution and a "steady-state" solution:

u(x,t)=s(x,t)steady-state+v(x,t)variable

Substitute this relation into our original heat equation, boundary conditions and initial condition:

st+vt=ksxx+kvxx+h(x,t)
α1s(0,t)+α1v(0,t)β1sx(0,t)β1vx(0,t)=b1(t)
α2s(L,t)+α2v(L,t)+β2sx(L,t)+β2vx(L,t)=b2(t)
s(x,0)+v(x,0)=f(x)

We will also impose conditions on our partitioned solutions. Part of the beauty of partitioning the solution is being able to divide the boundary conditions among both parts. The following conditions will be imposed:

  1. We will choose the steady-state solution to be linear in x, which means that sxx=0.
  2. We will let the steady-state solution handle the non-homogeneous boundary conditions.
  3. We will let the variable portion satisfy the non-homogeneous equation and homogeneous boundary conditions.

Thus, we have constructed two separate initial boundary value problems (IBVPs):

{sxx=0α1s(0,t)β1sx(0,t)=b1(t)α2s(L,t)+β2sx(L,t)=b2(t)

{vt=kvxxst+h(x,t)α1v(0,t)β1vx(0,t)=0α2v(L,t)+β2vx(L,t)=0v(x,0)=f(x)s(x,0)

Note that the sum s(x,t)+v(x,t) satisfies all conditions of the original IBVP.

Step 2: Solve Steady-state Partition

Assumption 1

We are assuming that S is linear in x, so our equation take the form:

s(x,t)=m(t)x+b(t)

We will see why this is only an assumption because doesn't cover all the different boundary condition types. Applying the boundary conditions, we get:

α1b(t)β1m(t)=b1(t)α2b(t)+(α2L+β2)m(t)=b2(t)

Solving for b(t) and m(t) :

b(t)=|b1(t)β1b2(t)α2L+β2||α1β1α2α2L+β2|=(α2L+β2)b1(t)+β1b2(t)α1α2L+α1β2+α2β1
m(t)=|α1b1(t)α2b2(t)||α1β1α2α2L+β2|=α1b2(t)α2b1(t)α1α2L+α1β2+α2β1
s(x,t)=α1b2(t)α2b1(t)α1α2L+α1β2+α2β1x+(α2L+β2)b1(t)+β1b2(t)α1α2L+α1β2+α2β1

That means that the coefficients are only defined as long as α1α2L+α1β2+α2β10. This means that the linear assumption of s(x,t) only holds if the boundary conditions are not both Neumann type (i.e. α1,α20 ). Knowing the coefficients α1,α2,β1,β2 from the original boundary conditions will yield the coefficients for s(x,t).

Assumption 2

For the case where both boundary conditions are Neumann type, a different assumption must be made. The linear assumption didn't yield any solution, so let's assume s has a quadratic relationship with x:

s(x,t)=a(t)x2+b(t)x+c(t).

For convenience, we choose c(t)=0. In this Neumann-Neumann condition, the only boundary conditions we have are:

{sx(0,t)=b1(t),β1=1 for simplicitysx(L,t)=b2(t),β2=1 for simplicity

Solving the assumption for the boundary conditions:

sx(0,t)=b1(t)=b(t)sx(L,t)=b2(t)=2a(t)L+b(t){b(t)=b1(t)a(t)=b2(t)b1(t)2L

Thus we arrive at the solution to the "steady-state" solution:

s(x,t)=b2(t)b1(t)2Lx2+b1(t)x.

Step 3: Solve Variable Partition

The equation for the variable portion is:

vt=kvxxst+h(x,t)+ksxx

For Assumption 1

In order to simplify the equation, we can define a new function:

q(x,t):=h(x,t)st(x,t)

For Assumption 2

In order to simplify the equation, we can define a new function:

q(x,t):=h(x,t)st(x,t)+ksxx(x,t)

Step 3.1: Solve the Associated Homogeneous IBVP

The associated homogeneous IBVP is as follows:

{vt=kvxxα1v(0,t)β1vx(0,t)=0α2v(L,t)+β2vx(L,t)=0

Separate Variables

v(x,t)=X(x)T(t)XT=kXTTkT=XX=μ

Translate Boundary Conditions

0=α1X(0)T(t)β1X(0)T(t)=[α1X(0)β1X(0)]T(t)t[0,)α1X(0)β1X(0)=0

0=α2X(L)T(t)+β2X(L)T(t)=[α2X(L)+β2X(L)]T(t)t[0,)α2X(L)+β2X(L)=0

Solve the SLP

XμX=0α1X(0)β1X(0)=0α2X(L)+β2X(L)=0}μ=λ2λn= solutions to equation (α1α2β1β2λ2)sin(λL)+(α1β2+α2β1)λcos(λL)=0Xn(x)=β1λncos(λnx)+α1sin(λnx)

Step 3.2: Solve the Non-homogeneous BVP

The BVP is as follows:

{vt=kvxx+q(x,t)α1v(0,t)β1vx(0,t)=0α2v(L,t)+β2vx(L,t)=0v(x,0)=f(x)s(x,0)

In order to solve the problem, let:

v(x,t):=n=0Tn(t)Xn(x)

where the time-dependent Fourier coefficients will be determined later. Also, let:

q(x,t):=n=0Qn(t)Xn(x)

where the Fourier coefficients are given by the inner product:

Qn(t)=0Lq(x,t)Xn(x)dx0LXn(x)Xn(x)dx.

In order to solve for the coefficients Tn(t), we have to substitute the relations above into the original PDE. The term-by-term differentiation of v is legitimate since the partial derivatives of v are continuous. v satisfies the same spatial boundary conditions as the eigenfunction:

t[n=0Tn(t)Xn(x)]=k2x2[n=0Tn(t)Xn(x)]+n=0Qn(t)Xn(x)
n=0Tn(t)Xn(x)=kn=0Tn(t)Xn(x)+n=0Qn(t)Xn(x)

Since the eigenfunction Xn(x) satisfies the ODE X+λn2X=0Xn(x)=λn2Xn(x) ,

n=0Tn(t)Xn(x)=n=0kλn2Tn(t)Xn(x)+n=0Qn(t)Xn(x)
n=0[Tn(t)+kλn2Tn(t)]Xn(x)=n=0Qn(t)Xn(x)

Since Xn(x) forms a basis and is therefore linearly independent:

Tn(t)+kλn2Tn(t)=Qn(t)

which is a first order non-homogeneous linear equation. The integrating factor μ(t)=ekλn2dt=ekλn2t . Solving the equation yields:

Tn(t)=ekλn2t0tekλn2sQn(s)ds+Cnekλn2t

The constant Cn allows us to satisfy the initial condition:

v(x,0)=f(x)s(x,0)=n=0Tn(0)Xn(x)=n=0CnXn(x).
Cn=0L[f(x)s(x,0)]Xn(x)dx0LXn(x)Xn(x)dx.

We can now substitute all the expressions to get the variable portion v(x,t):

  1. Compute and substitute Cn and Qn(t) into Tn(t).
  2. Compute and substitute Tn(t) and Xn(x) into v(x,t):=n=0Tn(t)Xn(x).

Step 4: Combine Solutions

The complete solution for u(x,t) can be found by adding the "steady-state" solution and the "variable" solutions. The result can easily be checked by graphing in a symbolic solver like Mathematica or Maple.

Template:CourseCat