|
[Sponsors] |
December 14, 2015, 06:26 |
Rotate part of mesh
|
#1 |
New Member
Johannes Rasmussen
Join Date: Dec 2011
Posts: 9
Rep Power: 15 |
Hi
I wish to simulate the flow over some structure. I have a mesh that works well with the wind approaching from one direction and I get a satisfactory steady solution. I use blockMesh and snappyHexMesh Instead of generating new meshes for each alternative wind direction I would like to just rotate the central part of the mesh and make new cases from these meshes. This feature seems quite obvious to me but I have not yet determined how to do it. Note that I don't want a dynamic mesh. I just want to divide the mesh and rotate part of it. I attach a couple of sketches of what I am trying to do. I have looked at the propeller and annularThermalMixer cases, even though the simulations are quite different from my needs, but it is hard for me to understand all the steps of the mesh generation. What I imagine I should do is to split the mesh in two parts: a cylindrical part in the middle and the remaining part. I have managed to create a cylindrical zell cone with snappyHexMesh but now I feel I'm shooting in the dark with various meshing utilities. I don't understand the difference between sets, zones, regions and that makes it difficult for me to see a way through. And once split, I want to rotate the cylindrical part and merge the meshes to one or better, use AMI to connect them. So my question is: Can anyone point me to some documentation on the data types (sets,zones,regions,...) or a tutorial that makes it possible to understand the necessary concepts in clear steps? |
|
December 15, 2015, 02:51 |
|
#2 |
New Member
Alexander Hylla
Join Date: Apr 2011
Posts: 1
Rep Power: 0 |
Hi,
there was something called 'cube rotor' in the forum, ready to download. You maybe will find it here: http://www.cfd-online.com/Forums/ope...ing-ami-6.html The mesh is created in two parts, connected by AMI. Cheers |
|
December 15, 2015, 11:57 |
|
#3 |
New Member
Johannes Rasmussen
Join Date: Dec 2011
Posts: 9
Rep Power: 15 |
Hi Alexander
Thank you for your suggestion. What I wish to do is create one mesh around a building and its surroundings. With snappyHexMesh I can create a cylindrical cell zone around the building excluding some of the surroundings and with this cell zone I would like to divide the mesh. I lack the insight into OpenFoams data types but I was hoping to use the cell zone (or some other data type) to rotate only the part of the mesh in the cylindrical part, thereby simulating flow from different directions. I know the documentation on OpenFoam is sparse but any pointers/documents/webpages that could get me started would be much appreciated. Johannes |
|
October 25, 2016, 04:07 |
|
#4 |
New Member
Johannes Rasmussen
Join Date: Dec 2011
Posts: 9
Rep Power: 15 |
For anyone interested I managed to do some kind of makeshit solution a while ago and I post it/attach the files now as someone has expressed interest. The steps are
* first generatie the full mesh, including the structure * then apply snappyHexMesh to this mesh once more with a cylindrical geometry, thereby cutting away the structure (to be rotated) and leaving the surroundings * then repeat the above step but cutting away the surroundings and leaving the structure in a cylindrical mesh ! note that the mesh refinement around the structure may result in non-hex cells. If the division-cylinder intersects any such cells snappyHexMesh will fail * finally the cylindrical mesh can be rotated as desired and merged with the surrounding mesh I attach a zip-file with snappyHexMeshDict-files and two scripts that automate the process for a number of angles of attack I am sure that this can be done in a much more elegant way. SnappyHexMesh can generate the cylindrical interface while introducing the structure and will mark the interior of this cylinder with a cellZone. I am sure this can used and I think it might be with pimpleDyMFoam which as far as I remember seems to use the cell zones to move parts of meshes. I think the trick might be to introduce a static motion of the mesh (perhaps precomputed in the meshPhi file). I did some quick tests without success and have not spend any time on it since then. I would be very interested to hear if anyone solves the problem in an elegant way. |
|
October 25, 2016, 11:56 |
|
#5 |
New Member
Lorenzo Donisi
Join Date: Oct 2016
Posts: 5
Rep Power: 10 |
Dear Johannes,
thanks for your solution, even if, as you said, it is not very elegant it is still a solution. I have found a similar one by using the splitMeshRegions utility, but I can make it work only with mesh generated with blockMesh up to now - I used topoSet to create two cellZones, one internal and one external to region I want to split - I used splitMeshRegions to separate the two regions; it also creates two directories with the meshes of the two regions. - After having copied all that is needed in these directories I ran transformPoints just like in your application. - Finally I ran mergeMeshes and then stitchMesh on the new mesh. I do not know if it can be useful, maybe if I manage to use it with sHM it can save the time needed to run three times the mesh generator. The problem is that after using splitMeshRegions the new mesh has none of the features I created with sHM. EDIT: I was running splitMeshRegions on the wrong mesh, the one generated by bM and not the one generated by sHM |
|
October 27, 2016, 04:29 |
|
#6 |
New Member
Johannes Rasmussen
Join Date: Dec 2011
Posts: 9
Rep Power: 15 |
Hi Lorenzo
I did mange to create some cell zones whilst including my structure but I didn't manage to manipulate the mesh based on these cell zones. I will paste them further down. If you are able to rotate your mesh based on cell zones it might work (?) - if it does I am very interested. The annularThermalMixer uses pimpleDyMFoam to rotate parts of a mesh at runtime. It uses the AMI to connect the cells across the rotating interface. I was thinking that this displacement could be done statically but I didn't spend more time on this approach - all though I think it might be the best way to do it. Here are excerpts from snappyHexMeshDict. I hope you can use it Johannes Code:
geometry { box.stl { type triSurfaceMesh; name structures; } cylinder.stl { type triSurfaceMesh; name cylinder; } }; ... refinementSurfaces { structures { level (3 5); } cylinder { level (3 3); faceType boundary; cellZone cylinder; faceZone cylinder; cellZoneInside inside; } } |
|
Tags |
formats, mesh, rotate, split, static |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Split, rotate and merge part of mesh | lo.donisi | OpenFOAM Meshing & Mesh Conversion | 2 | October 25, 2016 12:10 |
[ICEM] Mirror Mesh | Delete duplicate mesh | pythag0ra5 | ANSYS Meshing & Geometry | 6 | November 19, 2013 08:35 |
[ICEM] How to mesh part by part? | rikio | ANSYS Meshing & Geometry | 6 | February 24, 2010 20:19 |
Icemcfd 11: Loss of mesh from surface mesh option? | Joe | CFX | 2 | March 26, 2007 19:10 |
How to control Minximum mesh space? | hung | FLUENT | 7 | April 18, 2005 10:38 |