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

Rotating Disc in a Volume of Air

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 24, 2009, 15:06
Default Rotating Disc in a Volume of Air
  #1
New Member
 
Daniel McGregor
Join Date: Aug 2009
Location: Denver, Colorado
Posts: 5
Rep Power: 17
alcesalces is on a distinguished road
Hello All-

I am new to CFD solvers therefore would like benefit from the knowledge base this forum represents. Can OpenFOAM solve the following test case?

Physical Problem Description/Definition:

a) Define a disc in a volume of air. The disc would of negligible thickness, but rigid. Since I intend to spin the disc about its central axis, I am thinking that it would be a good idea to take advantage of symmetry and define both the volume of air and the disc in a cylindrical coordinate system (not a requirement, but it would make pre- and post-processing easier, so software that makes this easy would be desirable).

Initial Conditions:

a) Assign a rotational velocity to the disc, i.e., assign a tangential (to the axis of rotation) surface velocity to the individual mesh elements of the disc. once again a preprocessor that would use a cylindrical coordinate system would be desirable...

b) the air in the volume (the cylindrical "can") is initially at rest and, if need be, the air in contact with the boundary of the volume would be zero.

Solving:

a) solve for a steady state solution. the spinning disc should cause the air in the volume to spin as well. the steady state solution should be where the rotation of the air reaches equilibrium with the spinning disc. (At least this what I think should happen!!)

Post Processing:

a) have a look at the normal forces on the surface of the disc (induced by the Bernoulli effect) as a function of radius

b) have a look at how the air in the volume rotates as a function of the rotating disc

That's It! Can OpenFOAM do this problem?

Any help in narrowing my search for a solver (and pre- and post-processor) is appreciated!!
alcesalces is offline   Reply With Quote

Old   August 25, 2009, 05:12
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Daniel

I believe I can answer all of your questions except the one related to cylindrical coordinate system. However many threads does exist on that topic.

Quote:
Originally Posted by alcesalces View Post
Initial Conditions:

a) Assign a rotational velocity to the disc, i.e., assign a tangential (to the axis of rotation) surface velocity to the individual mesh elements of the disc. once again a preprocessor that would use a cylindrical coordinate system would be desirable...

b) the air in the volume (the cylindrical "can") is initially at rest and, if need be, the air in contact with the boundary of the volume would be zero.
ad a) you should definitely consider the add-on "groovyBC", which allows you to specify spatial varying boundary conditions easily. Look at the wiki or elsewhere on this forum.

ad b) With respect to setting the wall velocity to zero look into any of the tutorials or if the boundary layer at the far walls are of no interest simply use slip conditions.

Quote:
Originally Posted by alcesalces View Post
Solving:

a) solve for a steady state solution. the spinning disc should cause the air in the volume to spin as well. the steady state solution should be where the rotation of the air reaches equilibrium with the spinning disc. (At least this what I think should happen!!)
ad a) I believe as well that you can achieve some kind of (at least in a time averaged sence) equilibrium, and if this is what you are looking for, you could benifite from simpleFoam, which solves for steady state problems. If you are also interested in the transient solution, then look into turbFoam. Both solves the RANS equations.


Quote:
Originally Posted by alcesalces View Post
Post Processing:

a) have a look at the normal forces on the surface of the disc (induced by the Bernoulli effect) as a function of radius

b) have a look at how the air in the volume rotates as a function of the rotating disc

That's It! Can OpenFOAM do this problem?

Any help in narrowing my search for a solver (and pre- and post-processor) is appreciated!!
Look into the functionObject called forces. Search on this forum and you will find lots of information. If it does not completely fulfill your requirements it would at least be a could platform to start off from while building your own functionality.

I hope this helps. Good luck,

Niels
ngj is offline   Reply With Quote

Old   August 30, 2009, 17:17
Default
  #3
Senior Member
 
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17
hansel is on a distinguished road
This could also be done using the -dev version of openFoam and the ggi features which allow you to spin a mesh.

