CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

multiphaseInterFoam: timestep error by simulating a co-extrusion nozzle

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 1, 2013, 07:58
Default multiphaseInterFoam: timestep error by simulating a co-extrusion nozzle
  #1
New Member
 
Leon
Join Date: Mar 2013
Posts: 4
Rep Power: 3
Quatschinsky is on a distinguished road
Hey FOAMers,

I am a new OpenFOAM 2.1.1. user and have a problem which I try to solve since 10 days.
Here my case:
I want to simulate a coextrusion nozzle and a Jet-Breakup at the nozzle outlet with the multiphaseInterFoam solver but the timesteps decrease and the Simulation stops after 30 to 80 s (clocktime).
Here a cut of the logfile:
Code:
Courant Number mean: 7.84266e-07 max: 0.107767
Interface Courant Number mean: 0 max: 0
deltaT = 1.11151e-20
Time = 1.3215936608538546e-07

MULES: Solving for alphawater
water volume fraction, min, max = -7.55787e-09 -0.000570536 1
MULES: Solving for alphaoil
oil volume fraction, min, max = -1.4893e-07 -0.0336218 1
MULES: Solving for alphaair
air volume fraction, min, max = 1 0.999999 1
Phase-sum volume fraction, min, max = 1 0.966378 2
MULES: Solving for alphawater
water volume fraction, min, max = -7.55787e-09 -0.000570536 1
MULES: Solving for alphaoil
oil volume fraction, min, max = -1.4893e-07 -0.033558 1
MULES: Solving for alphaair
air volume fraction, min, max = 1 0.999999 1
Phase-sum volume fraction, min, max = 1 0.966442 2
MULES: Solving for alphawater
water volume fraction, min, max = -7.55787e-09 -0.000570536 1
MULES: Solving for alphaoil
oil volume fraction, min, max = -1.4893e-07 -0.0334928 1
MULES: Solving for alphaair
air volume fraction, min, max = 1 0.999999 1
Phase-sum volume fraction, min, max = 1 0.966507 2
MULES: Solving for alphawater
water volume fraction, min, max = -7.55787e-09 -0.000570536 1
MULES: Solving for alphaoil
oil volume fraction, min, max = -1.4893e-07 -0.0334262 1
MULES: Solving for alphaair
air volume fraction, min, max = 1 0.999999 1
Phase-sum volume fraction, min, max = 1 0.966574 2
smoothSolver: Solving for Ux, Initial residual = 0.0105473, Final residual = 0.00090196, No Iterations 6
smoothSolver: Solving for Uy, Initial residual = 0.000925167, Final residual = 6.16274e-05, No Iterations 6
smoothSolver: Solving for Uz, Initial residual = 0.00888806, Final residual = 0.000632785, No Iterations 4
GAMG: Solving for p_rgh, Initial residual = 0.694822, Final residual = 0.0291662, No Iterations 2
time step continuity errors : sum local = 7.81989e-08, global = -1.29592e-12, cumulative = -1.15696e-07
GAMGPCG: Solving for p_rgh, Initial residual = 0.105286, Final residual = 2.9533e-08, No Iterations 11
time step continuity errors : sum local = 1.21996e-13, global = 8.31433e-15, cumulative = -1.15696e-07
ExecutionTime = 32.15 s ClockTime = 32 s

Courant Number mean: 1.38081e-06 max: 0.207025
Interface Courant Number mean: 0 max: 0
deltaT = 5.36895e-21
Time = 1.3215936608539084e-07

#0  Foam::error:[IMG]file:///C:\Users\Leon\AppData\Local\Temp\msohtmlclip1\01\clip_image001.gif[/IMG]rintStack(Foam::Ostream&)  in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/libc.so.6"
#3 at multiphaseMixture.C:0
#4 Foam::multiphaseMixture::solveAlphas(double) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libmultiphaseInterFoam.so"
#5 Foam::multiphaseMixture::solve() in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libmultiphaseInterFoam.so"
#6 
in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/multiphaseInterFoam"
#7 __libc_start_main in "/lib/libc.so.6"
#8 
in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/multiphaseInterFoam"
Floating point exception
Made the geometrie with blockMesh, in paraFoam it looks ok and according to checkMesh it is. Already varied between fine (~35000 cells) and coarse grid (~15000 cells) with no improvment.

A Image of teh geometry is attached: Inlet1 is Oil and Inlet2 Water, the Internalfield is filled with air.
Tried several kinds of Boundary conditions for U (velocity), p_rgh (totalpressure, fixedValue and zeroGradient for inlets and outlet) and alphas (fixedvalue and zeroGradient for inlets) but none of them worked, the current 0 folder looks as follows:

U:

