CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   groovyBC Error (https://www.cfd-online.com/Forums/openfoam-solving/242369-groovybc-error.html)

Kavi April 18, 2022 13:18

groovyBC Error
 
Hello everyone,

I am trying to set up a case to simulate water current interaction and a solid disk. also, I am using SHM and extrudeMesh to mesh the model, simpleFoam or PimpleFoam as the solver.
As the inlet velocity boundary condition, I want to implement a parabolic velocity profile, then I have used groovyBC as follows:

Code:

inlet
    {
    type              groovyBC;
    value            $internalField;
    valueExpression  "1*para";
    variables        "yp=pts().x;minY=min(yp);maxY=max(yp);para=-1.5*(maxY-pos().y)*(pos().y-minY)/(0.25*pow(maxY-minY,2))*normal();";
    }

but, I got the error:

Code:

--> FOAM FATAL ERROR: (openfoam-2106 patch=211215)
The expected return type scalar is different from the stored result type "vector"

also, when I removed the term *normal() I got the:

Code:

--> FOAM FATAL ERROR: (openfoam-2106 patch=211215)
The expected return type vector is different from the stored result type "scalar"

Does anyone know how can I get rid of this error?

Thanks in advance.


All times are GMT -4. The time now is 08:49.