Institute-for-Future-Intelligence / multiphysics

Interactive Multiphysics Simulation for Everyone
https://intofuture.org/energy2d.html
GNU Lesser General Public License v3.0
58 stars 29 forks source link

FATAL ERROR after running a simulation for several seconds #3

Open tigra opened 8 years ago

tigra commented 8 years ago

Trying to model heat convection inside the woodstove. As soon as I put in a powerful power source, or a nonzero wind speed, it starts to fall with "FATAL ERROR" (I suppose because of inability to solve the equation using numerical methods). Well, it suggests to decrease steplenth, but this way I am able to model even smaller portion of time of model's work.

Tried both with version on site and with version compiled from github.

Attached is an example of such file.

borov_e2d.zip

charxie commented 8 years ago

Energy2D is not unconditionally stable, meaning that a transient numerical simulation can "blow up" when the condition becomes more turbulent, such is in the cases of low viscosity, high temperature, or fast fluid speed. There is also a fundamental constraint in transient simulations that limits the length of the time step we can use. For example, if your model has a width of 1 m with air blowing in at a speed of 1 m/s, and you use a time step of 0.1 s, then within just 10 steps the air must blow across. If there are a lot of interactions on its way such is in the case of turbulence, it is hardly possible for a numerical algorithm to handle this situation within only 10 steps. We typically will need thousands of steps to have an approximate solution. This means that the time step must be very small, which can make the simulation appear to be very slow to be practical.