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

Courant number blowing up, non-orthogonal mesh?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 21, 2013, 05:14
Default Courant number blowing up, non-orthogonal mesh?
  #1
Member
 
Olie
Join Date: Oct 2013
Posts: 51
Rep Power: 13
odellar is on a distinguished road
Hi,

I'm trying to run a case I created with a backward facing step geometry, using the k-epsilon turbulence model, RAS solver. I've created the mesh and when I run blockMesh it creates the mesh (which when I view in ParaView looks correct) but gives some warnings:
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Creating block mesh from
    "/home/olie/OpenFOAM/olie-2.2.1/run/tutorials/incompressible/pisoFoam/ras/bfstep/constant/polyMesh/blockMeshDict"
Creating curved edges
Creating topology blocks
Creating topology patches

Creating block mesh topology
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -0.666667 for face 0
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -0.666667 for face 1
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -0.666667 for face 2
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -0.666667 for face 3
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -0.666667 for face 4
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -0.666667 for face 5
--> FOAM Warning : 
    From function blockMesh::createTopology(IOdictionary&)
    in file blockMesh/blockMeshTopology.C at line 255
    negative volume block : 0, probably defined inside-out
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -2.66667 for face 0
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -2.66667 for face 1
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -2.66667 for face 2
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -2.66667 for face 3
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -2.66667 for face 4
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -2.66667 for face 5
--> FOAM Warning : 
    From function blockMesh::createTopology(IOdictionary&)
    in file blockMesh/blockMeshTopology.C at line 255
    negative volume block : 1, probably defined inside-out
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -2.66667 for face 0
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -2.66667 for face 1
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -2.66667 for face 2
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -2.66667 for face 3
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -2.66667 for face 4
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -2.66667 for face 5
--> FOAM Warning : 
    From function blockMesh::createTopology(IOdictionary&)
    in file blockMesh/blockMeshTopology.C at line 255
    negative volume block : 2, probably defined inside-out

Check topology

    Basic statistics
        Number of internal faces : 2
        Number of boundary faces : 14
        Number of defined boundary faces : 14
        Number of undefined boundary faces : 0
    Checking patch -> block consistency

Creating block offsets
Creating merge list .

Creating polyMesh from blockMesh
Creating patches
Creating cells
Creating points with scale 1

Writing polyMesh
----------------
Mesh Information
----------------
  boundingBox: (0 -2 0) (10 2 1)
  nPoints: 1942
  nCells: 900
  nFaces: 3670
  nInternalFaces: 1730
----------------
Patches
----------------
  patch 0 (start: 1730 size: 10) name: inlet
  patch 1 (start: 1740 size: 20) name: outlet
  patch 2 (start: 1760 size: 110) name: fixedWalls
  patch 3 (start: 1870 size: 1800) name: frontAndBack

End
When I then run pisoFoam it fails and says:

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
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 turbulence model type RASModel
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    sigmaEps        1.3;
}


Starting time loop

Time = 0.001

