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

Newbie Question IcoFoam - Courant Number explodes

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

Like Tree2Likes
  • 2 Post By tcarrigan

Reply
 
LinkBack Thread Tools Display Modes
Old   November 18, 2010, 11:55
Smile Newbie Question IcoFoam - Courant Number explodes
  #1
New Member
 
Stefan
Join Date: Jul 2010
Posts: 8
Rep Power: 8
sprobst76 is on a distinguished road
Hi,

I trying to simulate various problems with OpenFoam and I am still in the learing phase. Perhaps somebody can help me.

I have a structure with an inlet of 4x5mm connected with a larger block. Attached to the block is a very thin outlet (0.2mm). I have created the structure with netgen and it is related to a problem a colleague of mine has.

I tried a simulation with simpleFoam and icoFoam and both simulations did not work. So far the mesh is very coarse, but I tried it als with a finer mesh.

In the attached file the whole icoFoam case is included with the netgen geo file. Running the case leads to an exploding courant number.

Thank you for your help, this is useful for me to get more knowledge about OpenFOAM.

Best regards
Stefan
Attached Files
File Type: gz polySimplifiedIcoFoam.tar.gz (70.3 KB, 43 views)
sprobst76 is offline   Reply With Quote

Old   November 18, 2010, 14:20
Default
  #2
Senior Member
 
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 144
Rep Power: 8
tcarrigan is on a distinguished road
I tried running your case, and indeed it does blow up. Could you please post a picture of your grid and/or geometry, I'm not quite sure what you're trying to simulate. To me it seems that it's a problem with your grid, not the numerics.
tcarrigan is offline   Reply With Quote

Old   November 18, 2010, 15:00
Default Pictures from NetGen
  #3
New Member
 
Stefan
Join Date: Jul 2010
Posts: 8
Rep Power: 8
sprobst76 is on a distinguished road
Here are pictures of the case. The real case is more complicated and with a fluid of high viscosity, but I first wanted to test with a simplified structure how this can be done at all.

Inlet (patch - 4x5mm)


Outlet (patch 18x0.2mm)



Middle (symmetryPlane)


All remaining boundarys are of type wall.

I know the grid is very coarse, but even with a finer grid produced by netgen the case is not running. Thank you for your help.

Best regards
Attached Images
File Type: png Middle.png (10.3 KB, 691 views)
File Type: png Outlet.png (10.4 KB, 679 views)
File Type: png Inlet.png (10.3 KB, 682 views)
sprobst76 is offline   Reply With Quote

Old   November 18, 2010, 15:19
Default
  #4
Senior Member
 
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 144
Rep Power: 8
tcarrigan is on a distinguished road
I'm thinking the velocity is pretty high at the outlet causing the Courant number to blow up. You might want to try tightening up the grid spacing at the inlet and outlet. If you can, post some pics of your fine grid and I can take a look.
tcarrigan is offline   Reply With Quote

Old   November 18, 2010, 15:44
Default
  #5
New Member
 
Stefan
Join Date: Jul 2010
Posts: 8
Rep Power: 8
sprobst76 is on a distinguished road
Thank you for your help! The pictures are taken directly from netgen. The geo file was included in the tar.gz file. Perhaps I am doing also something wrong with netgen.

Attached are two pictures of a finer mesh (perhaps still to coarse!?).

Best regards
Attached Images
File Type: jpg FinerMesh1.jpg (58.6 KB, 87 views)
File Type: jpg FinerMesh2.jpg (99.0 KB, 94 views)
sprobst76 is offline   Reply With Quote

Old   November 18, 2010, 15:53
Default
  #6
Senior Member
 
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 144
Rep Power: 8
tcarrigan is on a distinguished road
Looks ok. I did just notice something. Did you check your units? Seems you specify the velocity to be 0.001 and nu=1e-6. However, you specify your grid in mm correct? This would meen that the velocity you specify would be 0.001 mm/s.

I wasn't sure you were trying to specify velocity to be 1 mm/s at the inlet or not.



