Implicit ODEs and discretized PDEs with time-variable parameters.
1 view (last 30 days)
Show older comments
I am trying to solve a system of ODEs and PDEs that have already been discretized in space and the integration using ode15s is getting done without bugs.
However, when I look at the results I can see many artefacts given by the fact that some of the parameters randomly change value in time and Matlab is not able to integrate nicely to obtain a smooth profile. It only does that when I set a constant value for all the flows involved but unfortunately my real life system isn't like that. I am integrating concentrations (X_BH) and material flows (Q) vary from one day to another without being correlated in any way with the time.
So instead of having a constant for the entire duration of the process, the Q value changes every day. I can see when I plot this variable (a flow in chemical engineering) that the solver has gone back and forth every time the value changed and the integrated states (concentrations, in my case) have weird spikes or dips, suggesting the the solves struggled to integrate.
How can I integrate my system and get reliable results while all the flows are so variable?
I have looked a bot at ode15i but I don't know enough Maths to understand what my Jacobian would be or how to estimate initial values for the derivative. I only have initial conditions for the concentrations.
Thank you!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1498639/image.png)
6 Comments
Torsten
on 5 Oct 2023
I can't interprete your results for C since I don't know your equations. But there must be other parameters that influence C apart from Q. Otherwise I couldn't explain why C slightly increases between 59 and 62 and decreases between 66 and 69 although Q in both cases is at a comparable level.
Answers (0)
See Also
Categories
Find more on Boundary Conditions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!