CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   error when running interFoam (https://www.cfd-online.com/Forums/openfoam/107768-error-when-running-interfoam.html)

houkensjtu October 6, 2012 04:50

error when running interFoam
 
1 Attachment(s)
Hi foamers!

Basically I tried to modify the damBreak tutorial case to become a hagen-poiseuille flow calculation case. The idea is to make a 2d channel and apply uniform alpha=1 everywhere in the calculation field. So since interFoam uses a pimple solver, I thought it could get the classic parabolic velocity profile on outlet.

Attachment 16051

I applied fixedValue inlet and zeroGradient outlet for velocity. For pressure all boundaries are set as zeroGradient. No turbulent model is applied. Other fvSolution and fvScheme files are remained the same as damBreak.

I got the confusing error message:

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
#0 Foam::error::printStack(Foam::Ostream&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/printStack.C:201
#1 Foam::sigFpe::sigHandler(int) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/signals/sigFpe.C:117
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::magSqr(double) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/Scalar.H:153
#4 Foam::plusEqMagSqrOp2<double, double>::operator()(double&, double const&) const at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/ops.H:76
#5 void VectorSpaceOps<3, 1>::SeqOp<double, Foam::VectorSpace<Foam::Vector<double>, double, 3>, Foam::plusEqMagSqrOp2<double, double> >(double&, Foam::VectorSpace<Foam::Vector<double>, double, 3> const&, Foam::plusEqMagSqrOp2<double, double>) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/VectorSpaceM.H:20
#6 double Foam::magSqr<Foam::Vector<double>, double, 3>(Foam::VectorSpace<Foam::Vector<double>, double, 3> const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/VectorSpaceI.H:311
#7 double Foam::mag<Foam::Vector<double>, double, 3>(Foam::VectorSpace<Foam::Vector<double>, double, 3> const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/VectorSpaceI.H:321
#8 void Foam::mag<Foam::Vector<double> >(Foam::Field<double>&, Foam::UList<Foam::Vector<double> > const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/FieldFunctions.C:174
#9 void Foam::mag<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/GeometricFieldFunctions.C:319
#10 Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > Foam::mag<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<Foam::Vect or<double>, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/GeometricFieldFunctions.C:347
#11 Foam::interfaceProperties::calculateK() at ~/OpenFOAM/OpenFOAM-2.1.x/src/transportModels/interfaceProperties/interfaceProperties.C:125
#12 Foam::interfaceProperties::interfaceProperties(Foa m::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::IOdictionary const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/transportModels/interfaceProperties/interfaceProperties.C:201
#13
at ~/OpenFOAM/OpenFOAM-2.1.x/applications/solvers/multiphase/interFoam/createFields.H:82
#14 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#15
in "/home/houken/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPDebug/bin/interFoam"
Floating point exception (core dumped)

Plz help me!
Thanks in advance.

wouter October 6, 2012 08:51

two observations
 
Hello,
Why do you use Interfoam for a single phase flow (alpha=1 everywhere). Is simplefoam of icofoam not simpler?
second observation is that you do not have a pressure setting anywhere, try fixed value on the outlet

I am no expert, but I hope this helps

Best
Wouter

houkensjtu October 6, 2012 10:23

Quote:

Originally Posted by wouter (Post 385206)
Hello,
Why do you use Interfoam for a single phase flow (alpha=1 everywhere). Is simplefoam of icofoam not simpler?
second observation is that you do not have a pressure setting anywhere, try fixed value on the outlet

I am no expert, but I hope this helps

Best
Wouter

Thanks for reply!
I use interfoam because my final goal is to do some bubble simulation. And this is just an experiment through which I want to get familiar with the characteristic of this solver.

As for pressure, I do have tried to fix pressure somewhere like on outlet, but same error came out...

mturcios777 October 6, 2012 10:40

It looks like there is a problem when calculating the properties at the interface. Which makes sense, since you don't have one. I would try simulating in a single-phase solver first, as the formulation of the transport equations is slightly different due to the multiphase mixture.

Once you understand pimpleFoam/icoFoam, jumping into two-phase is not as difficult as you might think...

houkensjtu October 6, 2012 22:39

Quote:

Originally Posted by mturcios777 (Post 385213)
It looks like there is a problem when calculating the properties at the interface. Which makes sense, since you don't have one. I would try simulating in a single-phase solver first, as the formulation of the transport equations is slightly different due to the multiphase mixture.

Once you understand pimpleFoam/icoFoam, jumping into two-phase is not as difficult as you might think...

Good Idea!

I tried to modify the TJunction case in tutorial directory. Same channel geometry, same boundary condition, and I turned simulation type to laminar which has been RAS in original TJunction case.
...And, similar error message came out...

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
No field sources present


PIMPLE: Operating solver in PISO mode


Starting time loop

Courant Number mean: 5e+290 max: 2.5e+292
deltaT = 2e-295
Time = 2e-295

#0 Foam::error::printStack(Foam::Ostream&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/printStack.C:201
#1 Foam::sigFpe::sigHandler(int) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/signals/sigFpe.C:117
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::divideEqOp2<double, double>::operator()(double&, double const&) const at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/ops.H:74
#4 void VectorSpaceOps<3, 0>::eqOpS<Foam::VectorSpace<Foam::Vector<double>, double, 3>, double, Foam::divideEqOp2<double, double> >(Foam::VectorSpace<Foam::Vector<double>, double, 3>&, double const&, Foam::divideEqOp2<double, double>) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/VectorSpaceM.H:13
#5 Foam::VectorSpace<Foam::Vector<double>, double, 3>::operator/=(double) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/VectorSpaceI.H:236
#6 Foam::Field<Foam::Vector<double> >::operator/=(Foam::UList<double> const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/Field.C:709
#7 void Foam::fvc::surfaceIntegrate<Foam::Vector<double> >(Foam::Field<Foam::Vector<double> >&, Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/fvcSurfaceIntegrate.C:76
#8 Foam::tmp<Foam::GeometricField<Foam::Vector<double >, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::surfaceIntegrate<Foam::Vector<double> >(Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/fvcSurfaceIntegrate.C:113
#9 Foam::tmp<Foam::GeometricField<Foam::Vector<double >, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::surfaceIntegrate<Foam::Vector<double> >(Foam::tmp<Foam::GeometricField<Foam::Vector<doub le>, Foam::fvsPatchField, Foam::surfaceMesh> > const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/fvcSurfaceIntegrate.C:130
#10 Foam::fv::gaussDivScheme<Foam::Tensor<double> >::fvcDiv(Foam::GeometricField<Foam::Tensor<double >, Foam::fvPatchField, Foam::volMesh> const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/finiteVolume/divSchemes/gaussDivScheme/gaussDivScheme.C:63
#11 Foam::tmp<Foam::GeometricField<Foam::innerProduct< Foam::Vector<double>, Foam::Tensor<double> >::type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::div<Foam::Tensor<double> >(Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::word const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/fvcDiv.C:92
#12 Foam::tmp<Foam::GeometricField<Foam::innerProduct< Foam::Vector<double>, Foam::Tensor<double> >::type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::div<Foam::Tensor<double> >(Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/fvcDiv.C:132
#13 Foam::tmp<Foam::GeometricField<Foam::innerProduct< Foam::Vector<double>, Foam::Tensor<double> >::type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::div<Foam::Tensor<double> >(Foam::tmp<Foam::GeometricField<Foam::Tensor<doub le>, Foam::fvPatchField, Foam::volMesh> > const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/fvcDiv.C:151
#14 Foam::incompressible::laminar::divDevReff(Foam::Ge ometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&) const at ~/OpenFOAM/OpenFOAM-2.1.x/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C:200
#15
at ~/OpenFOAM/OpenFOAM-2.1.x/applications/solvers/incompressible/pimpleFoam/UEqn.H:8
#16 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#17
in "/home/houken/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPDebug/bin/pimpleFoam"
Floating point exception (core dumped)


Different thing is, this time no error message about interface, which is obvious because I used single phase pimpleFoam...
I think the problem may not be improper setting of interface, but sth. else I misunderstood or missed in pimple solver...
Plz help!

houkensjtu October 6, 2012 22:43

It also seems that courant number became extremely high at the very first of my test case, what may be the reason of that?
Or how can I test by myself to detect what's going on...
(I have compiled openfoam with a debug flag, but I don't know what/how to debug)

duongquaphim October 7, 2012 16:12

Hi,

I think you need to set at least one boundary patch with fixed value for pressure. Also I supposed you set 0 velocity and zeroGradient for pressure at 2 walls. I think if you do like that you can have the case run fine. I did run interFoam for single phase several times without any problems.

Duong

mturcios777 October 7, 2012 19:13

I was about to mention the possibility of giving us your BCs and setup. I'll be on vacation for the next three weeks (real vacation) so hopefully someone can help you while I'm gone.

houkensjtu October 7, 2012 20:02

Quote:

Originally Posted by mturcios777 (Post 385385)
I was about to mention the possibility of giving us your BCs and setup. I'll be on vacation for the next three weeks (real vacation) so hopefully someone can help you while I'm gone.

Thanks for help!
Finally I found the problem...It was stupid...My only block mesh had wrong order of vertices, although the shape and mesh of it looked like OK in parafoam, it seems openfoam misunderstood the geometry.


All times are GMT -4. The time now is 12:06.