CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

Internal geometry invisible and merely reflects on blockMesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 3, 2012, 22:54
Default Internal geometry invisible and merely reflects on blockMesh
  #1
sgl
New Member
 
Sang-gon Lee
Join Date: Jul 2012
Posts: 8
Rep Power: 5
sgl is on a distinguished road
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
sgl is offline   Reply With Quote

Old   July 4, 2012, 02:49
Default
  #2
New Member
 
Stefanie Schiffer
Join Date: Mar 2010
Location: Cologne, Germany
Posts: 26
Rep Power: 7
StSchiff is on a distinguished road
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
StSchiff is offline   Reply With Quote

Old   July 4, 2012, 03:35
Default
  #3
sgl
New Member
 
Sang-gon Lee
Join Date: Jul 2012
Posts: 8
Rep Power: 5
sgl is on a distinguished road
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

I don't see face zones but "read zones" button was switched off. But still no difference when I switch on
sgl is offline   Reply With Quote

Old   July 4, 2012, 03:41
Default
  #4
Senior Member
 
Join Date: Mar 2011
Posts: 174
Rep Power: 6
anon_a is on a distinguished road
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.
anon_a is offline   Reply With Quote

Old   July 4, 2012, 04:16
Default
  #5
sgl
New Member
 
Sang-gon Lee
Join Date: Jul 2012
Posts: 8
Rep Power: 5
sgl is on a distinguished road
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.
Attached Images
File Type: jpg my_geometry.jpg (99.4 KB, 24 views)
sgl is offline   Reply With Quote

Old   July 4, 2012, 04:24
Default
  #6
New Member
 
Stefanie Schiffer
Join Date: Mar 2010
Location: Cologne, Germany
Posts: 26
Rep Power: 7
StSchiff is on a distinguished road
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 &
StSchiff is offline   Reply With Quote

Old   July 4, 2012, 05:08
Default
  #7
Senior Member
 
Join Date: Mar 2011
Posts: 174
Rep Power: 6
anon_a is on a distinguished road
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?
anon_a is offline   Reply With Quote

Old   July 4, 2012, 22:54
Default
  #8
sgl
New Member
 
Sang-gon Lee
Join Date: Jul 2012
Posts: 8
Rep Power: 5
sgl is on a distinguished road
Quote:
Originally Posted by StSchiff View Post
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 View Post
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..
slice_1.jpg

slice_2.jpg

slice_3.jpg

slice_4.jpg

sgl.tar.gz
sgl is offline   Reply With Quote

Old   July 5, 2012, 01:10
Default
  #9
Senior Member
 
Join Date: Mar 2011
Posts: 174
Rep Power: 6
anon_a is on a distinguished road
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.
anon_a is offline   Reply With Quote

Old   July 5, 2012, 01:42
Default
  #10
sgl
New Member
 
Sang-gon Lee
Join Date: Jul 2012
Posts: 8
Rep Power: 5
sgl is on a distinguished road
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.
slice_5.jpg

slice_6.jpg

slice_7.jpg
sgl is offline   Reply With Quote

Old   July 5, 2012, 02:39
Default
  #11
sgl
New Member
 
Sang-gon Lee
Join Date: Jul 2012
Posts: 8
Rep Power: 5
sgl is on a distinguished road
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!
Attached Images
File Type: jpg contoured.jpg (95.7 KB, 16 views)
sgl is offline   Reply With Quote

Old   July 5, 2012, 03:15
Default
  #12
New Member
 
Stefanie Schiffer
Join Date: Mar 2010
Location: Cologne, Germany
Posts: 26
Rep Power: 7
StSchiff is on a distinguished road
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
StSchiff is offline   Reply With Quote

Old   July 5, 2012, 03:35
Default
  #13
sgl
New Member
 
Sang-gon Lee
Join Date: Jul 2012
Posts: 8
Rep Power: 5
sgl is on a distinguished road
Thank you so much Stefanie!
Removing .stl suffix after simpleRoomModel did the trick!!!
It now shows my box wonderfully.
I wonder why I added .stl at the first place.
Thank you again and have a great day!
sgl is offline   Reply With Quote

Old   July 5, 2012, 03:47
Default
  #14
New Member
 
Stefanie Schiffer
Join Date: Mar 2010
Location: Cologne, Germany
Posts: 26
Rep Power: 7
StSchiff is on a distinguished road
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.
StSchiff is offline   Reply With Quote

Old   July 5, 2012, 05:37
Default
  #15
Senior Member
 
Join Date: Mar 2011
Posts: 174
Rep Power: 6
anon_a is on a distinguished road
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.
anon_a is offline   Reply With Quote

Old   July 5, 2012, 20:25
Default
  #16
sgl
New Member
 
Sang-gon Lee
Join Date: Jul 2012
Posts: 8
Rep Power: 5
sgl is on a distinguished road
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
sgl is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 15:16.