# kdv_exact

kdv_exact, a Fortran90 code which evaluates exact solutions of the Korteweg-deVries (KdV) partial differential equation (PDE) that represents the motion of a soliton.

The equation for u(x,t), the height of the wave, has the form

```        ut - 6 u ux + uxxx = 0
```
for which an exact solution is
```        u(x,t) = - 1/2 v ( sech ( 1/2 * sqrt ( v ) * ( x - v * t - a ) )^2
```
where parameter "a" is an arbitrary phase, and "v" represents the wave velocity.

### Languages:

kdv_exact is available in a Fortran90 version and a MATLAB version and an Octave version and a Python version.

### Related Data and codes:

burgers_exact, a Fortran90 code which evaluates exact solutions of time-dependent 1D viscous Burgers equation.

flame_exact, a Fortran90 code which returns the exact solution of an ordinary differential equation (ODE) which models the growth of a ball of flame in a combustion process. The exact solution is defined in terms of the Lambert W function.

navier_stokes_2d_exact, a Fortran90 code which evaluates an exact solution to the incompressible time-dependent Navier-Stokes equations (NSE) over an arbitrary domain in 2D.

navier_stokes_3d_exact, a Fortran90 code which evaluates an exact solution to the incompressible time-dependent Navier-Stokes equations (NSE) over an arbitrary domain in 3D.

spiral_exact, a Fortran90 code which computes a 2D velocity vector field that is an exact solution of the continuity equation.

stokes_2d_exact, a Fortran90 code which evaluates exact solutions to the incompressible steady Stokes equations over the unit square in 2D.

### Reference:

• John D Cook,
Solitons and the KdV equation,
03 November 2023,
https://www.johndcook.com/blog/2023/11/03/solitons-and-the-kdv-equation/
• John D Cook,
Rational solution to the Korteweg-De Vries equation,
13 November 2023,
https://www.johndcook.com/blog/2023/11/13/rational-kdv/

### Source Code:

Last revised on 30 April 2024.