CfdOF 설치

참조이하FreeCAD의add-onCfdOF을 사용해 보십시오.주어진 환경은 Windows 11WSL Ubutun 20.04, FreeCAD 0.19입니다.
https://qiita.com/Sagittarius_Chiron/items/c0f5a8c856c999c8d308

README.MD의Prerequisites를 보면 ESI-openCFD 버전은 v2012까지의 모습이다.주변 환경은 v2112.
  • OpenFOAM Foundation versions 5-9 or ESI-OpenCFD versions 1706-2012
  • 하지만 최근(2022년 3월 4일) 위원들도 v2112에 대응했는데 괜찮겠습니까?
    Make changes for createPatch in OpenFOAM v2112
    https://github.com/jaheyns/CfdOF/commit/30cd85ddc792255153d294801133558fdc921185

    CfdOF 설치


    설치 후 GiitPython을 찾을 수 없다고 합니다.

    FreeCAD를 종료하면 GiitPython을 설치합니다.
    취소를 선택합니다.

    GitPython 설치


    GiitPytohon은 pip 로컬로 설치됩니다.
    $ pip install GitPython
    
    FreeCAD를 다시 시작하여 CfdOF를 설치하는 동안 오류가 발생했습니다.

    add-on Plat 설치


    미안합니다.README.md 잘 쓰여 있네요.먼저 FreeCAD의 add-on Plat을 설치하십시오.
  • Run FreeCAD
  • Select Tools | Addon manager ...
  • Select Plot in the list of workbenches, and click "Install/update"
  • Restart FreeCAD
  • Repeat the above for the "CfdOF"workbench
  • Plat을 설치하고 FreeCAD를 다시 시작합니다.

    CfdOF 설치


    FreeCAD가 재부팅되면 CfdOF를 안전하게 설치하고 설정 화면을 시작할 수 있습니다.
    OpenFOAM v2112의 환경이지만, dependency checker도 무사히 통과했습니다.

    처음에는 cfMesh의 설치 단추를 누르면 파일을 다운로드했지만 컴파일링이 시작되지 않았습니다.
    잘 모르겠습니다. FreeCAD를 다시 시작하고 cfMesh를 다시 설치한 후에 컴파일링이 순조롭게 시작되었고 설치가 완료되었습니다.
    데스크톱 PC는FreeCAD를 다시 시작해야 하는데 노트북에서 시도해 봤는데 문제 없이 cfMesh를 순조롭게 컴파일하고 설치했습니다.

    Cfdof 작업 확인


    병렬 계산 오류


    데모 파일은 $HOME/입니다.Freecad/Mod/Cfdof/demos에 있기 때문에 이 중의 Elbow로 동작을 확인했습니다.
    Solver의 Parallel은 True입니다.어쨌든 먼저 그물 모양의 물건을 잘라서 계산해 보아라.

    실행을 시도하면 오류가 발생합니다.병렬 계산을 하고 싶었는데 프로세서 하나만 식별했다.

    오류 메시지
    --> FOAM FATAL ERROR: (openfoam-2112)
    attempt to run parallel on 1 processor
    
        From static bool Foam::UPstream::init(int&, char**&, bool)
        in file UPstream.C at line 297.
    
    FOAM aborting
    
    #0  Foam::error::printStack(Foam::Ostream&)
    
    --> FOAM FATAL ERROR: (openfoam-2112)
    attempt to run parallel on 1 processor
    
        From static bool Foam::UPstream::init(int&, char**&, bool)
        in file UPstream.C at line 297.
    
    FOAM aborting
    
    #0  Foam::error::printStack(Foam::Ostream&) at ??:?
    #1  Foam::error::simpleExit(int, bool)
    
    --> FOAM FATAL ERROR: (openfoam-2112)
    attempt to run parallel on 1 processor
    
        From static bool Foam::UPstream::init(int&, char**&, bool)
        in file UPstream.C at line 297.
    
    FOAM aborting
    
    #0  Foam::error::printStack(Foam::Ostream&)
    
    --> FOAM FATAL ERROR: (openfoam-2112)
    attempt to run parallel on 1 processor
    
        From static bool Foam::UPstream::init(int&, char**&, bool)
        in file UPstream.C at line 297.
    
    FOAM aborting
    
    #0  Foam::error::printStack(Foam::Ostream&) at ??:?
    #2  Foam::error::exiting(int, bool) at ??:?
    #1  Foam::error::simpleExit(int, bool) at ??:?
    #1  Foam::error::simpleExit(int, bool) at ??:?
    #3  Foam::UPstream::init(int&, char**&, bool) at ??:?
    #2  Foam::error::exiting(int, bool) at ??:?
     at ??:?
    #4  Foam::argList::argList(int&, char**&, bool, bool, bool)#2  Foam::error::exiting(int, bool) at ??:?
    #5   at ??:?
    #3  Foam::UPstream::init(int&, char**&, bool)? at ??:?
    #3  Foam::UPstream::init(int&, char**&, bool) at ??:?
    #4  Foam::argList::argList(int&, char**&, bool, bool, bool) in /usr/lib/openfoam/openfoam2112/platforms/linux64GccDPInt32Opt/bin/potentialFoam
    #6  __libc_start_main at ??:?
    #4  Foam::argList::argList(int&, char**&, bool, bool, bool) in /lib/x86_64-linux-gnu/libc.so.6
    #7  ? at ??:?
    #5  ? in /usr/lib/openfoam/openfoam2112/platforms/linux64GccDPInt32Opt/bin/potentialFoam
    [OPTIPLEX:27623] *** Process received signal ***
    [OPTIPLEX:27623] Signal: Aborted (6)
    [OPTIPLEX:27623] Signal code:  (-6)
    [OPTIPLEX:27623] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x143c0)[0x7f3e6fadf3c0]
    [OPTIPLEX:27623] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f3e6f91c03b]
    [OPTIPLEX:27623] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f3e6f8fb859]
    [OPTIPLEX:27623] [ 3] /usr/lib/openfoam/openfoam2112/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam5error10simpleExitEib+0x17a)[0x7f3e702529ca]
    [OPTIPLEX:27623] [ 4] /usr/lib/openfoam/openfoam2112/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam5error7exitingEib+0x4a)[0x7f3e7025600a]
    [OPTIPLEX:27623] [ 5] /usr/lib/openfoam/openfoam2112/platforms/linux64GccDPInt32Opt/lib/sys-openmpi/libPstream.so(_ZN4Foam8UPstream4initERiRPPcb+0x1ad9)[0x7f3e6f8cbe09]
    [OPTIPLEX:27623] [ 6] /usr/lib/openfoam/openfoam2112/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam7argListC1ERiRPPcbbb+0x7e2)[0x7f3e702829c2]
    [OPTIPLEX:27623] [ 7] potentialFoam(+0x31e53)[0x560a553a3e53]
    [OPTIPLEX:27623] [ 8] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f3e6f8fd0b3]
    [OPTIPLEX:27623] [ 9] potentialFoam(+0x3476e)[0x560a553a676e]
    [OPTIPLEX:27623] *** End of error message ***
     at ??:?
    #5   in /usr/lib/openfoam/openfoam2112/platforms/linux64GccDPInt32Opt/bin/potentialFoam
    
    ===================================================================================
    =   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
    =   PID 27621 RUNNING AT OPTIPLEX
    =   EXIT CODE: 9
    =   CLEANING UP REMAINING PROCESSES
    =   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
    ===================================================================================
    YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Terminated (signal 15)
    This typically refers to a problem with your application.
    Please see the FAQ page for debugging suggestions
    
    OpenFOAM은 포장으로 설치되어 있습니다.

    싱글 코어 컴퓨팅


    이번에는 병행하지 않고 혼자서 계산해 보자.

    이번에는 괜찮아요.

    결과를 ParaView로 나타냅니다.계산을 잘하다.

    수동 병렬 계산


    CfdOF에서 병렬 계산 설정을 통해 설정 파일을 작성하고 명령줄에서 계산을 실행하면 계산이 순조롭게 나온다.
    $ mpirun -np 4 simpleFoam -parallel
    $ reconstructPar
    $ paraFoam
    
    CfdOF 관련 질문?아니면 주변 환경의 문제?

    좋은 웹페이지 즐겨찾기