Code:
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
inlet1
{
type fixedValue;
value uniform (0 0 -0.1);
}
inlet2
{
type fixedValue;
value uniform (-707 0 -0.707);
}
outlet
{
type zeroGradient;
}
atmos
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
fixedWall
{
type fixedValue;
value uniform (0 0 0);
}
nozzle
{
type fixedValue;
value uniform (0 0 0);
}
front
{
type wedge;
}
back
{
type wedge;
}
}
p_rgh:
Code:
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet1
{
type zeroGradient;
}
inlet2
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 0;
}
fixedWall
{
type zeroGradient;
}
atmos
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
value uniform 0;
}
nozzle
{ 
type zeroGradient;
}
front
{
type wedge;
}
back
{
type wedge;
}
}
alphair:
Code:
dimensions [0 0 0 0 0 0 0];

internalField uniform 1;

boundaryField
{
inlet1
{
type zeroGradient;
}
inlet2
{
type zeroGradient;
}
outlet
{
type zeroGradient;
}
atmos
{
type inletOutlet;
inletValue uniform 1;
value uniform 1;
}
fixedWall
{
type zeroGradient;
}
nozzle
{
type zeroGradient;
}
front
{
type wedge;
}
back
{
type wedge;
}
}


alphawater:

Code:
dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet1
{
// type fixedValue;
// value uniform 0;
type zeroGradient;
}
inlet2
{
type fixedValue;
value uniform 1;
}
outlet
{
type zeroGradient;
}
atmos
{
type zeroGradient;
}
fixedWall
{
type zeroGradient;
}
nozzle
{
type zeroGradient;
}
front
{
type wedge;
}
back
{
type wedge;
}
}


alphaoil:

Code:
dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet1
{
type fixedValue;
value uniform 1;
}
inlet2
{
// type fixedValue;
// value uniform 0;
type zeroGradient;
}
outlet
{
type zeroGradient;
}
atmos
{
type zeroGradient;
}
fixedWall
{
type zeroGradient;
}
nozzle
{
type zeroGradient;
}
front
{
type wedge;
}
back
{
type wedge;
}
}



How mentioned I use the multiphaseInterFoam solver of the dambreak tutorial, without any changes. In the fvSolution file i played with the cAlpha ( 0 to 2) without any result.

fvSolution:
Code:
solvers
{
pcorr
{
solver PCG;
preconditioner
{
preconditioner GAMG;
tolerance 1e-05;
relTol 0;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration off;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 2;
}
tolerance 1e-05;
relTol 0;
maxIter 100;
}

p_rgh
{
solver GAMG;
tolerance 1e-07;
relTol 0.05;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration on;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}

p_rghFinal
{
solver PCG;
preconditioner
{
preconditioner GAMG;
tolerance 1e-07;
relTol 0;
nVcycles 2;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration on;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
tolerance 1e-07;
relTol 0;
maxIter 20;
}

U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-08;
relTol 0.1;
}

UFinal
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-08;
relTol 0.1;
nSweeps 1;
}
}

PIMPLE
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaSubCycles 4;
cAlpha 2;
}

relaxationFactors
{
fields
{
}
equations
{
"U.*" 1;
}
}


fvSchemes:
Code:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
default Euler;
}

gradSchemes
{
default Gauss linear;
grad(U) Gauss linear;
grad(gamma) Gauss linear;
}

divSchemes
{
div(rho*phi,U) Gauss upwind;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss interfaceCompression;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
pcorr;
p_rgh;
"alpha.*";
}
In the controlDict i varied the deltaT (1e-5 to 1e-10) and the maxCo and maxAlphaCo (0.8 to 0.1).
Controldict:
Code:
application multiphaseInterFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 2;

deltaT 1e-9;

writeControl runTime;

writeInterval 2e-02;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

adjustTimeStep yes;

maxCo 0.1;
maxAlphaCo 0.1;

maxDeltaT 1e-01;
I am very clueless what the problem is about, guess it has something to do with my solversettings, but have no idea about that. In the past days I searched a lot in the forum to find likewise problems and tried to transfer the proposals on my case without any result.
Maybe someone can help me to find the problem.
Thank you in advance,
Leon
Attached Images
File Type: jpg Geometrie.jpg (95.2 KB, 35 views)
Quatschinsky is offline   Reply With Quote

Old   March 15, 2013, 12:49
Default
  #2
New Member
 
Leon
Join Date: Mar 2013
Posts: 4
Rep Power: 3
Quatschinsky is on a distinguished road
problem solved. Need to put a small field of the phases directly at the inlets and everything works fine.
Quatschinsky is offline   Reply With Quote

Old   March 27, 2013, 05:24
Default
  #3
New Member
 
