|
[Sponsors] |
[snappyHexMesh] Help in locating the locationInMesh coordinates |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
edgar africano
Join Date: Apr 2021
Posts: 3
Rep Power: 5 ![]() |
Good morning to everybody
I developed a water tank geometry in STL and through snaapyHexMesh I want to use it for simulations. I am not very sure where to put the locationInMesh coordinates. I have put them inside the tank and the inlet or outlet of the tank don't appaer. I put it in the inlet and the tank and outlet don't appaer in the mesh. The same goes for the outlet. I kindly ask you for suggestions in putting the coordinates in order to run the simulation properly. I have attached the case file where the blockMeshDict and snappyHexMeshDict are avaliable. Thank you very much |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
M
Join Date: Dec 2017
Posts: 692
Rep Power: 12 ![]() |
I don't like opening zips where I don't know whats inside. So my best guess is: you have multiple closed regions inside your STL. The default behavior of snappy is to keep only the region, that encloses the locationInMesh. So, make sure your STL is only one solid body.
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
edgar africano
Join Date: Apr 2021
Posts: 3
Rep Power: 5 ![]() |
Thank you for your reply.
Probably it wasn't the best choice to send a zip file attached. So it will explain myself in a better way. I developed a simple tank in FreeCAD. It us composed of four STL files. the inlet, the outlet, the volume (the whole tank) and the walls (which is the tank minus the inlet and outlet). After doing the blockMesh, surfaceFeatureExtract and snappyHexMesh. The block Mesh also appears. I have modified the locationInMesh coordinates to different locations. In some cases the blockMesh doesn't appear, it just appears the inlet or the outlet but no the complete tank. I believe that the source of error is the locationInMesh coordinates. But perhaps the error comes from other place. Any feedback or suggestion is more than welcomed. Thank you |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
M
Join Date: Dec 2017
Posts: 692
Rep Power: 12 ![]() |
I can't tell, if your model is one closed body or not (are the inlet/outlet cylinders merged with the tank?). From your description how snappy behaved, I think they are not merged? Then the first step would be to merge them to one solid. Then, separately export stl files for each region you need (tank walls, inlet face, outlet face). This can cause issues, but I describe later.
Normally, what you want is a STL file, that contains all faces and encloses a volume. So, now, place these single stls into one file (its ascii, just copy the lines over). Then, in the geometry section of the snappyHexMesh dict, you can use following syntax to address the regions: Code:
geometry { myFileWithAllSTLsInside // User defined region name { type triSurfaceMesh; file "myFileWithAllSTLsInside.stl"; // surface geometry regions { inletSolid // Named region in the STL file { name inlet; // User-defined patch name } } } } Now, you must only place your locationInMesh somewhere inside. Instead of using (0 0 0) as in your sHMDict, go for some small float numbers like (0.024 0.012 0.021). The reason for this is: the locationInMesh should not hit a node or face from the blockMesh, otherwise strange behavior can occur. Theoretically, it should all work fine now. However, as mentioned, one problem may arise: when you export these single STLs for your region, they might not form a watertight geometry when put back together (the triangulation leaves holes). You can check that visually in Paraview or use surfaceCheck utility from OpenFOAM. There are many threads here disussing how to get watertight geometry. Another way: FreeCAD has its own OpenFOAM-Workbench including a GUI for snappyHexMesh, which works around the open stl issue internally. You might want to check that out to get a working snappy case. |
|
![]() |
![]() |
![]() |
Tags |
locationinmesh, snappyhexmesh, stl file |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Selecting cell closest to coordinates (and setting its field value) | rando_foamer | OpenFOAM Pre-Processing | 2 | May 14, 2019 05:15 |
[Scripting]: How to get the coordinates of a 2D airfoil @ different angles of attack? | CfdIntro | Main CFD Forum | 2 | December 12, 2017 10:23 |
[General] Spherical Coordinates | Bing | ParaView | 0 | June 10, 2014 07:58 |
tracking / locating of coordinates | chauhan | FLUENT | 0 | May 27, 2010 04:16 |
Coordinate's tranformation | tommy | FLUENT | 0 | February 13, 2004 02:19 |