CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   interFoam error with imported Gambit mesh (http://www.cfd-online.com/Forums/openfoam-solving/119511-interfoam-error-imported-gambit-mesh.html)

shuoxue June 18, 2013 23:13

interFoam error with imported Gambit mesh
 
1 Attachment(s)
I am solving the damBreak tutorial in user guide with imported Gambit mesh.
Boundary conditions in boundary file have been rewrited.

This is .msh file generated in Gambit.
https://skydrive.live.com/?cid=a9e4f...4756B9AE%21105

setFields is ok.
Attachment 22810

Error occurs when I solve the case with interFoam.
Code:

luyao@luyao:~/OpenFOAM/luyao-2.2.0/run/case/multiphase-interFoam/1/damBreak2$ interFoam
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.2.0-5be49240882f
Exec  : interFoam
Date  : Jun 19 2013
Time  : 10:26:21
Host  : "luyao"
PID    : 4020
Case  : /home/luyao/OpenFOAM/luyao-2.2.0/run/case/multiphase-interFoam/1/damBreak2
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

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 laminar

Reading g
Calculating field g.h

No finite volume options present

time step continuity errors : sum local = 0, global = 0, cumulative = 0
DICPCG:  Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
Courant Number mean: 0 max: 0

Starting time loop

Courant Number mean: 0 max: 0
Interface Courant Number mean: 0 max: 0
deltaT = 0.00119048
Time = 0.00119048

MULES: Solving for alpha1
Phase-1 volume fraction = 0.130194  Min(alpha1) = 0  Max(alpha1) = 1
MULES: Solving for alpha1
Phase-1 volume fraction = 0.130194  Min(alpha1) = 0  Max(alpha1) = 1
DICPCG:  Solving for p_rgh, Initial residual = 1, Final residual = 0.0365699, No Iterations 3
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2  Uninterpreted:
#3  at tensorField.C:0
#4 
 in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/interFoam"
#5 
 in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/interFoam"
#6 
 in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/interFoam"
#7  __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#8 
 in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/interFoam"

Thanks in advance.

nlinder June 19, 2013 07:08

Hi!

I have similar problems, but only with a modified interFoam solver so far. Interesting that it also happens with the standard solver. What are your boundary conditions?

Greetings

nlinder June 19, 2013 07:28

Update:

Can you confirm that commenting out the first two lines here (pEqn.H):
Code:

        if (pimple.finalNonOrthogonalIter())
        {
            //phi = phiHbyA - p_rghEqn.flux();

            //U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
            U.correctBoundaryConditions();
            fvOptions.correct(U);
        }

"solves" the problem (at least the error message is gone - solution obviously not correct)?

The reason at this point is, that p_rghEqn.flux() returns a "-nan" field. Your first written timestep should be "-nan" everywhere in p_rgh, correct?

BTW: Serial or parallel?

greetings

nlinder June 19, 2013 09:30

Sorry for answering myself all the time but:
It seems as if
Code:

- ghf*fvc::snGrad(rho)
in "surfaceScalarField phig" produces an "-nan" on a boundary. Not in all cases, therefore I do not yet know where it comes from. Can you maybe confirm that in your case? Just comment it out and run again.

Greetings
Nicklas

shuoxue June 20, 2013 23:42

Quote:

Originally Posted by nlinder (Post 434835)
Sorry for answering myself all the time but:
It seems as if
Code:

- ghf*fvc::snGrad(rho)
in "surfaceScalarField phig" produces an "-nan" on a boundary. Not in all cases, therefore I do not yet know where it comes from. Can you maybe confirm that in your case? Just comment it out and run again.

Greetings
Nicklas

Hi, nlinder!
I am afraid that we got different problems although we received similar error.
Mine has been solved, see here.

Which line do you want me to comment?
Both
Code:

phi = phiHbyA - p_rghEqn.flux();
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);

and
Code:

- ghf*fvc::snGrad(rho)

nlinder June 21, 2013 03:48

Hi!

Allright, thanks for the information. In my case it was enough to comment out
Code:

- ghf*fvc::snGrad(rho)
I now specified a boundary condition for rho and in my testCase I had some issues with the pressure and Velocity BC. I think I somehow "solved" that problem currently.
Thanks for discussing :)

Nicklas


All times are GMT -4. The time now is 13:28.