See http://www.youtube.com/watch?v=qr-HUpWKPsM if you want to see an example of what can be done with the spinning mesh. In your case you'd just replace the plate with a cylinder.
hansel is offline   Reply With Quote

Old   September 1, 2009, 17:10
Default
  #4
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18
vinz is on a distinguished road
Hi everybody,

I need some advice about groovyBC boundary condition. I am also simulating a disc. So far I used cyclic boundary condition in order to impose a difference in pressure through the disc. However I'd like to also impose a tangential and radial velocity as well as a deltaP depending on the position on the disc.
GroovyBC looks like a good choice, but I'm not sure if it can replace the cyclic boundary condition.
I tried to impose a deltaP using the groovyBC but I don't know how to write it correctly in the p file.
Thanks a lot for any help you can provide.

Vincent
vinz is offline   Reply With Quote

Old   September 2, 2009, 09:42
Default
  #5
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by vinz View Post
Hi everybody,

I need some advice about groovyBC boundary condition. I am also simulating a disc. So far I used cyclic boundary condition in order to impose a difference in pressure through the disc. However I'd like to also impose a tangential and radial velocity as well as a deltaP depending on the position on the disc.
GroovyBC looks like a good choice, but I'm not sure if it can replace the cyclic boundary condition.
I tried to impose a deltaP using the groovyBC but I don't know how to write it correctly in the p file.
Thanks a lot for any help you can provide.

Vincent
Currently the groovyBC can only replace boundary conditions that are based on the the mixedFvPatchField-class (or fixedValue or fixedGradient). You are talking about a boundary condition that is based on cyclicFvPatchField, right?

