CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

How to use rotatingWallVelocity boundary condition

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 4, 2009, 05:14
Default How to use rotatingWallVelocity boundary condition
  #1
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17
terrybarnaby is on a distinguished road
Does anyone know how to use the "rotatingWallVelocity" boundary condition ?
I can't see any info on this in the docs or forum.
I am trying to simulate a wheel. I currently have the following but simpleFoam is giving the error:

keyword omega is undefined in dictionary "/home/terry/vwt/vwt-wheels"/0/U::car_car

wheel
{
type rotatingWallVelocity;
origin (0 0 0.2);
axis (0 1 0);
rpm 600;
value uniform (0 0 0);
}
terrybarnaby is offline   Reply With Quote

Old   September 4, 2009, 05:33
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,902
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Terry

From the error message, it appears that it is the boundary car_car, which is the problem and not wheel.

Best regards,

Niels
ngj is offline   Reply With Quote

Old   September 4, 2009, 05:38
Default
  #3
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17
terrybarnaby is on a distinguished road
Sorry my fault with the patch name. I changed it when putting it onto the forum, the patch was actually named "car_car" not "wheel" as per the error message. I did this to make things clearer !!
terrybarnaby is offline   Reply With Quote

Old   September 4, 2009, 05:48
Default
  #4
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,902
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Terry

Is this boundary condition by any chance from 1.6? I cannot find it in my 1.5-installation. The error message tells you that you need to specify "omega", and as I do not have the source, you need to dig into it yourself and find out what omega does.

Best regards,

Niels
ngj is offline   Reply With Quote

Old   September 4, 2009, 05:53
Default
  #5
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17
terrybarnaby is on a distinguished road
Yes, it is from 1.6.
I think I have found how to use it by looking at the source in rotatingWallVelocityFvPatchVectorField.C
It appears that I need to use omega rather than rpm for the rotational velocity. (rpm was used in another post on the 1.5-dev version).
So I think I need to use:

wheel
{
type rotatingWallVelocity;
origin (0 0 0.2);
axis (0 1 0);
omega 62; // Rotational speed in radians/sec
value uniform (0 0 0);
}

This looks like it works ...
terrybarnaby is offline   Reply With Quote

Old   September 4, 2009, 07:20
Default
  #6
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17
terrybarnaby is on a distinguished road
The rotatingWallVelocity boundary condition appears to work to some degree, but I am seeing some strange results. This may be me as I am a novice at this, but I wonder if anyone can shed some light.
I have a wind tunnel simulation with a rotating wheel in a 13m/s wind stream. Stream is in the X direction.
Looking at the results using paraview, the wheels surface appears to be rotating by looking at the velocity vector on the surface, see wheel-1.jpg (Looking at U's component in the X direction).
However when I look at U's component in the Y direction I see the view in wheel-2.jpg. (Y plane through wheels axis)

1. I would have thought that U's Y velocity would be the same either side of the wheel (Y) ?
2. The affect of the wheel rotation in th X and Z directions on the surrounding U field looks negligible, I would have thought it would be larger ?

As an aside I would like to caclucate the overall forces on the wheel while rotating. Is the OpenFOAM forces function going to give me correct results with the rotatingWallVelocity boundary condition ?
Attached Images
File Type: jpg wheel-2.jpg (60.1 KB, 781 views)
File Type: jpg wheel-1.jpg (88.4 KB, 634 views)
terrybarnaby is offline   Reply With Quote

Old   September 4, 2009, 08:14
Default
  #7
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,902
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Terry

The only explanation I can come up with is that the inner product is taken between the surface normal and the axis of rotation (for some reason). This product changes sign between the two sides of the wheel and hence the direction of rotation changes.

See if you can find such a thing in the source.

One way to solve this issue could be to make two boundaries, one for each side of the wheel. This is cumbersome, however it might work.

Bests,

Niels
ngj is offline   Reply With Quote

Old   September 4, 2009, 17:41
Default
  #8
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17
terrybarnaby is on a distinguished road
Doh! I just thought about this and what I see is correct. There is a "road" below the wheel and the air is drawn downwards at the front of the wheel and goes out in the y+ direction on one side and the y- direction on the other side.

The only question now is if I can calcucate the overall forces on the wheel while rotating. Is the OpenFOAM forces function going to give me correct X direction results with the rotatingWallVelocity boundary condition ?

Last edited by terrybarnaby; September 4, 2009 at 17:42. Reason: Spelling.
terrybarnaby is offline   Reply With Quote

Old   November 24, 2009, 16:35
Default how can a 1.5 user get the source for movingRotatingWallVelocity?
  #9
lth
Member
 
lth's Avatar
 
lth
Join Date: Mar 2009
Location: Madison, WI, USA
Posts: 37
Blog Entries: 45
Rep Power: 17
lth is on a distinguished road
I am running a screw chamber and would like to use movingRotatingWallVelocity as a boundary condition for my chamber velocity. Cannot find this code and assume it is in the latest version of 1.6 only, but is there an option for this b.c. in the 1.5 version of OF?

Sincerely, Lori Holmes
lth is offline   Reply With Quote

Old   July 9, 2011, 15:58
Default rotatingWallVelocity with wrong results
  #10
New Member
 
G.Paulo
Join Date: Jul 2011
Location: Delft, Netherlands
Posts: 4
Rep Power: 15
gpextra is on a distinguished road
Dear colleagues,

I am making use of this post to show you a similar problem I have had using rotating walls with OpenFoam. I am a beginner (in OpenFoam) and this is the case:

It is a lid-driven cavity problem where the lid is not flat, but a rotating cylinder. The solver was icoFoam from OpenFoam 2.0.0. Conceptually this is exactly the same old 2D lid-driven cavity, but with this slightly different geometry. The internal flow details are unimportant and I will focus only on the wall velocity. This is part of the mesh dictionary to illustrate the very simple geometry:

convertToMeters 0.001;
vertices
(
(0 0 0) // 0
(1 0 0) // 1
(1 1 0) // 2
(0 1 0) // 3
(0 0 1) // 4
(1 0 1) // 5
(1 1 1) // 6
(0 1 1) // 7
);
blocks
(
hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)
);
edges
(
arc 3 2 (0.5 1.5 0)
arc 6 7 (0.5 1.5 1)
);

