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

Negative courant number

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By wyldckat
  • 3 Post By tomf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 3, 2015, 13:55
Default Negative courant number
  #1
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 18
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, 11 views)
samiam1000 is offline   Reply With Quote

Old   February 3, 2015, 15:01
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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, 06:03
Default
  #3
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 18
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, 12:29
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
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, agustinvo and Dosin like this.
tomf is offline   Reply With Quote

Old   February 5, 2015, 06:11
Default
  #5
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 18
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


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
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
[mesh manipulation] Mesh Refinement Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Meshing & Mesh Conversion 42 January 8, 2017 12:55
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 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 18:07


All times are GMT -4. The time now is 09:20.