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] groovyBC conditionnal BC if inflow our outflow velocity (https://www.cfd-online.com/Forums/openfoam-community-contributions/150264-groovybc-conditionnal-bc-if-inflow-our-outflow-velocity.html)

loic_d March 18, 2015 14:12

groovyBC conditionnal BC if inflow our outflow velocity
 
Hi everyone,
I am trying to define a different boundary condition for the salinity S if the velocity on my boundary is inflow our outflow:
  • fixedValue 1 if inflow
  • zeroGradient if outflow
I use the following code unsuccessfully (nothing happened):

Code:

Sea
    {
        type            groovyBC;
        valueExpression "1";
        gradientExpression "0";
        fractionExpression "(U&normal()>0)?0:1";
        value uniform  0;

    }

Thanks you
Loïc

wyldckat March 28, 2015 16:56

For future reference, this was answered here: http://www.openfoam.org/mantisbt/view.php?id=1582
Quote:

Greetings to all!

@loic_d: From your description... have you tried using the boundary type "inletOutlet"? See the last table on this page: http://www.openfoam.org/docs/user/boundaries.php [^] - the reference to "p" is actually in reference to the field where the boundary type is defined.

Best regards,
Bruno


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