CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD

Rotating boundary simplefoam

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

LinkBack Thread Tools Display Modes
Old   May 31, 2007, 10:01
Default Is there an easy way to make r
New Member
Gabriel Barroso
Join Date: Mar 2009
Posts: 23
Rep Power: 8
gabriel is on a distinguished road
Is there an easy way to make rotating wall boundary conditions? I have an outlet which is rotating and it would be very elegant if the boundary could be set as in the cavity tutorial with a constant velocity but in tangential direction.

Bests, Gabriel
gabriel is offline   Reply With Quote

Old   May 31, 2007, 10:09
Default Gabriel, I don't know if it
Posts: n/a

I don't know if it will work on an outlet b.c., but you can see here how to create a rotating wall boundary condition.

Good luck!

best regards,
  Reply With Quote

Old   May 31, 2007, 10:21
Default You "just" have to loop on the
Senior Member
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 215
Rep Power: 9
fra76 is on a distinguished road
You "just" have to loop on the patch and assign, for each file, a different velocity vector, computed in the proper way.
If you don't need something very general, it's enough to modifiy the standard solver (i.e. simpleFoam) and set ther the velocitis before the time loop.
If you want something more general, you have to write some more code, and handle for example dictionary files for specifying rotating patches and velocities, etc...

For example:

vector axis; /* To be defined as rotation axis */
vector center; /* To be defined as center of rotation */
scalar omega; /* Rotation speed */
label patchID=mesh.boundaryMesh().findPatchID("rotating_ patch");
fvPatchVectorField& wU = U.boundaryField()[patchID];
const fvPatchVectorField& faceCentres = mesh.Cf().boundaryField()[patchID];

forAll(wU, faceI)
vector c1 = faceCentres[faceI]; /* You probably need it */
wU[faceI] = (axis*omega) ^ (c1 - center);/* Your velocity law ... */


I cannot assure that this code works as it is, but the idea should be correct.

Have fun!
fra76 is offline   Reply With Quote

Old   June 1, 2007, 06:13
Default Hi there, I just would like
Senior Member
Join Date: Mar 2009
Location: Belgium
Posts: 179
Rep Power: 8
cedric_duprat is on a distinguished road
Hi there,

I just would like to continu the topic there without any answer for Gabriel (sorry) but with other questions ...:
1- what's the difference between your link, Roland (uniformAxialRotation for exemple) and the swirl inlet condition avaiable with OF engineSwirl ?
2- in OF V 1.3, we have to copy the piece of code in OpenFOAM-1.3/applications/utilities/preProcessing and then compiling with wmake or .....not (copy on an other file ...)?

thanks for replying,
cedric_duprat is offline   Reply With Quote

Old   June 4, 2007, 03:41
Default Cedric, I have never used t
Posts: n/a

I have never used the swirl inlet condition or engineSwirl, so I really can't comment on any differences with the code that I am using.

As for your second question, I am not quite sure what you mean.
To use uniformAxialRotation in simpleFoam I copied it to the simpleFoam directory, added the line


to simpleFoam/Make/files and then did 'wmake' in thi simpleFoam directory.

I hope this answers your question.

best regards,
  Reply With Quote


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
Own boundary condition modified simpleFoam erorr in parallel execution sponiar OpenFOAM Running, Solving & CFD 1 August 27, 2008 09:16
Define non uniform TKE boundary condition in simpleFOAM qtian OpenFOAM Running, Solving & CFD 9 July 30, 2007 14:54
SimpleFoam boundary conditions changed in OF 14 adorean OpenFOAM Running, Solving & CFD 5 June 22, 2007 07:50
Rotating boundary eros CFX 5 May 16, 2007 18:09
SimpleFoam boundary conditions hani OpenFOAM Running, Solving & CFD 2 January 10, 2007 03:44

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