salame ama
Join Date: Dec 2012
Posts: 28
Rep Power: 4
salame is on a distinguished road
hi, did you mean need a setfieldsDict to initialize the internalfield? like:
...
regions
(
boxToCell
{
box ( 0 0 -1 ) ( 0.1461 0.292 1 );
fieldValues
(
volScalarFieldValue alphawater 1
volScalarFieldValue alphaoil 0
...
salame is offline   Reply With Quote

Old   March 28, 2013, 03:35
Thumbs up
  #4
New Member
 
salame ama
Join Date: Dec 2012
Posts: 28
Rep Power: 4
salame is on a distinguished road
Hi, Quatschinsky:
From tutorial of the solver like dambreak4phase, I found the file "alphaair" write like this:
boundaryField
{
leftWall
{
type alphaContactAngle;
thetaProperties
(
( water air ) 90 0 0 0
( oil air ) 90 0 0 0
( mercury air ) 90 0 0 0
( water oil ) 90 0 0 0
( water mercury ) 90 0 0 0
( oil mercury ) 90 0 0 0
);
value uniform 0;
}
....
but yours did not like this, can u tell me whether there are some default setting in it?
salame is offline   Reply With Quote

Old   April 1, 2013, 11:07
Default
  #5
New Member
 
Leon
Join Date: Mar 2013
Posts: 4
Rep Power: 3
Quatschinsky is on a distinguished road
Hey salame

Yeah, exactly i mean setting Fields with the setFieldsdict.
If you just set the Value of the phase at the Inlet equal 1 in the alpha files it was not working but with running the setFieldsdict it is. Just the first 5 to 10 cells at the inlet need to be field with the phase also.

You just need alphacontactangle if the angle between the wall and the phases is not equal 90. If it is equal 90 you can also take zeroGradient.

Regards,
Leon
Quatschinsky is offline   Reply With Quote

Old   April 2, 2013, 22:04
Default
  #6
New Member
 
salame ama
Join Date: Dec 2012
Posts: 28
Rep Power: 4
salame is on a distinguished road
Quote:
Originally Posted by Quatschinsky View Post
Hey salame

Yeah, exactly i mean setting Fields with the setFieldsdict.
If you just set the Value of the phase at the Inlet equal 1 in the alpha files it was not working but with running the setFieldsdict it is. Just the first 5 to 10 cells at the inlet need to be field with the phase also.

You just need alphacontactangle if the angle between the wall and the phases is not equal 90. If it is equal 90 you can also take zeroGradient.

Regards,
Leon
I see, Thank u! Your reply is very detailed.
by the way, i think a extend question.
If the two fluids are injected one by one, how set the setfieldsDict?
is it ok that i reset the setfieldsDict file after the first fluid finish injection?
then how can i determine the revelant "volScalarFieldValue"?
salame is offline   Reply With Quote

Old   June 26, 2013, 06:59
Default buiding problem
  #7
New Member
 
Join Date: Apr 2013
Posts: 24
Rep Power: 3
mebinitap is on a distinguished road
Hi all,

I tried to make multiphaseInterFoam solver in my user directory but got the error as follows :

SOURCE=mymultiphaseInterFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I../myinterFoam -ImultiphaseMixture/lnInclude -I/opt/openfoam220/src/transportModels -I/opt/openfoam220/src/transportModels/incompressible/lnInclude -I/opt/openfoam220/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam220/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam220/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/mymultiphaseInterFoam.o
mymultiphaseInterFoam.C:36:33: fatal error: mymultiphaseMixture.H: No such file or directory
compilation terminated.
make: *** [Make/linuxGccDPOpt/mymultiphaseInterFoam.o] Error 1

wmake libso in the multiphaseMixture inside the directory worked fine. Can anyone please let me know where the error is ?

(Hopefully it kind of belongs to the same thread)

Thanks
mebinitap is offline   Reply With Quote

Old   March 27, 2014, 07:08
Default
  #8
New Member
 
zhanglei
Join Date: May 2013
Location: China
Posts: 19
Rep Power: 3
becklei is on a distinguished road
Quote:
Originally Posted by Quatschinsky View Post
problem solved. Need to put a small field of the phases directly at the inlets and everything works fine.
hi, Quatschinsky:
I met the problem quite same with you. I can not understand " put a small field of the phases directly at the inlets". Can you give me a more detailed explanation.
Thank you in advance!
becklei 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
used OpenFOAM in simulating aluminum extrusion? wendywu OpenFOAM Running, Solving & CFD 0 March 30, 2009 19:45
Simulating nozzle exhaust in a free stream M. Mandour FLUENT 0 November 14, 2008 07:49
Simulating Abrasive water jet nozzle behaviour Marika FLUENT 0 January 26, 2007 06:16
Simulating Abrasive water jet nozzle behaviour Marika FLUENT 0 January 26, 2007 06:15
compressible flow in a counterflow nozzle d.vamsidhar FLUENT 0 November 24, 2005 02:45


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