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

SimpleFoam Stops Without Error Message

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By arjun
  • 1 Post By ARTisticCFD

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 8, 2017, 11:14
Default SimpleFoam Stops Without Error Message
  #1
New Member
 
Moe Alams
Join Date: May 2017
Posts: 13
Rep Power: 8
MoeCFD is on a distinguished road
Hello All,

I am trying to run simpleFoam. I created the mesh using SnappyHexMesh and and an stl file that I have. It is 3D problem with one inlet and one outlet, below are the boundary conditions that I am using and the simulation settings.

SimpleFoam stops without an error message. I provided simpleFoam output below as well. Any idea why this is happening?

For pressure:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{

    fixedWalls_patch20083
    {
        type            zeroGradient;
    }

    left
    {
        type            fixedValue;
		value			uniform 1e-3;
    }

    right
    {
        type            fixedValue;
		value			uniform 0;
    }

    bottom
    {
        type            zeroGradient;
    }

    top
    {
        type            zeroGradient;
    }

    frontAndBack
    {
        type            zeroGradient;
    }
}

For velocity

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{

    fixedWalls_patch20083
    {
        type            fixedValue;
		value			uniform (0 0 0);
    }

    left
    {
        type            zeroGradient;
    }
    right
    {
        type            zeroGradient;
    }
    bottom
    {
        type            fixedValue;
		value			uniform (0 0 0);
    }
    top
    {
        type            fixedValue;
		value			uniform (0 0 0);
    }
    frontAndBack
    {
        type            fixedValue;
		value			uniform (0 0 0);
    }
}
Here is my fvSolution:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers 
{

    p
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-07;
        relTol          0.1;
    }

    U
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-07;
        relTol          0;
    }

}



/*
    U
    {
        solver           smoothSolver;
        smoother         GaussSeidel;
        tolerance        1e-12;
        relTol           0;
        nSweeps          1;
    }

    p
    {
        solver           GAMG;
        tolerance        1e-9;
        relTol           0.1;
        smoother         GaussSeidel;
        nPreSweeps       0;
        nPostSweeps      2;
        cacheAgglomeration on;
        agglomerator     faceAreaPair;
        nCellsInCoarsestLevel 10;
        mergeLevels      1;
    }
*/



SIMPLE
{
    nNonOrthogonalCorrectors 0;

    residualControl
    {
        p               1e-6;
        U               1e-6;
    }

	pRefCell 0;
	pRefValue 0;
}

relaxationFactors
{
    p               0.15;
    U               0.9;
}



// ************************************************************************* //
When I run the command SimpleFoam to start the simulation based on the inputs shown above, I get the following (see below)
which doesn't show me what went wrong with the simulation. Is it something with the way I defined the boundary conditions or simulation settings?

On a separate note, I am running the simulation in serial for now. However, I created the Mesh by running SnappyHexMesh in parallel then used reconstruct to put it together.


Code:
Build  : 4.1
Exec   : simpleFoam
Date   : Jul 07 2017
Time   : 21:57:43
Host   : 
PID    : 592
Case   : 
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0


SIMPLE: convergence criteria
    field p      tolerance 1e-06
    field U      tolerance 1e-06

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
No MRF models present

No finite volume options present


Starting time loop

Time = 1

DILUPBiCG:  Solving for Ux, Initial residual = 0.219962, Final residual = 2.60365e-08, No Iterations 10
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 4.89906e-08, No Iterations 11
DILUPBiCG:  Solving for Uz, Initial residual = 0.143777, Final residual = 9.97743e-08, No Iterations 9
moe@DESKTOP:/example$
MoeCFD is offline   Reply With Quote

Old   July 8, 2017, 16:28
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Your endTime (settings in system/controlDict) is 1?
alexeym is offline   Reply With Quote

Old   July 9, 2017, 11:44
Default
  #3
New Member
 
Moe Alams
Join Date: May 2017
Posts: 13
Rep Power: 8
MoeCFD is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

Your endTime (settings in system/controlDict) is 1?
Hi Alexeym,

Thank you for your reply. Here is the controlDict settings. I have it at 1000

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     simpleFoam;

startFrom       latestTime;

startTime       0.0;

stopAt          endTime;

endTime         1000.0;

deltaT          1;

writeControl    runTime;

writeInterval   1000;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression uncompressed;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;
MoeCFD is offline   Reply With Quote

Old   July 9, 2017, 12:17
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
I missed the fact, that simpleFoam exits just after momentum predictor, so the problem is somewhere in your environment or installation. simpleFoam tutorial cases run without problems? What is mesh size? How OpenFOAM was installed?
alexeym is offline   Reply With Quote

Old   July 9, 2017, 12:42
Default
  #5
New Member
 
Moe Alams
Join Date: May 2017
Posts: 13
Rep Power: 8
MoeCFD is on a distinguished road
Alexey - The tutorials were ran without issues. In regard to the installation, I followed the instructions from OpenFOAM.org.

