CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Specifying two locations in mesh with snappyHexMesh

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 7, 2011, 11:44
Default Specifying two locations in mesh with snappyHexMesh
  #1
New Member
 
Join Date: Jun 2011
Posts: 29
Rep Power: 6
Cyberholmes is on a distinguished road
I am trying to mesh two concentric spheres using snappyHexMesh, but I want the interior of both spheres to be meshed while removing the meshing that is outside the larger sphere.

Using locationInMesh, if I specify a point inside the inner sphere, I only end up up with its interior meshed, and if I specify a point inside the outer sphere but not the inner sphere, I end up with the interior of the large sphere with a cavity where the smaller sphere was.

The reason I want this is because I want the inner sphere to be a patch that I can use to set a temperature boundary condition, but I do not want it to be a wall, so I need its interior to be meshed so I can solve there as well.

Is there any way with snappyHexMesh to end up meshing the interior of both spheres?
Cyberholmes is offline   Reply With Quote

Old   July 9, 2011, 05:50
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Cyberholmes,

What you'll need is chtMultiRegionFoam as a solver! Assuming of course you want two regions...

There is a tutorial that exemplifies just this: heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater

If you simply want to set a temperature field inside a single region, then you should look into setFields.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   July 11, 2011, 10:37
Default
  #3
New Member
 
Join Date: Jun 2011
Posts: 29
Rep Power: 6
Cyberholmes is on a distinguished road
Thank you for the reply, but before I even get to the stage of using a solver, I need to figure out how to use snappyHexMesh to mesh two regions. As far as I currently know, you can only specify one locationInMesh, and it removes all cells outside of that region.
Cyberholmes is offline   Reply With Quote

Old   July 11, 2011, 16:21
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Cyberholmes,

I (wrongly) assumed you would investigate more about that tutorial case...

OK, this is what happens with OpenFOAM (afaik):
  1. It does not allow internal boundary conditions. For example, if you wanted a door between two rooms to close or open instantaneously, that can't be done with normal solvers. It sort-of could be done with some sort of variable porous region.
  2. Therefore, since internal boundaries are not allowed in OpenFOAM, then snappyHexMesh also will not allow two regions in the same mesh. Two or more volumes would only be meshed if and only if there was a physical opening between them.
  3. So, how can OpenFOAM handle two volumes, even if they are contiguous, only separated by a thin surface? Simple! You have to use a solver designed to handle those two volumes, which are named regions. Therefore, you have to mesh two regions, instead of just one.
  4. In essence, if you want two locationInMesh points, then you need two regions! This is where the tutorial I wrote about comes in!!
It's a bit complex and time consuming to explain it all, therefore I pointed you in the direction I think is the best one, at least for now.


On the other hand, if you only want one single region, because those two spheres are going to transfer fluid between them through that surface that separates them, then the other possibility I talked about was about setFields. With setFields, you can set a zone in the mesh to have the desired value; for example, if you wanted to start that surface with an initial temperature of 300K, then you can do it with setFields. In case you do want to learn more about setFields, you can start here: http://www.openfoam.com/docs/user/damBreak.php

Best regards,
Bruno
wyldckat 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
3D Hybrid Mesh Errors DarrenC ANSYS Meshing & Geometry 11 August 5, 2013 06:42
engrid -> save as .stl with boundarie codes Zymon enGrid 31 August 29, 2011 13:40
snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Native Meshers: snappyHexMesh and Others 2 March 27, 2011 21:11
snappyHexMesh aborting Tobi OpenFOAM Native Meshers: snappyHexMesh and Others 0 November 10, 2010 04:23
basic of mesh refinement arya CFX 4 June 19, 2007 12:21


All times are GMT -4. The time now is 17:00.