
[Sponsors] 
March 15, 2011, 13:07 
Full pipe 3D using icoFoam

#1 
New Member
Petar Zivkovic
Join Date: Feb 2011
Posts: 6
Rep Power: 6 
Hi foamers! hope someone has solution for my problem because i don't know what is going on with my model!
First of all i have to mention that i modeled 3D rectangular pipe,unsteady laminar flow, and simulation went fine after some tweaking ... i got stable solution in this case but as soon as i change geometry (with same p,U,boundery fields,fvSolution,fvSchemas...etc) i can't tweak model to convergent. Definition of the problem: This is how I modeled it: My input files: blockMeshDict: Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 0.1; vertices ( (0.15 0 0.15) (0.15 0 0.15) (0.15 0 0.15) (0.15 0 0.15) (0.35355 0 0.35355) (0.35355 0 0.35355) (0.35355 0 0.35355) (0.35355 0 0.35355) (0.15 10 0.15) (0.15 10 0.15) (0.15 10 0.15) (0.15 10 0.15) (0.35355 10 0.35355) (0.35355 10 0.35355) (0.35355 10 0.35355) (0.35355 10 0.35355) ); blocks ( hex (0 3 2 1 8 11 10 9) (10 10 50) simpleGrading (1 1 1) hex (0 1 5 4 8 9 13 12) (10 10 50) simpleGrading (1 1 1) hex (1 2 6 5 9 10 14 13) (10 10 50) simpleGrading (1 1 1) hex (2 3 7 6 10 11 15 14) (10 10 50) simpleGrading (1 1 1) hex (3 0 4 7 11 8 12 15) (10 10 50) simpleGrading (1 1 1) ); edges ( arc 4 5 (0 0 0.5) arc 5 6 (0.5 0 0) arc 6 7 (0 0 0.5) arc 7 4 (0.5 0 0) arc 12 13 (0 10 0.5) arc 13 14 (0.5 10 0) arc 14 15 (0 10 0.5) arc 15 12 (0.5 10 0) ); patches ( patch inlet ( (0 3 2 1) (0 1 5 4) (1 2 6 5) (2 3 7 6) (3 0 4 7) ) patch outlet ( (8 9 10 11) (8 12 13 9) (9 13 14 10) (10 14 15 11) (11 15 12 8) ) wall walls ( (4 5 13 12) (5 6 14 13) (6 7 15 14) (7 4 12 15) ) ); mergePatchPairs ( ); // ************************************************************************* // Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application icoFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 30; deltaT 1; writeControl timeStep; writeInterval 1; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; // ************************************************************************* // Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; // default steadyState; } gradSchemes { default Gauss linear; grad(p) Gauss linear; } divSchemes { default none; div(phi,U) Gauss linear; } laplacianSchemes { default none; laplacian(nu,U) Gauss linear corrected; laplacian((1A(U)),p) Gauss linear corrected; } interpolationSchemes { default linear; interpolate(HbyA) linear; } snGradSchemes { default corrected; } fluxRequired { default no; p ; } // ************************************************************************* // Code:
solvers { p { solver PCG; preconditioner DIC; tolerance 1e06; reTol 0; } U { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0; } } PISO { nCorrectors 2; nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; } // ************************************************************************* // Code:
dimensions [0 2 2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type zeroGradient; } outlet { type fixedValue; value uniform 0; } walls { type zeroGradient; } } Code:
dimensions [0 1 1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type fixedValue; value uniform (0 1 0); } outlet { type zeroGradient; } walls { type fixedValue; value uniform (0 0 0); } } really can't find problem...maybe icoFoam is not solver that i should use for this problem...any sugestion would be great! finally these errors and results i get on calculation: Code:
Create time Create mesh for time = 0 Reading transportProperties Reading field p Reading field U Reading/calculating face flux field phi Starting time loop Time = 1 Courant Number mean: 0 max: 100 DILUPBiCG: Solving for Ux, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 7.24921e06, No Iterations 35 DILUPBiCG: Solving for Uz, Initial residual = 0, Final residual = 0, No Iterations 0 DICPCG: Solving for p, Initial residual = 1, Final residual = 9.26667e07, No Iterations 151 time step continuity errors : sum local = 9.26667e07, global = 8.46286e09, cumulative = 8.46286e09 DICPCG: Solving for p, Initial residual = 0.00918897, Final residual = 9.76998e07, No Iterations 136 time step continuity errors : sum local = 9.97464e05, global = 9.91256e07, cumulative = 9.82793e07 ExecutionTime = 1.41 s ClockTime = 2 s Time = 2 Courant Number mean: 4.98906 max: 143.985 DILUPBiCG: Solving for Ux, Initial residual = 0.751531, Final residual = 9.97711e06, No Iterations 28 DILUPBiCG: Solving for Uy, Initial residual = 0.313552, Final residual = 8.39474e06, No Iterations 29 DILUPBiCG: Solving for Uz, Initial residual = 0.75153, Final residual = 7.57783e06, No Iterations 29 DICPCG: Solving for p, Initial residual = 0.49221, Final residual = 8.38074e07, No Iterations 147 time step continuity errors : sum local = 1.2671e05, global = 8.75128e09, cumulative = 9.91545e07 DICPCG: Solving for p, Initial residual = 0.0117698, Final residual = 7.11563e07, No Iterations 137 time step continuity errors : sum local = 0.000408209, global = 2.92362e06, cumulative = 1.93208e06 ExecutionTime = 2.49 s ClockTime = 3 s Time = 3 Courant Number mean: 26.4226 max: 916.486 DILUPBiCG: Solving for Ux, Initial residual = 0.809749, Final residual = 9.30861e06, No Iterations 31 DILUPBiCG: Solving for Uy, Initial residual = 0.389871, Final residual = 7.63744e06, No Iterations 40 DILUPBiCG: Solving for Uz, Initial residual = 0.809748, Final residual = 9.34365e06, No Iterations 36 DICPCG: Solving for p, Initial residual = 0.604599, Final residual = 9.48499e07, No Iterations 147 time step continuity errors : sum local = 8.65678e05, global = 1.26445e07, cumulative = 2.05852e06 DICPCG: Solving for p, Initial residual = 0.0148976, Final residual = 7.70586e07, No Iterations 137 time step continuity errors : sum local = 0.00252944, global = 1.84451e05, cumulative = 1.63866e05 ExecutionTime = 3.67 s ClockTime = 4 s Time = 4 Courant Number mean: 147.201 max: 4510.08 DILUPBiCG: Solving for Ux, Initial residual = 0.77792, Final residual = 9.67807e06, No Iterations 73 DILUPBiCG: Solving for Uy, Initial residual = 0.489883, Final residual = 5.18925e06, No Iterations 73 DILUPBiCG: Solving for Uz, Initial residual = 0.77792, Final residual = 6.03916e06, No Iterations 73 DICPCG: Solving for p, Initial residual = 0.694876, Final residual = 8.19978e07, No Iterations 148 time step continuity errors : sum local = 0.000558808, global = 2.33549e06, cumulative = 1.40511e05 DICPCG: Solving for p, Initial residual = 0.0226691, Final residual = 6.59866e07, No Iterations 139 time step continuity errors : sum local = 0.0122011, global = 9.60505e05, cumulative = 8.19994e05 ExecutionTime = 5.32 s ClockTime = 5 s . . . Time = 14 Courant Number mean: 2.95062e+86 max: 2.42912e+89 DILUPBiCG: Solving for Ux, Initial residual = 0.998523, Final residual = 1.01741e+07, No Iterations 1001 DILUPBiCG: Solving for Uy, Initial residual = 0.994646, Final residual = 2.2903, No Iterations 1001 DILUPBiCG: Solving for Uz, Initial residual = 0.999568, Final residual = 69.2939, No Iterations 1001 DICPCG: Solving for p, Initial residual = 1, Final residual = 35.9498, No Iterations 1001 time step continuity errors : sum local = 1.53483e+98, global = 3.01763e+92, cumulative = 3.01763e+92 DICPCG: Solving for p, Initial residual = 0.950592, Final residual = 54.6822, No Iterations 1001 time step continuity errors : sum local = 2.09996e+101, global = 1.03985e+97, cumulative = 1.03988e+97 ExecutionTime = 142.67 s ClockTime = 143 s Time = 15 Courant Number mean: 1.99707e+101 max: 2.02545e+104 #0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Uninterpreted: #3 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so" #4 in "/opt/openfoam171/applications/bin/linuxGccDPOpt/icoFoam" #5 in "/opt/openfoam171/applications/bin/linuxGccDPOpt/icoFoam" #6 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6" #7 in "/opt/openfoam171/applications/bin/linuxGccDPOpt/icoFoam" Floating point exception Thanks in advance...my CFD knowledge was based on basics of Finite Elements method...so Finite Volumes is something new for me...so sorry for some stupid mistakes if i made using OpenFOAM! regards! Petar Zivkovic 

