CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] parabolic velocity by groovy bc (https://www.cfd-online.com/Forums/openfoam-community-contributions/135490-parabolic-velocity-groovy-bc.html)

1988 May 14, 2014 05:55

parabolic velocity by groovy bc
 
2 Attachment(s)
hi
I am going to have parabolic velocity inlet and I have defined it in a pipe which it diameter is 4mm and flow is laminar and this is the definition of fully developed flow in a pipe

u z = u max (1 −r2/R2) and this is my definition
Code:

  {
  inlet
    {
      type            groovyBC;
        refValue        uniform (0 0 0);
        refGradient    uniform (0 0 0);
        valueFraction  uniform 1;
        value          uniform (0 0 0);
        valueExpression "vector(Umax*(1-(sqr(r)/sqr(0.004))),0,0)";
        gradientExpression "vector(0,0,0)";
        fractionExpression "1";
        evaluateDuringConstruction 0;
        variables      "r=sqrt(pow(pos().y,2)+pow(pos().z,2));Umax=0.07;";
        timelines      ();
        lookuptables    ();
    }

but I am not sure about defining "r" as a radius in this way because the coordinate is changing and using "sqrt((z**2)+(y**2))" is not true for everywhere,Am I right?
and the other problem is I have got this velocity profile instead of parabolic one.
thanks guys

gschaider May 14, 2014 09:30

Quote:

Originally Posted by 1988 (Post 491711)
hi
I am going to have parabolic velocity inlet and I have defined it in a pipe which it diameter is 4mm and flow is laminar and this is the definition of fully developed flow in a pipe

u z = u max (1 −r2/R2) and this is my definition
Code:

  {
  inlet
    {
      type            groovyBC;
        refValue        uniform (0 0 0);
        refGradient    uniform (0 0 0);
        valueFraction  uniform 1;
        value          uniform (0 0 0);
        valueExpression "vector(Umax*(1-(sqr(r)/sqr(0.004))),0,0)";
        gradientExpression "vector(0,0,0)";
        fractionExpression "1";
        evaluateDuringConstruction 0;
        variables      "r=sqrt(pow(pos().y,2)+pow(pos().z,2));Umax=0.07;";
        timelines      ();
        lookuptables    ();
    }

but I am not sure about defining "r" as a radius in this way because the coordinate is changing and using "sqrt((z**2)+(y**2))" is not true for everywhere,Am I right?
and the other problem is I have got this velocity profile instead of parabolic one.
thanks guys

The equation for r looks alright to me assuming that the center of your inlet is (someX,0,0): centered on the x-axis

What do you mean with "coordinate is changing"? Even if your mesh is moving r is OK. r is a basically a field of values: one for every face of the patch. So it calcs r for every face separately (was this your concern)?

1988 May 14, 2014 12:10

yes I got what you explained and thats helpful.thanks for your answer however do you have any idea about the wrong velocity pattern which I have got at inlet ?
it suppose to be parabolic but it is something else

gschaider May 14, 2014 12:43

Quote:

Originally Posted by 1988 (Post 491808)
yes I got what you explained and thats helpful.thanks for your answer however do you have any idea about the wrong velocity pattern which I have got at inlet ?
it suppose to be parabolic but it is something else

What I don't understand about this diagram: what is the distance on the bottom? Because for instance if it is y or z then it should go from -0.004 to 0.004. If it is the 3 of the points it should go from 0 to 0.004.

1988 May 14, 2014 13:10

coordinates are (3 points of circle at velocity inlet)

(-0.008,0,0.020)
(-0.008,0.004,0.024)
(-0.008,0,0.028)
it means that radius=0.004

gschaider May 14, 2014 14:12

Quote:

Originally Posted by 1988 (Post 491824)
coordinates are (3 points of circle at velocity inlet)

(-0.008,0,0.020)
(-0.008,0.004,0.024)
(-0.008,0,0.028)
it means that radius=0.004

I don't understand what these 3 coordinates are saying (apart from being in the x=-0.008-plane). Please reread the above comment "The equation for r looks alright to me assuming that the center of your inlet is (someX,0,0): centered on the x-axis". Your example doesn't convince mit at all that this is the case.

Please check whether this is the case specify what "distance" in your diagram means.

I will NOT answer anything that arrives in the next couple of hours to give you time to properly think it through

taajaki May 15, 2014 02:37

oh I got it you are right and I find the solution thanks a lot

1988 May 15, 2014 02:55

thanks it seems that it was other user's problem too however thanks for your protect


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