FEM1D_NONLINEAR is a MATLAB program, using double precision arithmetic, which applies the finite element method to a simple nonlinear boundary value problem in one spatial dimension.
The nonlinear boundary problem involves an unknown function u on an interval [a,b]. Typically, a single boundary condition, either u(a) or u'(a), is given at the left endpoint, and u(b) or u'(b) at the right endpoint. The associated differential equation, which must hold in the interior of [a,b], happens to have the form:
-d/dx ( p(x) du/dx ) + q(x) * u + u * du/dx = f(x)
where p(x), q(x) and f(x) are given functions.
The nonlinearity arises because of the term u*du/dx; if this term were not present, standard finite element techniques would allow the system to be set up and solved almost as easily as a linear system of algebraic equations is solved.
Newton's method, which works well for scalar nonlinear equations, can also be applied to this problem, as long as we are willing to extend our notions of a function and derivative. We need to imagine our differential equation as a function F(u):
F(u) = -d/dx ( p(x) du/dx ) + q(x) * u + u * du/dx - f(x)
(with the boundary conditions wrapped in here somewhere as well!)
If we differentiate this function, we get a Jacobian operator, which is
evaluated at u, and applied to any small increment v. This equation
implicitly describes the tangent plane of solutions near to a given
solution u.
J(u,v) = -d/dx ( p(x) dv/dx ) + q(x) * v + u * dv/dx + v * du/dx
Now if we apply the finite element formulation to represent u and
v in terms of sums of basis functions, we can set up a linear
system, to be evaluated at u and solved for the Newton increment
delta_u:
J(u,delta_u) = - F(u)
By using the Newton increment to update u and repeating the process
as needed, we can expect to get a good finite element solution of our original
nonlinear boundary value problem.
FEM is a data directory which contains a description of the data files that can be used to describe a finite element model.
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_BASIS_T3_DISPLAY is a MATLAB program which displays a basis function associated with a linear triangle ("T3") mesh.
FEM_BASIS_T6_DISPLAY is a MATLAB program which displays a basis function associated with a quadratic triangle ("T6") mesh.
FEM_IO is a set 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.
FEM_TO_TEC is a MATLAB program that can convert an FEM model into a TEC graphics file.
FEM1D is a MATLAB program that applies the finite element method to a linear two point boundary value problem.
FEM1D_ADAPTIVE is a MATLAB program that applies the finite element method to a linear two point boundary value problem in a 1D region, using adaptive refinement to improve the solution.
FEM1D_NONLINEAR is also available in a C++ version and a FORTRAN77 version and a FORTRAN90 version.
FEM1D_PMETHOD is a MATLAB program that applies the p-method version of the finite element method to a linear two point boundary value problem in a 1D region.
FEM2D_HEAT is a MATLAB program that solves the time dependent heat equation on the unit square.
FEM2D_POISSON is a MATLAB program for solving Poisson's equation on a square, using the finite element method.
FEMPACK is a MATLAB library of routines for finite element calculations.
FFNS_SPARSE is a MATLAB program for solving the steady incompressible Navier Stokes equations on an arbitrary triangulated region, using the finite element method and MATLAB's sparse facility.
FFS_SPARSE is a MATLAB version of FREE_FEM_STOKES which uses MATLAB's sparse matrix storage, factorization and solution techniques.
FLOW3 is an executable FORTRAN90 code for solving steady incompressible Navier Stokes equations in 2D using the finite element method.
FLOW5 is an executable FORTRAN90 code for solving steady incompressible Navier Stokes equations in 2D using the finite element method.
FLOW7 is an executable FORTRAN90 code for solving steady incompressible Navier Stokes equations in 2D using the finite element method.
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_NAVIER_STOKES is a MATLAB program which solves the 2D incompressible Navier Stokes equations in an arbitrary triangulated region.
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 FORTRAN90 program which solves the 2D incompressible Stokes equations in an arbitrary triangulated region.
HCELL is a FORTRAN77 program which computes the pressure and velocity for a Navier Stokes flow in an "H"-shaped region.
HOT_PIPE is a sample problem that can be run with FEM_50_HEAT.
HOT_POINT is a sample problem that can be run with FEM_50_HEAT.
INOUT is a FORTRAN77 program which computes the pressure and velocity for a Navier Stokes flow in a square region with an inlet and an outlet.
MHD_CONTROL is an executable FORTRAN90 program which tries to control the evolution of an MHD system so that a particular state is achieved.
MHD_FLOW is an executable FORTRAN90 program for the evolution of an MHD system.
NAST2D is a C++ program which computes the pressure and velocity for a Navier Stokes flow.
NAST2D_F90 is an executable FORTRAN90 program which uses the finite volume method to set up and solve the 2D incompressible Navier Stokes equations with heat.
NSASM is a C library of routines, intended to be used with a MATLAB calling program, and which set up the sparse matrix needed for a Newton iteration to solve a finite element formulation of the steady incompressible 2D Navier Stokes equations.
PLTMG_SINGLE 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.
TCELL is an executable FORTRAN77 program which computes the pressure and velocity for a Navier Stokes flow in a "T"-shaped region.
You can go up one level to the MATLAB source codes.