March 15, 2011, 13:21 

#2 
Senior Member
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 252
Rep Power: 12 
Hi Petar,
reduce deltaT in system/controlDict to a much lower value, say 0.001, and try again. Martin 

March 15, 2011, 14:16 

#3 
New Member
Petar Zivkovic
Join Date: Feb 2011
Posts: 6
Rep Power: 6 
Hi Matin,
Thanx for quick replay... but same problem occurred: Code:
Time = 0.015 Courant Number mean: 15.6518 max: 277.137 DILUPBiCG: Solving for Ux, Initial residual = 0.745384, Final residual = 8.16797e06, No Iterations 53 DILUPBiCG: Solving for Uy, Initial residual = 0.78606, Final residual = 8.31362e06, No Iterations 50 DILUPBiCG: Solving for Uz, Initial residual = 0.745302, Final residual = 5.90854e06, No Iterations 50 DICPCG: Solving for p, Initial residual = 0.904914, Final residual = 8.3528e07, No Iterations 227 time step continuity errors : sum local = 6.3841e05, global = 1.01036e07, cumulative = 3.16388e07 DICPCG: Solving for p, Initial residual = 0.713999, Final residual = 9.34143e07, No Iterations 221 time step continuity errors : sum local = 0.000113492, global = 2.62634e08, cumulative = 3.42651e07 ExecutionTime = 17.02 s ClockTime = 17 s Time = 0.016 Courant Number mean: 69.3057 max: 50974.2 DILUPBiCG: Solving for Ux, Initial residual = 0.999403, Final residual = 0.0429228, No Iterations 1001 DILUPBiCG: Solving for Uy, Initial residual = 0.998282, Final residual = 0.426477, No Iterations 1001 DILUPBiCG: Solving for Uz, Initial residual = 0.999378, Final residual = 0.0676183, No Iterations 1001 DICPCG: Solving for p, Initial residual = 0.979382, Final residual = 8.03998e07, No Iterations 762 time step continuity errors : sum local = 0.00285593, global = 2.08686e06, cumulative = 1.7442e06 DICPCG: Solving for p, Initial residual = 0.993121, Final residual = 5.441e07, No Iterations 869 time step continuity errors : sum local = 0.368197, global = 0.00145017, cumulative = 0.00145192 ExecutionTime = 33.06 s ClockTime = 33 s Time = 0.017 Courant Number mean: 2.25409e+06 max: 1.33605e+10 DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 1.26774, No Iterations 1001 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 6.16202, No Iterations 1001 DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 14331.8, No Iterations 1001 DICPCG: Solving for p, Initial residual = 1, Final residual = 2.86475, No Iterations 1001 time step continuity errors : sum local = 5.61093e+18, global = 3.57396e+12, cumulative = 3.57396e+12 DICPCG: Solving for p, Initial residual = 0.998461, Final residual = 6.10091, No Iterations 1001 time step continuity errors : sum local = 2.83525e+22, global = 7.04584e+16, cumulative = 7.04548e+16 ExecutionTime = 49.9 s ClockTime = 51 s Time = 0.018 Courant Number mean: 2.82832e+22 max: 3.0603e+25 DILUPBiCG: Solving for Ux, Initial residual = 0.998746, Final residual = 34.4554, No Iterations 1001 DILUPBiCG: Solving for Uy, Initial residual = 0.997935, Final residual = 1.09843, No Iterations 1001 DILUPBiCG: Solving for Uz, Initial residual = 0.999978, Final residual = 5.21295, No Iterations 1001 DICPCG: Solving for p, Initial residual = 1, Final residual = 994.164, No Iterations 1001 time step continuity errors : sum local = 9.01643e+34, global = 1.1094e+25, cumulative = 1.1094e+25 DICPCG: Solving for p, Initial residual = 0.854007, Final residual = 2.57049, No Iterations 1001 time step continuity errors : sum local = 1.51861e+36, global = 5.055e+28, cumulative = 5.05611e+28 ExecutionTime = 68.06 s ClockTime = 70 s Time = 0.019 Courant Number mean: 1.47917e+36 max: 6.46245e+39 DILUPBiCG: Solving for Ux, Initial residual = 0.99976, Final residual = 1.32634, No Iterations 1001 DILUPBiCG: Solving for Uy, Initial residual = 0.999817, Final residual = 2.27595, No Iterations 1001 DILUPBiCG: Solving for Uz, Initial residual = 0.999836, Final residual = 1.46444, No Iterations 1001 DICPCG: Solving for p, Initial residual = 1, Final residual = 14.1995, No Iterations 1001 time step continuity errors : sum local = 1.57509e+45, global = 5.09557e+40, cumulative = 5.09557e+40 DICPCG: Solving for p, Initial residual = 0.961166, Final residual = 1.84414, No Iterations 1001 time step continuity errors : sum local = 1.29718e+47, global = 5.31671e+42, cumulative = 5.26575e+42 ExecutionTime = 85.08 s ClockTime = 87 s Time = 0.02 Courant Number mean: 1.13079e+47 max: 1.72878e+50 DILUPBiCG: Solving for Ux, Initial residual = 0.999672, Final residual = 3.36115, No Iterations 1001 DILUPBiCG: Solving for Uy, Initial residual = 0.999739, Final residual = 1.97782, No Iterations 1001 DILUPBiCG: Solving for Uz, Initial residual = 0.999953, Final residual = 1.26137, No Iterations 1001 DICPCG: Solving for p, Initial residual = 1, Final residual = 26.5917, No Iterations 1001 time step continuity errors : sum local = 5.52811e+54, global = 1.50009e+47, cumulative = 1.50004e+47 DICPCG: Solving for p, Initial residual = 0.968712, Final residual = 3.96145, No Iterations 1001 time step continuity errors : sum local = 6.76349e+56, global = 4.68529e+51, cumulative = 4.68514e+51 ExecutionTime = 102.04 s ClockTime = 104 s Time = 0.021 Courant Number mean: 6.15008e+56 max: 1.0711e+60 DILUPBiCG: Solving for Ux, Initial residual = 0.999863, Final residual = 2.39706, No Iterations 1001 DILUPBiCG: Solving for Uy, Initial residual = 0.999311, Final residual = 2.89499, No Iterations 1001 DILUPBiCG: Solving for Uz, Initial residual = 0.999239, Final residual = 9.1686, No Iterations 1001 DICPCG: Solving for p, Initial residual = 1, Final residual = 6.74239, No Iterations 1001 time step continuity errors : sum local = 9.93366e+62, global = 8.94398e+59, cumulative = 8.94398e+59 DICPCG: Solving for p, Initial residual = 0.969226, Final residual = 5.91848, No Iterations 1001 time step continuity errors : sum local = 1.60358e+65, global = 3.91343e+61, cumulative = 3.82399e+61 ExecutionTime = 118.84 s ClockTime = 121 s Time = 0.022 Courant Number mean: 1.4642e+65 max: 1.56676e+68 DILUPBiCG: Solving for Ux, Initial residual = 0.999892, Final residual = 14.4943, No Iterations 1001 DILUPBiCG: Solving for Uy, Initial residual = 0.997566, Final residual = 314.253, No Iterations 1001 DILUPBiCG: Solving for Uz, Initial residual = 0.999563, Final residual = 47.8097, No Iterations 1001 DICPCG: Solving for p, Initial residual = 1, Final residual = 6.72161, No Iterations 1001 time step continuity errors : sum local = 2.74648e+72, global = 3.28068e+68, cumulative = 3.28068e+68 DICPCG: Solving for p, Initial residual = 0.994044, Final residual = 1.4551, No Iterations 1001 time step continuity errors : sum local = 6.07386e+74, global = 3.00558e+70, cumulative = 2.97277e+70 ExecutionTime = 135.7 s ClockTime = 139 s Time = 0.023 Courant Number mean: 4.83037e+74 max: 2.49651e+78 DILUPBiCG: Solving for Ux, Initial residual = 0.999758, Final residual = 1.13815, No Iterations 1001 DILUPBiCG: Solving for Uy, Initial residual = 0.999584, Final residual = 6.9745, No Iterations 1001 DILUPBiCG: Solving for Uz, Initial residual = 0.999761, Final residual = 1.2188, No Iterations 1001 DICPCG: Solving for p, Initial residual = 1, Final residual = 4.16214, No Iterations 1001 time step continuity errors : sum local = 7.19249e+80, global = 3.93959e+77, cumulative = 3.93959e+77 DICPCG: Solving for p, Initial residual = 0.974832, Final residual = 1.65162, No Iterations 1001 time step continuity errors : sum local = 5.25285e+82, global = 4.10531e+78, cumulative = 4.49927e+78 ExecutionTime = 153.07 s ClockTime = 157 s Time = 0.024 Courant Number mean: 4.6552e+82 max: 5.73544e+85 DILUPBiCG: Solving for Ux, Initial residual = 0.999591, Final residual = 45.7348, No Iterations 1001 DILUPBiCG: Solving for Uy, Initial residual = 0.996466, Final residual = 20.3214, No Iterations 1001 DILUPBiCG: Solving for Uz, Initial residual = 0.998556, Final residual = 7.91727, No Iterations 1001 DICPCG: Solving for p, Initial residual = 1, Final residual = 1.49843, No Iterations 1001 time step continuity errors : sum local = 6.52806e+88, global = 2.50005e+84, cumulative = 2.50005e+84 DICPCG: Solving for p, Initial residual = 0.994329, Final residual = 47.8821, No Iterations 1001 time step continuity errors : sum local = 2.26097e+92, global = 1.25671e+88, cumulative = 1.25696e+88 ExecutionTime = 170.12 s ClockTime = 174 s Time = 0.025 Courant Number mean: 2.18709e+92 max: 1.36393e+95 DILUPBiCG: Solving for Ux, Initial residual = 0.998666, Final residual = 9754.69, No Iterations 1001 DILUPBiCG: Solving for Uy, Initial residual = 0.997946, Final residual = 7535.41, No Iterations 1001 DILUPBiCG: Solving for Uz, Initial residual = 0.999833, Final residual = 303.156, No Iterations 1001 #0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Uninterpreted: #3 Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so" #4 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam171/lib/linuxGccDPOpt/libfiniteVolume.so" #5 in "/opt/openfoam171/applications/bin/linuxGccDPOpt/icoFoam" #6 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6" #7 in "/opt/openfoam171/applications/bin/linuxGccDPOpt/icoFoam" Floating point exception This is basic example...there should no be problem solving this... I'm just afraid that i'm doing something wrong on basic stuff...(mesh or something like that)...but checkMesh returns "mesh OK".. 

