HOT_PIPE
A Sample Heat Flow Problem


HOT_PIPE is a MATLAB program which describes a particular heat problem suitable for solution by FEM_50_HEAT, a MATLAB program that solves the time dependent heat equation in two dimensions, by Jochen Alberty, Carsten Carstensen, Stefan Funken.

Dirichlet boundary conditions on the left side of the region have the form


        U(x,y,t) = t
      
The list of element sides at which these conditions apply are given in dirichlet.txt.

The (time dependent) right hand side of the Dirichlet conditions is evaluated by the function u_d.m.

Neumann boundary conditions on the top and bottom of the region have the form


        Un(x,y,t) = 0
      
and the Neumann boundary condition on the right is:

        Un(x,y,t) = 1.
      
The list of element sides at which these conditions apply are given in neumann.txt.

The (possibly time dependent, but not in this case) right hand side of the conditions is evaluated by the function g.m.

The initial condition


        U(x,y,t_start) = 0
      
is evaluated by the function u_init.m.

The time dependent heat equation has the form


        dU/dt = Uxx + Uyy + F(x,y,t)
      
The right hand side function F(x,y,t) for the hot pipe problem has the fancy form:

        F(x,y,t) = 5 * sin ( pi * ( x + t ) ) * sin ( pi * ( y - t ) )
      
and is evaluated by the function f.m.

Internal to the script FEM_50_HEAT are statements that choose certain parameters. For this run, suggested values are:

Any of these quantities may be changed to values that you find more suitable.

Related Data and Programs:

FEM_50, a MATLAB program which implements a finite element method in just 50 lines of code.

FEM_50_HEAT, a modified version of FEM_50 suitable for solving the heat equation.

FEM_IO, a MATLAB library which reads and writes the node, element and data files that define a finite element model.

FEM2D_HEAT, a MATLAB program which solves the heat equation on the unit square, using the finite element method.

FEM2D_POISSON, a MATLAB program which solves Poisson's equation on the unit square, using the finite element method.

HOT_POINT, a MATLAB program which can be run with FEM_50_HEAT.

TRIANGULATION_ORDER3, a data directory which contains a description and examples of how an order 3 (linear) triangulation is defined by a node and element file.

TRIANGULATION_ORDER6, a data directory which contains a description and examples of how an order 6 (quadratic) triangulation is defined by a node and element file.

TRIANGULATION_ORDER6_CONTOUR, a MATLAB program which can make contours of a scalar quantity defined on the nodes of an order 6 triangulation.

Author:

Jochen Alberty,
Carsten Carstensen,
Stefan Funken.

Reference:

  1. Jochen Alberty, Carsten Carstensen, Stefan Funken,
    Remarks Around 50 Lines of MATLAB:
    Short Finite Element Implementation,
    Numerical Algorithms,
    Volume 20, pages 117-137, 1999.
  2. Carsten Carstensen's web page "http://www.math.hu-berlin.de/~cc".

Source Code:

Examples and Tests:

The test region is the unit square, containing 169 nodes, whose locations are specified in coordinates.txt. You may examine a PNG image of the nodes in nodes.png, created by the TRIANGULATION_PLOT program.

Triangular elements are used (in fact, FEM_50_HEAT can't currently use quadrilateral elements.) The triples of nodes that form each triangle are listed in elements3.txt. You may examine a PNG image of the elements in elements.png, created by the TRIANGULATION_PLOT program..

The pair of data files coordinates.txt and elements3.txt describe an order 3 triangulation. For more examples of this data structure, see the order 3 triangulation data page.

You may examine a PNG image of the grid, which displays both the nodes and elements, in grid.png, created by the TRIANGULATION_PLOT program.

You can go up one level to the MATLAB source codes.


Last revised on 04 May 2007.