CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

What is causing this simpleFoam floating point exception?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 10, 2013, 02:30
Default What is causing this simpleFoam floating point exception?
  #1
New Member
 
Stephen Bosch
Join Date: Feb 2013
Location: Germany
Posts: 22
Rep Power: 4
pajot is on a distinguished road
I am using the turbineSiting tutorial as a template for a simulation using real complex terrain, but using my own geometry.

When I run Allrun, it terminates without showing me any errors, but the simulation is not complete: the time step folders are missing or present but empty.

The logs have numerous errors. I've attached log.simpleFoam and 0.org/U. I am using the same filename for the terrain file, terrain.stl. Beyond that I have commented out the searchableBox fields in snappyHexMeshDict.
Attached Files
File Type: txt log.simpleFoam.txt (8.3 KB, 12 views)
File Type: txt U.txt (1.8 KB, 5 views)
pajot is offline   Reply With Quote

Old   September 10, 2013, 05:48
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,110
Rep Power: 19
alexeym will become famous soon enoughalexeym will become famous soon enough
Can you also post you case files? From log it is clear that atmBoundaryLayerInletVelocity doesn't like your IC or BC setup. But it's rather difficult to figure out the real problem.
alexeym is offline   Reply With Quote

Old   September 10, 2013, 13:54
Default
  #3
New Member
 
Stephen Bosch
Join Date: Feb 2013
Location: Germany
Posts: 22
Rep Power: 4
pajot is on a distinguished road
Hi, Alexey. The case has many files, and the whole case is 5.8 MB compressed. Which ones do you need to see?

I've attached files from 0.org and system...
Attached Files
File Type: zip case.zip (14.3 KB, 11 views)
pajot is offline   Reply With Quote

Old   September 10, 2013, 15:26
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,110
Rep Power: 19
alexeym will become famous soon enoughalexeym will become famous soon enough
According to the line from log.simpleFoam

Code:
[2] #3  log in "/lib64/libm.so.6"
there is a problem with log function call (negative or too large argument value). In atmBoundaryLayerInletVelocity constructor there are two calls to log function:

Code:
    forAll (Ustar_, i)
    {
        Ustar_[i] = kappa_*Uref_/(log((Href_  + z0_[i])/max(z0_[i] , 0.001)));
    }
and

Code:
    forAll(coord, i)
    {
        if ((coord[i] - zGround_[i]) < Href_)
        {
            Un[i] =
                (Ustar_[i]/kappa_)
              * log((coord[i] - zGround_[i] + z0_[i])/max(z0_[i], 0.001));
        }
        else
        {
            Un[i] = Uref_;
        }
    }
and I think coord[i] - zGround_[i] + z0_[i] is negative in certain faces (maybe all of them) of inlet boundary. As coord[i] depends on the mesh you should check the mesh or change zGround value.
alexeym is offline   Reply With Quote

Old   September 10, 2013, 16:19
Default
  #5
New Member
 
Stephen Bosch
Join Date: Feb 2013
Location: Germany
Posts: 22
Rep Power: 4
pajot is on a distinguished road
Thanks for this, I had difficulty interpreting the stack trace, I don't have any experience with C++.

I just read somewhere that the terrain file must exceed the boundary file in area. In fact, I sized the boundary to the exact size of the terrain file. Could that be a cause of this error?

The mesh itself checks out (output attached).

zGround is assigned from a variable in U. Where is it defined? EDIT: I see it's in ABLConditions -- sure enough, zGround exceeds my Z axis height by five metres. This was a value I just took over from the existing tutorial.
Attached Files
File Type: txt checkMesh.txt (2.9 KB, 2 views)
pajot is offline   Reply With Quote

Old   September 10, 2013, 17:04
Default
  #6
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,110
Rep Power: 19
alexeym will become famous soon enoughalexeym will become famous soon enough
Quote:
Originally Posted by pajot View Post
zGround is assigned from a variable in U. Where is it defined?
zGround comes from 0.org/include/ABLConditions and it is equal to 935.0. coords scalar field is defines as patch().Cf() & z. In your case (also ABLConditions) z = (0 0 1), coords is simple z coordinates of the patch face centres. Href is 20, z0 is 0.1, so Href_ + z0_[i] is 20.1 all over the patch and log((Href_ + z0_[i])/max(z0_[i] , 0.001)) is well defined. Finally coord[i] - zGround_[i] + z0_[i] can be negative if coord[i] will go below 935.

And as checkMesh showed

Code:
Overall domain bounding box (0 0 0) (38850 27450 900)
I guess coord[i] - zGround_[i] + z0_[i] can go below zero.
alexeym is offline   Reply With Quote

Old   September 10, 2013, 17:19
Default
  #7
