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

[mesh manipulation] Rotate part of mesh

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By johannes.tophoj

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 14, 2015, 05:26
Default Rotate part of mesh
  #1
New Member
 
Johannes Rasmussen
Join Date: Dec 2011
Posts: 9
Rep Power: 14
johannes.tophoj is on a distinguished road
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?
Attached Images
File Type: png mesh0.png (15.3 KB, 102 views)
File Type: png mesh1.png (22.2 KB, 95 views)
arashgmn likes this.
johannes.tophoj is offline   Reply With Quote

Old   December 15, 2015, 01:51
Default
  #2
New Member
 
Alexander Hylla
Join Date: Apr 2011
Posts: 1
Rep Power: 0
alhylla is on a distinguished road
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
alhylla is offline   Reply With Quote

Old   December 15, 2015, 10:57
Default
  #3
New Member
 
Johannes Rasmussen
Join Date: Dec 2011
Posts: 9
Rep Power: 14
johannes.tophoj is on a distinguished road
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
johannes.tophoj is offline   Reply With Quote

Old   October 25, 2016, 03:07
Default
  #4
New Member
 
Johannes Rasmussen
Join Date: Dec 2011
Posts: 9
Rep Power: 14
johannes.tophoj is on a distinguished road
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.
Attached Files
File Type: zip generateMesh.zip (13.9 KB, 60 views)
johannes.tophoj is offline   Reply With Quote

Old   October 25, 2016, 10:56
Default
  #5
New Member
 
Lorenzo Donisi
Join Date: Oct 2016
Posts: 5
Rep Power: 9
lo.donisi is on a distinguished road
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
lo.donisi is offline   Reply With Quote

Old   October 27, 2016, 03:29
Default
  #6
New Member
 
Johannes Rasmussen
Join Date: Dec 2011
Posts: 9
Rep Power: 14
johannes.tophoj is on a distinguished road
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;
        }
    }
johannes.tophoj is offline   Reply With Quote

Reply

Tags
formats, mesh, rotate, split, static


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
[Other] Split, rotate and merge part of mesh lo.donisi OpenFOAM Meshing & Mesh Conversion 2 October 25, 2016 11:10
[ICEM] Mirror Mesh | Delete duplicate mesh pythag0ra5 ANSYS Meshing & Geometry 6 November 19, 2013 07:35
[ICEM] How to mesh part by part? rikio ANSYS Meshing & Geometry 6 February 24, 2010 19:19
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 18:10
How to control Minximum mesh space? hung FLUENT 7 April 18, 2005 09:38


All times are GMT -4. The time now is 20:34.