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

Home Forums OpenFOAM Forum nacaAirfoil – Solver

  • nacaAirfoil – Solver

    Posted by Harshavardhan Konka on January 9, 2023 at 5:11 am

    Hi Baris,

    When I try to run the sonicFoam for Nacaarifoil, I get the following error.

     

    /*—————————————————————————*\
    | ========= | |
    | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
    | \\ / O peration | Version: 2206 |
    | \\ / A nd | Website: http://www.openfoam.com |
    | \\/ M anipulation | |
    \*—————————————————————————*/
    Build : _76d719d1e6-20220624 OPENFOAM=2206 version=v2206
    Arch : “LSB;label=32;scalar=64”
    Exec : sonicFoam
    Date : Jan 09 2023
    Time : 16:07:23
    Host : hk3956-VirtualBox
    PID : 5764
    I/O : uncollated
    Case : /home/hk3956/OpenFOAM/hk3956-v2206/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

    Reading thermophysical properties

    Selecting thermodynamics package
    {
    type hePsiThermo;
    mixture pureMixture;
    transport const;
    thermo hConst;
    equationOfState perfectGas;
    specie specie;
    energy sensibleInternalEnergy;
    }

    –> FOAM FATAL ERROR: (openfoam-2206)
    cannot find file “/home/hk3956/OpenFOAM/hk3956-v2206/run/nacaAirfoil/0/p”

    From virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOperation::readStream(Foam::regIOobject&, const Foam::fileName&, const Foam::word&, bool) const
    in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 540.

    FOAM exiting

    Barış Bicer replied 1 year, 5 months ago 2 Members · 12 Replies
  • 12 Replies
  • Harshavardhan Konka

    Member
    January 9, 2023 at 5:12 am

    It says that couldnt find the pressure file in 0, but when I cd into 0 iam able to see the Pressure(p) file.

  • Barış Bicer

    Moderator
    January 9, 2023 at 8:15 pm

    Can you make “ls -l” under  ../nacaAirFoil folder and let me know what are the sub-folders under of /nacaAirFoil folder.

    Then we can see what is problem.

    Best

  • Harshavardhan Konka

    Member
    January 9, 2023 at 11:39 pm

    hk3956@hk3956-VirtualBox:~/OpenFOAM/hk3956-v2206/run$ cd nacaAirfoil/
    hk3956@hk3956-VirtualBox:~/OpenFOAM/hk3956-v2206/run/nacaAirfoil$ ls -l
    total 24
    drwxr-xr-x 3 hk3956 hk3956 4096 Jan 9 15:52 0.orig
    -rwxr-xr-x 1 hk3956 hk3956 544 Jan 9 15:52 Allclean
    -rwxr-xr-x 1 hk3956 hk3956 923 Jan 9 15:52 Allrun
    drwxr-xr-x 3 hk3956 hk3956 4096 Jan 9 16:20 constant
    -rw-rw-r– 1 hk3956 hk3956 0 Jan 9 15:56 foam.foam
    -rw-r–r– 1 hk3956 hk3956 376 Jan 9 15:52 README.md
    drwxr-xr-x 2 hk3956 hk3956 4096 Jan 9 16:13 system
    hk3956@hk3956-VirtualBox:~/OpenFOAM/hk3956-v2206/run/nacaAirfoil$

  • Harshavardhan Konka

    Member
    January 9, 2023 at 11:41 pm

    hk3956@hk3956-VirtualBox:~/OpenFOAM/hk3956-v2206/run/nacaAirfoil/system$ ls -l
    total 16
    -rw-r–r– 1 hk3956 hk3956 1642 Jan 9 15:52 controlDict
    -rw-r–r– 1 hk3956 hk3956 938 Jan 9 15:52 decomposeParDict
    -rw-r–r– 1 hk3956 hk3956 1543 Jan 9 15:52 fvSchemes
    -rw-r–r– 1 hk3956 hk3956 1289 Jan 9 15:52 fvSolution
    hk3956@hk3956-VirtualBox:~/OpenFOAM/hk3956-v2206/run/nacaAirfoil/system$

     

    hk3956@hk3956-VirtualBox:~/OpenFOAM/hk3956-v2206/run/nacaAirfoil$ cd constant/
    hk3956@hk3956-VirtualBox:~/OpenFOAM/hk3956-v2206/run/nacaAirfoil/constant$ ls -l
    total 12
    drwxr-xr-x 2 hk3956 hk3956 4096 Jun 25 2022 polyMesh.orig
    -rw-r–r– 1 hk3956 hk3956 1332 Jan 9 15:52 thermophysicalProperties
    -rw-r–r– 1 hk3956 hk3956 983 Jan 9 15:52 turbulenceProperties
    hk3956@hk3956-VirtualBox:~/OpenFOAM/hk3956-v2206/run/nacaAirfoil/constant$

  • Barış Bicer

    Moderator
    January 10, 2023 at 10:05 pm

    Hi Konka,

    As I expected you dont have /0 folder. you have 0.org folder which means origional /0 folder.

    Therefore, you have to first copy /0.org folder then you can run the simulation.

    use cp -r 0.rog 0

  • Harshavardhan Konka

    Member
    January 13, 2023 at 2:41 am

    Hi Baris,

    Thank you for the support. I was able to run the simulation first time. But when I tried copying the files again and run the simulation I am getting the following error.

    *—————————————————————————*\
    | ========= | |
    | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
    | \\ / O peration | Version: 2206 |
    | \\ / A nd | Website: http://www.openfoam.com |
    | \\/ M anipulation | |
    \*—————————————————————————*/
    Build : _76d719d1e6-20220624 OPENFOAM=2206 version=v2206
    Arch : “LSB;label=32;scalar=64”
    Exec : sonicFoam
    Date : Jan 13 2023
    Time : 13:39:31
    Host : hk3956-VirtualBox
    PID : 22579
    I/O : uncollated
    Case : /home/hk3956/OpenFOAM/hk3956-v2206/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 ERROR: (openfoam-2206)
    Cannot find file “points” in directory “polyMesh” in times “0” down to constant

    From virtual Foam::IOobject Foam::fileOperation::findInstance(const Foam::IOobject&, Foam::scalar, const Foam::word&) const
    in file global/fileOperations/fileOperation/fileOperation.C at line 1139.

    FOAM exiting

     

    hk3956@hk3956-VirtualBox:~/OpenFOAM/hk3956-v2206/run/nacaAirfoil$ ls -l
    total 32
    drwxr-xr-x 3 hk3956 hk3956 4096 Jan 13 13:12 0
    drwxr-xr-x 3 hk3956 hk3956 4096 Jan 13 13:11 0.orig
    -rwxr-xr-x 1 hk3956 hk3956 544 Jan 13 13:11 Allclean
    -rwxr-xr-x 1 hk3956 hk3956 923 Jan 13 13:11 Allrun
    drwxr-xr-x 2 hk3956 hk3956 4096 Jan 13 13:11 constant
    -rw-rw-r– 1 hk3956 hk3956 1235 Jan 13 13:19 log.foil
    -rw-r–r– 1 hk3956 hk3956 376 Jan 13 13:11 README.md
    drwxr-xr-x 2 hk3956 hk3956 4096 Jan 13 13:27 system

     

     

    hk3956@hk3956-VirtualBox:~/OpenFOAM/hk3956-v2206/run/nacaAirfoil/constant$ ls -l
    total 8
    -rw-r–r– 1 hk3956 hk3956 1332 Jan 13 13:11 thermophysicalProperties
    -rw-r–r– 1 hk3956 hk3956 983 Jan 13 13:11 turbulenceProperties

     

  • Harshavardhan Konka

    Member
    January 13, 2023 at 4:33 am

    Hi baris,

    I was able to fix the issue. I ran the ./Allrun file and obtained the polymesh and ran the simulation. I created log file with foamLog log.sonicFoam but when i list the log file I get the only the following option

    hk3956@hk3956-VirtualBox:~/OpenFOAM/hk3956-v2206/run/nacaAirfoil$ ls
    0  0.orig  Allclean  Allrun  constant  logs  log.sonicFoam  log.star4ToFoam  README.md  system

    hk3956@hk3956-VirtualBox:~/OpenFOAM/hk3956-v2206/run/nacaAirfoil$ ls logs
    foamLog.awk

     

    pls advise if I am on the right track.

     

  • Barış Bicer

    Moderator
    January 13, 2023 at 1:03 pm

    Hi Konka,

    I just checked your constant folder and you have ployMesh.org folder under of it. So problem says that cant find polyMesh folder.

    change its name to polyMesh and most probably it will work.

    for your info.

  • Harshavardhan Konka

    Member
    January 16, 2023 at 4:28 am

    Hi baris,

    I was able to run the simulation. when I try to use the postprocess utility I am getting the following error

     

    hk3956@hk3956-VirtualBox:~/OpenFOAM/hk3956-v2206/run/nacaAirfoil$ postProcess -func CourantNo
    /*—————————————————————————*\
    | ========= | |
    | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
    | \\ / O peration | Version: 2206 |
    | \\ / A nd | Website: http://www.openfoam.com |
    | \\/ M anipulation | |
    \*—————————————————————————*/
    Build : _76d719d1e6-20220624 OPENFOAM=2206 version=v2206
    Arch : “LSB;label=32;scalar=64”
    Exec : postProcess -func CourantNo
    Date : Jan 16 2023
    Time : 15:26:07
    Host : hk3956-VirtualBox
    PID : 11372
    I/O : uncollated
    Case : /home/hk3956/OpenFOAM/hk3956-v2206/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

    Time = 0
    –> FOAM Warning :
    From virtual bool Foam::functionObjects::fieldSelection::checkSelection()
    in file functionObjects/fieldSelections/fieldSelection/fieldSelection.C at line 166
    Field phi not found

    Reading fields:

    Executing functionObjects
    –> FOAM Warning : functionObjects::CourantNo CourantNo cannot find required object phi of type surfaceScalarField
    –> FOAM Warning : functionObjects::CourantNo CourantNo failed to execute.

    Time = 0.0002

    Reading fields:
    surfaceScalarField: phi

    Executing functionObjects

    –> FOAM FATAL ERROR: (openfoam-2206)

    failed lookup of rho (objectRegistry region0)
    available objects of type volScalarField:
    1(surfaceSum(mag(phi)))

    From const Type& Foam::objectRegistry::lookupObject(const Foam::word&, bool) const [with Type = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>]
    in file /home/hk3956/Desktop/openfoam/OpenFOAM-v2206/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 571.

    FOAM exiting

  • Harshavardhan Konka

    Member
    January 16, 2023 at 6:33 am

    hi baris,

    I was able to calculate the Co using sonicFoam -postProcess -func courantNo, but unfortunately when I open the paraview I do not get the phi option to open for checking the courant no

  • Harshavardhan Konka

    Member
    January 16, 2023 at 6:37 am

    this is the o/p I am getting for all the timestep

     

    Time = 0.0026
    Reading thermophysical properties

    Selecting thermodynamics package
    {
    type hePsiThermo;
    mixture pureMixture;
    transport const;
    thermo hConst;
    equationOfState perfectGas;
    specie specie;
    energy sensibleInternalEnergy;
    }

    Reading field U

    Reading/calculating face flux field phi

    Creating turbulence model

    Selecting turbulence model type RAS
    Selecting RAS turbulence model LaunderSharmaKE
    RAS
    {
    RASModel LaunderSharmaKE;
    turbulence on;
    printCoeffs on;
    Cmu 0.09;
    C1 1.44;
    C2 1.92;
    C3 0;
    sigmak 1;
    sigmaEps 1.3;
    }

    Creating field kinetic energy K

    No MRF models present

    No finite volume options present

    End

  • Barış Bicer

    Moderator
    January 16, 2023 at 9:41 pm

    Hi Konka,

    Can you send me a screenshot what do you see as fields in paraview and when you make ls under the time folders what do you have? paste them here please.

    Best

Log in to reply.

error: Content is protected !!