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

How to debug the error for LTSInterFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 23, 2013, 00:45
Default How to debug the error for LTSInterFoam
  #1
New Member
 
Kshitij kunte
Join Date: Jun 2011
Posts: 16
Rep Power: 6
k.kshitij is on a distinguished road
Hi All,

I'm performing steady state CFD simulation for atomizing a liquid jet in a cylindrical nozzle. I have compiled the code in debug mode and I get the following message when my simulation diverges, can anybody please suggest me what does the error message say. I want to learn in general how to understand these messages and locate where the problem is. Thanks in anticipation.
HTML Code:
Create time

Create mesh for time = 0

Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting turbulence model type RASModel
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    sigmaEps        1.3;
}


Reading g
Calculating field g.h

No finite volume options present


PIMPLE: Operating solver in PISO mode

time step continuity errors : sum local = 11.5327, global = -11.5327, cumulative = -11.5327
GAMGPCG:  Solving for pcorr, Initial residual = 1, Final residual = 0.0252914, No Iterations 4
GAMGPCG:  Solving for pcorr, Initial residual = 0.000189297, Final residual = 8.84765e-06, No Iterations 2
time step continuity errors : sum local = 0.380693, global = 0.00297738, cumulative = -11.5297
Courant Number mean: 5737.01 max: 435114

Starting time loop

Time = 1

Flow time scale min/max = 1.28348e-05, 1e+15
Smoothed flow time scale min/max = 1.28348e-05, 5.36101e+14
MULES: Solving for alpha1
Phase-1 volume fraction = 3.70466e-05  Min(alpha1) = 0  Max(alpha1) = 1
MULES: Solving for alpha1
Phase-1 volume fraction = 7.41328e-05  Min(alpha1) = 0  Max(alpha1) = 1
MULES: Solving for alpha1
Phase-1 volume fraction = 0.000111258  Min(alpha1) = 0  Max(alpha1) = 1
MULES: Solving for alpha1
Phase-1 volume fraction = 0.000148421  Min(alpha1) = 0  Max(alpha1) = 1
DILUPBiCG:  Solving for epsilon, Initial residual = 1, Final residual = 0.0333823, No Iterations 12
bounding epsilon, min: -4.2004e-06 max: 2.56295e-05 average: 5.48135e-06
DILUPBiCG:  Solving for k, Initial residual = 1, Final residual = 0.000150965, No Iterations 1
#0  Foam::error::printStack(Foam::Ostream&) at ~/OpenFOAM/OpenFOAM-2.2.0/src/OSspecific/POSIX/printStack.C:221
#1  Foam::sigFpe::sigHandler(int) at ~/OpenFOAM/OpenFOAM-2.2.0/src/OSspecific/POSIX/signals/sigFpe.C:117
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ~/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverScale.C:57 (discriminator 1)
#4  Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ~/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C:297
#5  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ~/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C:99
#6  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ~/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C:164 (discriminator 1)
#7  Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ~/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude/fvMatrixSolve.C:81
#8  
 at ~/OpenFOAM/OpenFOAM-2.2.0/applications/solvers/multiphase/my_interFoam/LTSInterFoam/../pEqn.H:37 (discriminator 1)
#9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10  
 at ??:?
Floating point exception (core dumped)
k.kshitij is offline   Reply With Quote

Old   July 23, 2013, 03:46
Default
  #2
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 226
Rep Power: 6
Artur is on a distinguished road
I am no expert so may easily be wrong but I think that the problem starts here:
Quote:
Originally Posted by k.kshitij View Post
bounding epsilon, min: -4.2004e-06 max: 2.56295e-05 average: 5.48135e-06
And then when you divide by a very small number you get a floating point exception:
Quote:
Floating point exception (core dumped)
I've had that happen to me at least a couple of times with pimpleDyMFoam.
Artur is offline   Reply With Quote

Old   July 23, 2013, 04:01
Default
  #3
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 226
Rep Power: 6
Artur is on a distinguished road
Having gone through your stack print out I noticed this:

Quote:
Originally Posted by k.kshitij View Post
#8 at ~/OpenFOAM/OpenFOAM-2.2.0/applications/solvers/multiphase/my_interFoam/LTSInterFoam/../pEqn.H:37 (discriminator 1)
it seems to me that you are using a modified version of the solver (my_interFoam?) and it crashes when solving for pEqn around line 37. When I had a quick look at the original code for LTSInterFoam I noticed that the UEqn is solved right after the
Code:
turbulence->correct();
line and only after that comes the pEqn. I am a newbie in OpenFOAM programming so hopefully someone more experienced will comment on this, but perhaps you changed something in the code around there which makes it flip over?
Artur is offline   Reply With Quote

Old   July 23, 2013, 04:12
Default
  #4
New Member
 
Kshitij kunte
Join Date: Jun 2011
Posts: 16
Rep Power: 6
k.kshitij is on a distinguished road
Hi Arthur,

