#Problem with DifferentialEquations.jl

1 messages · Page 1 of 1 (latest)

magic dagger
#

I'm working on a project, which is basically a simulation model for adsorption process of phosphate in waste water

(2 videos to understand the adsorption process, it's 15 seconds in total)

https://www.youtube.com/watch?time_continue=15&v=XnkKa9xlw-c&embeds_referring_euri=https%3A%2F%2Fencyclopedia.che.engin.umich.edu%2F&source_ve_path=MjM4NTE
https://www.youtube.com/watch?v=xQDV57ZthC8&t=9s

So the first is to simulate the evolution of the concentration of phosphate into the column and the evolution of the amount of phosphate adsorbed into the column. To do that, I have to discretize two equations.

I'm using a code that I've previously used in class with slighty different equations, and it was working perfectly. However in my case, I keep getting weird plot with excessive time or maxiters error.

#

The last file is to calculate the concentration at the equilibrium from lab data. All you need to know is that the vector q need to have the same amount of element than the number of space points.

#

Exemple of what I get

#

What I should get

fallen rapids
#

Can’t check your code at the moment, but the central difference seems to lack 1/2
(It wouldn’t matter, as it can be considered to be effectively part of the coefficient before)

You might want to use upwind scheme for stability (because it seems your solution isn’t stable)

… I’m sure someone who’s more familiar with differential equation.jl can provide a better solution

formal grove
#

yes that is not a stable semidiscretization