Courant Number mean: 1.66667e+295 max: 1.5e+297
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  void Foam::fvc::surfaceIntegrate<Foam::Vector<double> >(Foam::Field<Foam::Vector<double> >&, Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#4  Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::surfaceIntegrate<Foam::Vector<double> >(Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#5   at gaussDivSchemes.C:0
#6  Foam::fv::gaussDivScheme<Foam::Tensor<double> >::fvcDiv(Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#7  Foam::tmp<Foam::GeometricField<Foam::innerProduct<Foam::Vector<double>, Foam::Tensor<double> >::type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::div<Foam::Tensor<double> >(Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libincompressibleTurbulenceModel.so"
#8  Foam::incompressible::RASModels::kEpsilon::divDevReff(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&) const in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#9  
 in "/opt/openfoam221/platforms/linux64GccDPOpt/bin/pisoFoam"
#10  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11  
 in "/opt/openfoam221/platforms/linux64GccDPOpt/bin/pisoFoam"
Floating point exception (core dumped)
So the Courant number blows up immediately. I don't think it's an issue with my choice of time step, I've been very careful to choose it to satisfy Co<1.

I'd be very grateful if someone could help me out!

Thanks,
Olie
odellar is offline   Reply With Quote

Old   October 22, 2013, 11:43
Default
  #2
Member
 
Eric Robertson
Join Date: Jul 2012
Posts: 95
Rep Power: 15
msuaeronautics is on a distinguished road
You need to re-mesh. Seems like you have some mesh quality issues- most specifically, inside-out cells.
msuaeronautics is offline   Reply With Quote

Old   October 22, 2013, 15:22
Default
  #3
Member
 
Olie
Join Date: Oct 2013
Posts: 51
Rep Power: 13
odellar is on a distinguished road
Quote:
Originally Posted by msuaeronautics View Post
You need to re-mesh. Seems like you have some mesh quality issues- most specifically, inside-out cells.
Okay, thank you.

Now what exactly does that mean? Made a mistake with the way I defined blocks or something? Maybe the order of the vertices I give?

Thanks for pointing that out.
odellar is offline   Reply With Quote

Old   October 22, 2013, 15:25
Default
  #4
Member
 
Eric Robertson
Join Date: Jul 2012
Posts: 95
Rep Power: 15
msuaeronautics is on a distinguished road
That's what it seems like. You must also remember to follow the right hand rule when defining block faces etc.
msuaeronautics is offline   Reply With Quote

Old   October 22, 2013, 16:57
Default
  #5
Member
 
Olie
Join Date: Oct 2013
Posts: 51
Rep Power: 13
odellar is on a distinguished road
Quote:
Originally Posted by msuaeronautics View Post
That's what it seems like. You must also remember to follow the right hand rule when defining block faces etc.

Thank you - I had a look at the way I'd defined blocks and faces and it would appear I didn't follow the RHR. So I've got it to run now, HOWEVER the mesh isn't using the same x-y-z coordinates as me it would seem. For example I have three blocks, which in blockMeshDict I've declared:

Code:
blocks
(
hex (11 12 4 3 8 9 1 0) (10 10 1) simpleGrading (1 1 1)//0
hex (12 13 5 4 9 10 2 1) (40 10 1) simpleGrading (1 1 1)//1
hex (14 15 7 6 12 13 5 4) (40 10 1) simpleGrading (1 1 1)//2
);
- so I mean to have 10 cells in x, 10 in y, and 1 in z (first block), 40 cells in x, 10 in y, 1 in z (second block).. etc.. HOWEVER when I look at the mesh in Paraview it seems to be producing me the right outline geometrical shape, but with 10 cells in x, 1 in y, and 10 in z (first block), 40 cells in x, 1 in y, and 10 in z (second block).. etc..

I.e. it's mixed up my mesh resolutions in the y & z directions - do you know why this is?

Thanks for the help.
Olie
odellar is offline   Reply With Quote

Old   October 22, 2013, 20:50
Default
  #6
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Hi odellar!

Read carefully the section 5.3 of the User Guide http://www.openfoam.org/docs/user/blockMesh.php. It's important to understand the use of the "local coordinate system" when you create your blocks and the difference between both local and global coordinate systems, which is what you see in paraview.

cheers.

zfaraday
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday 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
[snappyHexMesh] SnappyHexMesh for internal Flow vishwa OpenFOAM Meshing & Mesh Conversion 24 June 27, 2016 09:54
dynamic Mesh is faster than MRF???? sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 08:47
[ICEM] courant number <-> mesh quality kpax ANSYS Meshing & Geometry 7 December 20, 2012 12:06
[snappyHexMesh] external flow with snappyHexMesh chelvistero OpenFOAM Meshing & Mesh Conversion 11 January 15, 2010 20:43
air bubble is disappear increasing time using vof xujjun CFX 9 June 9, 2009 08:59


All times are GMT -4. The time now is 06:56.