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

Courant Number become bigger and bigger!!!

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 11, 2009, 16:48
Default
  #41
Member
 
Mihir
Join Date: Mar 2009
Posts: 40
Rep Power: 17
mihir1310 is on a distinguished road
Quote:
Originally Posted by Julian K. View Post
.

Mihir, could you also post your fvSchemes? I'd be very interested. Maybe also you rBC setup for P U and T. Thanks.

you mean Bcs of sonicFoam case ?????

As far as schemes are concerned , i used Minmod perfectly , ,However for rhoCentralFoam im not sure, as it is a completely different ballgame ..
mihir1310 is offline   Reply With Quote

Old   September 16, 2009, 09:24
Default
  #42
Member
 
Julian Krick
Join Date: May 2009
Location: Guelph
Posts: 88
Rep Power: 17
Julian K. is on a distinguished road
Quote:
Originally Posted by mihir1310 View Post
you mean Bcs of sonicFoam case ?????

As far as schemes are concerned , i used Minmod perfectly , ,However for rhoCentralFoam im not sure, as it is a completely different ballgame ..
Hi Mihir,

It would be very interesting for me to see your 0/p, 0/U, 0/T files, as well as the system/fvSchemes and maybe also the system/fvSolution dictionary. Perhaps, there is something in, I don't already know.
__________________
grid generation: ICEM CFD 13.0
solver: CFX 13.0
Julian K. is offline   Reply With Quote

Old   September 16, 2009, 11:41
Default
  #43
Member
 
Mihir
Join Date: Mar 2009
Posts: 40
Rep Power: 17
mihir1310 is on a distinguished road
Quote:
Originally Posted by Julian K. View Post
Hi Mihir,

It would be very interesting for me to see your 0/p, 0/U, 0/T files, as well as the system/fvSchemes and maybe also the system/fvSolution dictionary. Perhaps, there is something in, I don't already know.
Ma
Code:
 type            waveTransmissive;
internalField   uniform 1;

boundaryField
{
    inlet
    {
        type            calculated;
        value           uniform 1;
    }
    outlet
    {
        type            calculated;
	//        value           uniform 3;
    }
    
    }
