Difference between revisions of "MRFSimpleFoam"
Nimbus1947 (Talk | contribs) (→Mesh Generation and Import) |
AntonChupin (Talk | contribs) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | = MRFSimpleFoam = | + | = MRFSimpleFoam Tutorial= |
== Introduction == | == Introduction == | ||
Line 11: | Line 11: | ||
# subtract cylinder 2 from 1 (maintain cylinder 2) | # subtract cylinder 2 from 1 (maintain cylinder 2) | ||
# subtract cube 3 from cylinder 2 | # subtract cube 3 from cylinder 2 | ||
+ | # Connect the faces (inner face of cylinder 1 and outer face of cylinder 2)[[Image:couple.png|center|thumb|Connect faces]] | ||
# define continuum types (zones): rotor for cylinder 2, and stator for cylinder 1[[Image:Objects.png|center|thumb|Rotor/Stator domain]] | # define continuum types (zones): rotor for cylinder 2, and stator for cylinder 1[[Image:Objects.png|center|thumb|Rotor/Stator domain]] | ||
− | # define boundaries (inlet, outlet, cubeWall, cylindricWall, sliderFace) | + | # define boundaries (inlet, outlet, cubeWall, cylindricWall, sliderFace).sliderFace is the connected faces mentioned above.[[Image:boundaries.png|center|thumb|Boundaries]] |
− | # define the | + | # define the boundary for sliderFace as INTERIOR |
# generate tetrahedral mesh (0.05 size)[[Image:mesh.png|center|thumb|Mesh]] | # generate tetrahedral mesh (0.05 size)[[Image:mesh.png|center|thumb|Mesh]] | ||
+ | NOTE: It is advisable not to make any modifications to the topology after meshing. | ||
# export as mrf.msh | # export as mrf.msh | ||
# import mesh in OpenFoam: | # import mesh in OpenFoam: | ||
Line 37: | Line 39: | ||
== Download == | == Download == | ||
The complete case and solver: [[http://openfoamwiki.net/images/e/e2/Wiki.tar.gz]] | The complete case and solver: [[http://openfoamwiki.net/images/e/e2/Wiki.tar.gz]] | ||
+ | |||
+ | NOTE: To run this case in OF1.6 include the file constant/RASproperties | ||
+ | |||
+ | [[Category:Tutorials]] |
Latest revision as of 10:58, 21 October 2013
Contents
1 MRFSimpleFoam Tutorial
1.1 Introduction
This tutorial is aimed to generating the mesh in Gambit, importing and solving it with MRFSimpleFoam. It applies to Valid versions:
1.2 Mesh Generation and Import
- generate two cylinders (r1=0.5 h1=1; r2=0.25, h2=0.5) and one cube (h3=0.3)
- subtract cylinder 2 from 1 (maintain cylinder 2)
- subtract cube 3 from cylinder 2
- Connect the faces (inner face of cylinder 1 and outer face of cylinder 2)
- define continuum types (zones): rotor for cylinder 2, and stator for cylinder 1
- define boundaries (inlet, outlet, cubeWall, cylindricWall, sliderFace).sliderFace is the connected faces mentioned above.
- define the boundary for sliderFace as INTERIOR
- generate tetrahedral mesh (0.05 size)
NOTE: It is advisable not to make any modifications to the topology after meshing.
- export as mrf.msh
- import mesh in OpenFoam:
fluentMeshToFoam ./ simulation geom/mrf.msh -writeSets -writeZones
1.3 Solver Running
Before you start the solver, another modification is needed: change in all the dictionaries the patch cubeWall with rotor and cylindricWall with stator. Of course you could name this patches as it should from the beginning in Gambit, but I considered that in this way it will be clearer since the same name rotor appears in two places: zone and patch.
The rotational axis, and the angular velocity are specified using a dictionary file named constant/MRFZones.
The solver can be started as:
MRFSimpleFoam ./ simulation
It is advisable to start with very low angular velocities, even better to use potentialFoam as an initialization step. potentialFoam runs directly on the case withouth any other modifications.
In the case I ran, I started with potentialFoam, then I increased gradually the angular velocity from 0, 10, 20, 50, to 100 rad/s.
1.4 Postprocessing
Pressure distribution in a middle cross section is shown in the next figure:1.5 Download
The complete case and solver: [[1]]
NOTE: To run this case in OF1.6 include the file constant/RASproperties