CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

Possible bug in multiphaseInterFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 15, 2007, 20:36
Default Description: At Time = 0.02
  #1
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Description:

At Time = 0.0278082 in the default damBreak4phaseFine case, we get this message in the stderr output. (Full log file is attached as well: log.tar.bz2 )

#0 Foam::error::printStack(Foam:stream&) in "/home/madhavan/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/madhavan/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 __restore_rt in "/lib64/tls/libc.so.6"
#3 Foam::GAMGSolver::scalingFactor(Foam::Field<double >&, Foam::Field<double> const&, Foam::Field<double> const&, Foam::Field
<double> const&) const in "/home/madhavan/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 Foam::GAMGSolver::scalingFactor(Foam::Field<double >&, Foam::lduMatrix const&, Foam::Field<double>&, Foam::FieldField<Foam
::Field, double> const&, Foam::UPtrList<foam::lduinterfacefield> const&, Foam::Field<double> const&, unsigned char) con
st in "/home/madhavan/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#5 Foam::GAMGSolver::Vcycle(Foam::PtrList<foam::lduma trix::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 in "/home/madhavan/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#6 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/home/madhavan/OpenFOA
M/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#7 Foam::fvMatrix<double>::solve(Foam::Istream&) in "/home/madhavan/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libfiniteVol
ume.so"
#8 main in "/home/madhavan/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/multiphaseInterFoam"
#9 __libc_start_main in "/lib64/tls/libc.so.6"
#10 Foam::regIOobject::readIfModified() in "/home/madhavan/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/multipha
seInterFoam"

Solver/Application:
multiphaseInterFoam (OpenFOAM Version 1.4.1)

Source file:
Not sure. Check the diff output (posted below) from multiphaseInterFoam source (OF v 1.4) versus that from OF v 1.4.1.

Testcase:
damBreak4phaseFine. Interestingly the damBreak4phase case seems to run OK in OF 1.4.1.

Platform:
So far linux64.

Version:
(OpenFOAM version 1.4.1) OF Version 1.4 seems to be unaffected. The case runs without problems there.

Notes:

Related discussion thread: http://www.cfd-online.com/OpenFOAM_D...ges/1/315.html

For some reason, Nobody reported this bug

Source code diff output:

[madhavan@tohirdhurd ~]$ diff multiphaseInterFoam.OF1.4/createFields.H multiphaseInterFoam.OF1.4.1/createFields.H

[madhavan@tohirdhurd ~]$ diff multiphaseInterFoam.OF1.4/multiphaseInterFoam.C multiphaseInterFoam.OF1.4.1/multiphaseInterFoam.C

[madhavan@tohirdhurd ~]$ diff multiphaseInterFoam.OF1.4/pEqn.H multiphaseInterFoam.OF1.4.1/pEqn.H

[madhavan@tohirdhurd ~]$ diff multiphaseInterFoam.OF1.4/UEqn.H multiphaseInterFoam.OF1.4.1/UEqn.H

[madhavan@tohirdhurd ~]$ diff multiphaseInterFoam.OF1.4/multiphaseMixture/multiphaseMixture.C multiphaseInterFoam.OF1.4.1/multiphaseMixture/multiphaseMixture.C
344c344
< fvPatchVectorFieldField& nHatb
---
> surfaceVectorField::GeometricBoundaryField& nHatb
347c347
< const fvPatchScalarFieldField& gbf = refPhase_.boundaryField();
---
> const volScalarField::GeometricBoundaryField& gbf = refPhase_.boundaryField();

[madhavan@tohirdhurd ~]$ diff multiphaseInterFoam.OF1.4/multiphaseMixture/multiphaseMixture.H multiphaseInterFoam.OF1.4.1/multiphaseMixture/multiphaseMixture.H
51d50
< #include "fvPatchFieldFields.H"
205c204
< fvPatchVectorFieldField& nHatb
---
> surfaceVectorField::GeometricBoundaryField& nHatb

[madhavan@tohirdhurd ~]$ diff multiphaseInterFoam.OF1.4/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C multiphaseInterFoam.OF1.4.1/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
79c79
< const scalarField& iF
---
> const DimensionedField<scalar,>& iF
90c90
< const scalarField& iF,
---
> const DimensionedField<scalar,>& iF,
102c102
< const scalarField& iF,
---
> const DimensionedField<scalar,>& iF,
116c116
< const scalarField& iF
---
> const DimensionedField<scalar,>& iF
126d125
< // Write

