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] Normal component of velocity in groovyBC (https://www.cfd-online.com/Forums/openfoam-community-contributions/174418-normal-component-velocity-groovybc.html)

SirIsaac90 July 12, 2016 04:51

Normal component of velocity in groovyBC
 
Hi Foamers!

I am struggling with with a pressure BC with groovyBC.

I want to define a groovyTotalPressure where p0Expression looks as follows:
Code:

p0Expression    "(U*normal() > 0) && (p < 99500) ? base - (mag(U)*a_max + b_max*mag(U)*mag(U)) : 99500";
Unfortunately, it does not work with the "normal()" multiplier. How to get the normal component of the velocities on a patch? Where is my fault?

I would be pleased if anyone can help me!

Regards
JW

SirIsaac90 July 14, 2016 03:43

Hi!

Problem is already solved.
I did it with

U&normal().


At least it gave me the correct results.

Regards,
JW


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