In regard to the mesh, I had an stl file of a porous network. I used blockMesh to create a background and then SnappyHexMesh to eliminate the non porous region. Below are the mesh information:

x - length = 0.085 m (no of mesh =88) thus cell length = 0.000967 m
y - length = 0.2029 m (no of mesh =215) thus cell length = 0.000967 m
z - length = 0.081 m (no of mesh =84) thus cell length = 0.000967 m

The geometry represents a cube where the flow is along the y direction.
Along the y axis we have an inlet to the left, and outlet to the right. Then for the other 4 faces, we have top, bottom, and frontAndBack





Here, I ran the help on simpleFoam just to check if SimpleFoam is Ok.

moe@6:/example$ simpleFoam -help

Usage: simpleFoam [OPTIONS]
options:
-case <dir> specify alternate case directory, default is the cwd
-noFunctionObjects
do not execute functionObjects
-parallel run in parallel
-postProcess Execute functionObjects only
-roots <(dir1 .. dirN)>
slave root directories for distributed running
-srcDoc display source code in browser
-doc display application documentation in browser
-help print the usage

Using: OpenFOAM-4.1 (see www.OpenFOAM.org)
Build: 4.1
MoeCFD is offline   Reply With Quote

Old   July 9, 2017, 15:44
Default
  #6
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Could you also post checkMesh output? Or maybe if you case is not under NDA, you can post whole case? So (a) the error could be reproduced, (b) the real origin of the error could be found and reported upstream.
alexeym is offline   Reply With Quote

Old   July 9, 2017, 16:20
Default
  #7
New Member
 
Moe Alams
Join Date: May 2017
Posts: 13
Rep Power: 8
MoeCFD is on a distinguished road
Alexey,

Again thank you for you patience and will to help. Below is the output of the checkMesh

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 4.1
Exec   : checkMesh
Date   : Jul 09 2017
Time   : 15:16:51
Host   : 
PID    : 237
Case   : 
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           171862
    faces:            447817
    internal faces:   383810
    cells:            146412
    faces per cell:   5.68005
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     115422
    prisms:        8106
    wedges:        0
    pyramids:      0
    tet wedges:    2277
    tetrahedra:    4
    polyhedra:     20603
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            4   13574
            5   7029

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
   *Number of regions: 5
    The mesh has multiple regions which are not connected by any face.
  <<Writing region information to "0/cellToRegion"
  <<Writing region 0 with 146408 cells to cellSet region0
  <<Writing region 1 with 1 cells to cellSet region1
  <<Writing region 2 with 1 cells to cellSet region2
  <<Writing region 3 with 1 cells to cellSet region3
  <<Writing region 4 with 1 cells to cellSet region4

Checking patch topology for multiply connected surfaces...
                   Patch    Faces   Points                  Surface topology
            frontAndBack     2644     3118  ok (non-closed singly connected)
                    left      707      825  ok (non-closed singly connected)
                   right      717      848  ok (non-closed singly connected)
                  bottom      866     1078  ok (non-closed singly connected)
                     top     1054     1298  ok (non-closed singly connected)
    fixedWalls_patch20083    58019    72015  ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (0.0663932 0.0736 0.235492) (0.151514 0.2765 0.316507)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (-6.14891e-17 7.68427e-18 1.80846e-17) OK.
    Max cell openness = 3.85128e-16 OK.
    Max aspect ratio = 5.61657 OK.
    Minimum face area = 5.01235e-09. Maximum face area = 3.59669e-06.  Face area magnitudes OK.
    Min volume = 8.71886e-13. Max volume = 2.35087e-09.  Total volume = 0.000128431.  Cell volumes OK.
    Mesh non-orthogonality Max: 54.2248 average: 10.454
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 2.26928 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
MoeCFD is offline   Reply With Quote

Old   September 11, 2019, 07:42
Default
  #8
New Member
 
Arne
Join Date: Dec 2018
Posts: 19
Rep Power: 7
arsimons is on a distinguished road
Hi fellow Foamers


I recently had a similar problem. In my case, it was due to a dynamic mesh. I had a rotating object which I placed in an AMI. However, I initially did not know that the AMI would be rotating as well so the axis of rotation did not go through the center of the AMI. In my case, this also caused a sudden stop without any error-message.

After I changed the axis to the center of the (cylindrical) AMI, everything worked fine.


Hope this might help someone.


Best regards
Arne Simons
arsimons is offline   Reply With Quote

Old   September 11, 2019, 17:46
Default
  #9
New Member
 
Aashay Tinaikar
Join Date: May 2019
Location: Boston
Posts: 19
Rep Power: 6
ARTisticCFD is on a distinguished road
Hello Moe and Arne,


You might have to understand that simpleFoam is a steady state solver. As far as I have known, all steady state solvers will exit once the convergence is achieved, i.e once the residuals are small enough and do not change much with each iteration.

If you can see in the original post, the convergence criteria for simpleFoam in fvSolution was 10e-6 for both U and p. The residual after 1st itertation was in the range of e-8 << convergence criteria. Hence the solver assumes that the steadystate has been reached and there is no need to compute further. Therefore it stops.

