A Problem in a Square Region for FEM2D_HEAT_SPARSE

FEM2D_HEAT_SPARSE_SQUARE is a MATLAB library which defines the geometry and other data of the square problem, so that a solution can be computed by fem2d_heat_sparse.

This mesh uses 81 nodes and forms 32 quadratic triangular elements.

We assume that the equation to be solved is

dUdT - Laplacian U + K * U = F
K = 0,
F = (2*pi*pi-1)*sin(pi*x)*sin(pi*y)*exp(-t).
The exact solution is:
U = sin(pi*x) * sin(pi*y) * exp(-t).
which is the formula we use to define our functions G (for the boundary conditions) and H (for the initial conditions).


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


FEM2D_HEAT_SPARSE_SQUARE is available in a MATLAB version.

Related Data and Programs:

CONTOUR_SEQUENCE4, a MATLAB program which makes a sequence of contour plots based on a single XY coordinate file, and a sequence of Z(X,Y) data files.

FEM2D_HEAT_SPARSE, a MATLAB program which solves the time dependent heat equation in an arbitrary triangulated 2D region, using MATLAB's sparse matrix storage format and solver.

Source Code:

Examples and Tests:

The following solution data was computed over 10 time steps:

The MATLAB program CONTOUR_SEQUENCE4 can make contour plots from the sequence of solutions:

You can go up one level to the MATLAB source code page.

Last revised on 06 July 2011.