Adjusting the resolution of the time vector
Show older comments
Dear Matlab community,
I am solving heat transfer problems using the pdepe solver. Our problems require a very fine resolution regarding the time vector at certain points during our simulations (due to time-dependent boundary conditions). To ensure this fine resolution we currently use the 'MaxStep' option to restrict the δt for the whole simulation. This works really well but, as you can imagine, increases the computational time immensely since this measure would be necessary only during comparatively short time frames within the whole simulation (only at certain boundary conditions). Therefore my question, is it possible to have a time vector with varying δt as an input to the pdepe solver, or in other words, is there a possibility to set different 'MaxStep' options?
Thanks in advance.
Best regards
Christoph
Answers (1)
Fabio Freschi
on 9 Oct 2019
0 votes
Try pdeval and supply the solution of pdepe
4 Comments
Christoph Scherndl
on 10 Oct 2019
Fabio Freschi
on 10 Oct 2019
Got it. I can give a try to "ODE Event Location"
To give a rule to identify when you have a change of the boundary condition. Then restart the integration with the previous final solution as intial conditions.
Christoph Scherndl
on 14 Oct 2019
Fabio Freschi
on 14 Oct 2019
Edited: Fabio Freschi
on 14 Oct 2019
The overhead shouldn't be excessive, especially if the problem is very complex. Maybe someone from the community can help in this direction: I am quite surprised I am the only one replying to your post.
Btw: it seems that the previous one is the only possibility in Matlab: https://it.mathworks.com/matlabcentral/answers/84749-best-ode-solver-when-there-is-a-parameter-discontinuity
Categories
Find more on Programming 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!