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/)
-   -   Pesky "Warnings" with custom boundary condition (https://www.cfd-online.com/Forums/openfoam-programming-development/245689-pesky-warnings-custom-boundary-condition.html)

cosmicCharlie October 19, 2022 14:33

Pesky "Warnings" with custom boundary condition
 
Using OF10, ubuntu 22.04. I implemented a modified dynamic contact angle model, based on the standard OF model dynamicAlphaContactAngle. The modified model myDynamicContactAngle compiles & runs. wmake installed it in $FOAM_USER_LIBBIN and I included in controlDict as:

libs ("libmyDynamicContactAngle.so" "libOpenFOAM.so");

As long as the libs command is active in controlDict I get the following warning when I run every OF application (blockMesh, decomposePar, paraFoam etc.):

--> FOAM Warning :
From function void* Foam::dlOpen(const Foam::fileName&, bool)
in file POSIX.C at line 1247
dlopen error : /opt/openfoam10/platforms/linux64GccDPInt32Opt/lib/libtwoPhaseMixture.so: undefined symbol: _ZN4Foam18physicalProperties8typeNameE
--> 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 "libmyDynamicContactAngle.so"

I've been ignoring the warning, but I'd like to understand and correct (if possible) whatever is going wrong. I examined line 1247 in POSIX.C and line 106 in dlLibraryTable.C but all I found were the error message output statements. No trail of bread crumbs back to the problem.

When I created the new model I copied dynamicAlpha etc. .C and .H to my user src directory, and I modified and/or added the necessary includes, and did the same for wmake. Here are the wmake files:

options:
EXE_INC = \
-I$(LIB_SRC)/twoPhaseModels/twoPhaseProperties/lnInclude \
-I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude

LIB_LIBS = \
-ltwoPhaseProperties \
-ltwoPhaseMixture \
-linterfaceProperties \
-lfiniteVolume

files:
myDynamicContactAngle/myDynamicContactAngleFvPatchScalarField.C

LIB = $(FOAM_USER_LIBBIN)/libmyDynamicContactAngle

Note in options I had to include /twoPhaseModels/twoPhaseProperties to get the code to compile, this is not used in OF's dynamicAlpha etc.

Any suggestions?

Thanks, Charlie


All times are GMT -4. The time now is 18:28.