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

How to add multiple refinement boxes?

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 2 Post By AtoHM
  • 2 Post By Yann
  • 1 Post By Jay ZHOU

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 9, 2024, 22:38
Smile How to add multiple refinement boxes?
  #1
New Member
 
dengxin
Join Date: Dec 2023
Posts: 5
Rep Power: 2
Jay ZHOU is on a distinguished road
Hello everyone, first of all, please forgive me for my poor English. I am a new OpenFOAMer, I want to add 8 refinement boxes in snappyHexMeshDict, but it looks like the system doesn't recognize each refinement after I name it, here's my refinement box part of snappyHexMeshDict (An error was encountered during the upload, so the entire file could not be uploaded together, sorry):
refinementBox
{
type box;
name box1;
min (3.9 0 0);
max (16.4 1 1.5);
type box;
name box2;
min (16.4 0.4 0);
max (19.7 0.72 1.5);

}
I've tried unnamed and the resulting grid only encrypts the last box(box2), But when I name each box in the above way, the grid is not encrypted, why is that?
I hope someone can help me, please.
Jay ZHOU is offline   Reply With Quote

Old   January 10, 2024, 04:17
Default
  #2
Senior Member
 
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13
AtoHM is on a distinguished road
You cannot add two "box" objects inside one geometrical entity, instead, create two entities:


Code:
box1
{
    type box;
    min  (3.9   0   0);
    max  (16.4 1  1.5);
}
box2
{
     type box;
     min (16.4 0.4 0);
     max (19.7 0.72 1.5);
}
I' wondering abit about the "type box;" entry. This does work? I think it should be "type searchableBox;" but well, if it works ...
Yann and Jay ZHOU like this.
AtoHM is offline   Reply With Quote

Old   January 10, 2024, 04:53
Default
  #3
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Quote:
Originally Posted by AtoHM View Post
I' wondering abit about the "type box;" entry. This does work? I think it should be "type searchableBox;" but well, if it works ...
The shorter syntax has been introduced in OpenFOAM-v1812:

Quote:
The searchable surfaces, which are often used in snappyHexDict are available with shorter names as an alternative to the longer names.

New: box, cylinder, sphere …
Longer: searchableBox, searchableCylinder, searchableSphere …
source: https://www.openfoam.com/news/main-n...pre-processing
AtoHM and Jay ZHOU like this.
Yann is offline   Reply With Quote

Old   January 10, 2024, 05:21
Default
  #4
New Member
 
dengxin
Join Date: Dec 2023
Posts: 5
Rep Power: 2
Jay ZHOU is on a distinguished road
Thanks to AtoHM and Yann.
Yann likes this.
Jay ZHOU is offline   Reply With Quote

Reply

Tags
refinement box, snappyhexmesh


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
[snappyHexMesh] Error in the refinement region generation rahulcfd10 OpenFOAM Meshing & Mesh Conversion 2 March 3, 2022 17:47
sHM doesn't add layers to any surface Vinzmann Mesh Generation & Pre-Processing 0 March 23, 2021 06:02
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 10:42
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 13:21
[snappyHexMesh] snappyHexMesh aborting Tobi OpenFOAM Meshing & Mesh Conversion 0 November 10, 2010 04:23


All times are GMT -4. The time now is 10:52.