The bad news is:
- no, you can't specify the deltaP using the vanilla-groovyBC
The good news is:
You can write your own boundary condition (based on the one you want to extend). Just derive your own boundary-condition from it. Add a parameter that would look like
deltaPExpression "pos().x > 0.5 ? 20 : 10";
Have look at the orignal groovyBC how such a string is read and parsed (giving you back a scalarField) using that field let the super-class set the actual boundary condition (provided the superclass allows non-homogenous pressureJumps, otherwise you'll have to adapt it)
You'll have to link that boundary-condition against the groovyBC-library to get access to the parser-classes

Basically any boundary condition that accepts fields can be groovyfied in such a way

Bernhard
gschaider is offline   Reply With Quote

Old   September 3, 2009, 09:35
Default
  #6
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18
vinz is on a distinguished road
Thanks for those information Bernhard.

I decided to extend the solver simpleFoam into acSimpleFoam. I did this only by adding a source term in the U equation.
Then, I create a new vector field named force in order to be able to impose a force into a zone of my domain.
Basically this force is zero everywhere except around the disk in order to create a flow through the disk.This gives me the possibility to impose a force with the direction I want and the amplitude I want on the disk.

I use GridPro as a mesh generator, I impose some block conditions and I use the gridpro2Foam converter to extract the cells close to the disk on which I want to impose my force. This creates a cellZone file with these cells.

I tried to use funkySetFields in order to set the force field at a specific value only for the points in the cellZone. However I get an error when I try to do this:

in funkysetfielddict I write this :
expressions
(
force
{
field force; //field to initialise
create true;
expression "vector(0,0,-100)";
condition "zone(boundaryZone)"; //impose force only on boundaryZone
}
);


but I get this error:
Part: force
Creating field force

Putting "vector(0,0,-100)" into field force at t = "0" if condition "zone(boundaryZone)" is true

No set "boundaryZone" at t="0" falling back to 'constant'


Parser Error at "1.5-16" :"cell/zone id boundaryZone not existing or of wrong type"
"zone(boundaryZone)"
" ^^^^^^^^^^^^ "

From function parsingValue
in file ValueExpressionDriver.C at line 74.

FOAM exiting


my cellZone file looks like this:

FoamFile
{
version 2.0;
format ascii;

root "OpenFoamFiles/run/tutorials/icoFoam";
case "actuatorDisk";
instance ""constant"";
local "PolyMesh";

class regIOobject;
object cellZones;
}

1
(
boundaryZone
{
type cellZone;
cellLabels List<label>
640
(
0
1
2
3
4

.
.
.
);
}
)


Everything is working fine if I put another condition like "pos().x>1" for example.
I hope you have an idea of what can be wrong with my condition.

Regards,

Vincent
vinz is offline   Reply With Quote

Old   September 3, 2009, 14:56
Default
  #7
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by vinz View Post

I tried to use funkySetFields in order to set the force field at a specific value only for the points in the cellZone. However I get an error when I try to do this:

in funkysetfielddict I write this :
expressions
(
force
{
field force; //field to initialise
create true;
expression "vector(0,0,-100)";
condition "zone(boundaryZone)"; //impose force only on boundaryZone
}
);


but I get this error:
Part: force
Creating field force

Putting "vector(0,0,-100)" into field force at t = "0" if condition "zone(boundaryZone)" is true

No set "boundaryZone" at t="0" falling back to 'constant'


Parser Error at "1.5-16" :"cell/zone id boundaryZone not existing or of wrong type"
"zone(boundaryZone)"
" ^^^^^^^^^^^^ "

From function parsingValue
in file ValueExpressionDriver.C at line 74.

FOAM exiting


my cellZone file looks like this:

FoamFile
{
version 2.0;
format ascii;

root "OpenFoamFiles/run/tutorials/icoFoam";
case "actuatorDisk";
instance ""constant"";
local "PolyMesh";

class regIOobject;
object cellZones;
}

1
(
boundaryZone
{
type cellZone;
cellLabels List<label>
640
(
0


Everything is working fine if I put another condition like "pos().x>1" for example.
I hope you have an idea of what can be wrong with my condition.
I tried it. It works for me.

No idea. Except one: you talk about the cellZone-file. Surly you mean cellZones and forgot the "s"? Check with checkMesh how many cell-zones OpenFOAM recognizes for your mesh. Otherwise rename the file

Bernhard
gschaider is offline   Reply With Quote

Old   September 4, 2009, 02:49
Default
  #8
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18
vinz is on a distinguished road
Thanks a lot Bernhard.
In fact my file was named cellzones instead of cellZones! Stupid me!
So now it works. I am going to play with funkySetFields.
I'll try to post some pictures of the results later.
Thanks again.

Regards,

Vincent
vinz is offline   Reply With Quote

Old   September 4, 2009, 09:27
Default
  #9
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18
vinz is on a distinguished road
Dear Bernhard,

Is there a way to specify variables in funkySetFields like in groovyBC?
Also I am using the folowing dict:
force
{
field force; //field to initialise
create true;
expression "vector(100000*sqrt(pos().x*pos().x+pos().y*pos(). y),100000*sqrt(pos().x*pos().x+pos().y*pos().y),-100000)";
condition "zone(boundaryZone)"; //impose force only on boundaryZone
dimension [0 1 -2 0 0 0 0];
}
However the dimension is not set in force field which is created. In the file I still have a dimension [0 0 0 0 0 0 0] that I have to change by hand. Is it done on purpose or am I doing something wrong here?

Thanks for your precious help.
Regards,

Vincent
vinz is offline   Reply With Quote

Old   September 7, 2009, 15:02
Default
  #10
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by vinz View Post
Dear Bernhard,

Is there a way to specify variables in funkySetFields like in groovyBC?
I'm sorry: no
Quote:
Originally Posted by vinz View Post
Also I am using the folowing dict:
force
{
field force; //field to initialise
create true;
expression "vector(100000*sqrt(pos().x*pos().x+pos().y*pos(). y),100000*sqrt(pos().x*pos().x+pos().y*pos().y),-100000)";
condition "zone(boundaryZone)"; //impose force only on boundaryZone
dimension [0 1 -2 0 0 0 0];
}
However the dimension is not set in force field which is created. In the file I still have a dimension [0 0 0 0 0 0 0] that I have to change by hand. Is it done on purpose or am I doing something wrong here?
No. You're doing nothing wrong. The problem seems to be, that in
Code:
                dimensionSet dim(0,0,0,0,0);

                if (part.found("dimension")) {
                    dim=dimensionSet(part.lookup("dimension"));
                }
the assignment doesn't work the way I expected it to. I'll have a closer look and see what can be done

Bernhard
gschaider is offline   Reply With Quote

Old   March 16, 2011, 12:30
Default
  #11
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
I am sorry to reopen this thread, but I tried to use the dimension statement in a funkySetFieldDict and it did not work. Giving it as an option to the funkySetField command works well and the dimensions a set correctly but as an entry in the dictionary it do not work. Did you fixed this problem?

thx,
fs82
fs82 is offline   Reply With Quote

Old   March 16, 2011, 13:23
Default
  #12
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by fs82 View Post
I am sorry to reopen this thread, but I tried to use the dimension statement in a funkySetFieldDict and it did not work. Giving it as an option to the funkySetField command works well and the dimensions a set correctly but as an entry in the dictionary it do not work. Did you fixed this problem?

thx,
fs82
Which version of FSF are you using? I quickly checked the version that is in swak4Foam and there is code there that should take care of this. Are you sure the dimension entry is read? (insert a syntax error and watch FSF fail)

Bernhard
gschaider is offline   Reply With Quote

Old   March 17, 2011, 04:21
Default
  #13
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
I think the entry is right, because funkySetFields complain about a wrong dimension entry. The entry in the funkySetFieldDict looks like this:
example
{
create 1;
field test;
dimension [0 -1 0 0 0 0 0];
expression "0";
}
But as a result the field has dimension [0 0 0 0 0 0 0]. The version is difficult to find out, but in funkySetField.C the header says:

ICE Revision: $Id: funkySetFields.C 7567 2007-06-20 12:38:50Z bgschaid $

Thx for your help :-D By the way, what is swak4Foam?

kind regards,
Fabian
fs82 is offline   Reply With Quote

Old   March 17, 2011, 06:33
Default
  #14
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by fs82 View Post
I think the entry is right, because funkySetFields complain about a wrong dimension entry. The entry in the funkySetFieldDict looks like this:
example
{
create 1;
field test;
dimension [0 -1 0 0 0 0 0];
expression "0";
}
But as a result the field has dimension [0 0 0 0 0 0 0]. The version is difficult to find out, but in funkySetField.C the header says:

ICE Revision: $Id: funkySetFields.C 7567 2007-06-20 12:38:50Z bgschaid $
May I ask which version of OF you use? That version of OF is ancient history (seems to be the 1.5-version). I think the problem was fixed in the meantime (using >> instead of assignment) in the 1.6 version

Quote:
Originally Posted by fs82 View Post
Thx for your help :-D By the way, what is swak4Foam?
Google ist your friend (but Bing also knows it)
gschaider is offline   Reply With Quote

Old   March 17, 2011, 08:40
Default
  #15
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
I am using OpenFoam 1.6.x but as far as i know funkySetFields isn't part of the OpenFOAM package and I installed it separatly.
But as google -- never heard of it till today, but now its my new bff -- tells me swak4Foam is a newer version of funkySetFields and groovyBC combined, so I will try it out to get rid of this problem :-D

kind regards,
Fabian
fs82 is offline   Reply With Quote

Old   March 18, 2011, 09:08
Default
  #16
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
Allright using funkySetFields installed by swak4Foam is the solution.

thx,
Fabian
fs82 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
Rotating Disc in a Volume of Air alcesalces FLOW-3D 5 August 28, 2009 18:04
Rotating Disc in a Volume of Air alcesalces Siemens 0 August 24, 2009 14:59
air bubble is disappear increasing time using vof xujjun CFX 9 June 9, 2009 08:59
On the damBreak4phaseFine cases paean OpenFOAM Running, Solving & CFD 0 November 14, 2008 22:14
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00


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