fem2d_heat_test


fem2d_heat_test, a C++ code which calls fem2d_heat(), which applies the finite element method to solve a form of the time-dependent heat equation over an arbitrary triangulated region.

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
with
K = 0,
and
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).

Licensing:

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

Related Programs:

fem2d_heat, a C++ code which applies the finite element method to solve a form of the time-dependent heat equation over an arbitrary triangulated region.

Source Code:

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


Last revised on 05 March 2020.