FEM1D_HEAT_STEADY, a C program which applies the finite element method, with piecewise linear elements, to solve the steady state heat equation in one spatial dimension.
The finite element method is used with piecewise linear elements.
The steady state heat equation that is to be solved has the form:
- d/dx ( k(x) * du/dx ) = f(x)in the interval A < x < B. The functions k(x) and f(x) are given.
Boundary conditions are applied at the endpoints, and in this case, these are assumed to have the form:
u(A) = UA; u(B) = UB.
To compute a finite element approximation, a set of N equally spaced nodes is defined from A to B, a set of piecewise linear basis functions is set up, with one basis function associated with each node, and then the differential equation is multiplied by each basis function, and integration by parts is used to simplify the integrand.
A simple two point Gauss quadrature formula is used to estimate the resulting integrals over each interval.
fem1d_heat_steady ( n, a, b, ua, ub, k, f, x, u )where
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
FEM1D_HEAT_STEADY is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.
FD1D_HEAT_STEADY, a C program which applies the finite difference method to the steady state heat equation in one spatial dimension.
FD2D_HEAT_STEADY, a C program which uses the finite difference method (FDM) to solve the steady (time independent) heat equation in 2D.
FEM1D, a data directory which contains examples of 1D FEM files, three text files that describe a 1D finite element model;
FEM1D, a C program which applies the finite element method to a linear two point boundary value problem in a 1D region.
FEM1D_BVP_LINEAR, a C program which applies the finite element method to a linear two point boundary value problem (BVP) in a 1D region, using piecewise linear elements.
STOCHASTIC_HEAT2D, a C program which implements a finite difference method (FDM) for the steady (time independent) 2D heat equation, with a stochastic heat diffusivity coefficient, using gnuplot to illustrate the results.