CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Coded BC: parabolic inlet (https://www.cfd-online.com/Forums/openfoam/135659-coded-bc-parabolic-inlet.html)

samiam1000 May 16, 2014 05:19

Coded BC: parabolic inlet
 
Dear Foamers,

I am trying to insert a coded BC in my U-BC-file.

What I wanna do is to provide a parabolic inlet to my problem.

I do something like:

Code:

inlet
{
                type codedFixedValue;
                value uniform (0 -1 0);
                redirectType parabolicInlet;
                code
                #{
                variables                "Vm=2;yp=pos().y;zp=pos().z+0.005;h=-max(pts().z);a=-Vm/(h*h);b=Vm;";
                fractionExpression        "1";
                valueExpression                "vector(a*((yp*yp)+(zp*zp))+b,0,0)";
                       
                #};
}

This does not work.

Any idea about how to solve this?

Thanks a lot,
Samuele

ahmmedshakil May 16, 2014 05:25

Have you tried with the groovyBC ? If not then I guess it can serve your demand easily.

samiam1000 May 16, 2014 05:28

Actually,

the point is that - if I am not wrong - groovyBC goes along with swak4Foam and I am running a simulation on a PC where I can not compile swak4Foam, that's why I was trying to use the codedFixedValue. I think it should be able to do what I mean, isn't it?

Tushar@cfd June 10, 2014 01:33

Are you able to solve?


All times are GMT -4. The time now is 03:10.