fd1d_bvp, a Python code which applies the finite difference method (FDM) to solve a two point boundary value problem (BVP) in one spatial dimension.
The boundary value problem (BVP) that is to be solved has the form:
- d/dx ( a(x) * du/dx ) + c(x) * u(x) = f(x)in the interval X(1) < x < X(N). The functions a(x), c(x), and f(x) are given functions, and a formula for a'(x) is also available.
Boundary conditions are applied at the endpoints, and in this case, these are assumed to have the form:
u(X(1)) = 0.0; u(X(N)) = 0.0.
To compute a finite difference approximation, a set of n nodes is defined over the interval, and, at each interior node, a discretized version of the BVP is written, with u''(x) and u'(x) approximated by central differences.
u = fd1d_bvp ( n, a, aprime, c, f, x )where
The information on this web page is distributed under the MIT license.
fd1d_bvp is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.
fd1d_advection_lax_wendroff, a Python code which applies the finite difference method (FDM) to solve the time-dependent advection equation ut = - c * ux in one spatial dimension, with a constant velocity, using the Lax-Wendroff method to treat the time derivative.
fd1d_heat_explicit, a Python code which uses the finite difference method (FDM) and explicit time stepping to solve the time dependent heat equation in 1D.
fd1d_heat_implicit, a Python code which uses the finite difference method (FDM) and implicit time stepping to solve the time dependent heat equation in 1D.
humps_bvp, a Python code which sets up a boundary value problem (BVP) whose solution is a double hump curve.
ill_bvp, a Python code which defines an ill conditioned boundary value problem (BVP), and calls on scipy.integrate.solve_bvp() to solve it with various values of the conditioning parameter.
solve_bvp_test, a Python code which calls scipy.integrate.solve_bvp(), which solves boundary value problems (BVP) in one spatial dimension.