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

icoFoam crashing due to high courant numbers

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 20, 2021, 08:38
Default icoFoam crashing due to high courant numbers
  #1
New Member
 
Join Date: Jan 2021
Posts: 3
Rep Power: 5
Thomas44 is on a distinguished road
Hi everyone,

I have a problem with icoFoam crashing due to very high courant numbers.
Code:
Time = 0.0062

Courant Number mean: 1.70314 max: 1.70807
smoothSolver:  Solving for Ux, Initial residual = 0.321492, Final residual = 1.39023e+44, No Iterations 1000
smoothSolver:  Solving for Uy, Initial residual = 0.321716, Final residual = 3.3051e+44, No Iterations 1000
smoothSolver:  Solving for Uz, Initial residual = 0.483206, Final residual = 1.01409e+46, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 1, Final residual = 0.045319, No Iterations 27
DICPCG:  Solving for p, Initial residual = 0.0597692, Final residual = 0.00264667, No Iterations 15
DICPCG:  Solving for p, Initial residual = 0.0159539, Final residual = 0.000757184, No Iterations 22
time step continuity errors : sum local = 3.0971e+41, global = 2.73201e+39, cumulative = 2.73201e+39
DICPCG:  Solving for p, Initial residual = 0.443715, Final residual = 0.0178101, No Iterations 10
DICPCG:  Solving for p, Initial residual = 0.0497066, Final residual = 0.0021327, No Iterations 31
DICPCG:  Solving for p, Initial residual = 0.0169567, Final residual = 8.78265e-07, No Iterations 54
time step continuity errors : sum local = 3.20666e+38, global = -6.63929e+36, cumulative = 2.72537e+39
ExecutionTime = 9.1 s  ClockTime = 9 s

Time = 0.0063

Courant Number mean: 4.11596e+44 max: 1.69555e+47
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in /lib/x86_64-linux-gnu/libpthread.so.0
#3  Foam::symGaussSeidelSmoother::smooth(Foam::word const&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::Field<double> const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char, int) at ??:?
#4  Foam::symGaussSeidelSmoother::smooth(Foam::Field<double>&, Foam::Field<double> const&, unsigned char, int) const at ??:?
#5  Foam::smoothSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6  Foam::fvMatrix<Foam::Vector<double> >::solveSegregated(Foam::dictionary const&) at ??:?
#7  Foam::fvMatrix<Foam::Vector<double> >::solveSegregatedOrCoupled(Foam::dictionary const&) at ??:?
#8  Foam::fvMesh::solve(Foam::fvMatrix<Foam::Vector<double> >&, Foam::dictionary const&) const at ??:?
#9  ? in /opt/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Opt/bin/icoFoam
#10  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#11  ? in /opt/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Opt/bin/icoFoam
The goal is to simulate the flow of water through a simple cylinder with fixed pressure values of 2.4 bar at the inlet and 1 bar at the outlet.
I'm new to OpenFoam and have set-up the simulation case to my best knowledge. The attached files should include everything needed to run the case including the blockMeshDict.
It would be nice if someone could give me a hint what I made wrong and what parameter I have to change to achieve my goal.

Thanks in advance
Thomas
Attached Files
File Type: zip icofoam_cylinder.zip (4.5 KB, 5 views)
Thomas44 is offline   Reply With Quote

Old   January 21, 2021, 03:42
Default
  #2
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
I think you cant use fixedValue for the static pressure at both ends, because there are infinity solutions. Maybe thats the reason why your velocity becomes very big and thus the Courant number. I am quite sure its due to ill posed BCs.



Try using totalPressure with pressureInletOutletVelocity for U at one end and fixedPressure at the other end with zeroGradient for U.
shock77 is offline   Reply With Quote

Old   January 21, 2021, 04:22
Default
  #3
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Hi!


You are using icoFoam and already exceeded Co = 1 before the crash. You can't do that with the PISO algorithm.
Keep the Co bellow 1 or bellow 0.8 so you will be in safe.


Or change to pimpleFoam and you can exceed Co = 1 with inner loops.
simrego is offline   Reply With Quote

Old   January 21, 2021, 09:59
Default
  #4
New Member
 
Join Date: Jan 2021
Posts: 3
Rep Power: 5
Thomas44 is on a distinguished road
Quote:
Originally Posted by shock77 View Post
Try using totalPressure with pressureInletOutletVelocity for U at one end and fixedPressure at the other end with zeroGradient for U.
So p and U would look like this?
Code:
inlet
{
    type    totalPressure;
    p0      uniform 240;
}

outlet
{
    type    fixedValue;
    value   uniform 100;
}
Code:
inlet
{
    type    pressureInletOutletVelocity;
    value   uniform (0 0 0);
}

outlet
{
    type    zeroGradient;
}
Thomas44 is offline   Reply With Quote

Old   January 21, 2021, 10:17
Default
  #5
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
I suppose you are running an incompressible case, so yes. For your furhter information on the totalPressure BC:


https://cpp.openfoam.org/v3/a02627.html
shock77 is offline   Reply With Quote

Old   January 26, 2021, 10:37
Default
  #6
New Member
 
Join Date: Jan 2021
Posts: 3
Rep Power: 5
Thomas44 is on a distinguished road
With the initial conditions you proposed I get the same Courant number problem, but you are right that the boundary conditions are the reason for it.
I ran a case with pressures of fixedValue at the inlet and zeroGradiend at the outlet and the simulation was successful. Not sure how to proceed now.
Thomas44 is offline   Reply With Quote

Old   January 26, 2021, 11:01
Default
  #7
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Before you dig deeper into that, drop your mesh to the trash and create a correct one. This is bad. Really bad.
Attached Images
File Type: jpg Screenshot from 2021-01-26 17-00-58.jpg (50.1 KB, 32 views)
simrego is offline   Reply With Quote

Reply

Tags
courant, cylinder, icofoam


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
Actual Courant Numbers much greater than maxCo in interFoam with Local Time Stepping Ship Designer OpenFOAM Running, Solving & CFD 16 August 5, 2022 11:08
Simulation stops with high courant number Victor3 OpenFOAM Running, Solving & CFD 2 January 29, 2020 11:49
high Courant number m5m5kh OpenFOAM Running, Solving & CFD 1 July 9, 2013 07:48
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
pls help fluctuating residuals due to courant no sagar CFX 3 March 28, 2006 01:10


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