[madhavan@tohirdhurd ~]$ diff multiphaseInterFoam.OF1.4/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.H multiphaseInterFoam.OF1.4.1/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
145c145
< const scalarField&
---
> const DimensionedField<scalar,>&
152c152
< const scalarField&,
---
> const DimensionedField<scalar,>&,
162c162
< const scalarField&,
---
> const DimensionedField<scalar,>&,
179c179
< const scalarField&
---
> const DimensionedField<scalar,>&
183c183,186
<virtual> clone(const scalarField& iF) const
---
> virtual tmp<fvpatchscalarfield> clone
> (
> const DimensionedField<scalar,>& iF
> ) const

[madhavan@tohirdhurd ~]$ diff multiphaseInterFoam.OF1.4/multiphaseMixture/phase/phase.C multiphaseInterFoam.OF1.4.1/multiphaseMixture/phase/phase.C
25c25
< \*----------------------------------------------------------------------------*/
---
> \*---------------------------------------------------------------------------*/

[madhavan@tohirdhurd ~]$ diff multiphaseInterFoam.OF1.4/multiphaseMixture/phase/phase.H multiphaseInterFoam.OF1.4.1/multiphaseMixture/phase/phase.H
msrinath80 is offline   Reply With Quote

Old   September 15, 2007, 20:42
Default Addendum: The case of the phas
  #2
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Addendum: The case of the phases needs to be changed in setFieldsDict before running the case. For example, alphaAir needs to be changes to alphaair, alphaMercury to alphamercury and so on. But this isn't the bug. This is just a minor typo correction.
msrinath80 is offline   Reply With Quote

Old   September 15, 2007, 20:56
Default Addendum2: The terminal output
  #3
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Addendum2: The terminal output also stated the following when the solver stopped:

"Floating point exception"
msrinath80 is offline   Reply With Quote

Old   September 16, 2007, 05:00
Default I have found that the fine-mes
  #4
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
I have found that the fine-mesh case does not run reliably in either 1.4 or 1.4.1 whereas the coarse mesh case runs fine in both. The problem relates to the phase fraction unboundedness possible with 2nd-order spatial schemes which if larger than the density ratio causes the code to fail. I have solved this problem in the 2-phase VOF codes by developing the MULES solver which guarantees boundedness for well-posed problems but have not yet completed the multi-phase version of this; I hope to have done so for the next release.

In the meantime you can get the fine mesh case to run if you reduce the compressive effect of the scheme used for the "anti-diffusion" term slightly. This can be done by switching from the quartic to the quadratic scheme in OpenFOAM-1.4.1/src/transportModels/interfaceProperties/interfaceCompression/inte rfaceCompression.H
and recompiling the transportModels library. If switching between these schemes is found to be generally useful I will make it run-time selectable in the next release.
henry is offline   Reply With Quote

Old   September 16, 2007, 16:31
Default Thanks Henry, your suggestion
  #5
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Thanks Henry, your suggestion seems to work. No problems so far. I do have one question however. How do you set the alphas field (i.e. all volume fractions in 1 file) in the 0/ directory?
msrinath80 is offline   Reply With Quote

Old   September 16, 2007, 16:38
Default You don't need to have an alph
  #6
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
You don't need to have an alphas file as it is generated automatically by the code and used for post-processing only.
henry is offline   Reply With Quote

Old   September 16, 2007, 16:41
Default Thanks Henry.
  #7
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Thanks Henry.
msrinath80 is offline   Reply With Quote

Old   September 17, 2007, 20:30
Default Does this problem only relates
  #8
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 18
paka is on a distinguished road
Does this problem only relates to multiphaseInterFoam solver or does it also affects other interFoam solvers including rasInterFoam?

Krystian
paka is offline   Reply With Quote

Old   September 18, 2007, 02:53
Default I have solved this problem in
  #9
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
I have solved this problem in the 2-phase VOF codes including rasInterFoam by developing the MULES solver which guarantees boundedness for well-posed problems but I have not yet completed the multi-phase version of this; I hope to have done so for the next release.
henry is offline   Reply With Quote