UPDATE: Check following posts
tcarrigan is offline   Reply With Quote

Old   November 18, 2010, 16:00
Default
  #7
Senior Member
 
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 144
Rep Power: 8
tcarrigan is on a distinguished road
Ok, I got it. I checked your mesh. In the fvSolution dictionary file, change the number of non orthogonal correctors to 2,

nNonOrthogonalCorrectors 2;

And it works just fine
tcarrigan is offline   Reply With Quote

Old   November 18, 2010, 16:01
Default
  #8
Senior Member
 
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 144
Rep Power: 8
tcarrigan is on a distinguished road
If you run checkMesh, it will show that there are some non-orthogonal faces. Just bump up the number of non orthogonal correctors and should work just fine.
tcarrigan is offline   Reply With Quote

Old   November 19, 2010, 03:03
Default nNonOrthogonalCorrectors changed
  #9
New Member
 
Stefan
Join Date: Jul 2010
Posts: 8
Rep Power: 8
sprobst76 is on a distinguished road
First thank you for your help.

But I did not get it to run anyhow. Did you change more than the nNonOrthogonalCorrectors in the system/fvSolution.

I took again the case from the tar.gz file and did only change the system/fvSolution and tried to run the case. Again I got a exploding courant number

The last message of the icoFoam run with a nNonOrthogonalCorrectors of 2 is:
Quote:
Time = 0.00044

Courant Number mean: 3.38566e+98 max: 1.27208e+102
DILUPBiCG: Solving for Ux, Initial residual = 0.998514, Final residual = 0.55014, No Iterations 1001
#0 Foam::error:: printStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/opt/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib64/libc.so.6"
#3 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 Foam::fvMatrix<Foam::Vector<double> >::solve(Foam::dictionary const&) in "/opt/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/icoFoam"
#5 main in "/opt/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/icoFoam"
#6 __libc_start_main in "/lib64/libc.so.6"
#7 _start at /usr/src/packages/BUILD/glibc-2.10.1/csu/../sysdeps/x86_64/elf/start.S:116
I do not know, what I did differently than you. But I see that I learn more and more about OpenFOAM

Best regards
sprobst76 is offline   Reply With Quote

Old   November 19, 2010, 03:22
Default
  #10
Senior Member
 
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 144
Rep Power: 8
tcarrigan is on a distinguished road
Yeah, sorry...I just noticed I did make a few changes to the fvSchemes and fvSolutions dictionaries.

For the divergence of velocity I chose the linearUpwindV scheme. It's a second order scheme tailored towards vectors rather than scalars. I also limited the laplacian and snGradSchemes.

As for the solver, I switched to the GAMG solver with a Gauss Seidel smoother for the pressure term, and a Gauss Seidel smooth solver for velocity.

I'll attach a new .tar.gz file with the entire case. This is the one that worked for me. Sorry for the confusion, I totally forgot about those changes.

polySimplifiedIcoFoam_Modified.tar.gz
alyhya and Hanseny like this.
tcarrigan is offline   Reply With Quote

Old   November 19, 2010, 12:22
Smile Thank you very much for your help!
  #11
New Member
 
Stefan
Join Date: Jul 2010
Posts: 8
Rep Power: 8
sprobst76 is on a distinguished road
Hi,

you helped me a lot. Now I got even the more complicated case running.

I try now to set the same case up with simpleFoam. Hopefully it works

Thanks again!

Best regards
sprobst76 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
Courant number fireman FLUENT 5 July 28, 2016 12:55
IcoFoam unstability, courant number gets large! vivien OpenFOAM 10 July 23, 2013 12:48
RMS Courant Number vs MAX Courant Number zoozoozoo Main CFD Forum 3 June 12, 2012 13:44
Problems with Courant number (LaunderGibsonTurbulence Model) sven OpenFOAM 3 August 10, 2009 03:12
COURANT NUMBER Ferreira Main CFD Forum 23 February 26, 2006 19:10


All times are GMT -4. The time now is 14:12.