fem1d_heat_implicit


fem1d_heat_implicit, an Octave code which solves the time-dependent 1D heat equation, using the finite element method (FEM) in space, and an implicit version of the method of lines, using the backward Euler method, to handle integration in time.

This program solves

        dUdT - k * d2UdX2 = F(X,T)
      
over the interval [A,B] with boundary conditions
        U(A,T) = UA(T),
        U(B,T) = UB(T),
      
over the time interval [T0,T1] with initial conditions
        U(X,T0) = U0(X)
      

The spatial derivatives are approximated using the finite difference method, with piecewise linear elements.

The solver applies an implicit backward Euler approximation to the first derivative in time.

Licensing:

The computer code and data files described and made available on this web page are distributed under the MIT license

Languages:

fem1d_heat_implicit is available in a MATLAB version and an Octave version.

Related Data and Programs:

fem1d_heat_implicit_test

fd1d_heat_implicit, an Octave code which uses the finite difference method and implicit time stepping to solve the time dependent heat equation in 1d.

fem1d_heat_explicit, an Octave code which uses the finite element method and explicit time stepping with the forward Euler method to solve the time dependent heat equation in 1d.

fem1d_heat_steady, an Octave code which uses the finite element method to solve the steady (time independent) heat equation in 1d.

Reference:

  1. George Lindfield, John Penny,
    Numerical Methods Using MATLAB,
    Second Edition,
    Prentice Hall, 1999,
    ISBN: 0-13-012641-1,
    LC: QA297.P45.

Source Code:


Last revised on 10 July 2023.