FEM1D_NONLINEAR
Finite Element Method for 1D Nonlinear Problem.


FEM1D_NONLINEAR is a FORTRAN90 program 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.

Usage:

fem1d_nonlinear
runs the program.

Licensing:

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

Related Data and Programs:

FEM is a data directory which contains a description and examples of files that describe a finite element model.

FEM_50 is a MATLAB program which implements a finite element calculation in just 50 lines of code.

FEM_50_HEAT is a MATLAB program which implements a finite element calculation specifically for 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 FORTRAN90 library which reads or writes node, element and data files defining a finite element model.

FEM_SAMPLE is a FORTRAN90 library which evaluates a finite element function defined on an order 3 or order 6 triangulation.

FEM_TO_TEC is a MATLAB program which converts FEM models into TEC graphics files.

FEM1D is a FORTRAN90 program which applies the finite element method to a 1D linear two point boundary value problem.

FEM1D_ADAPTIVE is a FORTRAN90 program which applies the finite element method to a 1D linear two point boundary value problem using adaptive refinement to improve the solution.

FEM1D_NONLINEAR is available in a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.

FEM1D_PMETHOD is a FORTRAN90 program which applies the p-method version of the finite element method to a 1D linear two point boundary value problem.

FEM1D_PROJECT is a FORTRAN90 program which projects data into a finite element space, including the least squares approximation of data, or the projection of a finite element solution from one mesh to another.

FEM1D_SAMPLE, a FORTRAN90 program which samples a scalar or vector finite element function of one variable, defined by FEM files, returning interpolated values at the sample points.

FEM2D_HEAT is a FORTRAN90 program which solves the 2D time dependent heat equation on the unit square.

FEM2D_POISSON is a FORTRAN90 program which solves the 2D Poisson equation on a square, using the finite element method.

PIECEWISE_LINEAR_PRODUCT_INTEGRAL is a FORTRAN90 library which calculates the exact value of the integral of the product of two piecewise linear functions F(X) and G(X).

Reference:

  1. Hans Rudolf Schwarz,
    Finite Element Methods,
    Academic Press, 1988,
    ISBN: 0126330107,
    LC: TA347.F5.S3313..
  2. Gilbert Strang, George Fix,
    An Analysis of the Finite Element Method,
    Cambridge, 1973,
    ISBN: 096140888X,
    LC: TA335.S77.
  3. Olgierd Zienkiewicz,
    The Finite Element Method,
    Sixth Edition,
    Butterworth-Heinemann, 2005,
    ISBN: 0750663200,
    LC: TA640.2.Z54

Source Code:

Examples and Tests:

List of Routines:

You can go up one level to the FORTRAN90 source codes.


Last revised on 29 April 2007.