|
[Sponsors] |
[mesh manipulation] Defining regions with topoSet |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 10, 2014, 00:15 |
Defining regions with topoSet
|
#1 |
New Member
Join Date: Oct 2011
Location: Sydney, NSW
Posts: 21
Rep Power: 15 |
Hi there,
I'm having trouble figuring out how to get topoSet to do what I want... Basically, I want to create a compound mesh where each region has different material properties. Making single simple shapes such as rectangles, cylinders and an annulus is straightforward enough, but making more complicated shapes such as the quarter-cirle annulus I've (poorly) illustrated below are eluding me. In particular, it seems to me that it should be possible to make something like the below image by using some boolean operations--create an annulus and remove some of it by removing the portion that intersects a box. I don't know if this is actually possible via topoSetDict though. So, any suggestions? If boolean operations are not possible via topoSetDict, how else might I be able to accomplish something like this? Thanks in advance for any help. |
|
May 11, 2014, 21:52 |
|
#2 |
New Member
Join Date: Oct 2011
Location: Sydney, NSW
Posts: 21
Rep Power: 15 |
OK, how about this then...
Let's say I want to define a fairly generic closed polygon (no crossing boundaries) in terms of vertex coordinates, and then select the cells internal to the polygon. What seems the most intuitive solution to me would be to define said polygon as a patch in my blockMeshDict file and use that patch in topoSetDict to do the selection. This of course won't work, as defining a patch in this manner is invalid. Thus, I guess what I'm asking is how I might go about doing this sort of patch selection? Perhaps as some sort of slave relative to the grid patch shown in my previous post? And if that's correct, how? Thanks in advance for any help. |
|
May 12, 2014, 13:57 |
|
#3 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Depending on your version of OpenFOAM, you can select cells inside a surface geomnetry by using the surfaceToCell source. If you define your shape as an STL file you should be able to get what you want.
|
|
May 13, 2014, 06:22 |
|
#4 |
New Member
Join Date: Oct 2011
Location: Sydney, NSW
Posts: 21
Rep Power: 15 |
Thanks mturcios777, my problem has (and still remains) doing boolean operations with topoSet. However, I have (sort of) taken your advice and simply did things in gmsh, and used the gmshToFoam utility to convert the mesh. Once that was done, simply selecting the regions via topoSetDict was easy, and splitMeshRegions works like a charm as well.
If anyone can provide some insight as to how to do this via blockMesh + topoSet, I'd still like to know... |
|
May 13, 2014, 06:38 |
|
#5 |
Senior Member
|
Hi,
I'll assume you'd like to have cellSet. To create quarter of cylinder, you'll need to create outer cylinder, delete from it inner cylinder, delete half with box, and delete half of the acquired half with another box. So it should be something like (I'll create quarter of a cylinder in the center, correct coordinates for your case): Code:
{ name c0; type cellSet; action new; source cylinderToCell; sourceInfo { p1 (0 0 0); p2 (0 0 1); radius 1; } } { name c0; type cellSet; action delete; source cylinderToCell; sourceInfo { p1 (0 0 0); p2 (0 0 1); radius 0.8; } } { name c0; type cellSet; action delete; source boxToCell; sourceInfo { box (-1 -1 0) (1 0 1); } } { name c0; type cellSet; action delete; source boxToCell; sourceInfo { box (-1 -1 0) (0 1 1); } } Or you'd like to do something else? |
|
May 13, 2014, 06:47 |
|
#6 |
New Member
Join Date: Oct 2011
Location: Sydney, NSW
Posts: 21
Rep Power: 15 |
Thanks, that's just the kind of tip I have been looking for! I think I now see where I was going wrong, and get on using this tool instead of just swearing at it :-)
|
|
July 5, 2016, 06:56 |
|
#7 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 11 |
hi there, I know this is an old thread but it is exactly on the topic I need to ask about.. I am trying to use topoSet and refineMesh for the first time on a basic cylinder in multiphase flow mesh. What I would like to do is refine the mesh just around the cylinder and in the wake area and leave the rest quite coarse but I'm having trouble with topoSetDict and refineMeshDict understanding the dictionaries and getting the right entries. I'm attaching the blockMeshDict.txt file as it's too long to include here as well as my (barely edited) refineMeshDict and topoSetDict. If anyone can offer some advice on editing these files to refine the cells in the area around the cylinder and wake, I would be very grateful..
|
|
July 5, 2016, 07:34 |
|
#8 |
New Member
Join Date: Oct 2011
Location: Sydney, NSW
Posts: 21
Rep Power: 15 |
Good ol' email notifications!
I'm no longer working in CFD these days (stupid economy!) and my solution is likely outdated in terms of the current OF release. That said though, I have a whole demo script around here somewhere that at least sets up the geometry / meshing consistently, so just pm me an address and I'll be happy to dig it up and send it to you. Cheers! |
|
Tags |
toposet, toposetdict |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] defining porous zone in toposet | mvee | OpenFOAM Meshing & Mesh Conversion | 5 | July 13, 2020 13:28 |
Defining regions with topoSet | BarCFD | OpenFOAM Pre-Processing | 2 | February 4, 2018 12:18 |
Defining multiple regions in MRFsimpleFoam | ameen@cfd | OpenFOAM Running, Solving & CFD | 7 | May 9, 2014 06:29 |
splitting regions and defining BC in conjugate heat transfer | skuznet | OpenFOAM Pre-Processing | 3 | December 9, 2013 05:42 |
defining regions | Harriet Pearson | Main CFD Forum | 0 | February 19, 2004 13:44 |