|
[Sponsors] |
August 24, 2009, 15:06 |
Rotating Disc in a Volume of Air
|
#1 |
New Member
Daniel McGregor
Join Date: Aug 2009
Location: Denver, Colorado
Posts: 5
Rep Power: 17 |
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!! |
|
August 25, 2009, 05:12 |
|
#2 | |||
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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:
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:
Quote:
I hope this helps. Good luck, Niels |
||||
August 30, 2009, 17:17 |
|
#3 |
Senior Member
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17 |
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. |
|
September 1, 2009, 17:10 |
|
#4 |
Senior Member
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18 |
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 |
|
September 2, 2009, 09:42 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
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 |
||
September 3, 2009, 09:35 |
|
#6 |
Senior Member
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18 |
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 |
|
September 3, 2009, 14:56 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
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 |
||
September 4, 2009, 02:49 |
|
#8 |
Senior Member
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18 |
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 |
|
September 4, 2009, 09:27 |
|
#9 |
Senior Member
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18 |
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 |
|
September 7, 2009, 15:02 |
|
#10 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
Code:
dimensionSet dim(0,0,0,0,0); if (part.found("dimension")) { dim=dimensionSet(part.lookup("dimension")); } Bernhard |
|||
March 16, 2011, 12:30 |
|
#11 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
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 |
|
March 16, 2011, 13:23 |
|
#12 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
March 17, 2011, 04:21 |
|
#13 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
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 |
|
March 17, 2011, 06:33 |
|
#14 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Google ist your friend (but Bing also knows it) |
||
March 17, 2011, 08:40 |
|
#15 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
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 |
|
March 18, 2011, 09:08 |
|
#16 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
Allright using funkySetFields installed by swak4Foam is the solution.
thx, Fabian |
|
|
|
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 |