CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Generate mesh for MRF solvers

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By chegdan
  • 1 Post By kwardle

Reply
 
LinkBack Thread Tools Display Modes
Old   May 15, 2013, 14:36
Default Generate mesh for MRF solvers
  #1
Member
 
Pengchuan Wang
Join Date: Nov 2012
Location: Michigan USA
Posts: 52
Rep Power: 4
pechwang is on a distinguished road
Hello everyone,

I'm new to OpenFOAM. Now I'm working on a project including rotating refrence frames. I want to use MRF solvers. However, it seems that the mesh for MRF solvers is very complicated. It is not just blockMesh. So I want to know how to generate a mesh for MRF solvers. Do you guys have any suggestions or tutorials for me to start with? Many thanks.
pechwang is offline   Reply With Quote

Old   May 17, 2013, 12:19
Default
  #2
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 530
Rep Power: 18
chegdan will become famous soon enough
You could use snappyHexMesh if you have your geometry in STL format. You can easily add creation of MRF zones in the snappyHexMeshDict.

In the geometry section add a searchable cylinder like:

Code:
        impellerMRF
        {
            type searchableCylinder;
            point1 (0.0 0.0 0.07 );
            point2 (0.0 0.0 0.14 );
            radius 0.1;
        }
In the castellatedMeshControls section, you can add something like

Code:
            impellerMRF
            {
                level (3 4 );
                cellZoneInside inside;
                cellZone impellerMRF;
                faceZone impellerMRF;
            }
if you need some notes on how to use snappyHexMesh, take a look at this.
Romarius likes this.
__________________
Dan

Developer, Trainer, and Support Engineer at www.engys.com
Find me on twitter @dancombest and LinkedIn

Last edited by chegdan; May 17, 2013 at 12:24. Reason: grammar
chegdan is offline   Reply With Quote

Old   May 22, 2013, 08:51
Default
  #3
Member
 
Pengchuan Wang
Join Date: Nov 2012
Location: Michigan USA
Posts: 52
Rep Power: 4
pechwang is on a distinguished road
Hi Daniel,

Thank you for your reply. But right now I have nothing except a blockMeshDict. Originally I use blockMesh in icoFoam, Now I want to use MRFsimpleFoam, I just don't know how to move to that. Can you tell me what I can do that I can move from icoFoam to MRFsimpleFoam?

Thanks,
Pengchuan
pechwang is offline   Reply With Quote

Old   May 22, 2013, 09:56
Default
  #4
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 530
Rep Power: 18
chegdan will become famous soon enough
Pechwang
  1. what does your domain look like? Is it s a cube, complex shape, sphere?
  2. what shape is your MRF zone that you want? cylinder?

There are several ways to go about this. If you just want to use blockMesh, there is an example in tutorials/incompressible/simpleFoam/mixerVessel2D.

Dan
__________________
Dan

Developer, Trainer, and Support Engineer at www.engys.com
Find me on twitter @dancombest and LinkedIn
chegdan is offline   Reply With Quote

Old   May 22, 2013, 10:17
Default
  #5
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 192
Rep Power: 10
kwardle is on a distinguished road
Like Dan said, it really depends on the shape of your domain. What the MRF solver requires is that you define a cellZone for the rotating region and have this assigned as a MRFZone (where this happens is different if you are using 2.2 or earlier). There are lots of specific commands to select a block of cells and create a cellZone from them and it depends on the shape of the rotating region. You can do this 'on the fly' in snappy as was suggested or you can create the mesh and then run topoSet after the fact to create your cellZone from selections defined in system/topoSetDict. Have a look at OpenFOAM-<version>/applications/utilities/mesh/manipulation/topoSet/topoSetDict to see all the options and how to do this. Basically you will need to run some sort of <shape>ToCell command to create a cellSet and then a setToCellZone source type to make a cellZone from that cellSet.
jiaojiao likes this.
kwardle is offline   Reply With Quote

Old   May 22, 2013, 11:09
Default
  #6
Member
 
Pengchuan Wang
Join Date: Nov 2012
Location: Michigan USA
Posts: 52
Rep Power: 4
pechwang is on a distinguished road
Hi Dan,

Thank you for your reply. My domain right now is very simple. There are two plates, one is flate, and the other has some grooves and it can be more complex. Then the grooved plate is rotaing and the smooth wall is stationary. The fluid flows from the inner radius to out redius. I think the whole domain is rotating and the whole domain is MRFzone. Do I make sense?