New Member
 
Stephen Bosch
Join Date: Feb 2013
Location: Germany
Posts: 22
Rep Power: 4
pajot is on a distinguished road
The Z-height in blockMeshDict is 930. zGround had been set to 935. I just changed it to 925 and then to 600, but I still get the same error.
pajot is offline   Reply With Quote

Old   September 10, 2013, 17:28
Default
  #8
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,110
Rep Power: 19
alexeym will become famous soon enoughalexeym will become famous soon enough
Quote:
Originally Posted by pajot View Post
The Z-height in blockMeshDict is 930. zGround had been set to 935. I just changed it to 925 and then to 600, but I still get the same error.
Well, if the lowest value of z coordinate of the inlet patch is 0, you can set zGround to 100 and you will get the same error

I guess to see the mesh I need only blockMeshDict and terrain.stl, are they really so large?
alexeym is offline   Reply With Quote

Old   September 10, 2013, 17:35
Default
  #9
New Member
 
Stephen Bosch
Join Date: Feb 2013
Location: Germany
Posts: 22
Rep Power: 4
pajot is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Well, if the lowest value of z coordinate of the inlet patch is 0, you can set zGround to 100 and you will get the same error

I guess to see the mesh I need only blockMeshDict and terrain.stl, are they really so large?
Of course you are right about even 100 being too large I sent that message before I had seen your reply, sorry.

blockMeshDict is small, but the terrain.stl file is 3.4 MB compressed. Let me see if there is a way I could get it to you. E-mail? In the meantime, here is blockMeshDict:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version         2.0;
    format          ascii;
    class           dictionary;
    object          blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
    (     0      0      0 )
    ( 38850      0      0 )
    ( 38850  27450      0 )
    (     0  27450      0 )
    (     0      0    900 )
    ( 38850      0    900 )
    ( 38850  27450    900 )
    (     0  27450    900 )
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (30 30 20) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    outlet
    {
        type patch;
        faces
        (
            (2 6 5 1)
        );
    }
    sides
    {
        type patch;
        faces
        (
            (1 5 4 0)
            (3 7 6 2)
        );
    }
    inlet
    {
        type patch;
        faces
        (
            (0 4 7 3)
        );
    }
    ground
    {
        type wall;
        faces
        (
            (0 3 2 1)
        );
    }
    top
    {
        type patch;
        faces
        (
            (4 5 6 7)
        );
    }
);

mergePatchPairs
(
);


// ************************************************************************* //
pajot is offline   Reply With Quote

Old   September 10, 2013, 17:46
Default
  #10
New Member
 
Stephen Bosch
Join Date: Feb 2013
Location: Germany
Posts: 22
Rep Power: 4
pajot is on a distinguished road
Okay, you can get the terrain file here. It is rar compressed. Do you have a rar archiver?
pajot is offline   Reply With Quote

Old   September 10, 2013, 17:55
Default
  #11
New Member
 
Stephen Bosch
Join Date: Feb 2013
Location: Germany
Posts: 22
Rep Power: 4
pajot is on a distinguished road
I set zGround to 0 and the error is gone (hurra), however the simulation still fails with a different error:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.2.1-57f3c3617a2d
Exec   : simpleFoam -parallel
Date   : Sep 10 2013
Time   : 23:47:47
Host   : "machine"
PID    : 3289
Case   : /home/user/OpenFOAM/Spessart
nProcs : 4
Slaves : 
3
(
"machine.3290"
"machine.3291"
"machine.3292"
)

Pstream initialized with:
    floatTransfer      : 0
    nProcsSimpleSum    : 0
    commsType          : nonBlocking
    polling iterations : 0
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model kEpsilon
bounding k, min: 0 max: 1.3 average: 1.3
bounding epsilon, min: 0 max: 0.0498677166159 average: 0.01
kEpsilonCoeffs
{
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              -0.33;
    sigmak          1;
    sigmaEps        1.11;
    Prt             1;
}

Creating fintite volume options from fvOptions

Selecting finite volume options model type actuationDiskSource
    Source: disk1
    - applying source for all time
    - selecting cells using cellSet actuationDisk1
    - selected 0 cell(s) with volume 0

    - creating actuation disk zone: disk1
[0] [1] 
[1] 
[1] --> FOAM FATAL IO ERROR: 
[1] 
[1] 
[1] file: unknown
[1] 
FOAM parallel run exiting
[1] 