Old   January 16, 2008, 12:31
Default Henry - do you have a validati
  #10
irc
New Member
 
Ian Cowan
Join Date: Mar 2009
Location: London, UK
Posts: 28
Rep Power: 17
irc is on a distinguished road
Henry - do you have a validation test case that you are using to judge the performance of the multiphaseInterFoam solver, and if so could you please share the reference?

I am guessing that the tutorial test case (an extension of the dam break problem, with three liquids) is an arbitrary problem, chosen simply as a demonstration.
irc is offline   Reply With Quote

Old   January 16, 2008, 15:38
Default I have not run any rigorous va
  #11
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
I have not run any rigorous validation cases as this development was more of a demonstration and was not part of a funded project. Further development is needed, in particular the extension of MULES for multiphase problems and then further validation. Do you have any suggestions for validation cases?

Henry
henry is offline   Reply With Quote

Old   January 17, 2008, 17:22
Default Understood. I wonder what the
  #12
irc
New Member
 
Ian Cowan
Join Date: Mar 2009
Location: London, UK
Posts: 28
Rep Power: 17
irc is on a distinguished road
Understood. I wonder what the commercial code vendors use to validate their models ... I'll investigate.
irc is offline   Reply With Quote

Old   March 16, 2008, 21:07
Default I've met the same problem when
  #13
New Member
 
Shaokun Xu
Join Date: Mar 2009
Location: Tianjin, Tianjin, P.R.C.
Posts: 2
Rep Power: 0
pierre_xu is on a distinguished road
I've met the same problem when I try to run a custom case set by myself. Unfortunately although I changed the scheme from quartic to quadratic as Henry recommended, the problem still exists.

My case is a 2-D wave tank which has approximately 60000 cells, I just want to employ a viscoid phase in order to absorb waves at the far end of the tank, so I modified the damBreak4phase case, changed blockMeshDict and re-blockMesh and setFields. The program exited in no more than 3 time steps and reported the same error as Srinath met.

by the way, my wave tank based on interFoam works quite well, so is it possible to set up an absorption zone where water has large viscosity in it?
pierre_xu is offline   Reply With Quote

Old   March 25, 2008, 05:36
Default In "multiphaseMixture/multipha
  #14
Member
 
Richard Kenny
Join Date: Mar 2009
Posts: 64
Rep Power: 18
richpaj is on a distinguished road
In "multiphaseMixture/multiphaseMixture.C" I believe there is an initialization
bug in

Foam::tmp<foam::volscalarfield> Foam::multiphaseMixture::rho()


The line:

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

should be replaced by something like

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

to ensure correct initialization. Currently the density is approximately double
what is intended.

Regards,

RGK.
richpaj is offline   Reply With Quote

Old   March 25, 2008, 08:05
Default The plan was to initialize trh
  #15
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
The plan was to initialize trho with the density of the first phase and than add the other phases but it looks like I forgot to increment the iterator after the initialization. Try

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

Henry
henry is offline   Reply With Quote

Old   March 25, 2008, 08:09
Default or slightly neater tmp<
  #16
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
or slightly neater

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

for(++iter; iter != phases_.end(); ++iter)

and the same goes for the mu() and muf() functions.

H
henry is offline   Reply With Quote

Old   March 25, 2008, 20:09
Default Many thanks for the clarificat
  #17
Member
 
Richard Kenny
Join Date: Mar 2009
Posts: 64
Rep Power: 18
richpaj is on a distinguished road
Many thanks for the clarification and elegant solution.

I only spotted the issue with rho() on account of the extreme
densities I was using, mu() and muf() slipped under the radar.


RGK
richpaj 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
MultiphaseInterFoam virginie_e OpenFOAM Running, Solving & CFD 1 July 21, 2009 03:37
Problems with tutorialcase multiphaseInterFoam damBreak4phaseFine jfb OpenFOAM Bugs 2 February 29, 2008 06:20
MultiphaseInterFoam question msrinath80 OpenFOAM Running, Solving & CFD 0 September 17, 2007 14:45
MultiphaseInterFoam damBreak4phaseFine case hsieh OpenFOAM Installation 3 April 12, 2007 19:50


All times are GMT -4. The time now is 15:24.