CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   reading transportProperties of multiphaseInterFoam Error (https://www.cfd-online.com/Forums/openfoam-solving/166167-reading-transportproperties-multiphaseinterfoam-error.html)

AbbasRahimi February 3, 2016 16:08

reading transportProperties of multiphaseInterFoam Error
 
Hello everyone,

I'm trying to run multiphaseInterFoam for a case and I get this error. I wonder if anyone here can help me to overcome this error?

Thank you.



Create mesh for time = 0

Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 in "/lib64/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#5 Foam::multiphaseMixture::multiphaseMixture(Foam::G eometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:?
#6
at ??:?
#7 __libc_start_main in "/lib64/libc.so.6"
#8
at /usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/x86_64/elf/start.S:116
Floating exception

alexeym February 4, 2016 04:27

Hi,

Answering your question: use correct initial conditions (or properties, maybe you have made a mistake there).

More detailed answer would be:

If you look at the error, you can find key word "divide":

Code:

#2 in "/lib64/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam:perator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?

In general this error happens when you try to divide something by 0. Error happened during construction of the mixture, so you go to $FOAM_APP/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C and look into constructor of the class, the first division is here:

Code:

Foam::multiphaseMixture::multiphaseMixture
(
    const volVectorField& U,
    const surfaceScalarField& phi
)
:
...
    nu_
    (
        IOobject
        (
            "nu",
            mesh_.time().timeName(),
            mesh_
        ),
        mu()/rho()
    ),
...

and it means somewhere density is zero, so if you take a look at rho method:

Code:

Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixture::rho() const
{
    PtrDictionary<phase>::const_iterator iter = phases_.begin();

    tmp<volScalarField> trho = iter()*iter().rho();

    for (++iter; iter != phases_.end(); ++iter)
    {
        trho() += iter()*iter().rho();
    }

    return trho;
}

iter() is alpha.phase_name volume field, tier().rho() is density of the phase, you have put into transportProperties. Which one is zero? I can only guess, yet you can try to find it in your case files.

AbbasRahimi February 4, 2016 04:41

Alexey,

Thank you for response. Your answer totally make sense but I double checked my transportProperties and couldn't find any rho=0 anywhere.


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

phases
(
air
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 29.522;
rho rho [ 1 -3 0 0 0 0 0 ] 1129;
BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 378.7336;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 8.9686e-07;
k k [ 0 0 1 0 0 0 0 ] 10;
n n [ 0 0 0 0 0 0 0 ] 0.2407;
}

}
base
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 295.22;
rho rho [ 1 -3 0 0 0 0 0 ] 1129;
BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 262.65;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 0.000886;
k k [ 0 0 1 0 0 0 0 ] 10;
n n [ 0 0 0 0 0 0 0 ] 0.3005;
}

}
tcap
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 295.22;
rho rho [ 1 -3 0 0 0 0 0 ] 1129;
BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 262.65;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 0.000886;
k k [ 0 0 1 0 0 0 0 ] 10;
n n [ 0 0 0 0 0 0 0 ] 0.3005;
}

}
bcap
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 295.22;
rho rho [ 1 -3 0 0 0 0 0 ] 1129;
BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 262.65;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 0.000886;
k k [ 0 0 1 0 0 0 0 ] 10;
n n [ 0 0 0 0 0 0 0 ] 0.3005;
}

}
skirt
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 295.22;
rho rho [ 1 -3 0 0 0 0 0 ] 1129;
BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 262.65;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 0.000886;
k k [ 0 0 1 0 0 0 0 ] 10;
n n [ 0 0 0 0 0 0 0 ] 0.3005;
}

}


);

refPhase tcap;

sigmas
(
(air tcap) 0.0
(air bcap) 0.0
(air skirt) 0.0
(air base) 0.0
(tcap bcap) 0.0
(tcap skirt) 0.0
(tcap base) 0.0
(bcap base) 0.0
(bcap skirt) 0.0
(base skirt) 0.0
);


// ************************************************** *********************** //

alexeym February 4, 2016 04:49

OK. You did not find it in transportProperties, search in 0/alpha.* files. Since you did not post your case, other people can only GUESS what is wrong. And, in general, guessing game is rather annoying.


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