CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Generate mesh for MRF solvers (http://www.cfd-online.com/Forums/openfoam/117818-generate-mesh-mrf-solvers.html)

pechwang May 15, 2013 14:36

Generate mesh for MRF solvers
 
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.

chegdan May 17, 2013 12:19

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.

pechwang May 22, 2013 08:51

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

chegdan May 22, 2013 09:56

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

kwardle May 22, 2013 10:17

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.

pechwang May 22, 2013 11:09

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 (Post 429237)
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


chegdan May 23, 2013 08:32

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.

pechwang May 23, 2013 09:17

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.

chegdan May 23, 2013 15:13

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

pablodelag September 10, 2013 09:27

Quote:

Originally Posted by chegdan (Post 428320)
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!


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