butterfly icon indicating copy to clipboard operation
butterfly copied to clipboard

Sample file with HeatTransfer recipe doesn't converge

Open DambronOlivier opened this issue 8 years ago • 24 comments

@TheodoreGalanos @mostaphaRoudsari @MaxMarschall @mimarilker

The case in question is of a Heat Transfer recipe with RAS model to simulate the Airflow inside a room considering internal heat gains (human body, equipment). Here is the definition in question: indoor_airflow_heat3.zip

When adding a manually written BC for T as suggested an error occurs at the Createcase component : bc_str_error1

Same error occured when I wrote manually the panels with the BC for alphat and p_rgh.
To get through I used a python component to declare those BC to format them properly. Only the BC "fixedGradient" does not appear in BF's BCs, unfortunately. It seems that it does not exist yet in BF.

Furthermore, I ran the simulation with a fixed value BC to T: bc_str_error2

All went fine until Time 92 : bc_str_error3

DambronOlivier avatar Jan 05 '17 11:01 DambronOlivier

I didnt get any errors with this file.

thinklikeanarchitect avatar Jan 05 '17 17:01 thinklikeanarchitect

@mimarilker Did you let it run some time and observe the non-convergence until the error around time 95?

DambronOlivier avatar Jan 05 '17 21:01 DambronOlivier

sorry, did not wait this iteration actually, but as I know divergence stems from mostly insufficient mesh and incompatible boundary conditions.

thinklikeanarchitect avatar Jan 05 '17 21:01 thinklikeanarchitect

I have been getting the same error, usually after like 2 timesteps...

MaxMarschall avatar Jan 06 '17 00:01 MaxMarschall

Hi everyone,

As @mimarilker says if the simulation starts that means that there is no BF or OF error for that matter. The main reason for the divergence of the solution (which is what the error shows) are indeed the mesh and boundary conditions.

Reading the error it seems that there is something wrong with the calculation of pressure, as it drops to 0 (1e-21). I'll try and run the case today let you know what I find.

Regards, Theodore.

TheodoreGalanos avatar Jan 06 '17 00:01 TheodoreGalanos

I ran that case and saw problematic results as to temperature values. The highest ones are 10000000... which shows that something went wrong. However I have solved the issue by changing highest values (11 probes) and now the results are reasonable. I think the errors you saw somehow related with boundary conditions not mesh. Because that highest weird numbers stem from wrong boundary.

thinklikeanarchitect avatar Jan 06 '17 14:01 thinklikeanarchitect

Hi @mimarilker ,

thanks for your time on this. Did you juste replace them with a python component? replacing values above threshold to average of rest?

Would you have an idea how to correct the BC for this case?

DambronOlivier avatar Jan 06 '17 18:01 DambronOlivier

Actually its not very easy to replace highest numbers, I have tried too many things until to be succeed. Bcs as u know there is an order in the probe data, so just replacing didnt do trick. I will look for the file that I changed and let u know.

