CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: snappyHexMesh and Others (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/)
-   -   Internal geometry invisible and merely reflects on blockMesh (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/104149-internal-geometry-invisible-merely-reflects-blockmesh.html)

sgl July 3, 2012 22:54

Internal geometry invisible and merely reflects on blockMesh
 
Hi everyone,

I'm trying to use snappyHexMesh to import an stl file to openFoam and visualize it by paraFoam.
snappyHexMesh ran fine without indication of any errors, but when I open paraFoam in the case directory and click "Apply", set "Style" to wireframe in Display tab, the object does not look like what I expected.
The outer geometry(a square) defined by my blockMeshDict is there, but there is nothing inside it; instead, faces of the outer geometry somewhat "reflect"(in 2D) the inner geometry. So if you look at a face from right in front of it(90 degree), it does show the inner geometry but when you rotate a view a little bit, the inner geometry is merely drawn on a face of the outer geometry.

When I tested it with
tutorials/mesh/snappyHexMesh/snappyMultiRegionHeater
it does the same thing (or maybe this one was originally supposed to be like this?)
Is it a ParaView problem?

I've been searching for answer hard but couldn' really find anything.
Any advice would be appreciated.:)

Sang-gon

StSchiff July 4, 2012 02:49

Hi Sang-gon,

have you tried switching on the boundary patch of your inner geometry in the Mesh Regions Window of the Properties Display?
How did you define your inner geometry? Is it maybe a faceZone? In that case you would have to switch on the "read zones" switch in the Properties.

Hope this helps.
Stefanie

sgl July 4, 2012 03:35

Hi Stefanie,

Thank you for your reply.
Actually, I don't see anything related to my inner geometry at Mesh Regions Window. Everything there seems to have been defined in blockMeshDict file.
Can this be the problem? I'm very new to OpenFOAM.
I tried switching on everything there and switching off, but it shows no difference.
By the Boundary Patch of my inner geometry you mean internalMesh?
It's switched on. When I switch it off the reflected image of inner geometry at the faces change the shape a little bit. Not sure what's going on :confused:

I don't see face zones but "read zones" button was switched off. But still no difference when I switch on :(

anon_a July 4, 2012 03:41

Have you run sHM with the -overwrite option?
If you did not, check if there is another time instance containing your mesh (just move to the last time step in paraview).

It would also help to provide screenshots, log files and so on.

sgl July 4, 2012 04:16

1 Attachment(s)
Hi anon_a,

Thanks for the reply.
I just tried with -overwrite option, but still no luck.
I have done moving time step to different time but that didn't seem to do anything(I think my geometry stays consistent over time)

How do you find the log file?
I'm attaching the screenshot of my paraview window.
Please note that I set the number of cells in height(Z) to 2; when I set it to a larger number it didn't give me a satisfying result either so I'm using 2 for simplicity.

StSchiff July 4, 2012 04:24

Hi Sang-gon,

seems like your geometry is not loaded in the mesh regions. Might help if you post your snappyHexMeshDict. Are you sure that your geometry is within the domain?

The log is either in your teminal window where you run snappyHexMesh or you write a log file with the following command:
snappyHexMesh > logfile &

anon_a July 4, 2012 05:08

Well, if you get a projection of the geometry on these two patches, I guess sHM is doing something at least :-)

I think it matters that you have only two cells and that it would help a lot to take a look inside your mesh. Could you use the "slice" filter of paraview and post a few pictures?

sgl July 4, 2012 22:54

5 Attachment(s)
Quote:

Originally Posted by StSchiff (Post 369694)
Hi Sang-gon,

seems like your geometry is not loaded in the mesh regions. Might help if you post your snappyHexMeshDict. Are you sure that your geometry is within the domain?

The log is either in your teminal window where you run snappyHexMesh or you write a log file with the following command:
snappyHexMesh > logfile &



Is domain the region defined by blockMeshDict? Then yes I think it is.
I'm posting snappyHexMeshDict, logfile and blockMeshDict just in case. (you can find it at the bottom of this post in gz file)

Quote:

Originally Posted by anon_a (Post 369699)
Well, if you get a projection of the geometry on these two patches, I guess sHM is doing something at least :-)

I think it matters that you have only two cells and that it would help a lot to take a look inside your mesh. Could you use the "slice" filter of paraview and post a few pictures?

I'm attaching some screenshots of slice. I'm guessing it's just solid inside the blockMesh? I'm confused..
Attachment 14218

Attachment 14219

Attachment 14220

Attachment 14221

Attachment 14222

anon_a July 5, 2012 01:10

Nice pictures but you should also switch to wireframe for the slice itself
(in the same way as you did for the main mesh) so that you can see the mesh of the slice.

sgl July 5, 2012 01:42

3 Attachment(s)
Oh sorry, I didn't think of that.
slice_5 is a horizontal slice and slice_6 and 7 are vertical slices.
I can see something's definitely going on here but have no idea why it doesn't appear..
My geometry is a simple rectangular box which is empty inside.
Each face has no thickness.
Attachment 14223

Attachment 14224

Attachment 14225

sgl July 5, 2012 02:39

1 Attachment(s)
Ok I think I got a somewhat useful result when I use filter countour.
It finally shows my box!
Except for the fact that it is much more rugged than the original box. Its surfaces are supposed to be clean flat, but countoured one gives a very rough surfaces.
One thing I'm not sure is, was my geometry in STL format imported properly? (when the geometry appears only when I use a filter)

Thanks a million!

StSchiff July 5, 2012 03:15

Hi Sang-gon,
Yes, in your case domain is the region created by the blockMeshDict.
I've had a look at your snappyHexMeshDict and at first glance it looks okay.
Is the simpleRoomModel open at any end? Because your locationInMesh lies in the middle of the box, is that right?
I wonder why the patches of your geometry don't show up in paraview. Maybe try in the refinementSurfaces subdict writing 'simpleRoomModel' without the stl ending. Don't know if that helps, but it's worth a try.
It's also strange that in the layer addition phase snappy can't find your patches. Maybe you could try not defining specific names for inlet, outlet, etc. and then write 'simpleRoomModel.stl_inlet' for the layer addition phase.
Regards
Stefanie

sgl July 5, 2012 03:35

Thank you so much Stefanie!
Removing .stl suffix after simpleRoomModel did the trick!!!
It now shows my box wonderfully. :D
I wonder why I added .stl at the first place.
Thank you again and have a great day!

StSchiff July 5, 2012 03:47

That's good news :)
You probably oriented your dictionary on the user guide where there use that suffix, but didn't give it another name specifically. So either you use the assigned name or you use the stl suffix and don't assign a name. Both approaches should work.
Good luck with your further snapping.

anon_a July 5, 2012 05:37

Good to see you made it.
Just one final note: For this particular case, you could have also made the mesh with a combination of blockMesh, setSet and subsetMesh (make a mesh out of hexas, remove the box in the middle, add the domain inside the box and subset) and you would have more control over the mesh shape. But it is nice to learn sHM for future use anyway.

sgl July 5, 2012 20:25

Thank you for the info anon_a.
sHM was essentially the first thing I learned since I began to learn OpenFOAM so I don't know about setSet and subsetMesh, but I will definitely look into them too :)


All times are GMT -4. The time now is 18:36.