Feeds:
Posts

## fractional evolution simulations — problems

### Zulfikar Ahmed<wile.e.coyote.006@gmail.com>

10:12 PM (0 minutes ago)

 to David, bcc: aimee
Sir, the code I’d written for simulation of fractional differential system is not working yet but it should be working by tomorrow.  The output now is a lot of NA’s.  This can be fixed up quite quickly and is the key bottleneck for some simulations and tuning theta parameters.  The one-dimensional fracdiff now is quite fast since it uses fft.  Besides this I’ll change the Riemann-Liouville derivative with the Caputo derivative.  I think we can have trustable residuals tomorrow or at most a couple of days.

function( initial.values, theta, timelen ){
# assume system is simply
#
# y^(alpha)(t) – theta[2]*y(t) == theta[3]*y(t)**theta[4], y(0)=1
#
alpha<-theta[1]
#N<-length(initial.values)
N<-timelen
niter<-100
y<-matrix( 0, nrow=N, ncol=niter)
y[1,]<-initial.values
for (j in 2:niter){
fractional.derivative<-fracdiff(y[,j-1],alpha)
yterm<-theta[2]*y[,j-1]
convection<-theta[3]*y[,j-1]**theta[4]
y[,j]<-y[,j-1] + 1/gamma(theta[1])*(fractional.derivative – yterm)
}
y[,niter]
}
Attachments area
Preview attachment Screenshot from 2015-06-12 22:05:18.png

Screenshot from 2015-06-12 22:05:18.png