March 15, 2011, 15:18 

#4 
Senior Member
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 252
Rep Power: 12 
Hi Petar,
your case works fine for me, tested on 1.6.x and 1.6ext... can you try the attached case? As a general rule you should keep the max courant number below 0.5 by choosing an appropriate time step. The rest of your settings seem to be fine. Best regards Martin 

March 16, 2011, 10:20 

#5 
New Member
Petar Zivkovic
Join Date: Feb 2011
Posts: 6
Rep Power: 6 
Thanks a lot for your effort martin...you gave me direction for solving my problem...i'm abuout to find out what you have done so i'll try to modify my files and see if i can tweak it...(it seems you have added some extra parameters and files then I have)...
your example works fine...it seems that it was problem with viscosity and time step at the same time... tnx a lot! if i had some questions or suggestions that may help someone in future, i'll post it here! Petar. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
[DesignModeler] DesignModeler Pipe within pipe  shields  ANSYS Meshing & Geometry  12  April 30, 2015 03:58 
Circulation in a pipe (icoFoam)  Hectux  OpenFOAM Running, Solving & CFD  0  April 16, 2009 09:05 
My Revised "Time Vs Energy" Article For Review  Abhi  Main CFD Forum  2  July 9, 2002 09:08 
Terrible Mistake In Fluid Dynamics History  Abhi  Main CFD Forum  12  July 8, 2002 09:11 
fluid flow fundas  ram  Main CFD Forum  5  June 17, 2000 21:31 