CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Coded Boundary Condition for Velocity (https://www.cfd-online.com/Forums/openfoam-programming-development/242815-coded-boundary-condition-velocity.html)

kooki_13 May 13, 2022 06:42

Coded Boundary Condition for Velocity
 
Dear Fomers,


I am currently working with OF2112, and I have used coded BC for inlet velocity.


part of my code has:


scalar t_ = this->db().time().value();


But when I run the simulation, I get the error:


LowRe/0/U.boundaryField.JetInlet.U:59:22: error: ‘const class Foam::PatchFunction1Types::myExpressionPatchFuncti on1VectorField’ has no member named ‘db’
make: *** [/usr/lib/openfoam/openfoam2112/wmake/rules/General/transform:35: Make/linux64GccDPInt32Opt/codedPatchFunction1Template.o] Error 1


--> FOAM FATAL IO ERROR: (openfoam-2112 patch=220310)
Failed wmake "dynamicCode/myExpression/platforms/linux64GccDPInt32Opt/lib/libmyExpression_7c98b46426430ac5a842b2ddb24c61d371 1fb165.so"


file: 0/U.boundaryField.JetInlet.U at line 40 to 52.

From void Foam::codedBase::createLibrary(Foam::dynamicCode&, const Foam::dynamicCodeContext&) const
in file db/dynamicLibrary/codedBase/codedBase.C at line 240.

FOAM exiting



Has anyone had the same problem?
Could you please help me?


Thank you in advance.


All times are GMT -4. The time now is 03:41.