Inconsistent results

Numerical methods and mathematical models of Elmer
Post Reply
stair
Posts: 1
Joined: 07 Dec 2009, 14:49

Inconsistent results

Post by stair »

I have been having problems getting consistent results from a mixed material Heat Equation problem investigating heatsink configurations and forced air cooling. Reading the forums I discovered that in some circumstances using convection velocity in the heat equation could work instead of the much more intensive navier-stokes and fluid velocity, performing comparison case showed good enough for my purposes

Now I want to run variations on essentially the same model using the heat equation solver only, I set up 2 equations, 1 including convection in the fluid (air) and 1 without for the solids. When I generate and save the sif all looks good and the convection velocity terms appear as expected however when the model is run the sif is regenerated without the convection velocity terms.

Also depending on how I run the model I get 2 quite different results for no good reason that I can see. The only way to reliably get a results that matches the NS result is to generate the sif (making sure that the convection velocity is defined), delete egproject.xml, resave the project, close Elmer, reopen Elmer and immediately run the simulation. If I run the model any other way, including the command line with a correct sif I get a result that is clearly wrong because there are temperatures that are lower than any of the input temperatures.

Attached is a sample sif, any ideas on what is going would be appreciated
Attachments
case4.sif
(4.3 KiB) Downloaded 357 times
hazelsct
Posts: 153
Joined: 05 Oct 2009, 17:02
Location: Boston, MA, USA
Contact:

Re: Inconsistent results

Post by hazelsct »

Hello, I don't see the Convection Velocity in your .sif file, and I think I've seen a similar problem, or rather, two problems.

The first problem is: when you define Convection = Constant in the Equation -> Heat Equation panel, it lets you define the Convection Velocity components. However, it puts them in the Equation section, together with "Convection = Constant". This is wrong: ElmerSolver looks for Convection Velocity in the Matetrial section! (See fem/src/HeatSolve.src lines 744-753, 2458-2465.)

But it's not possible in the current ElmerGUI framework to put them in the Material section. In ElmerGUI/Application/edf/heatequation.xml lines 29-31, if you change Equation to Material in order to define those velocities in the Material section of the .sif, ElmerGUI segfaults. So there's a conflict between the .sif file format, as defined in the Elmer Models Manual p. 15 and the ElmerSolver source code (above), and the limitations of ElmerGUI.

The second problem is: the "Activate" tag in the .xml files like heatequation.xml don't carry over when one saves, exits, and re-loads the file. So after reloading, if you look at the Equation in the GUI, you'll see Convection = Constant but no Convection Velocity. And if you save the .sif file, it saves with no Convection Velocity, not even in the Equation section (the wrong place). The Convection Velocity is still there in the egproject.xml file, so if you click on the Constant to re-select it, they suddenly appear.

I have the same problem with Advection Diffusion, and need to spend some time digging into the ElmerGUI code to try to figure out a solution to these problems. I think the second will be easier than the first, particularly if one wants to leave the .sif file format as it is to maintain backward compatibility. If one can change the .sif file format, the first problem is easy to solve, and is done for Advection Diffusion by my patch in the "Multiple convection fields" thread.

-Adam
Post Reply