zjj0930 / numerical-methods-fortran

Solving linear, nonlinear equations, ordinary differential equations, ... using numerical methods in fortran

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Numerical methods in fortran

Solving linear, nonlinear equations, integral, ordinary differential equations, ... using numerical methods in fortran

1. Linear equations:

LU
PLU (TODO)
QR (TODO)

2. Non-uniform random number generator

Normal distribution
    - Box–Muller transform
    - Ratio-of-uniforms method

3. Nonlinear equations

Newton-Raphson
Fix point

4. Integration Methods

One-dimensional
    - Rectangle rule.
    - Trapezoidal rule.
    - Simpson's rule.   
    - Gauss-Hermite     (TODO)
    - Gauss-Laguerre    (TODO)

N-dimensional
    - Monte Carlo       (TODO)
    - Sparse grids      (TODO)
    - Bayesian Quadrature (TODO)

5. Ordinary differential equations (ODE)

Monostep
    - Euler explicit
    - Euler implicit (TODO)
    - Runge-Kutta fourth order method (classical)
Multistep
    - Adams-Bashforth
    - Adams-Moulton   (TODO)
    - Nyström         (TODO)
    - Mile-Simpson    (TODO)
    - Backward differentiation formula (TODO)

6. Stochastic Ordinary Differential Equations (SDE)

- Euler-Maruyama method
- Milstein Method (TODO)
- Strong Order 1.0 Runge-Kutta Method 
- Strong Order 1.5 Taylor Method (TODO)
- Weak Order 2 Taylor Method (TODO)
- Weak Order 2 Runge-Kutta Method

Examples

pgplot and dislin libraries are necessary to plot the examples: pgplot, dislin

Example 1: ordinary differential equation

example ode equation

ordinary differential equation figure

Example 2: Lotka–Volterra 1

lotka_volterra 1 equation

lotka_volterra 1 figure

Example 3: Lotka–Volterra 2

lotka_volterra 2 equation

lotka_volterra 2 figure

Example 4: isotherm transesterification reaction at 50 C (link)

transesterification equation

Where:

  • [TG] Triglycerides.
  • [DG] Diglycerides.
  • [MG] Monoglycerides.
  • [GL] Glycerin.
  • [A] Alcohol.
  • [E] Ethylester.

transesterification figure

Example 5: Bogdanov-Takens bifurcation

Bogdanov-Takens equation

Bogdanov-Takens figure

Example 6: pendulum

pendulum equation

pendulum figure

Example 7: Lorenz system

Lorenz equation

Lorenz figure

Example 8: Stochastic Ordinary Differential Equation (SDE)

Force Regulation by Nascent Adhesion Sites (Robijn Bruinsma)

one-dimensional integral equation

one-dimensional integral equation

Where:

  • G(0,1) standard normal distribution.

one-dimensional function figure

About

Solving linear, nonlinear equations, ordinary differential equations, ... using numerical methods in fortran

License:GNU General Public License v2.0


Languages

Language:Fortran 93.1%Language:Makefile 6.9%