Rotating machinery with MRF
At the end of this you will have a steady run of a pump, fan or propeller in which a region of the mesh spins in a rotating reference frame while the mesh itself stays still, and the torque and head that come out of it.
Cell zones are a paid feature. Say so before you start planning. A multiple-reference-frame case works by acting on a cell zone, and the free tier blocks cell zones outright. The Problems tab raises it as an error against Advanced concepts — “Cell zones and multi-region cases are not part of the … tier. Remove them, or upgrade.” — and a run with an error will not start. You can build the case, mesh it and look at it on the free tier. You cannot solve it.
The Rotating frame (SRF) analysis type is the other rotating workflow in the application and it needs no cell zone, because the whole mesh rotates. It is also outside the free tier’s analysis types. There is no free route to a rotating case.
Before you start
Section titled “Before you start”Read External aerodynamics. This tutorial assumes you are comfortable with refinement regions, boundary layers and the Quality pane, and it does not repeat them.
You need geometry with a rotor in it — an impeller, a fan, a propeller — positioned where it actually sits relative to the casing or the hull.
Choosing between the three
Section titled “Choosing between the three”Select Advanced concepts and look at the Rotating zones category. The + beside it creates an item, and the item’s Type offers three models whose hints state the trade directly:
MRF (frozen rotor) — “Steady and cheap. The zone spins in a rotating reference frame; the mesh does not move. Right for a design-point pump or fan.” This is what the tutorial uses. The rotor is frozen in one angular position and a source term is added inside the zone to represent the rotation. You get a steady answer for the cost of a steady run.
Sliding mesh (AMI) — “Transient, true relative motion across a cyclicAMI
pair. Needed for blade-passing unsteadiness.” The mesh genuinely rotates. It
costs a transient run and it is the only way to see blade passing.
Overset — background plus component meshes, for large motion or 6-DoF.
Take MRF unless you need what it cannot give. What it cannot give is anything that depends on the blade being somewhere other than where you froze it: blade-passing pressure fluctuation, rotor–stator interaction noise, or a volute whose answer changes with rotor position. What it gives well is the design-point performance of a machine, which is what most people are after.
If you pick AMI or Overset, the mesh moves, and the Problems tab will refuse a steady case:
The mesh moves, so the case cannot be solved steady-state - a steady solver never updates the mesh. Set the time dependency to Transient.
1. Create the case
Section titled “1. Create the case”Press New case, then Single Phase, Low Speed, Steady-state. That
derives simpleFoam, and its applicable list names frozen-rotor MRF explicitly.
MRF is not an analysis type. It is a concept added on top of an ordinary incompressible case, which is why you choose the physics first and the rotation afterwards.
2. Geometry
Section titled “2. Geometry”Import the geometry and check Size and Watertight in the Geometry info block.
Press Split into parts if the rotor and the casing are separate bodies. You want the rotor as its own patch, because the torque you are about to measure is a force on the rotor and not on everything.
Rename the parts so the patch names mean something. The Patch field on each card is what OpenFOAM will call it, and it is what a boundary condition and a force control will refer to.
3. Mesh
Section titled “3. Mesh”Select Mesh and mesh as usual, with one addition that matters more here than anywhere else.
Refine where the zone boundary will be. The MRF interface is not a patch — there is no physical boundary between the rotating zone and the rest of the domain, only a change in the equations solved. But the transition still has to be resolved: a coarse mesh across it smears the swirl the rotor imparts, and the head you compute comes out low. Add a refinement region under Refinements covering the volume the rotating zone will occupy.
Add boundary layers on the blades. Torque is the integral of shear and pressure over the blade surface; the shear half of that is a boundary-layer quantity and a mesh with no layers cannot produce it.
Press Generate mesh.
4. Advanced concepts — the rotating zone
Section titled “4. Advanced concepts — the rotating zone”Select Advanced concepts.
Six categories are listed, each showing what it writes: Rotating zones →
constant/MRFProperties, Porous media → constant/fvOptions, and so on.
Press the + beside Rotating zones.
An item is created, gets its own node in the setup tree under Advanced concepts, and the application takes you to its editor.
The item
Section titled “The item”Active is on. Inactive concepts stay in the case but are written with
active no, which is a useful way to run the same case with and without the
rotation.
Type — set to MRF (frozen rotor).
Name — names the entry in MRFProperties.
Cell zone — the name of the cell zone this concept acts on. The zone is built from the geometry below.
Zone geometry
Section titled “Zone geometry”This is the section that does the work.
Shape offers box, cylinder and sphere, and the hint says what you
almost always want: “A rotating zone is almost always a cylinder about its own
axis.”
Take cylinder and set:
- Radius — comfortably outside the blade tips, but inside the casing. A zone that clips the blades is wrong; a zone that touches the casing wall is also wrong, because the wall is stationary and the zone would try to spin it.
- Length — along the axis below, covering the rotor with clearance at both ends.
- Axis X, Axis Y, Axis Z — the rotation axis of the cylinder.
- The six min and max fields position the box the cylinder is centred on.
Fit to geometry gives you a starting zone sized from the case, which is easier to adjust than a set of numbers typed from nothing.
The zone is a set of cells, so it does not exist until the mesh does. The
pane says so: nothing here selects anything until there is a mesh. The
application runs topoSet after meshing to cut the zone out, and only then does
MRFProperties refer to something real.
One line in this pane says the zone is created “before meshing”. It is not — the zone is cut from the mesh after it is generated, which is what the paragraph immediately below that line says and what the run pipeline does.
Rotation
Section titled “Rotation”Speed in rpm, and an Axis given as three components.
The sign of the axis sets the direction of rotation, and getting it backwards gives a machine that produces negative head with no error anywhere. Check it against the blade geometry before running: a pump whose blades sweep backwards relative to the rotation is a pump running in reverse.
5. Re-mesh
Section titled “5. Re-mesh”Press Generate mesh again after defining the zone.
The zone is cut by topoSet as part of the meshing pipeline, so a zone defined
after the last mesh does not exist in the mesh on disc yet. Skipping this is the
single most common way to get a case that runs and does not rotate: the solver
reads MRFProperties, looks for the cell zone, finds nothing, and the rotor
sits there.
6. Models, Materials
Section titled “6. Models, Materials”Models — Incompressible, Steady-state, SIMPLE, k-omega SST.
MRF adds Coriolis and centrifugal terms and can make convergence harder than the same case without rotation. If it fights you, the Robust preset under Numerics is the first thing to try, not a finer mesh.
Materials — set the working fluid. A pump in water and the same pump in air are different machines.
7. Boundary conditions
Section titled “7. Boundary conditions”Select Boundary conditions.
The rotating zone is not a boundary condition and has no entry here. It is a volume, and it is configured entirely under Advanced concepts. If you find yourself looking for it in this pane you have the wrong mental model of what MRF is.
The rotor surface is a Wall with Wall motion at Stationary (no-slip). This is counter-intuitive and it is correct: inside the rotating frame the blade is stationary, and the frame is what rotates. The Rotating wall option under Wall motion, which takes a rotation rate in rad/s, is for a wall that spins within a stationary frame — a shaft passing through the domain, for instance — and using it on blades inside an MRF zone applies the rotation twice.
The casing is a Wall, stationary, and must lie outside the rotating zone.
Inlet and outlet as usual: a Velocity inlet and a Pressure outlet, or a flow rate driven from the inlet, depending on how the machine’s operating point is defined.
8. Result control
Section titled “8. Result control”Select Result control.
+ Forces and moments is the key one — “the same thing in newtons and newton-metres”. Set its Patch to the rotor. The moment about the rotation axis is the shaft torque, and torque times angular velocity is the power the machine absorbs, which is half of what a pump curve is made of.
Turn off Moments about the model centre and give the Centre of rotation explicitly as the point the shaft passes through. The model centre is not the shaft centre except by coincidence, and a moment about the wrong point is not a torque.
The other half of the pump curve is the head, so add:
- + Patch data with Operation set to areaAverage on
pat the inlet, and another at the outlet. The difference is the pressure rise. - + Flow rate through a patch for the volumetric or mass flow, which is the x-axis of the curve.
Add + y+ to confirm the blade wall treatment afterwards.
9. Run
Section titled “9. Run”Select Runs and press Start run.
Watch Monitors rather than the residuals. MRF cases often reach a state where the residuals sit at a plateau while the torque is still climbing — because the swirl field is still developing through the domain — and stopping at the plateau gives a torque that is too low.
The convergence test is: torque flat, pressure rise flat, mass balance near
1. The Runs pane shows the mass balance as ṁ … out/in alongside the
coefficients.
If the run diverges immediately, the usual causes in order of likelihood are: a zone that clips a stationary wall, a rotation axis that does not match the cylinder axis, and a rotation speed entered in rad/s into a field asking for rpm.
10. Post-processing
Section titled “10. Post-processing”Select Post-processing and press Show results.
Forces and separation builds the surface pressure and the surface-flow pattern on the blades. The surface flow on a blade is where you see whether the loading is where the design intended it or whether the leading edge is stalled.
Wake and vortices shows what leaves the rotor — the tip vortices and the swirl in the downstream passage.
Then use Sample along a line under Plot over line, set across the
passage downstream of the rotor, on U. The swirl component in that profile is
the direct evidence that the rotation did something. A profile with no swirl
downstream of a rotor means the MRF zone is not active — go back and check
that the mesh was regenerated after the zone was defined.
11. Report
Section titled “11. Report”Select Report and keep Physics and materials on so the rotation speed is recorded, and Boundary patch data for the flow through each patch, which is the table the mass balance can be checked from.
What you should see
Section titled “What you should see”Swirl downstream of the rotor. A shaft torque that settled. A pressure rise across the machine with the sign you expect. A y+ on the blades inside the range your wall treatment needs.
Things that mean it is wrong:
- No swirl and no torque. The zone is not in the mesh. Regenerate the mesh after defining the zone.
- Negative head from a pump. The rotation axis sign is inverted.
- Torque far too high, and a run that struggles to converge. The zone probably includes stationary walls — check the cylinder radius against the casing.
- A result that changes when you move the zone boundary. The zone is too close to the blades, or the mesh across the interface is too coarse to carry the swirl. Both are real, and both are why the refinement region in step 3 is not optional.
What to try next
Section titled “What to try next”- Run a curve, not a point. Duplicate the simulation from its ⋯ menu, change the flow rate, and run it again. Several points give you the characteristic, and the Comparison node puts them side by side — see Mesh independence study for how that node works.
- Rotating frame (SRF) under Specialist in the wizard, if the whole domain rotates and there is no stationary part anywhere. It needs no zone and no interface, and its notApplicable list says exactly when it stops being valid: a stationary part anywhere in the domain, or rotor–stator interaction.
- Sliding mesh (AMI) on the same case, as a second simulation, if you need blade passing. Set Time dependency to Transient first.
- Momentum sources → Actuator disk under Advanced concepts if you do not need blade detail at all: thrust over a disk without meshing blades, which for a propeller in a hull-resistance study is often the right level of model and a small fraction of the cost.