This is surely not a bug/or due to some errors. Hence there is no error in the output. The steady state has been reached well before your endTime.

This is not the case for transient solver. It will continue to compute in time.

Hope this helps
ARTisticCFD is offline   Reply With Quote

Old   September 12, 2019, 03:23
Default
  #10
New Member
 
Arne
Join Date: Dec 2018
Posts: 19
Rep Power: 7
arsimons is on a distinguished road
Quote:
Originally Posted by ARTisticCFD View Post
Hello Moe and Arne,


You might have to understand that simpleFoam is a steady state solver. As far as I have known, all steady state solvers will exit once the convergence is achieved, i.e once the residuals are small enough and do not change much with each iteration.

If you can see in the original post, the convergence criteria for simpleFoam in fvSolution was 10e-6 for both U and p. The residual after 1st itertation was in the range of e-8 << convergence criteria. Hence the solver assumes that the steadystate has been reached and there is no need to compute further. Therefore it stops.

This is surely not a bug/or due to some errors. Hence there is no error in the output. The steady state has been reached well before your endTime.

This is not the case for transient solver. It will continue to compute in time.

Hope this helps

Hi ARTisticCFD

Thank you for your reply. In my case, the problem occurred with a transient solver (interFoam) and resulted in a stop without mentioning 'end' or any error.

I am just wondering, shouldn't a steady state solver give and 'end' if the convergence is achieved before the endTime?

Best regards
Arne
arsimons is offline   Reply With Quote

Old   September 12, 2019, 04:31
Default
  #11
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by arsimons View Post
Hi ARTisticCFD

Thank you for your reply. In my case, the problem occurred with a transient solver (interFoam) and resulted in a stop without mentioning 'end' or any error.

I am just wondering, shouldn't a steady state solver give and 'end' if the convergence is achieved before the endTime?

Best regards
Arne



I have mentioned this few times before but people ignore it and move on to find other explanations.


I have observed this problem with my solver Wildkatze and saw that operating system killed the process without warning.



For it typically it happens when i switch off the internet or i switch off some other big process. In the book keeping the operating system (ubuntu and mint) are killing some processes that they shall not be killing.



I suspect this is what is happening with you.



PS: I did not observe it with ubuntu 14. Ubuntu 16 was terrible and now with latest version it happens but not as much as it happened with ubuntu 16.
ARTisticCFD likes this.
arjun is offline   Reply With Quote

Old   September 12, 2019, 09:31
Default
  #12
New Member
 
Aashay Tinaikar
Join Date: May 2019
Location: Boston
Posts: 19
Rep Power: 6
ARTisticCFD is on a distinguished road
Quote:
Originally Posted by arjun View Post
I have mentioned this few times before but people ignore it and move on to find other explanations.


I have observed this problem with my solver Wildkatze and saw that operating system killed the process without warning.



For it typically it happens when i switch off the internet or i switch off some other big process. In the book keeping the operating system (ubuntu and mint) are killing some processes that they shall not be killing.



I suspect this is what is happening with you.



PS: I did not observe it with ubuntu 14. Ubuntu 16 was terrible and now with latest version it happens but not as much as it happened with ubuntu 16.

Yes, both of you are right.

It should show an end statement even if it converges before the end time. If it doesn't there could be other reasons.


I agree with Arjun , I have observed this behavior couple of times on ubuntu 18.04 as well. This could well be the reason for termination of your solver. Unfortunately, I have not found any reason for its termination though.

PS. For me, it happened very seldomly and in that case, I just ran it again. If it is getting terminated at each run, then the problem might be a little different.
arjun likes this.
ARTisticCFD is offline   Reply With Quote

Old   July 20, 2022, 05:49
Default
  #13
Member
 
Wolfram Schneider
Join Date: Jan 2018
Location: Germany
Posts: 57
Rep Power: 8
Wolfram is on a distinguished road
I recently faced the same issue and searched the entire forum for any hints. It seems like there is no specific reason for this behaviour.

In my case a refined mesh at the boundaries solved this issue. Apart from that the entire setup remained the same.
Wolfram is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
interFoam vs. simpleFoam channel flow comparison DanM OpenFOAM Running, Solving & CFD 12 January 31, 2020 15:26
simpleFoam parallel solver & Fluent polyhedral mesh Zlatko OpenFOAM Running, Solving & CFD 3 September 26, 2014 06:53
Laminar simpleFoam and inviscid simpleFoam herenger OpenFOAM Running, Solving & CFD 7 July 11, 2013 06:27
Trying to run a benchmark case with simpleFoam spsb OpenFOAM 3 February 24, 2012 09:07
HELP PLS: Simplefoam manipulated to add diffusive mass transport...but solver stops!! 1gn0rant OpenFOAM Running, Solving & CFD 1 August 13, 2010 11:02


All times are GMT -4. The time now is 13:11.