|
[Sponsors] |
April 15, 2024, 11:47 |
Basic problem with OpenFOAM
|
#1 |
New Member
Andrea
Join Date: Apr 2024
Posts: 6
Rep Power: 2 |
Hy everybody,
I am a new user of OpenFOAM, trying to run my first case based on the tutorial motorbike. I created the triSurface folder in the constant directory, placed my CAD.stl and run surfaceFeatureExtract, blockMesh and snappyHexMesh. My cad is an assembly composed by many parts. I am not able to obtain the mesh of my entire assembly, just one part or another get meshed depending on the locationInMesh value I provide. I attach some pictures of my stl assembly and result obtained. Anyone please can help me? Thank you all |
|
April 15, 2024, 11:52 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26 |
Hello,
I guess you want to solve the flow in the air surrounding your geometry, so the locationInMesh you are providing should be inside the domain (defined with blockMesh), but outside your geometry (defined by your STL files). Regards, Yann |
|
April 15, 2024, 13:55 |
|
#3 |
New Member
Andrea
Join Date: Apr 2024
Posts: 6
Rep Power: 2 |
Thank you for answering.
I tried to select a point outside my stl and inside the domain. I attached the result. Best regards |
|
April 16, 2024, 03:15 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26 |
What are you displaying here? the internalMesh or your domain boundaries?
When loading the internalMesh in ParaView, you can use the slice filter to slice your domain and see the mesh inside. Regards, Yann |
|
April 17, 2024, 10:14 |
|
#5 |
New Member
Andrea
Join Date: Apr 2024
Posts: 6
Rep Power: 2 |
You were right. I managed to see my internal mesh.
Thank you for your answer again! just another question: if sHM gets display killed, does it mean I have a memory problem?I am running on wsl, my pc has 8 cores and 16 gbs of RAM. |
|
April 17, 2024, 11:11 |
|
#6 | |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26 |
Quote:
Probably less since windows should already use a good junk of those 16GB. |
||
April 17, 2024, 11:19 |
|
#7 |
New Member
Andrea
Join Date: Apr 2024
Posts: 6
Rep Power: 2 |
Clear, that was I thought. So do you have any suggestion to create a good quality mesh for my case (a 23x3.25x7 meters car carrier)?
like box and sHM values. Thank you again |
|
April 18, 2024, 03:31 |
|
#8 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26 |
Hello,
It would be useful to have few screenshots of your mesh to see what can be improved, even if it's a coarse one. And the number of cells you have in this mesh. General advices: Code:
maxLocalCells 1000000; maxGlobalCells 2000000; If snappy hits the 2 millions cells limit, it will stop refining the mesh and proceed with the next steps of the meshing process. (you can look at the log file to see if it's happening) It means it will not necessarily respect the refinement parameters you defined. Code:
nCellsBetweenLevels 3; Lets say you have a refinement level of 6 on your surface, and no volume refinement. With nCellsBetweenLevels 3, you will have a level 6 refinement on your surface + 3 layers of level 6 cells around your surface before switching to level 5, then 3 layers of level 5 cells before switching to level 4, etc... More information here: https://openfoamwiki.net/index.php/S...sBetweenLevels If you are tight on memory, it can be interesting to reduce the nCellsBetweenLevels value since bigger values means more cells on transitions between refinement levels. Of course it also means you will get rougher transitions between refinement levels, but if you lack memory you will have to compromise. Yann |
|
Yesterday, 06:23 |
|
#9 |
New Member
Andrea
Join Date: Apr 2024
Posts: 6
Rep Power: 2 |
Thank you for your detailed answer. It was very helpful!
I shared some details of my mesh, which is characterized by a #cells: 4.256.315. I also shared my snappyhexdict, if you may need it. Any suggestions is appreciated. Thank you again, Regards You can find everything here: https://polimi365-my.sharepoint.com/...Wd2PQ?e=rMiIzX |
|
Yesterday, 08:45 |
|
#10 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26 |
Hello Andrea,
Your surfaces are very coarse while your region refinement is already pretty fine. In my opinion it is useless to have a fine mesh in the volume if your surfaces are too coarse. I would advise to increase surface refinement and decrease volume refinement. For instance : Code:
refinementSurfaces { Bisarca { // Surface-wise min and max refinement level level (4 6); // Optional specification of patch type (default is wall). No // constraint types (cyclic, symmetry) etc. are allowed. patchInfo { type wall; inGroups (BisarcaGroup); } } } resolveFeatureAngle 30; Code:
refinementRegions { refinementBox { mode inside; levels ((1E15 2)); } } But in order to do this you will have to reset resolveFeatureAngle to something close to the default setting. (Check this for more details: https://doc.openfoam.com/2306/tools/...veFeatureAngle) This is just an example, you will have to test it for yourself and see what works best on your geometry. To efficiently setup your mesh I would recommend to follow these steps:
This will allow to quickly iterate on a lighter mesh on the first steps. To do so, for step 1 you can deactivate layer addition: Code:
castellatedMesh true; snap true; addLayers false; Then proceed to define your refinementBox on step 2, adjust the refinement level, and finally reactivate layer addition on step 3. Keep in mind, each step will increase mesh size, so you need to find the best compromise at each step. Have fun, Yann |
|
Yesterday, 08:49 |
|
#11 |
New Member
Andrea
Join Date: Apr 2024
Posts: 6
Rep Power: 2 |
thank you Yann,
your suggestions will help me a lot! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem in transferring flameletFoam to OpenFOAM 5.x | anjul | OpenFOAM Community Contributions | 5 | February 7, 2021 23:32 |
[Other] Openfoam for windows 16.02 [CFD support] -problem with paraview | ditmeyer | OpenFOAM Installation | 3 | May 15, 2017 12:04 |
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | January 5, 2016 03:18 |
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 | cfd.direct | OpenFOAM Announcements from Other Sources | 2 | August 31, 2015 13:36 |
OpenFOAM 1.7.1 installation problem on Fedora 14 | armonica | OpenFOAM Installation | 16 | March 31, 2011 13:16 |