Thanks for the reply, though I have created the a new solver called my_interFoam I have changed nothing in it. I would be adding the temperature field to it, but right now its pretty much similar to the original interfoam. I'm still trying to get why this is happening, but thanks anyways.
k.kshitij is offline   Reply With Quote

Old   July 23, 2013, 04:18
Default
  #5
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 226
Rep Power: 6
Artur is on a distinguished road
For the time being, if I may suggest setting your turbulent quantities in your BC files to some bigger values to see if the small bounding epsilon or k are the problem? If it turns out they aren't then at least you'll know that for sure.
Artur is offline   Reply With Quote

Old   July 23, 2013, 04:34
Default
  #6
Member
 
Join Date: Apr 2013
Posts: 32
Rep Power: 4
simt is on a distinguished road
Quote:
Originally Posted by k.kshitij View Post
Hi All,

...

PIMPLE: Operating solver in PISO mode

time step continuity errors : sum local = 11.5327, global = -11.5327, cumulative = -11.5327
GAMGPCG: Solving for pcorr, Initial residual = 1, Final residual = 0.0252914, No Iterations 4
GAMGPCG: Solving for pcorr, Initial residual = 0.000189297, Final residual = 8.84765e-06, No Iterations 2
time step continuity errors : sum local = 0.380693, global = 0.00297738, cumulative = -11.5297
Courant Number mean: 5737.01 max: 435114

Starting time loop

Time = 1

Flow time scale min/max = 1.28348e-05, 1e+15
Smoothed flow time scale min/max = 1.28348e-05, 5.36101e+14
MULES: Solving for alpha1
Phase-1 volume fraction = 3.70466e-05 Min(alpha1) = 0 Max(alpha1) = 1

...
[/HTML]
Your problems appear from start, I would recommend you to take a look at you bc's. Have you perhaps prescribed both pressure and velocity on the same boundary?

Best regards
simt is offline   Reply With Quote

Old   July 23, 2013, 06:28
Default
  #7
New Member
 
Kshitij kunte
Join Date: Jun 2011
Posts: 16
Rep Power: 6
k.kshitij is on a distinguished road
Hi All,
I was able to come over the earlier error by giving the relTol as zero which was earlier set to 0.1. Now I'm getting a very weird divergence, which says
HTML Code:
  [1] --> FOAM FATAL IO ERROR:  
 [1] error in IOstream "/home/ubuntu/Injector_Sims/ec2_22_7/processor1/114/p" for operation Ostream& operator<<(Ostream&, const Scalar&) 
 [1]  
 [1] file: /home/ubuntu/Injector_Sims/ec2_22_7/processor1/114/p at line 138500.  
 [1]  
 [1]     From function IOstream::check(const char*) const  
 [1]     in file db/IOstreams/IOstreams/IOstream.C at line 99.
I checked the time directories(10, 20 ..) for the value that have been written and found a the field p.gz is being written, as far as LTSinterFoam is concerned we write p_rgh fields and not the p.gz fields. But in this case both p and p_rgh is written. Can anybody tell me what is happening.
k.kshitij is offline   Reply With Quote

Old   July 23, 2013, 06:35
Default
  #8
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 226
Rep Power: 6
Artur is on a distinguished road
From IOStream.C:

Code:
bool Foam::IOstream::check(const char* operation) const
{
    if (bad())
    {
        FatalIOErrorIn
        (
            "IOstream::check(const char*) const", *this
        )   << "error in IOstream " << name() << " for operation " << operation   <= line 99 is here
            << exit(FatalIOError);
    }

    return !bad();
}
There appears to be something wrong with your output stream. Are you dumping the data to the file correctly?
Artur is offline   Reply With Quote

Old   July 23, 2013, 06:41
Default
  #9
Member
 
Join Date: Apr 2013
Posts: 32
Rep Power: 4
simt is on a distinguished road
Quote:
Originally Posted by k.kshitij View Post
I checked the time directories(10, 20 ..) for the value that have been written and found a the field p.gz is being written, as far as LTSinterFoam is concerned we write p_rgh fields and not the p.gz fields. But in this case both p and p_rgh is written. Can anybody tell me what is happening.
interFoam (and LTSInterFoam) outputs both p_rgh and p fields. p_rgh is the only needed field to be supplied in the first time directory though as the p field is computed from p_rgh as p = p_rgh + rho * g * h.
simt is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Switching to debug mode? NJG OpenFOAM Installation 4 March 4, 2013 19:08
how to use gdb to debug openfoam? houkensjtu OpenFOAM Programming & Development 2 October 16, 2012 02:05
Eclipse - case debug error Bufacchi OpenFOAM 1 February 7, 2012 16:15
create the file *.foam phongstar OpenFOAM 11 July 26, 2010 19:23
How to compile OF-1.5 in the debug mode? sandy OpenFOAM Running, Solving & CFD 4 July 8, 2009 08:43


All times are GMT -4. The time now is 10:30.