Professional Documents
Culture Documents
Readme
Readme
1. INTRODUCTION
This version of WINPP comes as a winzipped file witha bunch of ODE examples
and some very minimal documentation. I don't have that much time to write
this stuff and never was very good at it. XPP which begat this program has
more extensive documentation although there are some substantial differences.
However, the basic structure of the input files is identical.
The basic idea is to create an input file with any text editor. This file
tells WINPP the equations, parameters, functions, etc that are to be used
in the numerical simulation. In addition, it is possible to define plot parameters,
etc within the file. The interface is based on Win95/NT and will not run
under Windows 3.*. All aspects of the simulation can be changed within the
program using the interface, but the names of variables and the dimension
of the system cannot be changed nor can a new file be loaded in without exiting
first.
To run WINPP, just click on the icon for it and then use the file
selector to choose an ODE file. Alternatively, you can type it from the
DOS prompt followed by an ODE file name:
winpp pend.ode
LOGFILE
Every time you run WINPP, the program creates a file called WPP.LOG in the
directore where WINPP is found if called by clicking on the icon or in
the initiating directory if called from the DOS Prompt. This can be
used to see any comments etc that the program produces such as error
messages etc. If you run with a bad ODE file, this will tell you what
was wrong.
SIMPLE COMMANDS
2. INPUT FILES
The standard convention for WINPP is to name files with the extension
ODE. I will call such files ODE files. They all have the following
format. Note that there should be no spaces between a number and an
equals sign in the definions of parameters and initial values of
phase-space variables.
aux <name>=<formula>
!<name>=<formula>
<name>=<formula>
parameter <name1>=<value1>,<name2>=<value2>, ...
wiener <name1>, <name2>, ...
number <name1>=<value1>,<name2>=<value2>, ...
<name>(<x1>,<x2>,...,<xn>)=<formula>
table <name> <filename>
table <name> % <npts> <xlo> <xhi> <function(t)>
global sign {condition} {name1=form1;...}
init <name>=<value>,...
<name>(0)=<value>
bdry <expression>
0= <expression> <--- For DAEs
solv <name>=<expression> <------ For DAEs
special <name>=conv(type,npts,ncon,wgt,rootname)
fconv(type,npts,ncon,wgt,rootname,root2,function)
sparse(npts,ncon,wgt,index,rootname)
fsparse(npts,ncon,wgt,index,rootname,root2,function)
# comments
@ <name>=<value>, ...
done
INTEGRAL EQUATIONS
The general integral equation:
u(t)=f(t)+int(0,t) K(t,s,u(s))ds
becomes
u = f(t) + int{K(t,t',u)}
The convolution equation:
OPTIONS
The remaining options can be set from within the program. They are
RESERVED WORDS
EXAMPLES
Here I present some example ODE files that you are welcome to try out.
COMMENTS:
1. I have defined some extra quantities called pe and ke. These are
called "fixed variables" and are defined in terms of phase variables
and parameters etc. They are used internally but not accessible to the
user. Only phase variables (those that obey dynamics) and auxiliary
quantities can be plotted and viewed.
2. I have defined some auxiliary variables that can be viewed by the
user.
3. Run this and look at a 3D view with X along the X-axis, XP along the
Y-axis, and T along the Z-axis; use the Autofit option.
# hhnasing.ode
# single channel sodium channel with greatly enhanced single channel
# conductance.
dv/dt = -gl*(v-vl) -gna*m*(v-vna)+I
markov m 2
{0} {am(v)}
{bm(v)} {0}
#
init v=0,m=0
#
am(v)=PHI*.1e0*(.25e+02-v)/(EXP(.1e0*(.25e02-v))-.1e+01)
bm(v)=PHI*4.0e0*EXP(-v/1.8e01)
# parameters
par i=0,vna=115,vl=0,gna=.1,gl=.3,phi=1
#
done
COMMENTS:
1. The random variable, m, has two states open (1) and closed (0). The
rates of switching between the states are defined by a 2x2 array (or if
there were 5 states, 5x5) of switching rates, a_ij. The probability of
jumping from state i to state j is a_ij*dt. In WINPP, the diagonal
terms are ignored since the row sums must always be 1. Here am(v) is
the voltage-dependent rate of jumping from state 0 to state 1.
2. WINPP is case-insensitive so EXP and Exp and eXp are all the
exponential function.
3. Floating point exponents are of the form #e+#, #e-#, #e#, where # is
any number.
4. The functions am(v) and bm(v) are defined by a simple obvious
statement.
5. Run this simulation and look at the voltage and the channel states
COMMENTS:
1. The "@" symbol is used to initialize internal plot and simuation
parameters so that theuser doesnt have to do it manually within the
program. Here I have set the total integrateion time to 40 and also
made the x and y axes optimal for the simulation. Finally, I have set a
parameter called "delay" which tells WINPP to allocate enough storage
so that it can access delays as far back as 10. I only needed 3 for
this simulation.
2. Within a right-hand side the function delay(x,tau) produces,
x(t-tau).
3. Run this. Then move the mouse into the plot window, hold down the
button and move around. Note how the (x,y) values are displayed. Find
the period of the oscillation. It is about 9.7
COMMENTS:
1. The first integral operator convolves exp(-t) with f1(t)^2 and the
second one convolves t with f2(t)^2/(1+f1(t)^2)
2. yplot=f2 tell WINPP to plot f2(t).
3. Run this. Then click on Graphics Add/edit. In this dialog, click on
Add New. Make the Y axis of the new curve f1 and make the color Red.
Click on Done and then click on Graphics Redraw (Ctrl-R).
# dae_ex1.ode
x'=y
0= x+y-1
x(0)=0
solv y=1
aux yy=y
done
COMMENTS:
1. The expression "0=" starting a line tells WINPP that the remaining
expression must be set to 0. The expression "solv y=1" tells WINPP that
it "y" is an algebraic variable and that an initial guess should be 1.
2. The variable that is to be solved for, y, is hidden from the user
and in order to see it, the plottable auxiliary variable yy is defined.
dx/dt + exp(dx/dt)=-x
# dae_ex2.ode
x'=xp
0= xp+exp(xp)+x
x(0)=-3.7182
solv xp=1
aux xdot=xp
@ ylo=-4,yhi=0
done
COMMENTS:
1. Note that the root solver solves for xp and this is just dx/dt.
#dae_ex3.ode
w'=v_
0= v_*(1-v_*v_)-w
solv v_=1
aux v=v_
@ NEWT_ITER=1000,NEWT_TOL=1e-3,JAC_EPS=1e-5,METH=qualrk
done
COMMENT:
1. Plot v and w in a phase-plane
COMMENTS:
1. To run this, Click on Run BVP Show and repeated attempts at solving
using shooting will be shown. If a solution is found the intermediate
solutions will be erased and the final solution will be shown. The
initial value of xp is free to be chosen and will hopefully be found
to satisfy the end condition.
2. Boundary conditions are put in with the statement "bndry". The program
attempts to make them zero. A primed variable means to evaluate the
variable at the end of the integration while unprimed means to evaluate
at the beginning.
3. The total integration time is set here to 1 reflecting the length of
the domain.
omega'=0
# gberg.ode
init a=0.0118 ap=1.18 k=0 omeg=-0.19
par d=0.177 q=0.5 sig=3
# the odes...
a'=ap
ap'=a*k*k-ap/t+a/(t*t)-a*(1-a*a)/d
k'=-k/t-2*k*ap/a-(omeg+q*a*a)/d
omeg'=0
# the boundary conditions
bndry a-t*ap
bndry k
bndry ap'
bndry k'
# set it up for the user
@ xhi=1 t0=.01,dt=.01,total=.99
done
COMMENTS:
1. Since a(t)/t is undefined in the computer as t->0, we start t at a
small value and insist that a(t) = a'(0)t for t small. We integrate
for a total of .99 since we started at t=.01.
2. It is written as a system of first order equations.
3. This equation arises when one looks for spiral wave solutions to a
system of reaction-diffusion equations.
3. WINPP Commands
**Go** just uses the current initial data and runs for the amount of time
specified by the Numerics parameters
**New** lets you specify initial data for variables without clicking in
the initial data box which uses a font that is too small for my aging
eyes.
**Shoot** uses special initial data that are generated when fixed
points are found. See the section on fixed points.
THE BROWSER
WINPP keeps the results of simulations in a data buffer. You can view
the numbers from the simulation by looking at the Browser. Use the
arrow keys or scroll bars to go through the numbers. There are several
commands:
**Find** will look for the closest value of one of the browser
quantities to the number specified.
**Get** will use the numbers in the top row of the browser as initial
data.
**AddCol** lets you add a formula column to the browser. All subsequent
integrations will compute the formula.
GRAPHICS OPTIONS
WINPP lets you plot any quantity versus any other quantity.
**View**