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/)
-   -   snak4foam/groovyBC problem (https://www.cfd-online.com/Forums/openfoam-solving/121483-snak4foam-groovybc-problem.html)

klamorski July 29, 2013 18:16

snak4foam/groovyBC problem
 
Hi All,

I have a strange problem with setting boundary using groovyBC.

The solver used is modified Laplace solver. The aim is to elaborate more complicated Neumann type boundary, but I face the problem with using groovyBC at the very beginning during, testing phase after installation.

The boundary for testing was set with:

...
upperWall
{
type groovyBC;
fractionExpression "0";
gradientExpression "vector(0,0,0)";
}
...

During evaluation for the first timestep solver generates the error:
"--> FOAM FATAL ERROR: The expected return type scalar is different from the stored result type "vector"".

What this error message is about?

gschaider July 30, 2013 06:22

Quote:

Originally Posted by klamorski (Post 442685)
Hi All,

I have a strange problem with setting boundary using groovyBC.

The solver used is modified Laplace solver. The aim is to elaborate more complicated Neumann type boundary, but I face the problem with using groovyBC at the very beginning during, testing phase after installation.

The boundary for testing was set with:

...
upperWall
{
type groovyBC;
fractionExpression "0";
gradientExpression "vector(0,0,0)";
}
...

During evaluation for the first timestep solver generates the error:
"--> FOAM FATAL ERROR: The expected return type scalar is different from the stored result type "vector"".

What this error message is about?

OpenFOAM-boundary conditions (and therefor groovyBC too) mean with "gradient" "gradient in the direction normal to the patch". So if your field is a scalar then this gradient is a scalar too (contrary to what you'd expect in "normal mathematics")

klamorski July 30, 2013 06:41

Dear Bernard,

thank you very much for your explanation. Now it is clear. I proceed with the work.


All times are GMT -4. The time now is 16:29.