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 usage (https://www.cfd-online.com/Forums/openfoam-community-contributions/157393-groovybc-usage.html)

avigrod July 28, 2015 08:41

groovyBC usage
 
I have created the following boundary condition for the phase.water based on Swak4FOAM:

inlet
Code:

    {
        type            groovyBC;
        valueExpresion "(pos().z<=0.20) ? 1 : 0";
      value 1;
           
    }

And i included
Code:

libs (
      "libOpenFOAM.so"
      "libsimpleSwakFunctionObjects.so"
      "libswakFunctionObjects.so"
      "libgroovyBC.so"
    );

in my controlDict

however when calling interFoam, (or when decomposing), I get alpha.water = 0 in all points as well as a warning like this:
Code:

--> FOAM Warning :
    From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
    in file /home/opencfd/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/Field.C at line 318
    Reading "/home/user/OpenFOAM/user-2.3.0/run/rejas_m028horizontal/0/alpha.water.boundaryField.inlet" from line 26 to line 30
    expected keyword 'uniform' or 'nonuniform', assuming deprecated Field format from Foam version 2.0.

where lines 26-30 are the lines I pasted previously.

Am I doing something wrong?

I am using OpenFOAM 2.3.0 and swak4FOAM 0.3.1

avigrod July 30, 2015 08:54

Quote:

Originally Posted by avigrod (Post 557319)
I have created the following boundary condition for the phase.water based on Swak4FOAM:

inlet
Code:

    {
        type            groovyBC;
        valueExpresion "(pos().z<=0.20) ? 1 : 0";
      value 1;
           
    }

And i included
Code:

libs (
      "libOpenFOAM.so"
      "libsimpleSwakFunctionObjects.so"
      "libswakFunctionObjects.so"
      "libgroovyBC.so"
    );

in my controlDict

however when calling interFoam, (or when decomposing), I get alpha.water = 0 in all points as well as a warning like this:
Code:

--> FOAM Warning :
    From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
    in file /home/opencfd/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/Field.C at line 318
    Reading "/home/user/OpenFOAM/user-2.3.0/run/rejas_m028horizontal/0/alpha.water.boundaryField.inlet" from line 26 to line 30
    expected keyword 'uniform' or 'nonuniform', assuming deprecated Field format from Foam version 2.0.

where lines 26-30 are the lines I pasted previously.

Am I doing something wrong?

I am using OpenFOAM 2.3.0 and swak4FOAM 0.3.1

It was working properly. By the way before I realised, I also saw how to the same in another way (with codedFixedValue). I will paste it into another page in case it is usefull for anybody


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