FractionalDiffEq.jl icon indicating copy to clipboard operation
FractionalDiffEq.jl copied to clipboard

Use LinearSolve.jl for the FODEMatrixDiscrete methods

Open ErikQQY opened this issue 2 years ago • 2 comments

After the discretization, the linear fractional differential equation is transformed to a linear problem: $$Au=b$$ The current solver is the default solver in Julia, we can use the SciML LinearSolve.jl: https://github.com/SciML/LinearSolve.jl

ErikQQY avatar Aug 01 '22 02:08 ErikQQY

Hi @ErikQQY I found a problem in the FODEMatrixDiscrete() solver for solving Fractional differential equations. For which I need to solve the Bagley-Torvik equation where the right hand side defined by f(t) = 8 * (t<=1). However, it works by Matlab

h=5e-2
f(t) =  8 * (t<=1);
prob = MultiTermsFODEProblem([1, 1 , 1], [2, 3/2 , 0],  f , [0; 0], (0, 30))
sol = solve(prob, h, FODEMatrixDiscrete())
plot(sol)
dddddd

khaledharizb avatar Jul 25 '23 16:07 khaledharizb

Hello there! Sorry for the late response!

You can try the PIEX method for the multiple terms FODE problems:

h=5e-2
f(t, y) =  8 * (t<=1);
prob = MultiTermsFODEProblem([1, 1 , 1], [2, 3/2 , 0],  f , [0; 0], (0, 30))
sol = solve(prob, h, PIEX())
plot(sol)

ErikQQY avatar Jul 26 '23 02:07 ErikQQY