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

Newbie Question IcoFoam - Courant Number explodes

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By tcarrigan

Reply
 
LinkBack Thread Tools Search this Thread 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: 16
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, 64 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: 161
Rep Power: 16
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: 16
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, 1249 views)
File Type: png Outlet.png (10.4 KB, 1230 views)
File Type: png Inlet.png (10.3 KB, 1233 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: 161
Rep Power: 16
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: 16
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, 128 views)
File Type: jpg FinerMesh2.jpg (99.0 KB, 153 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: 161
Rep Power: 16
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: 161
Rep Power: 16
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: 161
Rep Power: 16
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: 16
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: 161
Rep Power: 16
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: 16
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

Old   February 28, 2018, 13:33
Default fvSolution and fvSchemes query
  #12
New Member
 
anon
Join Date: Jan 2018
Posts: 1
Rep Power: 0
stgof is on a distinguished road
Hi everyone,

I was wondering if anyone might be able to guide me through updating the fvSolution and fvSchemes files in the case above to be compatible with the latest openfoam release?
I'm facing an issue similar to the one in this thread (Courant number blowing up), and as I'm still pretty new to openfoam, I'm really not sure how to reconcile all the "undefined" errors I keep getting while trying to run icoFoam with the settings above.

Many thanks
stgof is offline   Reply With Quote

Old   March 1, 2018, 08:35
Default fvSolution and fvSchemes query
  #13
New Member
 
Eugen
Join Date: Dec 2017
Posts: 2
Rep Power: 0
megagen is on a distinguished road
Hi,

Regarding the fvSchemes and fvSolutions you can check them on https://www.openfoam.com/documentati.../fvSchemes.php
but it depends on you which type you want to use, first or second order.
But I recommend you to use the one that are in the tutorial file.

If the Courant number is blowing up you can try to reduce the timesteps in controlDict.

Cheers,
Eugen
megagen 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
Courant number fireman FLUENT 7 September 11, 2021 12:33
IcoFoam unstability, courant number gets large! vivien OpenFOAM 11 March 9, 2017 04:45
RMS Courant Number vs MAX Courant Number zoozoozoo Main CFD Forum 3 June 12, 2012 14:44
Problems with Courant number (LaunderGibsonTurbulence Model) sven OpenFOAM 3 August 10, 2009 04:12
COURANT NUMBER Ferreira Main CFD Forum 23 February 26, 2006 19:10


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