FEM_50_HEAT is a MATLAB program which is a version of FEM_50 that applies the finite element method to the time-dependent heat equation in an arbitrary region, using about 50 lines of MATLAB code, by Jochen Alberty, Carsten Carstensen, Stefan Funken.
Because the underlying routine is so sparse and flexible, the user has the burden of supplying datafiles and routines that specify the geometry, triangulation, boundary and initial conditions, and so on. In some cases, preparing these files can be a considerable effort.
The unknown state variable U(x,y,t) is assumed to satisfy the time dependent heat equation:
dU(x,y,t)/dt = Uxx(x,y,t) + Uyy(x,y,t) + F(x,y,t)for (x,y) in the region Omega and times t in [t_start,t_final].
Dirichlet boundary conditions have the form
U(x,y,t) = U_D(x,y,t)on GammaD.
Neumann boundary conditions may be specified on the outward normal derivative:
Un(x,y,t) = G(x,y,t)on GammaN.
If Gamma designates the boundary of the region Omega, then we presume that
Gamma = GammaD + GammaNbut the user is free to determine which boundary conditions to apply.
There is also an initial condition to be applied:
U(x,y,t_start) = U_init(x,y,t_start)
The code uses piecewise linear basis functions on triangular elements. It would not be hard to include the ability to handle quadrilateral elements or mixed grids using both types of elements, as is done in FEM_50.
Because the geometry is completely up to the user, just about any two dimensional region can be handled, with arbitrary shape, including holes and islands.
FD1D_HEAT_EXPLICIT, a MATLAB program which uses the finite difference method and explicit time stepping to solve the time dependent heat equation in 1D.
FD1D_HEAT_IMPLICIT, a MATLAB program which uses the finite difference method and implicit time stepping to solve the time dependent heat equation in 1D.
FD1D_HEAT_STEADY, a MATLAB program which uses the finite difference method to solve the steady (time independent) heat equation in 1D.
FEM_50, a MATLAB program which implements the finite element method in just 50 lines of code.
FEM1D, a MATLAB program which applies the finite element method, with piecewise linear basis functions, to a linear two point boundary value problem;
FEM2D_HEAT, a MATLAB program which solves Poisson's equation on a square, using the finite element method.
FEM2D_POISSON, a MATLAB program which solves Poisson's equation on a square, using the finite element method.
HOT_PIPE, a MATLAB program which can be run with FEM_50_HEAT.
HOT_POINT, a MATLAB program which can be run with FEM_50_HEAT.
Jochen Alberty,
Carsten Carstensen,
Stefan Funken.
You can go up one level to the MATLAB source codes.