SimScale CAE Forum

Natural Convection CFD Analysis settings


#1

Hello,

I am trying to see if I can run a Natural Convection CFD Analysis for a metal plate that heats up under constant power (100W of Joule Heating) for a certain amount of time. Whenever I run the analysis I always get the “Maximum execution time exceeded” error.
I am very new to CFD with OpenFOAM. I have used some other commercial CFD packages that are slightly easier to use, but not OpenFOAM. I dont know if my mesh is too coarse, or if my Simulation Settings are off (and if they are, what are the right settings to tweak-and please explain why so we can understand).

The link is here.


#2

Hi @Namby,

Thanks for sharing your question in the forum. With SimScale, you have a default maximum execution time (set at 3000 s here). What this means is that after 3000 seconds, ~50 minutes your simulation will be cancelled. We have this setting to ensure that you do not burn through all of your core hours on a simulation that is for example not converging.

So you could increase this time to 30000 seconds, which will likely allow your simulation to reach 100%. I would test this on your coarse mesh first and check the results.

Let us know if you are still running into issues and we’ll have a closer look at the setup too :slight_smile:

Best,
Anna


#3

Hello, I created a new Simulation (ust a copy of the first one) called ‘CFDTransientThermalCoarseMesh 20000run_s’ and ran one analysis with Maximum Run time set to 20000s and I got an error after about 1 hr that my maximum Courant number exceeded 1.

I then copied the Moderate Mesh run (CFDTransientThermal_ModerateMesh 20000s) set it to a max run time of 20000s and that also failed with the Maximum Number of Iterations Exceeded. It says the model ran for 56 mins, but 20000s means it should run for 5.5 hours right?


#4

I think your bounding box is a bit too close to your heat source, so this may be over-constraining the model a bit. Try to have several thickness of air in between the heat source and your slip/symmetry wall. Also, I haven’t tried a nat. conv. problem with simscale/openfoam yet, but I did a quick review of your analysis, and did not see a set temperature boundary condition on the outer slip walls? I think there needs to be one, other wise the temp would rise to infinite.


#5

Hi @Namby and @AnnaFless

Here is a link to a project I did a while back which is similar:
https://www.simscale.com/workbench?publiclink=8a29344e-bc48-43de-a490-a2279eaa76e8

I believe the source of your problem is the way you set up boundary condition, in the fact you have set two pressure outlets and no inlets.

unless you define an inlet the air has somewhere to go but nowhere to come from, a solution would either be to add an inlet or have an inlet-outlet type boundary condition (see my project for setup on that one).

Also the standard mesh isn’t really sufficient to get accurate results, Im working on an example of a hex-dominant parametric setup to show you, after that ill set up a sim to make sure my thinking is correct.

I’d also recommend from my painful recent experience to run a steady state simulation until you are 100% sure the setup is correct as the quickest way to burn core hours is a flawed transient sim :-S

hope this helps and if I have time ill do a version of your sim to demo what I mean’
Darren Lynch


#6

Here is a screenshot of the same model in another code, solved (as @1318980 recommended) as a steady state analysis (2.5M elements):

As you can see, the air box is a little skinny, and this is distorting the plume and causing a significant re-circulation zone (red) at the outlet. Not sure if this is causing the instability or not. I did copy your analysis, and play with the mesh a little bit, but unfortunately I haven’t been able to get past the “max # of iterations” error either. It happens in the first iteration for me, so that tells me it’s more likely a numerics thing, not a physics thing. The code I used has the relaxations set to “auto”, so I can’t easily use it to troubleshoot your numerics. I’ll play with it a little more tomorrow, see if I can’t pull some numbers out of it…

I can say this: What’s going at the bottom of the “U” shape is very unstable. You’ll need a tight mesh, and a small time step to capture it, I think. Here’s a closer look, obviously the grid resolution is not high enough, but hopefully this provides some insight into the physics of the situation…


#7

Hi @fastwayjim, thanks for your response. I do see your point about the size of my air domain. That should be bigger than it currently is. Regarding the Temperature BC, I dont know if it has to be there either. I have run Natural Convection CFD analyses with other codes more forgiving than OpenFOAM and I did not have to specify a temperature on the Symmetry walls…

Thanks for running the simulations in the other software. I will definitely try increasing the size of my domain. I will also probably scale down the model. This is only a “for fun” experiment to see how SimScale handles huge meshes, but I also dont want to burn core hours as well.


#8

Hello @1318980, yes I do see your point. One of my BC’s is wrong. I usually have a pressure BC on one surface (usually the outlet), and a Pressure + Temp BC on another surface (usually this is the inlet). I took a look at your project and for your inlet-outlet type BC, is there any difference if you just put a Temp and Pressure BC on the same surface? (it seems thats what the Custom Inlet Outlet BC achieves, I may be wrong).

Yes, running it Steady State first is a great idea…


#9

@Namby,

based on statistical learning, the latest platform update included improvements regarding the wall boundary condition for convective heat transfer sims. There are more stability improvements lined up that will make these setups more stable / robust.

Best,

David


#10

Hi @Namby, you can add a pressure BC and define the temperature for a pressure inlet. However having a pressure inlet and pressure outlet restricts the way the air flows. The way you are suggesting means air can only come in one way and out the opposite, however in convection we can’t necessarily define the flow as a straight through inlet outlet model. When we get to the outlet (normally on top) some of the air (directly over the heat source) is coming straight out at a high velocity, however the air around that we would expect to see recirculation caused by the rapidly rising hot air. To counter this we could simply make a really big system to neglect how the air comes in and out. However it is more practical to just have air coming in and out where necessary, this is the inlet outlet BC.

This is just my understanding and If any CFD pros want to add anything please do.

Kind regards,
Darren Lynch