CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   SRFsimplefoam inletvalue (http://www.cfd-online.com/Forums/openfoam-solving/114840-srfsimplefoam-inletvalue.html)

 pechwang March 18, 2013 16:41

SRFsimplefoam inletvalue

1 Attachment(s)
Hello everyone,

I'm new to OpenFOAM. And I want to use SRFsimplefoam to simulate my model. The model is in the attachment. And the model is very simple. The smooth wall is stationary and the grooved wall is rotating. But I'm a little confused about the following commands:

inlet
{
type SRFVelocity;
inletValue uniform ( 0 0 -10 );
relative no;
value uniform ( 0 0 0 );
}
1. What's the meaning of these commands?
2. Is the rotating velocity defined in constant/SRFPRoperties? Then what 0/omega is used for?
3. Originally, I use the force library to calculate the torques on the walls. The library uses p and U file to calculate the torques. However, in SRFsimplefoam, there is no U file , only Urel. So what should I use to calculate the torques?

Thank you very much.
Pengchuan

 otm March 19, 2013 08:32

Hi

Quote:
 inlet { type SRFVelocity; inletValue uniform ( 0 0 -10 ); relative no; value uniform ( 0 0 0 ); }
The above is a boundary condition that can be used for simulations in a rotating reference frame. Depending on if "relative" is set to yes or no the inletValue vector vill be either in the rotating frame or in the absolute frame.

You are right in what you write about constant/SRFProperties. The omega in /0 is a field for the inverse turbulence time scale used by k-omega based turbulence model.

Regarding torque calculations the solver will output a Uabs field that could be used. I guess it should work by setting "U Uabs;" in force section of your controlDict.

BR
//Olle

 pechwang March 19, 2013 10:14

Hi Olle,

Thank you for your reply. But I'm still a little confused. I think the boundary should be a rotating velocity. But now it is a three dimensional vector. You know the velocity of each point on the plate walls are different, then do I need to specify a point and set the inletValue to that point?

Quote:
 Originally Posted by otm (Post 414962) The above is a boundary condition that can be used for simulations in a rotating reference frame. Depending on if "relative" is set to yes or no the inletValue vector vill be either in the rotating frame or in the absolute frame.

 otm March 19, 2013 17:43

Hello again,

If your boundary is a wall rotating with your reference frame you can use ordinary wall BC. If your boundary is a stationary wall you can use the I think you can use something like:
Code:

```type            rotatingWallVelocity;     origin        (0 0 0.2);     axis        (0 1 0);     rpm        -600;     value        uniform (0 0 0);```
with opposite rotation direction compared to the reference frame.

The SRFVelocity BC is used for inlets and allows you to set if the incoming flow is rotating with the reference frame or not. The (counter)rotating velocity is automatically superposed on or subtracted from the inletValue vector field if you set relative to no or yes respectively.
Code:

```type SRFVelocity; inletValue uniform ( 0 0 -10 ); relative no;```
Have a look at the mixer tutorial inlet results and you will understand.

Good luck!
/Olle

 pechwang March 19, 2013 20:45

Hi Olle,

Thank you very much. It works now, but it still cannot calculate the torques on the walls. It seems like the force library just looks for p and U database. And there is only Urel here.

Pengchuan

 otm March 20, 2013 02:21

Hi!

Have you tried what I wrote im my first reply?
Quote:
 Regarding torque calculations the solver will output a Uabs field that could be used. I guess it should work by setting "U Uabs;" in force section of your controlDict.
At the end of your controlDict put something like:
Code:

```functions (     forces     {         type forces;         functionObjectLibs ("libforces.so");         outputControl timeStep;         outputInterval 1;         patches ( patchWithTorque );         pname p;         Uname Uabs;         rhoName rhoInf;         log true;         rhoInf 1.205;         CofR (0 0 0);         pitchAxis (0 1 0);     } );```
Hope this works. :)
/Olle

 pechwang March 20, 2013 08:28

Hi Olle,

Yes. I did. That's exactly what I wrote in my controlDict file. But it didn't work. The library searched the P and U database. And there was no U. So the it was in-active.

Hi Wang, this thread is a bit old, but I guess you tried to put Urel into controlDict instead, right? It seems to work with Uname Urel; OF2.2.1