Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Solving transient heat transfer, how can I control the time step size as a function of a local temperature from the former time step?

Please login with a confirmed email address before reporting spam

Hi guys,

I am trying to solve a transient heat transfer problem with phase change. When the temperature gets around the phase change point, I need to shorten the time step size to avoid fluctuation. Is it possible to get one temperature from each time step as a global variable? And then use the global variable as the input to the time step size function?

Thanks in advance, Tianyu


1 Reply Last Post 2019年9月6日 GMT-4 18:15

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 2019年9月6日 GMT-4 18:15

Hi Tianyu, An easier solution is to tell the solver to "take care" when a certain event, such as a maximum temperature or another global quantity, is encountered. To this end you can define the global quantity in Definitions and use it in the Events Interface.

When an Event is encountered, the solver will take an extremely small time step automatically. Here is a good illustration of this idea. https://www.comsol.com/blogs/implementing-a-thermostat-with-the-events-interface/

Hopefully you can follow from that. If not contact the support team with specific details on your modeling problem.

Cheers, Temesgen

-------------------
We all have opinions. But the COMSOL support team has the truth. I don't know if my opinion is still the truth. Check with that team before you try this at home!
Hi Tianyu, An easier solution is to tell the solver to "take care" when a certain event, such as a maximum temperature or another global quantity, is encountered. To this end you can define the global quantity in Definitions and use it in the Events Interface. When an Event is encountered, the solver will take an extremely small time step automatically. Here is a good illustration of this idea. https://www.comsol.com/blogs/implementing-a-thermostat-with-the-events-interface/ Hopefully you can follow from that. If not contact the support team with specific details on your modeling problem. Cheers, Temesgen

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.