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 at inlet for 2D axi geometry (https://www.cfd-online.com/Forums/openfoam-community-contributions/226658-parabolic-velocity-inlet-2d-axi-geometry.html)

mcfdma May 4, 2020 07:48

Parabolic velocity at inlet for 2D axi geometry
 
1 Attachment(s)
Hello.

I am interested in creating a developed flow at the inlet. I am using groovyBC and have checked several other example and forums.

My case is an axisymmetric pipe of 0.1m radius and 2m long.

I am trying to use the parabolic equation
u = umax( 1-(r/R)^2)

I want umax to be 1m/s and this is what I have done so far.

Code:

in U
inlet
    {
        type            groovyBC;
    variables    "Vmax=1.0;yp=pts().y;maxY=max(yp);para=(1-pow(pos().y/0.1,2))*normal();"
    valueExpression    "Vmax*para";
    value        uniform (1 0 0);
    }

I have added the libs in controlDict as well. However, instead of a parabolic curve, I am getting an oscillating curve and the value of the velocity is remarkably low.

Attachment 77207

Any idea how this can be corrected?

I am using these versions:
swak4Foam version - 0.4.1
OpenFOAM 2.3.1

Thanks


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