|
[Sponsors] |
In SnappyHexMesh, which external mesher can be usable for background mesh? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 17, 2024, 13:52 |
In SnappyHexMesh, which external mesher can be usable for background mesh?
|
#1 |
New Member
Xbrt
Join Date: Jan 2024
Posts: 18
Rep Power: 2 |
Hi everyone.
I am very new in openFoam. I try to do a ventilation project for a room. Inside geometry is okay but room geometry(my background mesh) is hard to make with blockMesh (the room has chamfered like edges). Do you have any advice about which mesher without blockMesh can I use for the room geometry? Good day. |
|
January 18, 2024, 04:24 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello,
You can use a STL file for your room geometry and use a simple blockMesh encapsulating it. Regards, Yann |
|
January 18, 2024, 05:59 |
|
#3 |
New Member
Xbrt
Join Date: Jan 2024
Posts: 18
Rep Power: 2 |
Thank you for your advice.
But I am afraid I could not express myself properly. The room geometry is encapsulater one. I use STL file for inside furniture but room geometry is hard to be maked by blockmesh. Regards, Xbrt. |
|
January 18, 2024, 06:07 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Can you elaborate about what you are trying to achieve?
Like a simple drawing? You can have STL files for the furniture, another STL for the room geometry, and have a bigger blockMesh encapsulating all your stl files to use as background mesh. snappyHexMesh will use the locationInMesh coordinate to know what part of the mesh has to be kept and which ones will be removed. |
|
January 18, 2024, 06:21 |
|
#5 |
New Member
Xbrt
Join Date: Jan 2024
Posts: 18
Rep Power: 2 |
Yes , my furniture is STL but the bigger geometry that is encapsulate the furniture is room. The room is hard to be maked with blockmesh. I wonder if there is any alternative.
|
|
January 18, 2024, 06:26 |
|
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Alright, this is my point: make the room as a STL file too, and use a blockMesh bigger than the room.
Your blockMesh can be made of one single block and the boundaries do not really matter as the blockMesh part outside of the room will be removed by snappy. You will end up with the inside of your room meshed and the boundaries will be the one defined in the room STL. EDIT: added drawing |
|
January 18, 2024, 06:37 |
|
#7 |
New Member
Xbrt
Join Date: Jan 2024
Posts: 18
Rep Power: 2 |
Ah, I now understand it. I will try to do. Thank you for your time and your information. I will put here the solution that maybe others can find it useful.
Have a nice day. |
|
January 19, 2024, 08:54 |
|
#8 |
New Member
Xbrt
Join Date: Jan 2024
Posts: 18
Rep Power: 2 |
Hi again. I run this snappyHexMesh file and computer do not mesh my interior (table and lamps). How can I fix this?
geometry { room.stl { type triSurfaceMesh; name room.stl; regions { inlet { name inlet.stl; } outlets { name outlets.stl; } sidewalls { name sidewalls.stl; } upperwall { name upperwall.stl; } downwall { name downwall.stl; } } } lamps.stl { type triSurfaceMesh; name lamps.stl; } table.stl { type triSurfaceMesh; name table.stl; } /* refinementBox1 { type searchableBox; min (-2 -2 -2); max (2 2 2); } */ }; castellatedMeshControls { maxLocalCells 100000; maxGlobalCells 2000000; minRefinementCells 0; maxLoadUnbalance 0.10; nCellsBetweenLevels 2; features ( { file "room.eMesh"; level 0; } { file "lamps.eMesh"; level 0; } { file "table.eMesh"; level 0; } ); refinementSurfaces { room.stl { level (2 2); regions { inlet { level (2 4); patchInfo { type patch; } } outlets { level (2 4); patchInfo { type patch; } } sidewalls { level (2 4); patchInfo { type wall; } } upperwall { level (2 4); patchInfo { type wall; } } downwall { level (2 4); patchInfo { type wall; } } } } } resolveFeatureAngle 60; refinementRegions { } locationInMesh (7.5 3 6); } |
|
January 19, 2024, 09:32 |
|
#9 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello,
Where is located your locationInMesh point? this is the parameter defining which volume your want to keep in your mesh. Yann |
|
January 19, 2024, 11:05 |
|
#10 |
Senior Member
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13 |
As Yann points out, locationInMesh must be set correctly.
Some additional hints: 1) usually we set the locationInMesh with some double components like (0.212 -11.991 2.2188). The reason is, that, if it lands on a cell node, snappy potentially makes strange things. This is probably not causing your isssue, just FYI. 2) Snappy works best with a uniform background mesh. Yours is very flat already, it is going to have a hard time creating a good quality mesh with this as an input. You need to really know what you are doing to use that kind of anisotropy. 3) I recommend not setting the min/max level for a region greater than 1 apart. The best would be to use one specific level for your region like (3 3) or (4 4). 4) Your global settings for maxGlobal and maxLocal cells might cause snappy to stop refining midway through the process and that might lead to some things missing. Make sure you are below these levels or increase these values if your computer can handle it. |
|
January 19, 2024, 11:06 |
|
#11 |
New Member
Xbrt
Join Date: Jan 2024
Posts: 18
Rep Power: 2 |
It was 1st. point. After your answer I change it to 2nd. location. But now it does not run even.
|
|
January 19, 2024, 11:25 |
|
#12 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
||
January 19, 2024, 12:00 |
|
#13 |
New Member
Xbrt
Join Date: Jan 2024
Posts: 18
Rep Power: 2 |
I correct the error but my outer mesh and interiors gone.
|
|
January 19, 2024, 12:01 |
|
#14 | |
New Member
Xbrt
Join Date: Jan 2024
Posts: 18
Rep Power: 2 |
Quote:
|
||
January 19, 2024, 12:04 |
|
#15 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Well, outer mesh gone was pretty much the point since you want to simulate the flow inside the room right?
What do you mean by "interiors gone" ? No furniture at all or no mesh inside furniture? |
|
January 19, 2024, 12:20 |
|
#16 |
New Member
Xbrt
Join Date: Jan 2024
Posts: 18
Rep Power: 2 |
in solutions I plan to see flow around table and lamps. But my STL files that located in triSurfacedMesh do not be meshed
|
|
January 19, 2024, 12:32 |
|
#17 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
OK then. Can you post your snappyHexMeshDict and your snappyHexMesh log?
|
|
January 19, 2024, 14:52 |
|
#18 |
New Member
Xbrt
Join Date: Jan 2024
Posts: 18
Rep Power: 2 |
Sorry for late answer. I cannot enter the forum for a gap
|
|
January 19, 2024, 17:30 |
|
#19 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Thanks for the files.
You need to define surface refinement for your lamps and table in the refinementSurfaces section. For now only room is defined and this is why only room is meshed. Yann |
|
January 20, 2024, 08:29 |
|
#20 | |
New Member
Xbrt
Join Date: Jan 2024
Posts: 18
Rep Power: 2 |
Quote:
I have very limited time until deadine and I am stucked. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
flow over cylinder in openFoam | saeed jamshidi | OpenFOAM Pre-Processing | 3 | August 11, 2023 16:16 |
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell | Arman_N | OpenFOAM Meshing & Mesh Conversion | 1 | May 20, 2019 18:16 |
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry | pizzaspinate | OpenFOAM Meshing & Mesh Conversion | 1 | February 25, 2015 08:05 |
CGNS Compiling | Diego | Main CFD Forum | 17 | December 21, 2014 02:40 |
[snappyHexMesh] How to Do External Mesh for Airfoil sHM | msuaeronautics | OpenFOAM Meshing & Mesh Conversion | 1 | September 23, 2012 05:00 |