The velocity boundary condition for the (rotating) lid is is specified as

bump
{
type rotatingWallVelocity;
origin (0.5 1 0);
axis (0 0 1);
omega 0.001; // a rather small value!
}

Well, I would expect that the wall absolute velocity was constant, and the x and y-velocities were of sin or cos shaped. But no! The wall velocity profile, shown in the attached figure, has a misbehaving y-velocity component with one full period of a sine (the x-velocity component is not that bad).

In fact this is a simplified version of my real problem, where I identified this weird behavior, just to illustrate the essence of the problem with rotating walls. I have also attached a zipped file with all the other relevant files, in case someone wants to run the case.

I hope someone can help me with this weirs wall velocity profile.

Regrads,
G.Paulo.
Attached Images
File Type: png wall_veloc.png (20.0 KB, 332 views)
Attached Files
File Type: zip rotatingwall.zip (25.3 KB, 194 views)
gpextra is offline   Reply With Quote

Old   March 1, 2012, 10:14
Default
  #11
Senior Member
 
Attesz's Avatar
 
Attesz
Join Date: Mar 2009
Location: Munich
Posts: 368
Rep Power: 17
Attesz is an unknown quantity at this point
Hi,

what is the dimension of omega finally? rad/s or rpm?

Attila
__________________
I am doing CFD Consulting Services.
Ich biete CFD Strömungssimulationen an.
Attesz is offline   Reply With Quote

Old   March 1, 2012, 15:28
Default
  #12
lth
Member
 
lth's Avatar
 
lth
Join Date: Mar 2009
Location: Madison, WI, USA
Posts: 37
Blog Entries: 45
Rep Power: 17
lth is on a distinguished road
Quote:
Originally Posted by Attesz View Post
Hi,

what is the dimension of omega finally? rad/s or rpm?

Attila

answer: rad/s
Attesz likes this.
lth is offline   Reply With Quote

Old   March 2, 2012, 03:59
Default
  #13
Senior Member
 
Attesz's Avatar
 
Attesz
Join Date: Mar 2009
Location: Munich
Posts: 368
Rep Power: 17
Attesz is an unknown quantity at this point
Thanks!
__________________
I am doing CFD Consulting Services.
Ich biete CFD Strömungssimulationen an.
Attesz is offline   Reply With Quote

Old   March 2, 2012, 07:33
Default
  #14
Senior Member
 
Attesz's Avatar
 
Attesz
Join Date: Mar 2009
Location: Munich
Posts: 368
Rep Power: 17
Attesz is an unknown quantity at this point
I'm getting the following problem. What is wrong here?

--> FOAM FATAL IO ERROR:
wrong token type - expected word, found on line 60 the doubleScalar 230.383

file: /nobackup/rm/felfoldi/OFsimulation/0/U::boundaryField::rotwall.*:mega at line 60.

From function operator>>(Istream&, word&)
in file primitives/strings/word/wordIO.C at line 74.

FOAM exiting

my code is:

//rotating walls in stn frame

"rotwall.*"
{
type rotatingWallVelocity;
origin (0 0 0);
axis (0 1 0);
omega 230.3834; //rad per sec using 13200 deg/s=2200 rpm value
// type fixedValue;
// value uniform (0 0 0);
}
__________________
I am doing CFD Consulting Services.
Ich biete CFD Strömungssimulationen an.
Attesz is offline   Reply With Quote

Old   March 5, 2012, 11:37
Default
  #15
lth
Member
 
lth's Avatar
 
lth
Join Date: Mar 2009
Location: Madison, WI, USA
Posts: 37
Blog Entries: 45
Rep Power: 17
lth is on a distinguished road
Hello Attesz,

