Find answers, ask questions, and connect with our <br>community around the world.

Home Forums OpenFOAM Forum Lesson 19 nacaaerofoil

  • Lesson 19 nacaaerofoil

    Posted by TAPAS KUMAR on July 11, 2023 at 11:58 am

    Dear Dr. Baris,

    I hope you are doing well. I have a doubt regarding the boundary names in the nacaaerofoil case. In this case, the boundary conditions present initially for 0/U file is as follows:

    boundaryField

    {

    “inlet.*”

    {
    type                 supersonicFreestream;
    pInf                 $pressure;
    TInf                 $temperature;
    UInf                $flowVelocity;
    gamma              1.4;
    value                $internalField;
    }

    “outlet.*”
    {
    type                   inletOutlet;
    inletValue          uniform$flowVelocity;
    value                   $internalField;
    }

    “sym.*”
    {
    type               empty;
    }

    “wall.*”
    {
    type                   noSlip;
    }

     

     

    Here I have copied the blockMeshDict file from the motorBike case and changed the ” boundary” subdictionary of the blockMeshDict as follows:

     

     

    boundary
    (
    “sym.*”
    {
    type empty;
    faces
    (
    (3 7 6 2)
    (1 5 4 0)
    );
    }
    “inlet.*”
    {
    type patch;
    faces
    (
    (0 4 7 3)
    );
    }
    “outlet.*”
    {
    type patch;
    faces
    (
    (2 6 5 1)
    );
    }
    “wall.*”
    {
    type wall;
    faces
    (
    (0 3 2 1)
    (4 5 6 7)
    );
    }
    );

     

    Is it ok to do like this or it should be according to the motorBike case.

     

    Barış Bicer replied 9 months, 1 week ago 2 Members · 8 Replies
  • 8 Replies
  • Barış Bicer

    Moderator
    July 11, 2023 at 8:04 pm

    Hi Kumar,

    No it is not like that. This is compressible/sonicFoam solver tutorial case  and totally different than motorBike case. In motorBike case we created volume mesh using blockMesh(for background mesh) & snappyHexMesh. However, here there is already mesh done in starccm+ and you should convert to foam. To understand how to proceed in the tutorials, I advice you to check all the time .Allrun file. All steps of the tutorials are explained there step by step.

    #!/bin/sh
    cd “${0%/*}” || exit # Run from this directory
    . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
    #——————————————————————————

    restore0Dir

    # Convert mesh from resources directory
    runApplication star4ToFoam -scale 1 \
    “$FOAM_TUTORIALS”/resources/geometry/nacaAirfoil/nacaAirfoil

    # Symmetry plane -> empty
    sed -i -e ‘s/symmetry\([)]*;\)/empty\1/’ constant/polyMesh/boundary

    # Don’t need these extra files (from star4ToFoam conversion)
    rm -f \
    constant/cellTable \
    constant/polyMesh/cellTableId \
    constant/polyMesh/interfaces \
    constant/polyMesh/origCellId \
    ;

    if isParallel “$@”
    then

    runApplication decomposePar

    runParallel $(getApplication)

    else

    runApplication $(getApplication)

    fi

  • TAPAS KUMAR

    Member
    July 12, 2023 at 8:39 am

    Dear Dr. Baris,

    after converting the mesh I have received the following error:

    /*—————————————————————————*\
    | ========= | |
    | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
    | \\ / O peration | Version: 2212 |
    | \\ / A nd | Website: http://www.openfoam.com |
    | \\/ M anipulation | |
    \*—————————————————————————*/
    Build : _66908158ae-20221220 OPENFOAM=2212 version=v2212
    Arch : “LSB;label=32;scalar=64”
    Exec : star4ToFoam -scale 1 $FOAM_TUTORIALS/resources/geometry/nacaAirfoil/nacaAirfoil
    Date : Jul 12 2023
    Time : 14:05:10
    Host : tapas-VirtualBox
    PID : 3919
    I/O : uncollated
    Case : /home/tapas/OpenFOAM/tapas-v2212/run/nacaAirfoil
    nProcs : 1
    trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
    fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20)
    allowSystemOperations : Allowing user-supplied system call operations

    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    no constant/boundaryRegion information available
    no constant/cellTable information available

    –> FOAM FATAL ERROR: (openfoam-2212)

    From static bool Foam::fileFormats::STARCDCore::readHeader(Foam::IFstream&, Foam::fileFormats::STARCDCore::fileHeader)
    in file starcd/STARCDCore.C at line 129.

    FOAM aborting

    #0 Foam::error::printStack(Foam::Ostream&) in ~/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
    #1 Foam::error::simpleExit(int, bool) in ~/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
    #2 Foam::fileFormats::STARCDCore::readHeader(Foam::IFstream&, Foam::fileFormats::STARCDCore::fileHeader) in ~/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/lib/libfileFormats.so
    #3 Foam::fileFormats::STARCDMeshReader::readPoints(Foam::fileName const&, double) in ~/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/lib/libconversion.so
    #4 Foam::fileFormats::STARCDMeshReader::readGeometry(double) in ~/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/lib/libconversion.so
    #5 Foam::meshReader::mesh(Foam::objectRegistry const&) in ~/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/lib/libconversion.so
    #6 ? in ~/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/bin/star4ToFoam
    #7 ? in /lib/x86_64-linux-gnu/libc.so.6
    #8 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
    #9 ? in ~/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/bin/star4ToFoam
    Aborted (core dumped)

  • TAPAS KUMAR

    Member
    July 12, 2023 at 9:24 am

    Dear Dr. Baris,

    I have solved the problem. I have unzipped all the files and then ran ‘star4ToFoam’, then it worked.

  • Barış Bicer

    Moderator
    July 12, 2023 at 8:19 pm

    Good to know that Kumar.

    Great.

     

    Keep up hard working!!!

  • TAPAS KUMAR

    Member
    July 13, 2023 at 1:34 pm

    Dear Dr. Baris,

    after running the simulation, I have tried to calculate the Courant number using the postProcessing utility by using the command:

    tapas@tapas-VirtualBox:~/OpenFOAM/tapas-v2212/run/nacaAirfoil$ sonicFoam -postProcess -func CourantNo

    However, I got some error as:

    /*—————————————————————————*\
    | ========= | |
    | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
    | \\ / O peration | Version: 2212 |
    | \\ / A nd | Website: http://www.openfoam.com |
    | \\/ M anipulation | |
    \*—————————————————————————*/
    Build : _66908158ae-20221220 OPENFOAM=2212 version=v2212
    Arch : “LSB;label=32;scalar=64”
    Exec : sonicFoam -postProcess -func CourantNo
    Date : Jul 13 2023
    Time : 18:57:20
    Host : tapas-VirtualBox
    PID : 13434
    I/O : uncollated
    Case : /home/tapas/OpenFOAM/tapas-v2212/run/nacaAirfoil
    nProcs : 1
    trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
    fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20)
    allowSystemOperations : Allowing user-supplied system call operations

    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    Create time

    Create mesh for time = 0

    PIMPLE: Operating solver in PISO mode

     

    –> FOAM FATAL IO ERROR: (openfoam-2212)
    Entry ‘type’ not found in dictionary “functions.CourantNo”

    file: functions.CourantNo at line 12 to 30.

    From bool Foam::dictionary::readEntry(const Foam::word&, T&, Foam::keyType::option, Foam::IOobjectOption::readOption) const [with T = Foam::word]
    in file lnInclude/dictionaryTemplates.C at line 327.

    FOAM exiting

     

    Please assist me in resolving this issue.

  • Barış Bicer

    Moderator
    July 13, 2023 at 8:51 pm

    I think that you dont need solver name to calculate the Courant number.

    Just type : postProcess -func CourantNo

    let me know.

  • TAPAS KUMAR

    Member
    July 14, 2023 at 3:59 am

    I have alredy done that. Similar error came for that case too:

    tapas@tapas-VirtualBox:~/OpenFOAM/tapas-v2212/run/nacaAirfoil$ postProcess -func CourantNo

    /*—————————————————————————*\
    | ========= | |
    | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
    | \\ / O peration | Version: 2212 |
    | \\ / A nd | Website: http://www.openfoam.com |
    | \\/ M anipulation | |
    \*—————————————————————————*/
    Build : _66908158ae-20221220 OPENFOAM=2212 version=v2212
    Arch : “LSB;label=32;scalar=64”
    Exec : postProcess -func CourantNo
    Date : Jul 14 2023
    Time : 09:26:00
    Host : tapas-VirtualBox
    PID : 5192
    I/O : uncollated
    Case : /home/tapas/OpenFOAM/tapas-v2212/run/nacaAirfoil
    nProcs : 1
    trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
    fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20)
    allowSystemOperations : Allowing user-supplied system call operations

    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    Create time

    Create mesh for time = 0

     

    –> FOAM FATAL IO ERROR: (openfoam-2212)
    Entry ‘type’ not found in dictionary “functions.CourantNo”

    file: functions.CourantNo at line 12 to 30.

    From bool Foam::dictionary::readEntry(const Foam::word&, T&, Foam::keyType::option, Foam::IOobjectOption::readOption) const [with T = Foam::word]
    in file lnInclude/dictionaryTemplates.C at line 327.

    FOAM exiting

  • Barış Bicer

    Moderator
    July 14, 2023 at 10:00 am

    I run sonicFoam case and then typed : sonicFoam -postProcess -func CourantNo then it worked. I saw Co number under each time step. First send me how it is seen your case file. type ls and send here. As parallel also please just copy the case from scratch and only type ./AllRun. After you get some time data use above command again. let me know what happened?

     

Log in to reply.

error: Content is protected !!