CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] Specifying two locations in mesh with snappyHexMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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: 14
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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: 14
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Creating very fine, high accuracy mesh with snappyHexMesh JD_Welch OpenFOAM Meshing & Mesh Conversion 10 July 5, 2023 11:50
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
[OpenFOAM] snappyHexMesh - can't open mesh in ParaView tfigueiro ParaView 0 June 11, 2015 19:05
[snappyHexMesh] snappyHexMesh & Mesh around a missile sasanghomi OpenFOAM Meshing & Mesh Conversion 2 October 15, 2014 19:54
3D Hybrid Mesh Errors DarrenC ANSYS Meshing & Geometry 11 August 5, 2013 06:42


All times are GMT -4. The time now is 07:50.