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

Negative courant number

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

Like Tree3Likes
  • 1 Post By wyldckat
  • 2 Post By tomf

Reply
 
LinkBack Thread Tools Display Modes
Old   February 3, 2015, 14:55
Default Negative courant number
  #1
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
Dear All,

I am running a simulation using pimplefoam and something strange happens: I get a negativa courant number, from the very first iteration.

Code:
Create time

Create mesh for time = 0

Reading field p

Reading field U

--> FOAM Warning : 
    From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
    in file /home/szampini/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/Field.C at line 318
    Reading "/home/szampini/Documenti/Afros/CFDSimulations/testRTM/0/U.boundaryField.inlet" from line 29 to line 9
    expected keyword 'uniform' or 'nonuniform', assuming deprecated Field format from Foam version 2.0.
Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
No finite volume options present


PIMPLE: Operating solver in PISO mode


Starting time loop

Courant Number mean: -1.68919e-06 max: -0
deltaT = 0.000111111
Time = 0.000111111

smoothSolver:  Solving for Ux, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.0219292, No Iterations 1000
smoothSolver:  Solving for Uz, Initial
And after few iteration the courant number becomes smaller and smaller (negative and bigger in magnitude) and the simulation diverges.

Could you have a look at the attached case?

Thanks a lot,
Samuele
Attached Files
File Type: gz testRTM.tar.gz (9.3 KB, 6 views)
samiam1000 is offline   Reply With Quote

Old   February 3, 2015, 16:01
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Quick answer: Incorrect usage of a transient solver, see file "system/fvSchemes":
Code:
ddtSchemes
{
    default         steadyState;
}
This is why the Courant Number cannot evolve over time, since there is no such thing as "time" in a steady state solver
samiam1000 likes this.
wyldckat is offline   Reply With Quote

Old   February 4, 2015, 07:03
Default
  #3
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
This was for sure an error, but not the only one. I changed the time scheme, but nothing happened.

Any other idea?

Thanks,
Samuele
samiam1000 is offline   Reply With Quote

Old   February 4, 2015, 13:29
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Delft, Netherlands
Posts: 224
Rep Power: 10
tomf is on a distinguished road
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi Samuele,

I ran your Allrun script except for the pimpleFoam part and after that I ran checkMesh.

During blockMesh there is already a warning for negative volumes, which is later confirmed by checkMesh output. I copied that output for you here:

Code:
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           452403
    faces:            1041592
    internal faces:   734408
    cells:            296000
    faces per cell:   6
    boundary patches: 5
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     296000
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

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 18000 cells to cellSet region0
  <<Writing region 1 with 30000 cells to cellSet region1
  <<Writing region 2 with 200000 cells to cellSet region2
  <<Writing region 3 with 30000 cells to cellSet region3
  <<Writing region 4 with 18000 cells to cellSet region4

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology                  
    outlet1             592      903      ok (non-closed singly connected)  
    outlet2             592      903      ok (non-closed singly connected)  
    top                 101900   103626   ok (non-closed singly connected)  
    walls               204000   205911   ok (non-closed singly connected)  
    inlet               100      121      ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-0.12 0 -0.25) (0.12 0.03 0.25)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (8.43768e-19 1.05278e-17 -3.86038e-20) OK.
 ***High aspect ratio cells found, Max aspect ratio: 1e+194, number of cells 296000
  <<Writing 296000 cells with high aspect ratio to set highAspectRatioCells
    Minimum face area = 1e-06. Maximum face area = 1e-06.  Face area magnitudes OK.
 ***Zero or negative cell volume detected.  Minimum negative volume: -1e-09, Number of negative volume cells: 296000
  <<Writing 296000 zero volume cells to set zeroVolumeCells
    Mesh non-orthogonality Max: 180 average: 180
 ***Number of non-orthogonality errors: 734408.
  <<Writing 734408 non-orthogonal faces to set nonOrthoFaces
 ***Error in face pyramids: 1776000 faces are incorrectly oriented.
  <<Writing 1041592 faces with incorrect orientation to set wrongOrientedFaces
    Max skewness = 2.5e-06 OK.
    Coupled point location match (average 0) OK.

Failed 4 mesh checks.

End
So it tells you it finds negative volumes, which would explain a negative courant number.

Please check your blockMesh setup and make sure you have a valid mesh before running pimpleFoam.

Regards,
Tom
samiam1000 and Dosin like this.
tomf is offline   Reply With Quote

Old   February 5, 2015, 07:11
Default
  #5
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
Got it: solved!

Thanks a lot,
Samuele.

This was a problem in the blockMeshDict!

Samuele
samiam1000 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
Mesh Refinement Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Mesh Utilities 41 January 17, 2013 03:43
AMI speed performance danny123 OpenFOAM 19 October 24, 2012 07:44
BlockMeshmergePatchPairs hjasak OpenFOAM Native Meshers: blockMesh 11 August 15, 2008 07:36
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


All times are GMT -4. The time now is 08:41.