Submissions from I.B.

Programs from I.B. I’d be a liar if I told you I understood these progroms, BUT I’m sure that someone working with nonlinear diferential equations on a daily basis can read these programs like I read the Sunday comics!  Enjoy, and thanks again I.B.!

Contents

Go to Interpolation Routines

Go to Differential Equation Solutions

Go to Non linear equation system solver

Go to Specialized Differential Equation Solvers (2nd order non-linear dispersion equation)

Interpolation Routines

These programs fit data to a curve using the method of least squares.

basic program (liberty basic) ibint1.bas (fit to a line)

 basic program (liberty basic) ibint2.bas (fit to a 2nd order poly)

basic program (liberty basic) ibint3.bas (fit to a 3rd order poly)

basic program (liberty basic) ibint4.bas (fit to 4th order poly)

basic program (liberty basic) ibint5.bas (fit to a fifth order poly)

basic program (liberty basic) ibint6.bas (fit to a sixth order poly)

Differential Equations

Solving second order linear differential equations using Runge Kutta (very compact)

basic program (liberty basic) ibdifeq2.bas

Solving second order linear differential equations using Runge Kutta with initial boundary condition handling (modification of the preceding).

basic program (liberty basic) ibdifeq3.bas

basic program (liberty basic) ibdif3a.bas

basic program (liberty basic) ibdifeq4.bas

basic program (liberty basic) ibdifeqa.bas

Solve three simultaneous first order linear equations.

basic program (liberty basic) ibdifeq5.bas

Solving second order linear differential equations with two point boundary situation.

basic program (liberty basic) ibdifeq8.bas

Solving a boundary value problem using finite difference methods (gauss)

basic program (liberty basic) ibfin2.bas

 basic program (liberty basic) ibfin2a.bas

And the final version... Please download the dat file for the test cases. Case N:o 9 is shown in the graphs.

basic program (liberty basic) ibdiffn1.bas

dat file for ibdiffn1.bas - diffeq6.dat

 

 

Non Linear Equation System Solver

basic program (liberty basic) ibdifeqb.bas

Specialized Differential Equations - Dispersion Equation (2nd order non-lin)

Solving a differential equation of the form (d^2x/dy^2)+A*(dy/dx)+B*y+C*y*x^D+E=0.

basic program (liberty basic) ibdifeq0.bas

basic program (liberty basic) ibdifeq1.bas

basic program (liberty basic) ibdifg1.bas

basic program (liberty basic) ibdifg2.bas

Finding the optimal temperature profile in a batch reactor (non-lin dif eq)

basic program (liberty basic) iboptemp.bas

And for this one, I will just copy the statement from the program:

' PROGRAM SHRINKIM.BAS
' PROGRAM WRITTEN BY INGEMAR BJERLE MARCH 2002' Two parallel reactions in fixed bed reacting according to shrinking core.' This problem cannot be solved with the assumption of a concentration' profile moving at a constant velocity through the bed that often is done.' Instead the partial differential equation must be solved for both' rate equations. Below the program showing the solution is given.' In case a constant moving concentration profile is assumed the ratio' C/C0 is constant across the bed area and that is also valid for q/q0.' When the partial differential equation is applied for each of the' rate equations the concentration C within a differential volume element
' is allowed to vary across the bed area. After leaving an element' an average concentration is calculated. The implicit method is used.' For those interested a 40 pages pdf-file is available. In this also' solutions with Matlab and Scientist are given.' e-mail: [email protected]

basic program (liberty basic) ibspc2p.bas