CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Multiple Reference Frame (

gabriel June 25, 2007 05:10

I have implemented (with the h
I have implemented (with the help of you all) rotating wall boundary conditions and single reference frame for simpleFoam. Now i want to implement Multiple Reference Frame (rotor / stator). I don't need topological change, just one mesh is rotating and the other is static.

Thanks for your hints.

Bests Gabriel

alberto June 25, 2007 05:50

Hello Gabriel, it's already i
Hello Gabriel,
it's already implemented in OF 1.4. See OpenFOAM-1.4/tutorials/MRFSimpleFoam


gabriel June 26, 2007 07:47

Sorry, thanks. I just looked i
Sorry, thanks. I just looked in FoamX.



plmauk February 7, 2008 07:06

Hi, everyone! I've tried to r
Hi, everyone!
I've tried to run tutorial-case MixerVessel2D (MRFSimpleFoam), but I've got an Error message

--> FOAM FATAL ERROR : cannot find MRF faceZone rotor

From function Foam::MRFZone::MRFZone(const fvMesh& , const dictionary&)
in file cfdTools/general/MRF/MRFZone.C at line 71.

FOAM exiting


jason February 7, 2008 09:22

Hi, I think you have to exe

I think you have to execute the mixerVessel2D\makeMesh script first. This builds the mesh and sets up the case before you can run it.



plmauk February 12, 2008 06:31

Hallo, the question may be qu
the question may be quite stupid, but how can I execute makeMesh-script?
I've tried allready simple double-click, but that does not lead to any positive results - MRF face Zone were not found...

plmauk February 12, 2008 06:42

I'M sorry, I ran setsToZones
I'M sorry,
I ran setsToZones .. mixerVessel2D -noFlipMap manually, and error message disapeared. But instead of that following mistake comes:

Starting time loop

Time = 1

smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0404075, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0403676, No Iterations 2
#0 Foam::error::printStack(Foam: in "/home/plmauk/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/plmauk/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/"
#2 Uninterpreted: [0x110420]
#3 Foam::MRFZone::relativeFlux(Foam::GeometricField<d ouble,>&) const in "/home/plmauk/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/"
#4 Foam::MRFZones::relativeFlux(Foam::GeometricField< double,>&) const in "/home/plmauk/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/"
#5 main in "/home/plmauk/OpenFOAM/plmauk-1.4.1/applications/bin/linuxGccDPOpt/MRFSimpleFoam "
#6 __libc_start_main in "/lib/"
#7 Foam::regIOobject::readIfModified() in "/home/plmauk/OpenFOAM/plmauk-1.4.1/applications/bin/linuxGccDPOpt/MRFSimpleFoam "

Have anybody an idea, what does it mean?

jason February 12, 2008 06:52

Hi Go to the mixerVessel2D

Go to the mixerVessel2D directory and type


it should then run through blockMesh etc automatically.

Then go up one directory and type

MRFSimpleFoam . mixerVessel2D

and it should work


plmauk February 12, 2008 07:05

Thank you very much, Jason, i
Thank you very much, Jason,
it works actually!

best regards,

jason February 12, 2008 07:23

Great, One other thing, I d

One other thing, I dont think you need the dynamicMeshDict file in the constant directory (left there by mistake?), you only need the MRFZones file which states the zone which is rotating, an origin point, the axis (at the origin point) which the rotation occurs around and the omega (i think its in rpm but Im not sure).

And I think its based on an incompressible solver so you need to multiply the calculated pressure by the density to get the real pressure in Pa.


sebastian_vogl October 27, 2008 13:07

Hello everyone, I want to s
Hello everyone,

I want to simulate the aerodynamics of a car using MRFsimpleFoam. The car computer model is imported as .stl file. It was meshed with snappyHexMesh in OpenFoam 1.5 (that's why it must be an .stl file).
The reason why I post my problem here, is that I want to take into consideration the movement of the wheels of the car, as they have a great influence on the aerodynamics of the car. This can be generally done by using a multiple reference frame (MRF) boundary condition. For this reason I need MRFsimpleFoam.
My question is, how can I define the wheels of my .stl-car as patches which can be written in the MRFZones input file? Is there a possibility to get the names of the mesh elements which form the wheels and put them together to patches?

For your ideas I would be very grateful,
Sebastian Vogl

grtabor October 29, 2008 05:46

Dear Sebastian, Seems a bit
Dear Sebastian,

Seems a bit strange - surely all you need for the wheels is a moving wall, not a separate reference frame?


sebastian_vogl October 29, 2008 13:05

Dear Gavin, thank you very
Dear Gavin,

thank you very much for your reply.
Meanwhile I could solve this problem on my own.


wikstrom December 5, 2008 08:27

Continuing this nicely named t
Continuing this nicely named thread with another topic:

The MRF class reside in the "general" section of cfdTools. However, it seems to me that it must be modified for compressible or possibly multiphase codes. I mean, the relative flux in MRFZone.C is calculated as the volume swept by a face, whereas in the compressible case (rho!=1) where phi is massflux the relative flux should contain rho, right?

So, I have overloaded the MRFZone::relativeFlux function to allow const volScalarField& rho in the arguments and calculate phi as
phi[facei] -= rhof[facei] * ((Omega ^ (Cf[facei] - origin))) & Sf[facei];

However, the solver bails out (p-solver) after a number of iterations. (Hence this post.)

Am I wrong in my assumptions about compressible MRFZones?


wikstrom December 5, 2008 10:30

Seems to work if the density i
Seems to work if the density is considered in the application code instead for in the MRF. Using the volumetric relative flux from MRFZone I added density in pEqn.H of rhoSimpleFoam as follows:

surfaceScalarField phiv = fvc::interpolate(U) & mesh.Sf();
surfaceScalarField rhof = fvc::interpolate(rho);
phi = phiv*rhof;


No problems with that during test, so far.


All times are GMT -4. The time now is 09:01.