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

Courant Number Shoot up!

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 6, 2016, 12:03
Default Courant Number Shoot up!
  #1
Member
 
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11
NightWing is on a distinguished road
I am trying to run a simulation using BuoyantBoussinesqPimpleFOAM.
I have re-modified the solver as a laminar transient one. In the control dict even though i have specifed maxCo has 0.5, during simulation the max courant number reaches values in the range10k-100k+ and still the simulation keeps on running. Mean courant number also varies from 0.001 to 100+ ranges. i have chosen the deltat based on the formuale (i.e. velocity/smallest cell in domain) and i am sure my mesh is a very good mesh.

But ANyone know why this happens??? Any idea??
NightWing is offline   Reply With Quote

Old   April 16, 2016, 12:22
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick question: Which OpenFOAM version are you using?

Quick answers:
Quote:
Originally Posted by NightWing View Post
I am trying to run a simulation using BuoyantBoussinesqPimpleFOAM.
I have re-modified the solver as a laminar transient one.
You don't need to modify the solver, you only need to configure the "constant/turbulenceProperties" file to use "laminar".

Quote:
Originally Posted by NightWing View Post
In the control dict even though i have specifed maxCo has 0.5,
Don't assume you've configured the file properly . Please provide the "controlDict" file, because apparently you missed one very tiny detail somewhere.

In addition, if you indeed have modified the solver, then you might have broken how it adapts the time step.
__________________
wyldckat is offline   Reply With Quote

Old   April 17, 2016, 00:13
Smile Thank you for the reply
  #3
Member
 
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11
NightWing is on a distinguished road
Hi Bruno,

I am glad you happen to read my post Yeah i initially, switched off RAS to laminar in the 'turbulenceProperties' in the constant directoary. But Still it kept on asking to read the values of alphat, k, epsilon etc which is not needed as iam trying to simulate a laminar solver.
So i took out, the RAS and turbulence.H files from my .C file and also from my files/options in the solver and re-complied it. Just to keep away all the unwanted aspects of turbulence in the solver. (pratically it wasnt needed but i just tried ) I would post the controlDict file here:


Code:
libs (
      "libOpenFOAM.so"
      "libsimpleSwakFunctionObjects.so"
      "libswakFunctionObjects.so"
      "libgroovyBC.so"
     );


application     Foam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         1800;

deltaT             1;

writeControl    timeStep;

writeInterval   150;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep  no;

maxCo           0.5;
i am trying to use groovyBC for some of my boundaries. I want to use heatflux (uniform) on my walls. for that i tried to use groovyBC. But later i found that there is something called as fixedGradient too. I am currently using fixedGradient BC. While simulation my courant no is of the range 2.0 to 2.9 and the max courant number is 90.0 to 90.9 <----

But the results i get are somewhat in accordance with the physics of the problem. I am trying to simulate natural convection (thermosyphon effect) on tubes. In the base solver the UEqn.H is given as:


Code:
fvVectorMatrix UEqn
    (
        fvm::ddt(U)
      + fvm::div(phi, U)
      + turbulence->divDevReff(U)
     ==
        fvOptions(U)
    );

    UEqn.relax();

    fvOptions.constrain(UEqn);

    if (pimple.momentumPredictor())
    {
        solve
        (
            UEqn
         ==
            fvc::reconstruct
            (
                (
                  - ghf*fvc::snGrad(rhok)
                  - fvc::snGrad(p_rgh)
                )*mesh.magSf()
            )
        );

        fvOptions.correct(U);
    }
i have re-written this Equation as:

Code:
// Solve the momentum equation

    fvVectorMatrix UEqn
    (
        fvm::ddt(U)
      + fvm::div(phi, U)
      -fvm::laplacian(nu, U)

    );

    UEqn.relax();

    UEqn.solve();
as i have switched off the momentum predictor in the fvSolutions. Does this make sense?? I didnt change my pEqn.H.

Any Suggestions Sir

Last edited by wyldckat; April 17, 2016 at 14:00. Reason: Added [CODE][/CODE] markers
NightWing is offline   Reply With Quote

Old   April 17, 2016, 14:20
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answers:
Quote:
Originally Posted by NightWing View Post
I am glad you happen to read my post Yeah i initially, switched off RAS to laminar in the 'turbulenceProperties' in the constant directoary. But Still it kept on asking to read the values of alphat, k, epsilon etc which is not needed as iam trying to simulate a laminar solver.
What about the "RASProperties" file?


And I'm glad I asked for the "controlDict", because these 3 entries:
Quote:
Originally Posted by NightWing View Post
Code:
deltaT             1;

