CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   ViewFactorsGen - exceeds internal hardcoded limit (https://www.cfd-online.com/Forums/openfoam-pre-processing/146807-viewfactorsgen-exceeds-internal-hardcoded-limit.html)

derekm January 7, 2015 09:47

ViewFactorsGen - exceeds internal hardcoded limit
 
1 Attachment(s)
while adapting CHTmultiregionsimpleRAD tutorial case I run in to this error

Code:

--> FOAM FATAL ERROR:
Dynamic list need from capacity.Actual size maxDynListLength : 100000

    From function shootRays
    in file shootRays.H at line 63.

shootRays.H has the value 100000 hard coded into it... not sure if I should recode it and at the moment i dont know what in the case is causing it to exceed this.
The geometery is not particularly complex and the cell count is ~750 000 . Its a heater suspended underneath an inverted box suspended in Air.
I may have to give up on this model and use P1 instead.

The complete case is attached.

pedrojrebelo January 21, 2015 07:15

Hi,

Could you solve this problem?

derekm January 21, 2015 07:49

no, I couldnt. The mesh and regions check out ok. The tutorial works ok. I've tried it out with similar geometries and it fails with the same error.
These geometries feature nested regions and around 1 million cells.
and work fine without this radiation model and will work with P1. But I would prefer viewfactors

pedrojrebelo January 21, 2015 08:07

Have you check this bug report?

http://www.openfoam.org/mantisbt/view.php?id=1240

Quote:

You might need to resize the "const label maxDynListLength = 100000"; in line 6 in shootRays.

zfaraday January 21, 2015 08:24

What's your viewFactorsDict definition? Playing with the values given in this file you may get rid of this error. Otherwise maybe you could modify this limit by increasing it in the code and recompile the utility.

Regards,

Alex

pedrojrebelo January 21, 2015 08:27

Hi Alex,

In my case I have quite a complex geometry so definitely I think I need to modify the code and recompile the utility. I am gonna try to do that now, I will let you know if that works or not.

derekm January 21, 2015 10:39

Quote:

Originally Posted by zfaraday (Post 528445)
What's your viewFactorsDict definition? Playing with the values given in this file you may get rid of this error. Otherwise maybe you could modify this limit by increasing it in the code and recompile the utility.

Regards,

Alex

did that got nowhere it still errored

pedrojrebelo January 21, 2015 11:04

Hi Derek,

I changed the limit in the shootRays.H and recompile it. After this it started running. I cannot comment on results at this stage.

derekm January 21, 2015 12:29

should really be a configurable parameter what size did you set it to?

derekm January 21, 2015 21:31

i have altered the shootrays.H from
Code:

...
// Maximum lenght for dynamicList
const label maxDynListLength = 100000;
...

to
Code:

...
// Maximum lenght for dynamicList
//const label maxDynListLength = 100000;
const label maxDynListLength =
      viewFactorDict.lookupOrDefault<label>("maxDynListLength", 100000);
 if (Pstream::master())
    { Info << "\nmaxDynListLength: "<< maxDynListLength << endl;  }
...

and now can specify the maxDynListLength in viewFactorsDict while keeping the old value as default and reporting the value used.
I have tested it on the tutorial case so far.

zfaraday January 22, 2015 06:36

Thanks for sharing your approach Derek, it can be useful info for those who don't have good skill in C++ (like me).

derekm January 23, 2015 03:12

edit news: reported as bug and is now fixed in 2.3.x


More results:
It appears the number assigned to nFacesInCoarsestLevel in viewfactorsdict, have to be high enough to stop faceAgglomerate crashing, but low enough to stop viewfactorsgen crashing.
This was found with maxDynListLength set to 5000000

Code:

...
Total number of coarse faces: 3536

maxDynListLength: 5000000
...


RobinZ June 29, 2015 11:03

Hello Foamers,

first i want to let you know that in OpenFoam 2.4 you can specify the maximum of listlength in the viewFactorsDict file by adding:

maxDynListLength 1000000;

You can choose the number you want, but keep in mind that more rays will increase the RAM requirements.

Did someone of you tried to vary the number of nFacesInCoarsestLevel for faceAgglomerate and viewFactorsGen??

Is that possible? And could this trick increase the stability?

best regards

Robin


All times are GMT -4. The time now is 05:43.