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/)
-   -   Error while adding a new boundary condition (https://www.cfd-online.com/Forums/openfoam-programming-development/236817-error-while-adding-new-boundary-condition.html)

subhojitkadiacfd June 16, 2021 16:50

Error while adding a new boundary condition
 
Hello everyone,
I am trying to add a new boundary condition for epsilon using wmake libso.
I have successfully compiled the boundary condition and added the library in controlDict. However while running simpleFoam, I am getting the following error
Code:

--> FOAM Warning :
    From function void* Foam::dlOpen(const Foam::fileName&, bool)
    in file POSIX.C at line 1251
    dlopen error : /home/subhojik/OpenFOAM/subhojik-8/platforms/linux64GccDPInt32Opt/lib/libmyEpsilonFreeSurface.so: undefined symbol: _ZTVN4Foam38myEpsilonFreeSurfaceFvPatchScalarFieldE
--> FOAM Warning :
    From function bool Foam::dlLibraryTable::open(const Foam::fileName&, bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 106
    could not load "libmyEpsilonFreeSurface.so"

Code:

.....
--> FOAM FATAL IO ERROR:
Unknown patchField type myEpsilonFreeSurface for patch type patch

Valid patchField types are :
......

The Make/files and options are
Code:

fvPatchFields = fields/fvPatchFields
derivedFvPatchFields = $(fvPatchFields)/derived
$(derivedFvPatchFields)/myEpsilonFreeSurface/myEpsilonFreeSurfaceFvPatchScalarField.C

LIB = $(FOAM_USER_LIBBIN)/libmyEpsilonFreeSurface

and
Code:

EXE_INC = \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/finiteVolume/lnInclude \

LIB_LIBS = \
    -lmeshTools \
    -lfiniteVolume

Could you please suggest the necessary correction? I am using OF 8 in Win 10.
Thanking you.

Subhojit

petros July 8, 2021 10:48

Hi Subhojit,

Nothing seems wrong in the provided code snippet. These errors usually mean that you have to wclean and wmake again.

Petros

uosilos July 14, 2021 05:19

Hi!


Could you fixed it?


I am using OF8 as well and facing exactly the same problem :(


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