Adjust time discretization in transient thermal model

Hi
I am trying to model a process with a very quickly varying heat source which pulses on and off on the scale of a few nanoseconds, repeating every microsecond. I'm using pde toolbox functions createpde('thermal','transient'), thermalProperties(...), solve(...) etc.
The first pulse is always correctly simulated, but later pulses are inconsistent in whether they are modelled or not, depending on whether I include certain times in my tlist set. Usually I will just see diffusion of the heat from the initial pulse
I think the time discretization may not be fine enough to model this process properly. Is there a way to increase it without custom building my own thermal model from first principles?

1 Comment

I'm solving this problem,too.But my programing sucks, I will appreciate it if you can share the part of program for soving the equations XD

Sign in to comment.

 Accepted Answer

I believe that, internally, the solver uses ode15s to solve the time portion of the equation. This solver attempts to take as large steps as it can while maintaining accuracy, and in the sort of situation you have, it can step right over a change in a coefficient and never know that it missed anything.
The safest way to run the solver is to solve the PDE during a pulse (very short time), then solve the PDE starting from the end of the pulse to the beginning of the next pulse separately, starting from the previous solution, and continue that way. In that manner, the solver will not skip over a small pulse, but will handle each one correctly. It shouldn't be too hard to program that, and to collect the solutions into one large data structure such as a matrix or cell array or whatever suits you.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

More Answers (0)

Asked:

on 29 Jun 2018

Commented:

L W
on 18 May 2022

Community Treasure Hunt

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

Start Hunting!