Adjusting the resolution of the time vector

4 visualizaciones (últimos 30 días)
Christoph Scherndl
Christoph Scherndl el 9 de Oct. de 2019
Editada: Fabio Freschi el 14 de Oct. de 2019
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

Respuestas (1)

Fabio Freschi
Fabio Freschi el 9 de Oct. de 2019
Try pdeval and supply the solution of pdepe
  4 comentarios
Christoph Scherndl
Christoph Scherndl el 14 de Oct. de 2019
Thanks for this approach, while this would work great for short simulations i am not sure if this solution will work time-efficient if i have to restart the integration a thousand times in an automated way during longer heat transfer problems. I am running my pdepe within a lsqnonlin optimizer and therefore being able to reliably integrate without my input during the whole simulation is of utmost importance. I am really struggeling to estimate the benefit regarding computational time when the solver has to be started over and over again and the added complexity that comes with this approach seems to exceed the benefits. I am just not sure if implementing this solution would be less effort than changing the ode15s (used by the pdepe) to fixed time steps. I don't want to overstrain your cooperativeness but maybe you could provide your thoughts on that. Anyway, thanks very much for your help. I really appreciate your support regarding this "special" problem.
Christoph
Fabio Freschi
Fabio Freschi el 14 de Oct. de 2019
Editada: Fabio Freschi el 14 de Oct. de 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

Iniciar sesión para comentar.

Etiquetas

Productos


Versión

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by