Edit: I couldnt find it, sorry:( I think I have rewritten it.

thinklikeanarchitect avatar Jan 06 '17 21:01 thinklikeanarchitect

Hi @DambronOlivier,

  1. For boundary component you can only use the boundary types that's available. The text input will work for solution parameters but not the boundary component. This is an inconsistency that we need to address as soon as possible.

  2. Make sure probes are located in the meshed area. A number of probes are located inside the heatbox / human body and so the number of probes won't match the number of the results. Butterfly has a method to search for missing probes but it would be to expensive to run it during the run-time. Here is the simple solution to solve it. image

  3. I can also generate the error after 89 steps but doesn't look to be a butterfly issue. @TheodoreGalanos here is the openfoam folder in case it's easier for you to check the files than checking in Grasshopper: indoor_airflow_heat36.zip

mostaphaRoudsari avatar Jan 08 '17 22:01 mostaphaRoudsari

@mostaphaRoudsari Thank you!

  1. works like a charm.

DambronOlivier avatar Jan 09 '17 01:01 DambronOlivier

Number 1 is also addressed. I will edit the title of this issue to represent the real problem. @DambronOlivier did you have any chance to create a case that converges using a custom boundary condition?

mostaphaRoudsari avatar Feb 06 '17 01:02 mostaphaRoudsari

I feel this is a meshing issue. I've run heat transfer cases with our standard settings with no problems. Hard to tell without running the actual case, will do so soon I hope.

TheodoreGalanos avatar Feb 08 '17 23:02 TheodoreGalanos

@mostaphaRoudsari

I have tried to input the custom BC for T but I do get an error. capture1 capture

DambronOlivier avatar Feb 09 '17 00:02 DambronOlivier

@DambronOlivier can you try to use space instead of tab? For some reason the space between uniform and the values is removed. If you share your input text in panel I can also debug this on my side.

mostaphaRoudsari avatar Feb 09 '17 01:02 mostaphaRoudsari

@mostaphaRoudsari I have typed the text as it shows with spaces and no tabs.

DambronOlivier avatar Feb 09 '17 01:02 DambronOlivier

Hi @mostaphaRoudsari ,

My previous message was a bit misleading. I meant that the error occurred, though I had written the BC manually as a panel.

{ type fixedGradient; gradient uniform 310; }

DambronOlivier avatar Feb 12 '17 18:02 DambronOlivier

Hi @DambronOlivier, I forgot to check this one. Will check and report back.

mostaphaRoudsari avatar Feb 12 '17 18:02 mostaphaRoudsari

@DambronOlivier it's fixed now! Thanks for reporting the bug.

This issue is the last open issue to be fixed and then we have the GH plugin ready for the release!

mostaphaRoudsari avatar Feb 12 '17 19:02 mostaphaRoudsari

@mostaphaRoudsari I have tried to run the case though I remain with an issue. I suppose the BCs I have set are wrong. capture1

I am still unable to upload a zip file, please find the case and the gh file in this link if you wish to have a look. https://we.tl/z8TG8Yr61Y

I will try with a simple wall boundary condition for the heat source.

DambronOlivier avatar Feb 12 '17 20:02 DambronOlivier

@mostaphaRoudsari I have run the case with a Wall Boundary Condition for the heatbox. The solution does not tend to convergence after 3000 Times.

capture

The initial intention of this case was to simulate stratification of heat with a simple box representing a human body. @TheodoreGalanos had provided some advices on the fixedGradient BC for Temperature, although with my recent experience with CFD, I am still unable to set properly the other boundary conditions for this case.

DambronOlivier avatar Feb 12 '17 21:02 DambronOlivier

Thanks @DambronOlivier. This error is different from the previous one and not a butterfly issue. I leave this issue to @TheodoreGalanos to comment.

mostaphaRoudsari avatar Feb 12 '17 21:02 mostaphaRoudsari

Hi @DambronOlivier

On the first issue, OF is quite specific as to what is going on. OF was assuming that your box is an inlet due to the specified BC atm. Changing the BC on all 0 files for the box to be identical to the wall (it is a wall itself after all) was the right choice! Good job!

Concerning the second case, your residuals appear to have converged. Generally, it is much more important, and indicative of a converged case, to look for stability in residuals and other parameters of of your case (e.g. average temperature, velocity, pressure, etc) than absolute value of residuals. In your residual plot you can see that for quite a while now there is no change in the values so that means the case is converged. Now, that does not mean it has converged to a correct result. This is heavily related to the mesh quality. I would say that for the current crude mesh involved, perhaps the solver has reached the solution accuracy it can reach. Also, generally, schemes are also important, final solutions should always include 2nd order schemes (in your case they are 2nd order).

Kind regards, Theodore.

TheodoreGalanos avatar Feb 13 '17 03:02 TheodoreGalanos

Hi @TheodoreGalanos,

I have been testing another similar case and trying to see how would the buoyancy drives the airflow in the intermediate level. Here are the simple wall BCs I used: capture3

The solution seem to converge looking at the residuals, though I am not sure if to an acceptable value. I have added 2nd order schemes (101 to 1000): capture

Have used only Castellated mesh since snap caused some issues: capture2 I am not sure of what happens above the ground box which is the heat source. Does the mesh quality seem coherent to you for this case?

Kind Regards, Olivier

DambronOlivier avatar Feb 28 '17 01:02 DambronOlivier

This can also be part of the challenge that we had for this case: https://github.com/ladybug-tools/butterfly/issues/203

mostaphaRoudsari avatar Mar 13 '17 03:03 mostaphaRoudsari