Quote:
Originally Posted by chegdan View Post
Pechwang
  1. what does your domain look like? Is it s a cube, complex shape, sphere?
  2. what shape is your MRF zone that you want? cylinder?
There are several ways to go about this. If you just want to use blockMesh, there is an example in tutorials/incompressible/simpleFoam/mixerVessel2D.

Dan
pechwang is offline   Reply With Quote

Old   May 23, 2013, 08:32
Default
  #7
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 530
Rep Power: 18
chegdan will become famous soon enough
Quote:
I think the whole domain is rotating and the whole domain is MRFzone.
Then you might want the think about a Single Reference Frame (SRF) solver, where the whole domain is rotating and your outer stationary wall has an equal velocity in the opposite direction of the domain rotation. This equal and opposite rotation of your outer stationary wall will in essence make it truly stationary from an outside perspective.
__________________
Dan

Developer, Trainer, and Support Engineer at www.engys.com
Find me on twitter @dancombest and LinkedIn
chegdan is offline   Reply With Quote

Old   May 23, 2013, 09:17
Default
  #8
Member
 
Pengchuan Wang
Join Date: Nov 2012
Location: Michigan USA
Posts: 52
Rep Power: 4
pechwang is on a distinguished road
Hi Dan,

I tried SRFsimpleFoam before and yes, it works. But later as the geometry becomes complex, I have to use the MRFsimpleFoam and MRFinterFoam, since there is no SRFinterFoam. So I think I have to learn to use MRF eventually.
pechwang is offline   Reply With Quote

Old   May 23, 2013, 15:13
Default
  #9
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 530
Rep Power: 18
chegdan will become famous soon enough
pechwang

Then we go back to the comment by kwardle. You can use topoSet to define a group of cells to be an MRF zone and then use your MRF solver.

You could always extract your surfaces that you have in your mesh with

Code:
surfaceMeshTriangulate [options] <outputFile>
and then re-mesh the geometry with snappyHexMesh to give some refinement near the MRF interface. Then this mesh could be used for your MRF solvers.

Dan
__________________
Dan

Developer, Trainer, and Support Engineer at www.engys.com
Find me on twitter @dancombest and LinkedIn

Last edited by chegdan; May 24, 2013 at 08:27. Reason: fixed some inocrrect information..sorry
chegdan is offline   Reply With Quote

Old   September 10, 2013, 09:27
Default
  #10
New Member
 
Pablo Alejandro
Join Date: Jul 2013
Location: Nuevo León, México
Posts: 3
Rep Power: 3
pablodelag is on a distinguished road
Quote:
Originally Posted by chegdan View Post
You could use snappyHexMesh if you have your geometry in STL format. You can easily add creation of MRF zones in the snappyHexMeshDict.

In the geometry section add a searchable cylinder like:

Code:
        impellerMRF
        {
            type searchableCylinder;
            point1 (0.0 0.0 0.07 );
            point2 (0.0 0.0 0.14 );
            radius 0.1;
        }
In the castellatedMeshControls section, you can add something like

Code:
            impellerMRF
            {
                level (3 4 );
                cellZoneInside inside;
                cellZone impellerMRF;
                faceZone impellerMRF;
            }
if you need some notes on how to use snappyHexMesh, take a look at this.

Hi everyone,

I think that maybe I'm misunderstanding how to use MRF zones. My question is: if you have a .stl geometry (impeller.stl) , can you define it in snappyHexMeshDict as a MRF zone?? or must you create a searchableCylinder that surrounds the .stl geometry and define that cylinder as the MRF zone?

Thank you in advance for any comment.

Regards!
pablodelag is offline   Reply With Quote

Reply

Tags
mesh generation, mrfzones

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SnappyHexMesh for internal Flow vishwa OpenFOAM Native Meshers: snappyHexMesh and Others 23 August 6, 2014 03:50
No layers in a small gap bobburnquist OpenFOAM Native Meshers: snappyHexMesh and Others 2 November 25, 2012 09:54
[ICEM] How to generate this kind of mesh? mingersai ANSYS Meshing & Geometry 50 November 21, 2012 12:25
engrid -> save as .stl with boundarie codes Zymon enGrid 31 August 29, 2011 13:40
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09


All times are GMT -4. The time now is 06:10.