|
[Sponsors] |
[snappyHexMesh] Boundary layers on an inlet/outlet for a pipe |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 4, 2011, 10:43 |
Boundary layers on an inlet/outlet for a pipe
|
#1 |
Member
Eysteinn Helgason
Join Date: Sep 2009
Location: Gothenburg, Sweden
Posts: 53
Rep Power: 17 |
Hi all,
I'm currently working on meshing a pipe using snappyHexMesh. Is there someone who knows how to get the boundary layers to connect to the inlet and outlet? Similiar as can be seen in the first image in this post: http://www.cfd-online.com/Forums/ope...furcation.html Best regards, Eysteinn |
|
July 15, 2011, 17:14 |
Try refineWallLayer
|
#2 |
New Member
Join Date: Jun 2011
Posts: 22
Rep Power: 15 |
I struggled with this for the last day. The best I've been able to come up with so far is to use the refineWallLayer utility that comes with OF. My method is the following...
In creating the mesh with sHM, I don't try to resolve the near-wall mesh. Once I get a mesh I'm happy with, I add the near-wall region by running: refineWallLayer <wall-patch-name> <edge-weight> The edge weight tells the utility what fraction of the cell adjacent to the wall should be divided. For now, I just use 0.5. My models have been relatively simple to date so I only have one wall patch to which I want to attach a bounary layer. However, I think you can run the command sequentially for each wall patch (or multiple times for successive refinement of a given wall patch) to get he mesh you want. You can also use the -overwrite option to replace the current mesh with the refined-wall-layer mesh...Hope this helps. |
|
July 21, 2011, 08:02 |
|
#3 |
Member
|
Hi Tim,
When I do the refineWallLayer command on my geometry (a simple wing) I end up with inverted cells, even after run it once. Eysteinn, try to change in your boundary file that is in constant/polymesh the type of inlet and outlet to "empty" and run sHM again. I think that should do the trick but you'll need to change back the boundaries to out/inlet once meshed. Thx, Ben |
|
July 21, 2011, 09:57 |
|
#4 |
New Member
Join Date: Jun 2011
Posts: 22
Rep Power: 15 |
Hey Ben,
Thanks a lot for the reply to my post. Maybe the cell inversion has to do with local curvature. I think your way offers the level of control I'd like to have over the near-wall mesh refinement. Plus, it's more in the spirit of the layer addition scheme offered by sHM. I'm going to try it and hope that it works for me, too. Thanks, Tim |
|
July 22, 2011, 13:26 |
|
#5 |
New Member
Join Date: Jun 2011
Posts: 22
Rep Power: 15 |
Hi Ben,
I tried your suggestion of changing the boundary type of the inlet/outlet patches to "empty" as well as "patch" and "symmetry", but none of these resulted in a mesh where the layers added at the pipe wall were imprinted to the inlet/outlet faces. Do you have an example .stl and SnappyHexMeshDict that could offer a bit more guidance? Thanks, Tim |
|
July 22, 2011, 14:20 |
|
#6 |
Member
|
Hi Tim,
I've made a tube quickly to check if that trick did work and it seems to work. See pic. attached. If that is what you want (sort of...) then the sHM dict file might help you (attached). I have changed the boundary of in/outlets to empty after the snapping step (in folder 2 if u don't do -overwrite) and it meshed the tube ends correctly. If you leave as a patch, it will not mesh on the in/outlet. I can't post the stl file because it is too big but its a cylinder anyway... can probably be done without using stl I guess. Not sure I'm making myself very clear... Regards, Ben Edit: the sHMDict file might be a bit messy because I'm trying to play around with the settings in order to get a correct BL on a wing - which I can't do for the moment - so some settings might not be very wise / good... Last edited by bouclette; July 22, 2011 at 14:25. Reason: added extra comments |
|
July 22, 2011, 16:17 |
|
#7 |
New Member
Join Date: Jun 2011
Posts: 22
Rep Power: 15 |
Ben,
Thanks for taking the time to put together the sample sHMDict file. Thanks, Tim |
|
July 23, 2011, 17:02 |
|
#8 |
New Member
Join Date: Jun 2011
Posts: 22
Rep Power: 15 |
OK! After messing around most of the afternoon, I discovered that the problem was in how my blockMeshDict was set up. In my original setup, I had the z-axis limits one unit away from the inlet and outlet of my z-axis aligned pipe. Once I moved the z-axis limits in closer, the "empty" BC trick worked perfectly and with the new feature edge function in OF 2.0.
Thanks for talking me through it... The important thing for others is to know that this method works great and if it's not working for you, try adjusting the initial background mesh. This will be particularly important if you have an inlet/outlet that is on the interior of the mesh and you can't have it hanging outside of the background mesh to make sure the feature is preserved. Thanks, Tim |
|
July 27, 2011, 13:08 |
|
#9 |
Member
Eysteinn Helgason
Join Date: Sep 2009
Location: Gothenburg, Sweden
Posts: 53
Rep Power: 17 |
Hi Ben and Tim
and thank you for the replies. Sorry for my late reply, have been out of internet for a few days and was unable to test this. This seems to work I only have a small problem with the type of the inlet and outlet. I get two entries for inlet, one as wall(nFaces=0) and one as empty so I removed the one with the wall definition. I also get duplicate entries in 3/pointLevel and cellLevel One of type empty and one calculated in pointLevel and zeroGradient in cellLevel. Should I remove one of them and leave one as patch or calculated (and then zeroGradient in cellLevel) ?? When you mesh the pipe you start by creating a box in blockMesh and create a patch wall for all sides, right? I always get my inlet default as wall when I continue with snappyHexMesh and have to changed it in constant/polyMesh/boundary Do you define the patch type of your inlets/outlets in blockMeshDict or somewhere else? Thank you for your help! Best regards, Eysteinn |
|
August 12, 2011, 08:17 |
|
#10 |
New Member
Join Date: Jun 2011
Posts: 22
Rep Power: 15 |
Eysteinn,
Sorry for the delay in responding to your post. When I create my model with SHM, I don't give too much thought to the BCs applied to the bounding surfaces of the original background mesh to be made with blockMesh. Once the meshing process is completed, these surface patches should have zero faces in them and can be deleted from the boundary definition file (with appropriate reduction in the number of boundary patches at the top of the file). As for defining the inlet/outle/walls, I make sure these surfaces are in the interior of my background mesh and use the boundary snapping feature included in the OF 2.0 version of SHM. With this procedure these surface patches will be created by SHM and one needs to edit the boundary file to ensure they have the right types for the desired simulation activity. I hope this answers your question...Assuming you still have any given the time that's elapsed between your post and my response...Again, my sincere apologies for the delay. TimboJones |
|
August 22, 2011, 04:54 |
|
#11 |
Member
Eysteinn Helgason
Join Date: Sep 2009
Location: Gothenburg, Sweden
Posts: 53
Rep Power: 17 |
Thank you for your answer Tim.
I have been trying this for a couple of days now and can't get the cells on the inlet or outlet to snap to the edge, so that it makes a smooth circle with sharp edges. You mentioned boundary snapping feature in OF2.0, is that automatically on or do you create an edge mesh or something else? Thanks Eysteinn |
|
August 22, 2011, 18:10 |
|
#12 |
New Member
Join Date: Jun 2011
Posts: 22
Rep Power: 15 |
Eysteinn,
You have to create the edge mesh. I did this using one of the OF-supplied utilities...I think it was surfaceFeatureExtract, but I can't remember right now the exact recipe I used for the extraction. One other trick that I *do* remember is the following. In the tutorials that come with OpenFOAM, the number of iterations for feature snapping is set to zero in the snappyHexMeshDict. Even with the extracted features, SHM will not snap to the features unless this number of iterations is increased. Tim Last edited by timbojones; August 22, 2011 at 18:12. Reason: Incorrectly wrote "Even with extracted surface mesh..." in last sentence. |
|
August 24, 2011, 13:41 |
|
#13 |
Member
Eysteinn Helgason
Join Date: Sep 2009
Location: Gothenburg, Sweden
Posts: 53
Rep Power: 17 |
Thank you Tim
Finally got this working. Nice! /Eysteinn |
|
April 11, 2013, 02:58 |
|
#14 | |
Senior Member
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 15 |
Quote:
would you please explain that what should we do with the new polyMesh that is obtained after runing the "refineWallLayer" utility? please help me i really need to know this. thanks in advance |
||
Tags |
boundary, layer, snappyhexmesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 60 | July 17, 2024 06:45 |
Out File does not show Imbalance in % | Mmaragann | CFX | 5 | January 20, 2017 11:20 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 18:11 |
domain imbalance for enrgy equation | happy | CFX | 14 | September 6, 2012 02:54 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 16:55 |