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.

Speeding up time-dependent solver

Please login with a confirmed email address before reporting spam

Hi!

I want to simulate air convection generated by Joule Effect. Using an input source of 1 V (constant over all times except for t=0, where there's a quick rising phase from 0 to 1 in order to have consistent initial conditions), I can simulate pretty good results on a time window of one minute, with a CPU time of about a hour.

When I try to simulate larger timespans, the reciprocal of step size tend to grow more and more until COMSOL warns that a singularity is likely hit, and the simulation is inturrepted (see image attached).

How can I prevent this and at the same time increase time durations to hours/days with a reasonable CPU time running? I use an Intel Core(TM) i5-7500 CPU and 16 GB RAM. The model is rather simple and the figure above refers to a 2D model with a simple geometry ~29k DOF.



2 Replies Last Post 2021年2月5日 GMT-5 05:38
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 years ago 2021年1月15日 GMT-5 15:04
Updated: 4 years ago 2021年2月5日 GMT-5 08:49

Hello Luca,

If I understand you correctly, you have some sort electric conductor that's exposed to a DC current; it heats up, and as a result some fluid nearby heats up too and starts moving. If I got that right (and if there is no feedback loop from the thermal and fluid flow problems into the DC problem), then one suggestion to speed up your calculations would be to solve the DC problem as a first solution step using a stationary solver, and then solving the heat transfer and fluid flow problem as a second solution step using a transient solver. This may or may not be related to the singularity error, but it will not hurt to do what I just described. The singularity could come from a number of possible reasons, for instance maybe the flow becomes turbulent when the temperature gets too high, it's hard to tell from your post.

Best,

Jeff

-------------------
Jeff Hiller
Hello Luca, If I understand you correctly, you have some sort electric conductor that's exposed to a DC current; it heats up, and as a result some fluid nearby heats up too and starts moving. If I got that right (and if there is no feedback loop from the thermal and fluid flow problems into the DC problem), then one suggestion to speed up your calculations would be to solve the DC problem as a first solution step using a stationary solver, and then solving the heat transfer and fluid flow problem as a second solution step using a transient solver. This may or may not be related to the singularity error, but it will not hurt to do what I just described. The singularity could come from a number of possible reasons, for instance maybe the flow becomes turbulent when the temperature gets too high, it's hard to tell from your post. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 4 years ago 2021年2月5日 GMT-5 05:38

Hello Luca,

If I understand you correctly, you have some sort electric conductor that's exposed to a DC current; it heats up, and as a result some fluid nearby heat up to and starts moving. If I got that right (and if there is no feedback loop from the thermal and fluid flow problems into the DC problem), then one suggestion to speed up your calculations would be to solve the DC problem as a first solution step using a stationary solver, and then solving the heat transfer and fluid flow poblem as a second solution step using a transient solver. This may or may not be related to the singularity error, but it will not hurt to do what I just described. The singularity could come from a number of possible reasons, for instance maybe the flow becomes turbulent when the temperature gets too high, it's hard to tell from your post.

Best,

Jeff

Hi Jeff,

thank you for the answer! I did as you suggested and managed to solve the model for ~1h long timespans (even though I had to remove the effect of the temperature on the electrical conductivity to avoid loops). That works pretty fine, but it was kind of a starting point, since the true interest is to simulate such conditions under a 50Hz phase. I need to do it necessarily in a time-dependent asset since I want to observe how the system variables (e.g. temperature) reacts to injected changes on the voltage waveform (e.g. amplitude modulation or harmonic distortion). When I manage to do the time-dependent simulation, the time-dependent simulator is very slow and tends to crash after few seconds of simulated physics (turbulence does not have even time to onset since, in the first 5-10 s, there is an increment of temperature of few degrees in the whereabouts of the conductor, but that's it). I see that the problem is harder then expected, so I turned it to technical/theoretical issues to the support centre. However, your effort in answering my question is highly appreciated since it helped me to get some result at least for stationary conditions.

Best, Luca

>Hello Luca, > >If I understand you correctly, you have some sort electric conductor that's exposed to a DC current; it heats up, and as a result some fluid nearby heat up to and starts moving. If I got that right (and if there is no feedback loop from the thermal and fluid flow problems into the DC problem), then one suggestion to speed up your calculations would be to solve the DC problem as a first solution step using a stationary solver, and then solving the heat transfer and fluid flow poblem as a second solution step using a transient solver. This may or may not be related to the singularity error, but it will not hurt to do what I just described. The singularity could come from a number of possible reasons, for instance maybe the flow becomes turbulent when the temperature gets too high, it's hard to tell from your post. > >Best, > >Jeff Hi Jeff, thank you for the answer! I did as you suggested and managed to solve the model for ~1h long timespans (even though I had to remove the effect of the temperature on the electrical conductivity to avoid loops). That works pretty fine, but it was kind of a starting point, since the true interest is to simulate such conditions under a 50Hz phase. I need to do it necessarily in a time-dependent asset since I want to observe how the system variables (e.g. temperature) reacts to injected changes on the voltage waveform (e.g. amplitude modulation or harmonic distortion). When I manage to do the time-dependent simulation, the time-dependent simulator is very slow and tends to crash after few seconds of simulated physics (turbulence does not have even time to onset since, in the first 5-10 s, there is an increment of temperature of few degrees in the whereabouts of the conductor, but that's it). I see that the problem is harder then expected, so I turned it to technical/theoretical issues to the support centre. However, your effort in answering my question is highly appreciated since it helped me to get some result at least for stationary conditions. Best, Luca

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.