|
[Sponsors] |
Newbie Question IcoFoam - Courant Number explodes |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 18, 2010, 11:55 |
Newbie Question IcoFoam - Courant Number explodes
|
#1 |
New Member
Stefan
Join Date: Jul 2010
Posts: 8
Rep Power: 16 |
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 |
|
November 18, 2010, 14:20 |
|
#2 |
Senior Member
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 161
Rep Power: 16 |
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.
|
|
November 18, 2010, 15:00 |
Pictures from NetGen
|
#3 |
New Member
Stefan
Join Date: Jul 2010
Posts: 8
Rep Power: 16 |
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 |
|
November 18, 2010, 15:19 |
|
#4 |
Senior Member
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 161
Rep Power: 16 |
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.
|
|
November 18, 2010, 15:44 |
|
#5 |
New Member
Stefan
Join Date: Jul 2010
Posts: 8
Rep Power: 16 |
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 |
|
November 18, 2010, 15:53 |
|
#6 |
Senior Member
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 161
Rep Power: 16 |
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 |
|
November 18, 2010, 16:00 |
|
#7 |
Senior Member
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 161
Rep Power: 16 |
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 |
|
November 18, 2010, 16:01 |
|
#8 |
Senior Member
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 161
Rep Power: 16 |
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.
|
|
November 19, 2010, 03:03 |
nNonOrthogonalCorrectors changed
|
#9 | |
New Member
Stefan
Join Date: Jul 2010
Posts: 8
Rep Power: 16 |
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:
Best regards |
||
November 19, 2010, 03:22 |
|
#10 |
Senior Member
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 161
Rep Power: 16 |
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 |
|
November 19, 2010, 12:22 |
Thank you very much for your help!
|
#11 |
New Member
Stefan
Join Date: Jul 2010
Posts: 8
Rep Power: 16 |
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 |
|
February 28, 2018, 13:33 |
fvSolution and fvSchemes query
|
#12 |
New Member
anon
Join Date: Jan 2018
Posts: 1
Rep Power: 0 |
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 |
|
March 1, 2018, 08:35 |
fvSolution and fvSchemes query
|
#13 |
New Member
Eugen
Join Date: Dec 2017
Posts: 2
Rep Power: 0 |
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 |
|
|
|
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 |