[an error occurred while processing this directive]

Home

# Burgers' PDE Equation & Parameter Estimation __________

### Increased Productivity Example #9 Source Code:

``````
global all
problem BurgersPDE

C I'm new to Method of Lines (MOL) and PDEs, so please check my work!

C Internet shows solutions to Burgers Equation that differ greatly!!!
C Are the solutions different types; e.g. Steady State vs. zzz?

C ------------------------------------------------------------------------
C --- Calculus Programming example: Burgers' 1D Equation; a PDE Initial
C --- Value Problem solved using Method of Lines.
C ------------------------------------------------------------------------
C ... Warning ... a numerical problem exists when 'dt' or 'viscosit' values
C ...   are too small.
C ------------------------------------------------------------------------
dynamic U, Ut, error
C
C User parameters ...
viscosit = 1         ! viscosity between .1 & .001 are of interest
tFinal =  .5          ! not sure when odd numeric problem surfaces
jpoints = 10*tFinal  ! grid pts. over t-axis
C
C x-parameter initial settings: x ==> i
xFinal= 1
dx = .1
ipoints = xFinal/dx + 1.99        ! grid pts. over x-axis
allot U( ipoints), Ut( ipoints), error( ipoints)

C t-parameter initial settings: t ==> j
dt = .005:	tPrint= dt*jpoints:  pts = ipoints
print 78, "viscosity, dt, dx, ipoints =", viscosit,dt,dx,pts
78     format( 1x, a, f5.3, 20(2x, f8.4))
C
call xAxis
end
model xAxis
C ... Integrate over x-axis ... for a steady state solution
last = 5	! number of iterations for Steady State solution
do 10 i = 1, last
t= 0:   tPrt = tPrint:  dt = tPrt / 10
‹error› = ‹U›
Initiate ISIS;  for PDE;
~       equations Ut/U;  of t;  step dt;  to tPrt
do while (t .lt. tFinal)
Integrate PDE;  by ISIS
if((t .ge. tPrt) .and. (i .eq. 1)) then
print 79, t, (U( j), j = 1, ipoints)
tPrt = tPrt + tPrint
elseif((t .ge. tPrt) .and. (i .eq. last)) then
print 79, t, (U( j), j = 1, ipoints)
tPrt = tPrt + tPrint
elseif(t .ge. tPrt) then
print 78, "-------------", i
print 78, " "
tPrt = tPrt + tPrint
endif
end do
10	continue
‹error› = ‹U› - ‹error›
print 78, " "
print 78, "i & 'error' array follows = ", i
print 79, t, (error( j), j = 1, ipoints)
print 78, "-------------"
print 78, " "
78     format( 1x, a, i8)
79     format( 1x, f4.3, 20(1x, f8.5))
end
model PDE                         ! Partial Differential Equation
C                                       ! Method of Lines
C Boundary Conditions for Burgers' Equation
U(1) = 1/(1 + Exp(-t/(4*viscosit))
U(ipoints) = 1/(1 + Exp((2-t)/(4*viscosit))

do 20 jj = 2, ipoints-1       ! System of ODEs ... Method of Lines
Ut(jj) = -U(jj) * (U(jj+1)-U(jj-1))/(2*dx)
Ut(jj) = Ut(jj) + viscosit*(U(jj+1)-2*U(jj)+U(jj-1))/(dx*dx)
20     continue
end
``````

Solving PDEs are another increased productivity example do to using Calculus (level) Programming.