HOT_PIPE
A Sample Heat Flow Problem


HOT_PIPE is a set of MATLAB routines that describe a particular heat problem suitable for solution by FEM_50_HEAT, a MATLAB program that solves the time dependent heat equation in two dimensions.

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 is a MATLAB finite element program in just 50 lines of code.

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

FEM_IO is a library of MATLAB routines for reading or writing the node, element and data files that define a finite element model.

FEM_SAMPLE is a MATLAB library of routines for evaluating a finite element function defined on an order 3 or order 6 triangulation.

FEM2D_HEAT is a MATLAB program for solving the heat equation on the unit square, using the finite element method.

FEM2D_POISSON is a MATLAB program for solving Poisson's equation on the unit square, using the finite element method.

FEMPACK is a MATLAB library of routines for finite element calculations.

FREE_FEM_HEAT is a MATLAB program which uses the finite element method and the backward Euler method to solve the time-dependent heat equation on an arbitrary triangulated region in 2D. (The user supplies some information in some problem-dependent subroutines.)

FREE_FEM_POISSON is a MATLAB program for solving Poisson's equation on a triangulated region, using the finite element method.

FREE_FEM_STOKES is a MATLAB program for solving the Stokes equations on a triangulated region, using the finite element method.

HOT_POINT is a sample problem that can be run with FEM_50_HEAT.

PLTMG is a FORTRAN77 library of routines for solving elliptic partial differential equations using the finite element method with piecewise linear triangles and the multigrid approach.

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

TRIANGULATION_ORDER6 is a 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 is a MATLAB script which can make contours of a scalar quantity defined on the nodes of an order 6 triangulation.

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,
    Available as "../../pdf/acf.pdf".
  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.