writeControl    timeStep;

adjustTimeStep  no;
should be changed to something like this:
  • Smaller "deltaT", to avoid unexpected surprises:
    Code:
    deltaT             0.01;
  • Adjustable time step is a must, so that it's written at the correct time:
    Code:
    writeControl    adjustableRunTime;
  • And now, the very most important detail that you missed... is this:
    Code:
    adjustTimeStep  yes;


Quote:
Originally Posted by NightWing View Post
Code:
// Solve the momentum equation

    fvVectorMatrix UEqn
    (
        fvm::ddt(U)
      + fvm::div(phi, U)
      -fvm::laplacian(nu, U)

    );

    UEqn.relax();

    UEqn.solve();
as i have switched off the momentum predictor in the fvSolutions. Does this make sense?? I didnt change my pEqn.H.
Looks OK to me. Although keep in mind that this way you can't use source terms defined with "fvOptions" for the U field.
wyldckat is offline   Reply With Quote

Old   April 17, 2016, 14:25
Default Big Thank you Bruno :)
  #5
Member
 
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11
NightWing is on a distinguished road
I was waiting even if its late at nite here f or your post Glad that u read my post am a slow learner thanks for the help

Indeed yeah, I cant use my source term using fvOptions by this way. But i guess i dont need it for my problem. It seems like that. I would check with the controlDict file and let u know, what happened

And about RAS properties file inside the constant directory, i removed it as i have removed RAS Header files frm .C
NightWing is offline   Reply With Quote

Old   April 17, 2016, 14:41
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by NightWing View Post
I was waiting even if its late at nite here f or your post
Just to let you know that I likely won't be able to answer more questions until next weekend, or even only on the other weekend. So no use staying up even more late today waiting for any answers from me
wyldckat is offline   Reply With Quote

Old   May 15, 2016, 11:00
Default Hope you had a safe journey :) Bruno (Y)
  #7
Member
 
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11
NightWing is on a distinguished road
Hi All,

In my problem as stated above, i am using fixedGradient to apply a uniform heat flux boundary condition on walls. Suppose I want to apply heat flux condition on the surface of a tube through which water is flowing. since i want to apply different heat flux at the top side and bottom side of the top i have written a boundary condition like

topside
{
type fixedGradient;
gradient uniform 1321.549;
}

bottomside
{
type fixedGradient;
gradient uniform 320.145;
}

And I have set the internalfield of Temperature field to be at room temperature i.e. 298K. But when i run the simulation, the temperature on the bottom walls falls below 298K or even goes like 180K even. The temperature Equation is

fvScalarMatrix TEqn
(
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(KcEff, T)
);

TEqn.relax();

TEqn.solve();
where KcEff is a dimensioned Scalar for time being.

any suggestions?
NightWing is offline   Reply With Quote

Old   June 3, 2016, 02:00
Default I solved it
  #8
Member
 
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11
NightWing is on a distinguished road
It was an error occurring due to some mistake in m pressure boundary conditions.
It works now.
NightWing is offline   Reply With Quote

Old   June 5, 2016, 23:16
Default
  #9
Member
 
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11
NightWing is on a distinguished road
I am trying to simulate a problem similar to water flowing through a glass tube. The glass tube is provided with constant heat flux and i am using boussinesq approximation to model the natural convection taking place within the tube. The base solver i am using is buoyantBoussinesqPimpleFOAM.

The problem is transient, laminar, incompressible.
I kind of modeled the problem. But i have some doubts regarding this issue.

To apply a constant heat flux condition on tube walls i have used a fixedGradient Boundary condition on 0/T
As we know that Q/A (heat flux) = -k* dt/dx, where k is thermal conductivity of glass

Now i assume that, the water intakes the heat applied on tube walls by convection. therefore Q/A = h* (T - Tinf)

If this formulation is right. I want to find out the (T-Tinf). But as i dont know much about OpenFOAM, i dont know how to compute it. I want to calculate this in every cell of the domain.

Why i need (T-Tinf)? Suppose if i want to calculate the grashoffno from this solver in post processing stage. I can write the grashoff nio equation and it contains this term (T-Tinf). By finding it, i can find out grashoff no also. is it correct?

If my theory is wrong, please correct me. How can i compute that (T-Tinf) from my solver?

Looking forward for your help.
NightWing 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
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 09:42
Sudden jump in Courant number NJG OpenFOAM Running, Solving & CFD 7 May 15, 2014 13:52
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 18:07


All times are GMT -4. The time now is 05:57.