OpenFOAM-10版本编译湍流模型发生could not load "DynSmag.so"情况
-
在reactingFoam求解器下的案例中,输入blockMesh运行时就会发生下面报错:
Create time--> FOAM Warning :
From function void* Foam::dlOpen(const Foam::fileName&, bool)
in file POSIX.C at line 1247
dlopen error : /home/postgraduate/OpenFOAM/postgraduate-10/platforms/linux64GccDPInt32Opt/lib/DynSmag.so: undefined symbol: _ZTIN4Foam36incompressibleMomentumTransportModelE
--> 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 "DynSmag.so"
因为能加载这个动态库,导致后面湍流文件不能识别DynSmag模型,计算也不能继续。
用的求解器是reactingFoam,版本号是OpenFOAM-10。求解答!感谢。 -
@李东岳 感谢李老师的回复:
编译的信息如下:wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file makeIncompressibleMomentumTransportModel.C g++ -std=c++14 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/home/postgraduate/OpenFOAM/OpenFOAM-10/OpenFOAM-10/src/physicalProperties/lnInclude -I/home/postgraduate/OpenFOAM/OpenFOAM-10/OpenFOAM-10/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/home/postgraduate/OpenFOAM/OpenFOAM-10/OpenFOAM-10/src/MomentumTransportModels/incompressible/lnInclude -I/home/postgraduate/OpenFOAM/OpenFOAM-10/OpenFOAM-10/src/finiteVolume/lnInclude -I/home/postgraduate/OpenFOAM/OpenFOAM-10/OpenFOAM-10/src/meshTools/lnInclude -IlnInclude -I. -I/home/postgraduate/OpenFOAM/OpenFOAM-10/OpenFOAM-10/src/OpenFOAM/lnInclude -I/home/postgraduate/OpenFOAM/OpenFOAM-10/OpenFOAM-10/src/OSspecific/POSIX/lnInclude -fPIC -c makeIncompressibleMomentumTransportModel.C -o Make/linux64GccDPInt32Opt/makeIncompressibleMomentumTransportModel.o g++ -std=c++14 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/home/postgraduate/OpenFOAM/OpenFOAM-10/OpenFOAM-10/src/physicalProperties/lnInclude -I/home/postgraduate/OpenFOAM/OpenFOAM-10/OpenFOAM-10/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/home/postgraduate/OpenFOAM/OpenFOAM-10/OpenFOAM-10/src/MomentumTransportModels/incompressible/lnInclude -I/home/postgraduate/OpenFOAM/OpenFOAM-10/OpenFOAM-10/src/finiteVolume/lnInclude -I/home/postgraduate/OpenFOAM/OpenFOAM-10/OpenFOAM-10/src/meshTools/lnInclude -IlnInclude -I. -I/home/postgraduate/OpenFOAM/OpenFOAM-10/OpenFOAM-10/src/OpenFOAM/lnInclude -I/home/postgraduate/OpenFOAM/OpenFOAM-10/OpenFOAM-10/src/OSspecific/POSIX/lnInclude -fPIC -fuse-ld=bfd -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/makeIncompressibleMomentumTransportModel.o -L/home/postgraduate/OpenFOAM/OpenFOAM-10/OpenFOAM-10/platforms/linux64GccDPInt32Opt/lib \ -lphysicalProperties -lmomentumTransportModels -lfiniteVolume -lmeshTools -lstdc++ -fopenmp -o /home/postgraduate/OpenFOAM/postgraduate-10/platforms/linux64GccDPInt32Opt/lib/DynSmag.so 我看在/home/postgraduate/OpenFOAM/postgraduate-10/platforms/linux64GccDPInt32Opt/lib/DynSmag.so有相应的.so文件应该是编译成功了。