[0] 
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 1 in communicator MPI_COMM_WORLD 
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
[0] --> FOAM FATAL IO ERROR: 
[0] 
[0] 
[0] file: unknown
[0] 
FOAM parallel run exiting
[0] 
[2] 
[2] 
[2] --> FOAM FATAL IO ERROR: 
[2] 
[2] 
[2] file: unknown
[2] 
FOAM parallel run exiting
[2] 
[3] 
[3] 
[3] --> FOAM FATAL IO ERROR: 
[3] 
[3] 
[3] file: unknown
[3] 
FOAM parallel run exiting
[3] 
--------------------------------------------------------------------------
mpirun has exited due to process rank 2 with PID 3291 on
node machine exiting without calling "finalize". This may
have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------
[machine:03287] 3 more processes have sent help message help-mpi-api.txt / mpi-abort
[machine:03287] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
I suspect the actuation disks (which I don't need) are not correctly placed for this geometry... I still have a lot to learn about setting up OpenFOAM cases
pajot is offline   Reply With Quote

Old   September 10, 2013, 17:59
Default
  #12
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,110
Rep Power: 19
alexeym will become famous soon enoughalexeym will become famous soon enough
Quote:
Originally Posted by pajot View Post
Okay, you can get the terrain file here. It is rar compressed. Do you have a rar archiver?
I've got the file.

Maybe something is wrong with my OpenFOAM installation but snappyHexMesh wasn't able to produce good quality mesh (it wasn't able to remove all severely non-orthogonal faces). Or maybe I missed some essential steps for generation of the mesh (I've done just blockMesh && snappyHexMesh).

After generation of the mesh I've checked Z-range of the inlet patch and it is 112-900. So I guess zGround should be lower than 112.
alexeym is offline   Reply With Quote

Old   September 10, 2013, 18:16
Default
  #13
New Member
 
Stephen Bosch
Join Date: Feb 2013
Location: Germany
Posts: 22
Rep Power: 4
pajot is on a distinguished road
Great, thank you! As I mentioned, the error goes away when I set zGround to 0. How did you determine the z-extents?

Did you run snappyHexMesh with the -overwrite option? That's how I did it.

I commented out the actuation disks in fvOptions, and now simpleFoam is running! This mesh and terrain file is turning out to be much more complex than I anticipated, I have no idea how long it will take to process... it might be hours, but hopefully not more than one or two. It may still produce a useless result, even if it works now.

Is there any way I can simplify it to make it run more efficiently without sacrificing a lot of resolution?
pajot is offline   Reply With Quote

Old   September 10, 2013, 18:23
Default
  #14
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,110
Rep Power: 19
alexeym will become famous soon enoughalexeym will become famous soon enough
Quote:
Originally Posted by pajot View Post
Selecting finite volume options model type actuationDiskSource
Source: disk1
- applying source for all time
- selecting cells using cellSet actuationDisk1
- selected 0 cell(s) with volume 0

- creating actuation disk zone: disk1
[0] [1]
[1]
[1] --> FOAM FATAL IO ERROR:
[1]
[1]
[1] file: unknown
[1]
FOAM parallel run exiting
[1]
This means that topoSet wasn't able to create actuation disk zone (or you've forgotten to run topoSet before running simpleFoam). One of the reasons can be the definitions from tutorial (system/topoSetDict -> (box (581850.5 4785805 1061) (581850.8 4785815 1071)) are outside of your new domain. And I guess they are as your mesh is much lower that the one used in tutorial case.

Concerning accelerating (I guess that's what you've meant with "run more efficiently") for the first coarse run you can try to play with residuals in fvSolution so the solvers will think they are converged more quickly. Though this can lead to diverging solution. Can't propose any other suggestions right now
alexeym is offline   Reply With Quote

Old   September 10, 2013, 18:37
Default
  #15
New Member
 
Stephen Bosch
Join Date: Feb 2013
Location: Germany
Posts: 22
Rep Power: 4
pajot is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Concerning accelerating (I guess that's what you've meant with "run more efficiently") for the first coarse run you can try to play with residuals in fvSolution so the solvers will think they are converged more quickly. Though this can lead to diverging solution. Can't propose any other suggestions right now
Hooray! It's already completed! Thanks for all your help, Alexey, I am extremely grateful! I wouldn't have made it this far without it.
pajot is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Floating point exception with pimpleDyMFoam ebah6 OpenFOAM Running, Solving & CFD 8 May 13, 2013 09:01
Floating point exception error Alan OpenFOAM Running, Solving & CFD 10 April 6, 2012 14:02
simpleFoam Floating point exception error -help sudhasran OpenFOAM Running, Solving & CFD 3 March 12, 2012 17:23
Pipe flow in settlingFoam floating point exception jochemvandenbosch OpenFOAM Running, Solving & CFD 4 February 16, 2012 04:24
block-structured mesh for t-junction Robert@cfd ANSYS Meshing & Geometry 20 November 11, 2011 05:59


All times are GMT -4. The time now is 19:50.