P:
Code:
boundaryField
{
    inlet           
    {
         /*type totalPressure; 
	  p0 uniform 1.0135e5; 
         U U; 
	  phi phi; 
	  rho none; 
	  psi none; 
	  gamma 1.4; */
	  type fixedValue;
	  value uniform 54000;     
    }

    outlet          
    {
       type zeroGradient;
	/* type            waveTransmissive;
        value           uniform 8800;
	 field           U;
        gamma           1.4;
	 phi             phi;
        rho             rho;
        psi             psi;
        lInf            0.01;
        fieldInf        8800; */
        
        
    }
T:
Code:
internalField   uniform 281;

boundaryField
{
    inlet           
    {
        type            fixedValue;
        value           uniform 273;
    }

    outlet          
    {
        type            zeroGradient;
    }
U:
HTML Code:
[CODE]internalField   uniform (260.39 0 0);

boundaryField
{
    inlet           
    {
        type            fixedValue;
        value           uniform (380 0 0);
    }

    outlet          
    {
		type            inletOutlet;
        inletValue      uniform (10 0 0);
        value           uniform (10 0 0);
        

//type            zeroGradient;
	/*type            waveTransmissive;
        value           uniform (10 0 0 );
	 field           U;
        gamma           1.4;
	 phi             phi;
        rho             rho;
        psi             psi;
        lInf            0.01;
        fieldInf        (10 0 0 ); */
[/CODE]

Last edited by mihir1310; September 16, 2009 at 11:58.
mihir1310 is offline   Reply With Quote

Old   September 16, 2009, 11:55
Default
  #44
Member
 
Mihir
Join Date: Mar 2009
Posts: 40
Rep Power: 17
mihir1310 is on a distinguished road
Code:
solvers
{
    rho  diagonal {};
    rhoU diagonal {};
    rhoE diagonal {};

    U smoothSolver
    {
        smoother         GaussSeidel;
        nSweeps          2;
        tolerance        1e-09;
        relTol           0.01;
    };

    h smoothSolver
    {
        smoother         GaussSeidel;
        nSweeps          2;
        tolerance        1e-10
        relTol           0;
    };
}
Code:
ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;
    div(tauMC) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default          linear;
    reconstruct(rho) vanLeer; 
    reconstruct(U)   vanLeerV;
    reconstruct(T)   vanLeer;

}

snGradSchemes
{
    default         corrected;
}
mihir1310 is offline   Reply With Quote

Old   September 16, 2009, 12:33
Default
  #45
Member
 
Julian Krick
Join Date: May 2009
Location: Guelph
Posts: 88
Rep Power: 17
Julian K. is on a distinguished road
Thanks Mihir!

However, I am a little bit confused, because you said that you use Minmod for the discretization of the divergent terms and backward for the convective terms.

By the way, are you simulating a CD nozzle, as well?
__________________
grid generation: ICEM CFD 13.0
solver: CFX 13.0
Julian K. is offline   Reply With Quote

Old   September 16, 2009, 12:35
Default
  #46
Member
 
Mihir
Join Date: Mar 2009
Posts: 40
Rep Power: 17
mihir1310 is on a distinguished road
Quote:
Originally Posted by Julian K. View Post
Thanks Mihir!

However, I am a little bit confused, because you said that you use Minmod for the discretization of the divergent terms and backward for the convective terms.

By the way, are you simulating a CD nozzle, as well?
ohh i meant you wanted my rhoCenrtalFoam case [which did not work ]

heres for sonicFoam
Code:
ddtSchemes
{
    default backward;           
}

gradSchemes
{
    default         Gauss linear;
    grad(p)         Gauss linear;
    grad(U)         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      Gauss Minmod;
    div(phid,p)     Gauss Minmod;
    div(phi,e)      Gauss Minmod;
}

laplacianSchemes
{
    default         none;
    laplacian(mu,U) Gauss linear corrected;
    laplacian(mu,e) Gauss linear corrected;
    laplacian((rho*(1|A(U))),p) Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p;
Im simulating outfield of the nozzle . So my inlet is the "nozzle outlet" ..
mihir1310 is offline   Reply With Quote

Old   September 16, 2009, 12:54
Default
  #47
Member
 
Julian Krick
Join Date: May 2009
Location: Guelph
Posts: 88
Rep Power: 17
Julian K. is on a distinguished road
Okay, thanks. I think I'll try your settings. Let's see what it produce.

By the way:
With rhoCentralFoam I noticed that a change of the lInf value (of the waveTransmissive BC) from 0.01, over 0.05, 0.5, 5, 50, 500 and finally 5000 does not have any effect on the result of my simulation. Which is, that the pressure waves are not transmitted across the outlet. Thus, I assume that rhoCentralFoam is (by any reason) not capable to apply the waveTransmissive BC. However, sonicFoam does apply the waveTransmissive BC, and changes of lInf resulted in very different behaviours.

Does anyone know, why a certain BC does not work with a certain solver?
__________________
grid generation: ICEM CFD 13.0
solver: CFX 13.0
Julian K. is offline   Reply With Quote

Old   April 21, 2010, 06:08
Default
  #48
Member
 
Join Date: Apr 2010
Posts: 51
Rep Power: 16
bephi is on a distinguished road
hi at all!
i read all the comments concerning the growing courant nr. problem because mine is the same

i set up a case with the icoFoam solver to achieve a first solution which i can improve later with other solver that display the reality better. i took the controlDict, fvSchemes and fvSolutions from the "icoFoam cavity tutorial".
unfortunately not even this simplified calculation works because after round about 8 to 10 time steps the courant nr. is increased to something over e+100 (well i'd say this is a bit more than 1 )

first i tried to decrease the time step to 3.5e-6 and change the writeControl to "adjustableRunTime"... but when looked at the runlogs, the timestep didn't change and remained constant.

then i tried to limit the courant number with "maxCo 1", but i read that it doesn't work for "icoFoam", because its a simple solver. is this correct?

do you have any idea, what i can do to achieve a solution that doesn't abort?
bephi is offline   Reply With Quote

Old   April 21, 2010, 06:25
Default
  #49
Member
 
Joern Bader
Join Date: Mar 2009
Posts: 33
Rep Power: 17
joern is on a distinguished road
hi bephi,

try to use bounded schemes like "upwind" or a TVD-Scheme for the div-schemes.

i think the convective terms produce an unbounded solution so you have to limit them.
icofoam solves the NS-Eqs. I haven't testet this solver but i tested simplefoam and there its nearly the same problem.


Joern
joern is offline   Reply With Quote

Old   April 21, 2010, 06:52
Default
  #50
Member
 
Join Date: Apr 2010
Posts: 51
Rep Power: 16
bephi is on a distinguished road
hi joern!
thanks a lot for the quick reply!
so you say I should change this:

Code:
ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
    grad(p)         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      Gauss linear;                            // change into "Gauss upwind"
}
laplacianSchemes
{
    default         none;
    laplacian(nu,U) Gauss linear corrected;
    laplacian((1|A(U)),p) Gauss linear corrected;
}
interpolationSchemes
{
    default         linear;
    interpolate(HbyA) linear;
}
snGradSchemes
{
    default         corrected;
}
fluxRequired
{
    default         no;
    p;
}
EDIT: i changed it and first my max.Co-Nr. doesn't get over 7! but unfortunately the Co-Nr. increases again after round about 20 timesteps until the calculation ends... an improvement was achieved but what can be changed too?

would it be okay when the mean value of the co-nr. is <1 or should the max Co-Nr <1 as well?


if also needed, here are my files:
p and U starting files:
Code:
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.000000;
boundaryField
{
symmetry
{
type symmetryPlane;
}
inlet
{
type fixedValue;
value uniform 452.38;
}
outlet
{
type zeroGradient;
}

dimensions [0 1 -1 0 0 0 0];
internalField uniform ( 0.000000 0.000000 -1.000000 );
boundaryField
{
symmetry
{
type symmetryPlane;
}
inlet
{
type fixedValue;
value uniform ( 0.000000 0.000000 -1.000000 );
}
outlet
{
type zeroGradient;
}
controlDict
Code:
application icoFoam;
startFrom       startTime;
startTime       0;
stopAt          endTime;
endTime         1e-3;
deltaT          3.5e-6;
writeControl    adjustableRunTime;
writeInterval   10;
purgeWrite      0;
writeFormat     ascii;
writePrecision  6;
writeCompression uncompressed;
timeFormat      general;
timePrecision   6;
runTimeModifiable yes;
adjustTimeStep    yes;
maxCo        1.0;
fvSchemes
Code:
ddtSchemes
{
    default         Euler;
}
gradSchemes
{
    default         Gauss linear;
    grad(p)         Gauss linear;
}
divSchemes
{
    default         none;
    div(phi,U)      Gauss upwind;
}
laplacianSchemes
{
    default         none;
    laplacian(nu,U) Gauss linear corrected;
    laplacian((1|A(U)),p) Gauss linear corrected;
}
interpolationSchemes
{
    default         linear;
    interpolate(U) linear;
}
snGradSchemes
{
    default         corrected;
}
fluxRequired
{
    default         no;
    p;
}
fvSolver
Code:
solvers
{
    p PCG
    {
        preconditioner   DIC;
        tolerance        1e-06;
        relTol           0;
    };
    U PBiCG
    {
        preconditioner   DILU;
        tolerance        1e-05;
        relTol           0;
    };
}
PISO
{
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;
    pRefCell        0;
    pRefValue       0;
}

Last edited by bephi; April 21, 2010 at 09:16.
bephi is offline   Reply With Quote

Old   April 21, 2010, 10:16
Default
  #51
Member
 
Joern Bader
Join Date: Mar 2009
Posts: 33
Rep Power: 17
joern is on a distinguished road
the max-conum should not be much larger than 1 because the discretisation of OF ist just semi implicit.
the decoupling in OF causes explicit factors.

In my test cases (for my diploma thesis) the solver simplefoam was only stable with maxCoNum<1.5.

Try maxCoNum<1. 7 is too much for OF, i think. That would just work with a full implicit solver.


Add:
If you use "Gauss linear" for all discretisations you get an central that is instable for ALL Delta t.
joern is offline   Reply With Quote

Old   April 22, 2010, 01:53
Default
  #52
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Add:
If you use "Gauss linear" for all discretisations you get an central that is instable for ALL Delta t.
A bit too broad as statement. Central schemes, largely used in LES also for the convective term, are unstable only if the local Péclet number is larger than 2.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   April 22, 2010, 01:54
Default help
  #53
Member
 
mohsen kh
Join Date: Nov 2009
Posts: 41
Rep Power: 16
mohsenkh599 is an unknown quantity at this point
hi everyone
I have a new solver for two-phase modeling. but there is a problem while running any case (dam break for instance). when in ControlDict I put the write interval one second the solution diverge quickly but if I put it .05 second the solution converges. I could not understand how the write interval affects the convergence of the system.
please help as soon as possible
mohsenkh599 is offline   Reply With Quote

Old   April 22, 2010, 01:59
Default
  #54
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by bephi View Post
if also needed, here are my files:
p and U starting files:
Code:
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.000000;
boundaryField
{
symmetry
{
type symmetryPlane;
}
inlet
{
type fixedValue;
value uniform 452.38;
}
outlet
{
type zeroGradient;
}

dimensions [0 1 -1 0 0 0 0];
internalField uniform ( 0.000000 0.000000 -1.000000 );
boundaryField
{
symmetry
{
type symmetryPlane;
}
inlet
{
type fixedValue;
value uniform ( 0.000000 0.000000 -1.000000 );
}
outlet
{
type zeroGradient;
}
You are fixing both velocity and pressure and velocity at the inlet for an incompressible flow (you use icoFoam). Let the inlet as is, but fix the pressure at the outlet, and set it to zeroGradient at the inlet.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   April 22, 2010, 02:02
Default
  #55
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by mohsenkh599 View Post
hi everyone
I have a new solver for two-phase modeling. but there is a problem while running any case (dam break for instance). when in ControlDict I put the write interval one second the solution diverge quickly but if I put it .05 second the solution converges. I could not understand how the write interval affects the convergence of the system.
please help as soon as possible
It doesn't :-)

Please open a new thread, and provide more information to increase the chances someone can help.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   April 22, 2010, 02:58
Default
  #56
Member
 
Join Date: Apr 2010
Posts: 51
Rep Power: 16
bephi is on a distinguished road
Quote:
Originally Posted by alberto View Post
You are fixing both velocity and pressure and velocity at the inlet for an incompressible flow (you use icoFoam). Let the inlet as is, but fix the pressure at the outlet, and set it to zeroGradient at the inlet.

Best,
hello alberto! thanks for your hint!

you are right that it doesn't make sense to fix pressure and velocity at the inlet! i changed it but now my max. Co-No is increasing again to around about 7... is this a problem?

greets!

Last edited by bephi; April 22, 2010 at 03:22.
bephi is offline   Reply With Quote

Old   April 22, 2010, 04:38
Default
  #57
Member
 
Joern Bader
Join Date: Mar 2009
Posts: 33
Rep Power: 17
joern is on a distinguished road
Quote:
Originally Posted by alberto View Post
A bit too broad as statement. Central schemes, largely used in LES also for the convective term, are unstable only if the local Péclet number is larger than 2.

Best,
ok, you'r right. but for icoFoam (like simplefoam) a use of Central Schemes lead to da central method.

@bephi:
a maxconum of 7 is now problem as long as your solution is ok ^^
take a look at the results (paraview) if they look physical ok.
or try to calculate a bit longer to look if the solver stays stable.

have you tried smaller timesteps to see if the maxconum stays smaller?
joern is offline   Reply With Quote

Old   April 22, 2010, 06:31
Default
  #58
Member
 
Join Date: Apr 2010
Posts: 51
Rep Power: 16
bephi is on a distinguished road
hi!
at the moment my problem is the following:
i calculated a time step of 3.5e-6 s because my highest velocity is 26.83 m/s² and the smalest element lenght is 0.0001m
the fluid needs round about 0.3 to 0.5 s to flow through the model so it would take 100000 steps which is too much in my in opinion.. so i increased the timestep to 0.0003 and after that to 0.00003 but then the co-number increases again until the calculation crashes...

i didn't thought that a simple laminar calculation would be so difficult?!
bephi is offline   Reply With Quote

Old   April 22, 2010, 09:30
Default
  #59
Member
 
Joern Bader
Join Date: Mar 2009
Posts: 33
Rep Power: 17
joern is on a distinguished road
if it takes to many steps, try a coarser mesh.
but if your mesh is too fine you need smaller timesteps, thats normal.

are you sure about your max. velocity?
i dont know the eigenvalues of the NS-eqs but for the euler-equations the max. velocity isnt just the max. u, its max.(u+c) with the speed of sound c.

my tip:
try smaller timesteps, you will see if the solver stays stable.


btw: how many cells does your testcase have?
joern is offline   Reply With Quote

Old   April 22, 2010, 09:48
Default
  #60
Member
 
Join Date: Apr 2010
Posts: 51
Rep Power: 16
bephi is on a distinguished road
now a calculation with 100 timesteps was successful...i think i'll set up 100 additional steps and look what happens...
when do i know that the solution is converged?

my model has 116112 trias, 622697 tetras and 198870 pentas
bephi 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
How to get the Global Node Number by UDF : Fluent Yusuke FLUENT 1 October 23, 2015 11:55
CFL number Daniele CFX 5 July 19, 2012 20:11
Number of interation? Tu Phoenics 1 September 28, 2008 15:12
SOS! HELP! max number of cells :( Jas Phoenics 4 February 14, 2004 11:12
Boundary region number limitation Pablo Barreiro Siemens 1 May 2, 2001 12:13


All times are GMT -4. The time now is 22:34.