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/)
-   -   Unknown groovyBC warning (https://www.cfd-online.com/Forums/openfoam-solving/240707-unknown-groovybc-warning.html)

MFWilliams January 20, 2022 05:27

Unknown groovyBC warning
 
Hello,

I am trying to use a groovyBC for the first time to create a time varying velocity input to CFD simulation.



My groovyBC input in the U file can be seen below:
Code:

Inlet
    {
        type            groovyBC;
        valueExpression "vector((1148120681*pow(time(),16)) +      (-7266830068.7*pow(time(),15)) + (20865494854.4*pow(time(.........
        value          uniform (0 0 0);
    }

(it is a long polynomial wrt time)


When I run the simulation though I get some errors.

Despite adding
Code:

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

to the controlDict I get the warning below:
Code:

--> FOAM Warning :
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 124
    could not load libOpenFOAM.so: cannot open shared object file: No such file or directory
--> FOAM Warning :
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 124
    could not load libsimpleSwakFunctionObjects.so: cannot open shared object file: No such file or directory

Could this be because I am running this simulation in /mnt/c/Users/merli/simulations/cylinderTest1 but I downloaded swak4foam in ~/foam/mfwilliams-4.0/swak4Foam?


Also, as soon as I start the solver I get the warning:
Code:

--> FOAM Warning :

      From function  groovyBCFvPatchField<Type>::groovyBCFvPatchField(const  fvPatch& p,const DimensionedField<Type, volMesh>& iF,Const  dictionary& dict)
      in file groovyBCFvPatchField.C at line 141
      No value defined for U on Inlet therefore using the internal field next to the patch

Please can someone advise me as to why these errors are occuring? I am testing this BC on the solids4Foam tutorial: fixed, conformal cylinder in channel.


Thank you for your help
Merlin

MFWilliams February 4, 2022 09:32

Does anybody know the answer to this, I would greatly appreciate help?

wildfire230 February 7, 2022 10:06

When I use groovyBC I only have these in the controlDict:


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


Also, in my velocity groovyBC conditions, I usually have value $internalField, like this:


topAndBottom
{
//type noSlip;
type groovyBC;
value $internalField;
valueExpression "vector(-1*myGrad.x/internalField(Csalt), 0, 0)";
variables "myGrad=internalField(CsaltGrad);";
}



Here Csalt and CsaltGrad are extra scalar fields in this particular example.

MFWilliams February 15, 2022 11:30

Ok thank you, what does the internalField term do?

wildfire230 February 15, 2022 14:33

Actually, I think this might not matter. It looks like you are just getting warnings, and not actually errors. So is the solver actually running or not?

MFWilliams February 18, 2022 09:07

Yes the solver is running to completion and the results seem ok


All times are GMT -4. The time now is 05:09.