使用sixDoFRigidBodyState这个functionObject报错



  • 想要找一个可以输出物体运动状态的FunctionObejct,在src\functionObject 下发现了这个FunctionObejct,于是根据.H 文件的说明在controlDict中加入了这个FunctionObejct,然后测试,结果有警告,提示信息显示是打不开、找不到这个FunctionObejt对应的库,但是我去platforms相应的文件夹中找到了响应的文件,请教各位这是什么原因导致的,应该如何解决?错误信息如下:

    Starting time loop
    
    --> FOAM Warning : 
        From function void* Foam::dlOpen(const Foam::fileName&, bool)
        in file POSIX.C at line 1604
        dlopen error : libsixDoFRigidBodyState.so: cannot open shared object file: No such file or directory
    --> FOAM Warning : 
        From function bool Foam::dlLibraryTable::open(const Foam::fileName&, bool)
        in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 105
        could not load "libsixDoFRigidBodyState.so"
    --> FOAM Warning : 
        From function bool Foam::dlLibraryTable::open(const Foam::dictionary&, const Foam::word&, const TablePtr&) [with TablePtr = Foam::HashTable<Foam::autoPtr<Foam::functionObject> (*)(const Foam::word&, const Foam::Time&, const Foam::dictionary&), Foam::word, Foam::string::hash>*]
        in file lnInclude/dlLibraryTableTemplates.C at line 62
        Could not open library "libsixDoFRigidBodyState.so"
    
    --> FOAM Warning : 
    Unknown function type sixDoFRigidBodyState
    
    Valid function types :
    
    9
    (
    forceCoeffs
    forces
    patchProbes
    probes
    psiReactionThermoMoleFractions
    rhoReactionThermoMoleFractions
    sets
    surfMeshes
    surfaces
    )
    

    下图是我找到的编译好的库文件
    cf0f95a6-886c-4570-a14d-26b372ada405-image.png
    万分感谢:chouchou:



  • 抱歉各位,自己仔细看了一下,库的名字我看错了,报错的原因可能是没有成功编译这个FunctionObject的原因,我应该重新编译OpenFOAM来检查错误吗?还是可以单独编译FunctionObject?万分感谢。:chouchou:



  • 已经解决了,各位。参考最新版本,重新编译了一下解决了。



  • 感谢分享!:xiexie:



  • @东岳 李老师太客气啦!:shangxue:


Log in to reply