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

Home Forums OpenFOAM Forum SnappyHexMesh Error in Tutorial 2: External Flow

  • SnappyHexMesh Error in Tutorial 2: External Flow

    Posted by SRIJNA on December 7, 2023 at 5:03 pm

    Hi

    I am running golfball case as suggested in Lecture 24. When i run the snappyHexMesh command using parallel (4 cpu), I am getting an error. I have attached the image of the error. The ‘minMedialAxisAngle’ is present in the snappyHexMeshDict but it is showing it is not there.

    I have also checked if it is creating the boundary layers. I have attached the image of the files present in the golfball case. There is no 3/ directory made by the snappyHexMesh.

    Kindly let me know how to fix this problem.

    Thanks

    Srijna Singh

    Barış Bicer replied 3 months, 1 week ago 2 Members · 11 Replies
  • 11 Replies
  • Barış Bicer

    Moderator
    December 9, 2023 at 11:28 am

    Hi,

    lets go step by step. I didnt understand what you did. first delete 0 1 2 processors folders. and tell me do you create your mesh parallel or in single cpu? lets do step by step

    1. blockMesh

    2. surfaceFeatureExtract

    3. snappyHexMesh -overwrite (if you use overwrite option it will directly create last stage of mesh inside polyMesh folder)

    if you run parallel : mpirun -np 4 snappyHexMesh -parallel -overwrite

    when it is finished : reconstructParMesh -constant (that will also create mesh inside polyMesh folder)

    4. delete procossors which are created for mesh

    5. cp -r 0.org 0

    6. decomposePar

    7. run your case parallel

    please check each step and if you face problem paste here in which step you had trouble?

    • SRIJNA

      Member
      December 9, 2023 at 12:55 pm

      Hi,

      I followed the step by step from the start. I am still getting the same problem.

      I am having problem in the snappyHexMesh part. I did the blockMesh and surfaceFeatureExtract part, after that i run the command ‘mpirun -np 4 snappyHexMesh -parallel -overwrite’ i am getting this error

      I have attached the image of the error.

      Kindly let me know how to fix this problem

      Regards

      Srijna Singh

  • Barış Bicer

    Moderator
    December 9, 2023 at 2:24 pm

    can you paste here the content of snappyHexMeshDict please

  • Barış Bicer

    Moderator
    December 11, 2023 at 10:39 am

    Hi Again,

    Could tell me please that did you play or make any change with the line of snappyHexMesh?

    Dont FORGET that openfoam lines and comments are letter sensitive!

    I checked your error and it says that couldnt find line “ minMedialAxisAngle 90;

    And please again look at your snappyHexMeshDict same line it is written minMediaNAxisAngle…

    change N with l then it will work. and when you get similar error always carefully check the letters.

    Best.

    Baris


  • SRIJNA

    Member
    January 2, 2024 at 12:56 pm

    Hi

    I am now running the golfball case with kepsilon turbulence model. The case is getting diverge at the start. I have attached the error. I have also tried the simulation with single cpu, still getting the same issue.I have also attached the checkMesh screenshot.

    aryaman04@aryaman04-HP-ENVY-13:~/OpenFOAM/aryaman04-v2312/run/new_golf_ball_test_case/golfball_kepsilon$ mpirun -np 4 simpleFoam -parallel | tee log.golfball
    /*—————————————————————————*\
    | ========= | |
    | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
    | \\ / O peration | Version: 2312 |
    | \\ / A nd | Website: http://www.openfoam.com |
    | \\/ M anipulation | |
    \*—————————————————————————*/
    Build : _c39a0f64-20231220 OPENFOAM=2312 version=2312
    Arch : “LSB;label=32;scalar=64”
    Exec : simpleFoam -parallel
    Date : Jan 02 2024
    Time : 18:16:49
    Host : aryaman04-HP-ENVY-13
    PID : 5004
    I/O : uncollated
    Case : /home/aryaman04/OpenFOAM/aryaman04-v2312/run/new_golf_ball_test_case/golfball_kepsilon
    nProcs : 4
    Hosts :
    (
    (aryaman04-HP-ENVY-13 4)
    )
    Pstream initialized with:
    floatTransfer : false
    nProcsSimpleSum : 0
    nonBlockingExchange: 0 (tuning: 0)
    exchange algorithm : 0
    commsType : nonBlocking
    polling iterations : 0
    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

    SIMPLE: convergence criteria
    field p tolerance 0.0001
    field U tolerance 0.0001
    field “(k|omega|epsilon)” tolerance 0.0001

    Reading field p

    Reading field U

    Reading/calculating face flux field phi

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

    No MRF models present

    No finite volume options present

    Starting time loop

    Time = 1

    smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.00375275, No Iterations 1
    smoothSolver: Solving for Uy, Initial residual = 0.999995, Final residual = 0.00293905, No Iterations 1
    smoothSolver: Solving for Uz, Initial residual = 0.999993, Final residual = 0.00143142, No Iterations 1
    GAMG: Solving for p, Initial residual = 1, Final residual = 0.0323069, No Iterations 2
    time step continuity errors : sum local = 0.161538, global = -0.137307, cumulative = -0.137307
    smoothSolver: Solving for epsilon, Initial residual = 0.0570119, Final residual = 0.00558699, No Iterations 1
    smoothSolver: Solving for k, Initial residual = 1, Final residual = 0.0878464, No Iterations 1
    ExecutionTime = 1.2 s ClockTime = 1 s

    Time = 2

    smoothSolver: Solving for Ux, Initial residual = 0.273707, Final residual = 0.026139, No Iterations 1
    smoothSolver: Solving for Uy, Initial residual = 0.269258, Final residual = 0.0159666, No Iterations 1
    smoothSolver: Solving for Uz, Initial residual = 0.268454, Final residual = 0.0158458, No Iterations 1
    GAMG: Solving for p, Initial residual = 0.664514, Final residual = 0.0229514, No Iterations 2
    time step continuity errors : sum local = 0.12106, global = -0.10065, cumulative = -0.237957
    smoothSolver: Solving for epsilon, Initial residual = 0.000806739, Final residual = 4.3192e-05, No Iterations 1
    bounding epsilon, min: -1.64386 max: 107359 average: 1604.1
    smoothSolver: Solving for k, Initial residual = 0.539286, Final residual = 0.0410127, No Iterations 1
    ExecutionTime = 2 s ClockTime = 2 s

    Time = 3

    smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0649989, No Iterations 1
    smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0674377, No Iterations 1
    smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.0673479, No Iterations 1
    GAMG: Solving for p, Initial residual = 1, Final residual = 0.0220214, No Iterations 1
    time step continuity errors : sum local = 1.71491e+10, global = -9.66203e+08, cumulative = -9.66203e+08
    smoothSolver: Solving for epsilon, Initial residual = 1, Final residual = 0.0345457, No Iterations 1
    bounding epsilon, min: -1.87377e+12 max: 1.97955e+14 average: 6.17635e+09
    smoothSolver: Solving for k, Initial residual = 1, Final residual = 0.0129711, No Iterations 1
    bounding k, min: -2.41976e+12 max: 4.89268e+14 average: 2.084e+09
    ExecutionTime = 2.81 s ClockTime = 3 s

    Time = 4

    smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0898031, No Iterations 1
    smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0118301, No Iterations 2
    smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.0112913, No Iterations 2
    GAMG: Solving for p, Initial residual = 1, Final residual = 0.060471, No Iterations 1
    time step continuity errors : sum local = 3.56442e+31, global = -2.77809e+31, cumulative = -2.77809e+31
    smoothSolver: Solving for epsilon, Initial residual = 1, Final residual = 0.0482261, No Iterations 1
    bounding epsilon, min: -1.03962e+38 max: 2.18291e+44 average: 4.98766e+39
    smoothSolver: Solving for k, Initial residual = 1, Final residual = 0.0542227, No Iterations 1
    bounding k, min: -3.39289e+38 max: 3.21903e+43 average: 3.75844e+38
    ExecutionTime = 3.64 s ClockTime = 4 s

    Time = 5

    smoothSolver: Solving for Ux, Initial residual = 0.0287109, Final residual = 0.001542, No Iterations 1
    smoothSolver: Solving for Uy, Initial residual = 0.144423, Final residual = 0.00954402, No Iterations 1
    smoothSolver: Solving for Uz, Initial residual = 0.433321, Final residual = 0.0277849, No Iterations 1
    GAMG: Solving for p, Initial residual = 1, Final residual = 0.0486962, No Iterations 2
    time step continuity errors : sum local = 2.03485e+31, global = -1.68718e+31, cumulative = -4.46526e+31
    smoothSolver: Solving for epsilon, Initial residual = 0.231101, Final residual = 7.81927e-20, No Iterations 1
    bounding epsilon, min: -1.35263e+54 max: 7.64348e+68 average: 5.56648e+63
    smoothSolver: Solving for k, Initial residual = 5.32589e-05, Final residual = 3.69692e-06, No Iterations 1
    bounding k, min: -5.49262e+32 max: 1.76331e+67 average: 1.74095e+62
    ExecutionTime = 4.46 s ClockTime = 5 s

    Time = 6

    smoothSolver: Solving for Ux, Initial residual = 0.650411, Final residual = 0.0318278, No Iterations 1
    smoothSolver: Solving for Uy, Initial residual = 0.999998, Final residual = 0.0686249, No Iterations 1
    smoothSolver: Solving for Uz, Initial residual = 0.917954, Final residual = 0.0617064, No Iterations 1
    GAMG: Solving for p, Initial residual = 0.898171, Final residual = 0.0869347, No Iterations 1
    time step continuity errors : sum local = 1.21423e+76, global = -1.51166e+60, cumulative = -1.51166e+60
    smoothSolver: Solving for epsilon, Initial residual = 1, Final residual = 0.0408947, No Iterations 1
    bounding epsilon, min: -3.554e+119 max: 1.12694e+122 average: 2.99988e+116
    smoothSolver: Solving for k, Initial residual = 1, Final residual = 0.0514215, No Iterations 2
    bounding k, min: -1.71354e+107 max: 6.28718e+108 average: 2.82331e+103
    ExecutionTime = 5.28 s ClockTime = 5 s

    Time = 7

    smoothSolver: Solving for Ux, Initial residual = 1.23564e-11, Final residual = 1.23564e-11, No Iterations 0
    smoothSolver: Solving for Uy, Initial residual = 9.85541e-07, Final residual = 9.85541e-07, No Iterations 0
    smoothSolver: Solving for Uz, Initial residual = 1.02573e-31, Final residual = 1.02573e-31, No Iterations 0
    [2] [stack trace]
    [2] =============
    [2] #1 Foam::sigFpe::sigHandler(int) in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
    [2] #2 ? in /lib/x86_64-linux-gnu/libc.so.6
    [2] #3 Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
    [2] #4 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
    [2] #5 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
    [2] #6 Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so
    [2] #7 ? in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so
    [2] #8 Foam::fvMesh::solve(Foam::fvMatrix<double>&, Foam::dictionary const&) const in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so
    [2] #9 ? in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/bin/simpleFoam
    [2] #10 ? in /lib/x86_64-linux-gnu/libc.so.6
    [2] #11 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
    [2] #12 ? in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/bin/simpleFoam
    [2] =============
    [aryaman04-HP-ENVY-13:05006] *** Process received signal ***
    [aryaman04-HP-ENVY-13:05006] Signal: Floating point exception (8)
    [aryaman04-HP-ENVY-13:05006] Signal code: (-6)
    [aryaman04-HP-ENVY-13:05006] Failing at address: 0x3e80000138e
    [aryaman04-HP-ENVY-13:05006] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f9275042520]
    [aryaman04-HP-ENVY-13:05006] [ 1] /lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x12c)[0x7f92750969fc]
    [aryaman04-HP-ENVY-13:05006] [ 2] /lib/x86_64-linux-gnu/libc.so.6(raise+0x16)[0x7f9275042476]
    [aryaman04-HP-ENVY-13:05006] [ 3] /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f9275042520]
    [aryaman04-HP-ENVY-13:05006] [ 4] /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam10GAMGSolver5scaleERNS_5FieldIdEES3_RKNS_9lduMatrixERKNS_10FieldFieldIS1_dEERKNS_8UPtrListIKNS_17lduInterfaceFieldEEERKS2_h+0xb5)[0x7f9275c6eb65]
    [aryaman04-HP-ENVY-13:05006] [ 5] /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam10GAMGSolver6VcycleERKNS_7PtrListINS_9lduMatrix8smootherEEERNS_5FieldIdEERKS8_S9_S9_S9_S9_S9_RNS1_IS8_EESD_h+0x6d3)[0x7f9275c79e93]
    [aryaman04-HP-ENVY-13:05006] [ 6] /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam10GAMGSolver5solveERNS_5FieldIdEERKS2_h+0x47b)[0x7f9275c7af7b]
    [aryaman04-HP-ENVY-13:05006] [ 7] /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam8fvMatrixIdE15solveSegregatedERKNS_10dictionaryE+0x3e4)[0x7f9277b01e54]
    [aryaman04-HP-ENVY-13:05006] [ 8] /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(+0x4b0fe5)[0x7f92776b0fe5]
    [aryaman04-HP-ENVY-13:05006] [ 9] /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZNK4Foam6fvMesh5solveERNS_8fvMatrixIdEERKNS_10dictionaryE+0x28)[0x7f92776a0618]
    [aryaman04-HP-ENVY-13:05006] [10] simpleFoam(+0x19397)[0x558b5874b397]
    [aryaman04-HP-ENVY-13:05006] [11] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7f9275029d90]
    [aryaman04-HP-ENVY-13:05006] [12] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7f9275029e40]
    [aryaman04-HP-ENVY-13:05006] [13] simpleFoam(+0x1ce85)[0x558b5874ee85]
    [aryaman04-HP-ENVY-13:05006] *** End of error message ***
    ————————————————————————–
    Primary job terminated normally, but 1 process returned
    a non-zero exit code. Per user-direction, the job has been aborted.
    ————————————————————————–
    ————————————————————————–
    mpirun noticed that process rank 2 with PID 0 on node aryaman04-HP-ENVY-13 exited on signal 8 (Floating point exception).

    Please let me know how to solve this issue

  • Barış Bicer

    Moderator
    January 5, 2024 at 1:19 pm

    Hi Again,

    Sorry for late response due to christmas and new year holiday. I checked the error and it looks initial condition problem for k and epsilon. Can you paste here the k and epsilon files located /0 folder.

    For other option go to constant/turbulenceProperties file and change the RANS option to laminar and try. Let me know if it works or not.

    Looking forward to hearing from you soon.

    Best

    • SRIJNA

      Member
      January 7, 2024 at 4:24 pm

      I have attached the k and epsilon files here.

      I changed the RAS model to laminar and run it again. It is showing only selected 21 RAS model can be applied and laminar is not present in them. I have attached the turbulenceProperties file and corresponding error that i am getting while running it.

      Let me know how to solve it.

      Regards

      Srijna Singh

      • Barış Bicer

        Moderator
        January 7, 2024 at 6:39 pm

        Hi,

        You must change simulationType as laminar in the turbulentProperties. You changed wrong line.

        Correct it and try again please.

  • SRIJNA

    Member
    January 9, 2024 at 8:06 am

    Hi Baris

    I changed the simulationType from RAS to laminar and its working. Now i want to run it in k-epsilon after running 100 timesteps in laminar. An error is showing. Let me know how to fix this issue.

    Regards

    Srijna Singh

  • Barış Bicer

    Moderator
    January 10, 2024 at 10:14 pm

    Hi again,

    If you wanna switch to k-epsilon model, first reconstructPar -latestTime which will create /100 folder if your last iteration 100. Then delete all procossers : rm -r pro* . after you should copy k epsilon and nut files from 0 folder to latest time folder I think here it is 100. then simply run manual without any parallel attempt and let me know works or not?

Log in to reply.

error: Content is protected !!