CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Maximal number of boundary patches

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 12, 2016, 09:22
Default Maximal number of boundary patches
  #1
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
Hi,
i will need to define a lot of patches for my model (~1000).
But before to define them, and spend an afetrnoon doing that, i guess there is a maximal limit for this number of patches.
Does anybody know more about such a limit ?
Thanks
Laurent
laurentD is offline   Reply With Quote

Old   July 12, 2016, 09:35
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,932
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

It is maximum value label type can hold and as

Code:
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE
and it is 2^(N - 1) - 1.
alexeym is offline   Reply With Quote

Old   July 13, 2016, 09:26
Default
  #3
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
Hi Alexey,
i am not sure to understand your answer.
You are saying that if my machine is a 64bit one,
the maximal number of patches is 2^(64 - 1) - 1 = 9e+18,
And if it is 32 bit one, this limit is : 2^(32 - 1) - 1 = 2e+09 ?
Please confirm this information if it is true.
Thank you very much,
Laurent
laurentD is offline   Reply With Quote

Old   July 13, 2016, 13:19
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,932
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

That is right. For 32-bit integers it is 2147483647, for 64-bit integers it is 9223372036854775807. Patches are stored in the data structure PtrList and its size is stored in the field size_ of type label (https://github.com/OpenFOAM/OpenFOAM.../UList/UList.H).

So theoretically, you could store up to 2^(N - 1) - 1 items in PtrList.
alexeym is offline   Reply With Quote

Old   July 18, 2016, 09:14
Default
  #5
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
Hi,
i have tried to use gmshToFoam with a msh including nearly 800 patch names and it crashes with a fatal error when the patch number pass over 99.
Like if there is a limit fixed to 100...
Anyone know where i can modify it ?
Laurent
laurentD is offline   Reply With Quote

Old   July 18, 2016, 09:32
Default
  #6
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,932
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

It would be great to see original output (when gmshToFoam crashes) and test case.
alexeym is offline   Reply With Quote

Old   July 18, 2016, 09:34
Default
  #7
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
Hi,

http://www.cfd-online.com/Forums/ope...tml#post610015
laurentD is offline   Reply With Quote

Old   July 18, 2016, 09:37
Default
  #8
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,932
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
And the test case? Crash output looks like corrupted msh file. Surely one can generate msh file with 800 physical groups, yet, it will take time.
alexeym is offline   Reply With Quote

Old   July 18, 2016, 09:55
Default
  #9
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
The msh file is too big to be sent...
Have you got a mail adress where i can send it ?
laurentD is offline   Reply With Quote

Old   July 18, 2016, 10:46
Default
  #10
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
This is the related part of the msh file :
Code:
 2 94 "PEAU_EXT_007_02"
2 95 "PEAU_EXT_007_11"
2 96 "PEAU_EXT_007_08"
2 97 "PEAU_EXT_008_04"
2 98 "PEAU_EXT_008_03"
2 99 "PEAU_EXT_008_06"
2 100 "PEAU_EXT_008_01"
2 101 "PEAU_EXT_008_12"
2 102 "PEAU_EXT_008_07"
laurentD is offline   Reply With Quote

Old   July 18, 2016, 11:09
Default
  #11
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
Ok i'm sorry...
i have found what was wrong on the msh file.
When the numbering of the patches pass over 99, the writing format is wrong.
Now my model is working with 1661 patches.
Thank you very much for your help Alexey.
Your remarks have been very helpful to help me to find the problem.
Have a good day.
laurentD is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
[OpenFOAM.org] OF2.3.1 + OS13.2 - Trying to use the dummy Pstream library aylalisa OpenFOAM Installation 23 June 15, 2015 14:49
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 15:55


All times are GMT -4. The time now is 06:15.