Not sure, but it appears to be a syntax. Not ablet to view your code line numbers, but I would simplify the value of omega to 20.0 at first and rename your b.c. to test. Else follow the lines in the code to the error if you can to see what OpenFOAM is asking for.

Best, Lori
lth is offline   Reply With Quote

Old   March 5, 2012, 12:35
Default
  #16
Senior Member
 
Attesz's Avatar
 
Attesz
Join Date: Mar 2009
Location: Munich
Posts: 368
Rep Power: 17
Attesz is an unknown quantity at this point
Hey Lori,

thanks! I already tried omega=1. But I found that I was using a 1 month old release of OF2.1.x, and the more recent version has a bugfix for this. So it was a bug actually.

Best,
Attila
__________________
I am doing CFD Consulting Services.
Ich biete CFD Strömungssimulationen an.
Attesz is offline   Reply With Quote

Old   March 5, 2012, 21:39
Default
  #17
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 18
calim_cfd is on a distinguished road
Quote:
Originally Posted by Attesz View Post
I'm getting the following problem. What is wrong here?

--> FOAM FATAL IO ERROR:
wrong token type - expected word, found on line 60 the doubleScalar 230.383

file: /nobackup/rm/felfoldi/OFsimulation/0/U::boundaryField::rotwall.*:mega at line 60.

From function operator>>(Istream&, word&)
in file primitives/strings/word/wordIO.C at line 74.

FOAM exiting

my code is:

//rotating walls in stn frame

"rotwall.*"
{
type rotatingWallVelocity;
origin (0 0 0);
axis (0 1 0);
omega 230.3834; //rad per sec using 13200 deg/s=2200 rpm value
// type fixedValue;
// value uniform (0 0 0);
}
hi! your missing the word "constant" in front of omega!!!
Code:
"rotwall.*"
    {
    type         rotatingWallVelocity;
    origin         (0 0 0);
    axis         (0 1 0);
    omega       constant  230.3834;  //rad per sec using 13200 deg/s=2200 rpm value
//    type        fixedValue;
//    value         uniform (0 0 0);
     }
type Kconstant and check the other options, if any!

it might have sth to do with the fact that this bc now allows for time dependent values due to the new class DataEntry!

bhups45 likes this.
__________________
Best Regards
/calim

"Elune will grant us the strength"
calim_cfd is offline   Reply With Quote

Old   March 20, 2012, 10:06
Default
  #18
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
Thank you Mauricio, you really made my day!

Could you please explain how you found that out?

Thank again!
lovecraft22 is offline   Reply With Quote

Old   March 20, 2012, 10:15
Default
  #19
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 18
calim_cfd is on a distinguished road
Hi!

i rly needed this bc so i spent some time on it.. OF's error messages follow a pattern and you know how they behave.. so if the error says you should have used a word, i.e., a string instead of a value , number, that's what you have to write in your files. Question is, which word? if you know OF error pattern you know that if you get the entry type right (number or word) it will give you the options if you chose a wrong word or misspelled it. that's what i did.. i gave it a word.. can't say the word i gave it the first time ... but then it gave me the real options.. and there was the constant one

too bad we can't solve all our doubts and errors this one.. but it's a start
lth and lovecraft22 like this.
__________________
Best Regards
/calim

"Elune will grant us the strength"

Last edited by calim_cfd; April 12, 2012 at 21:45. Reason: mispelling
calim_cfd is offline   Reply With Quote

Old   June 16, 2012, 08:17
Default
  #20
New Member
 
Bhupesh
Join Date: Jun 2012
Location: Germany
Posts: 14
Rep Power: 14
bhups45 is on a distinguished road
Quote:
Originally Posted by calim_cfd View Post
Hi!

i rly needed this bc so i spent some time on it.. OF's error messages follow a pattern and you know how they behave.. so if the error says you should have used a word, i.e., a string instead of a value , number, that's what you have to write in your files. Question is, which word? if you know OF error pattern you know that if you get the entry type right (number or word) it will give you the options if you chose a wrong word or misspelled it. that's what i did.. i gave it a word.. can't say the word i gave it the first time ... but then it gave me the real options.. and there was the constant one

too bad we can't solve all our doubts and errors this one.. but it's a start
Hello all,
I am also simulating the case of rotating cylinder using icoFoam solver.

But giving these boundary conditions are also not producing any difference in the results in OpenFoam 210I am quite new to openfoam... pls somebody help me

Thanx in advance...
bhups45 is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Boundary Conditions Thomas P. Abraham Main CFD Forum 20 July 7, 2013 06:05
Axis Boundary Condition..what is it? CFDtoy FLUENT 6 February 13, 2007 06:51
How to set boundary condition in Fluent for the fo Peiyong FLUENT 1 November 10, 2006 12:44
1 and 2 Order Boundary condition at the same place CFD_Flo Main CFD Forum 4 July 11, 2005 12:57
How to resolve boundary condition problem? sam FLUENT 2 July 20, 2003 03:19


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