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

Hybrid mesh and unstable solution

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 6, 2012, 09:44
Default Hybrid mesh and unstable solution
  #1
Member
 
Mohammad Fereshtehpour
Join Date: Jul 2011
Location: Iran
Posts: 61
Rep Power: 15
MOHAMMAD67 is on a distinguished road
Send a message via Skype™ to MOHAMMAD67
Dear Foamers
Hi
Recently, all of my simulations were blown out after 1 or 2 seconds. I use combination of hexahedral and tetrahedron meshes (hybrid meshes). Is the blowing out related to this? I checkmeshed and every thing is ok. Before that I used netgen3d for meshing and I didn't have any problem.
After a lot of run, I believe that the problem definitely arise from the meshing. But I don't know how to deal with it.
MOHAMMAD67 is offline   Reply With Quote

Old   August 6, 2012, 12:05
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
Hi dear mohamad
1) print out your checkMesh result here

2) print out the result, your solver name, your openFoam version

3) fvSchemes and fvSolution

however generally OpenFOAM solvers can be applied in polyhedral mesh (tet,hex or ...), so it should not be the main cause of error, however ever solver is sensitive to mesh quality, with bad mesh quality, it may diverge
nimasam is offline   Reply With Quote

Old   August 6, 2012, 12:27
Default
  #3
Member
 
Mohammad Fereshtehpour
Join Date: Jul 2011
Location: Iran
Posts: 61
Rep Power: 15
MOHAMMAD67 is on a distinguished road
Send a message via Skype™ to MOHAMMAD67
Dear Nima
Thanks for your reply, Here is the details:
I use interfoam solver and openfoam version2.0.1.

CheckMesh:

PHP Code:
Create polyMesh for time 0

Time 
0

Mesh stats
    points
:           186804
    faces
:            568825
    internal faces
:   543063
    cells
:            192523
    boundary patches
4
    point zones
:      0
    face zones
:       0
    cell zones
:       1

Overall number of cells of each type
:
    
hexahedra:     170352
    prisms
:        0
    wedges
:        0
    pyramids
:      1092
    tet wedges
:    0
    tetrahedra
:    21079
    polyhedra
:     0

Checking topology
...
    
Boundary definition OK.
    
Cell to face addressing OK.
    
Point usage OK.
    
Upper triangular ordering OK.
    
Face vertices OK.
    
Number of regions(OK).

Checking patch topology for multiply connected surfaces ...
    
Patch               Faces    Points   Surface topology                  
    w
-inlet             20       18       ok (non-closed singly connected)  
    
atmosphere          4102     4260     ok (non-closed singly connected)  
    
walls               20548    19083    ok (non-closed singly connected)  
    
outlet              1092     1161     ok (non-closed singly connected)  

Checking geometry...
    
Overall domain bounding box (-1.99 0 0) (2.5 0.59 0.4)
    
Mesh (non-empty, non-wedgedirections (1 1 1)
    
Mesh (non-empty) directions (1 1 1)
    
Boundary openness (2.80826e-16 -3.51094e-16 3.21826e-18OK.
    
Max cell openness 2.80998e-16 OK.
    
Max aspect ratio 66.5297 OK.
    
Minumum face area 7.67913e-07Maximum face area 0.00374992.  Face area magnitudes OK.
    
Min volume 5.33454e-10Max volume 7.40262e-05.  Total volume 0.645098.  Cell volumes OK.
    
Mesh non-orthogonality Max85.305 average7.74448
   
*Number of severely non-orthogonal faces405.
    Non
-orthogonality check OK.
  <<
Writing 405 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK
.
    
Max skewness 1.64137 OK.

Mesh OK.

End 
Fvscheme:

PHP Code:
ddtSchemes
{
    default         
Euler;
}

gradSchemes
{
    default         
Gauss linear;
    
grad(U)            faceMDLimited Gauss linear 0;
    
grad(p)            faceMDLimited Gauss linear 0;
}

divSchemes
{
    
div(rho*phi,U)  Gauss upwind;
    
div(phi,alpha)  Gauss vanLeer01;
    
div(phirb,alphaGauss interfaceCompression;
    
div(phi,k)      Gauss upwind;
    
div(phi,epsilonGauss upwind;

}

laplacianSchemes
{
        default        
Gauss linear corrected;
}

interpolationSchemes
{
    default         
linear;
}

snGradSchemes
{
    default         
corrected;
}

fluxRequired
{
    default         
no;
    
p_rgh;
    
pcorr;
    
alpha;

fvsolution:

PHP Code:
solvers
{
    
pcorr
    
{
        
solver          GAMG;
        
tolerance       1e-05;
        
relTol          0.0;
        
smoother        GaussSeidel;
        
nPreSweeps      0;
        
nPostSweeps     2;
        
nFinestSweeps   2;
        
cacheAgglomeration on;
        
nCellsInCoarsestLevel 10;
        
agglomerator    faceAreaPair;
        
mergeLevels     1;
        
maxIter         50;
    }

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

    
p_rghFinal
    
{
        
solver          GAMG;
        
tolerance       1e-06;
        
relTol          0.0;
        
smoother        GaussSeidel;
        
nPreSweeps      0;
        
nPostSweeps     2;
        
nFinestSweeps   2;
        
cacheAgglomeration on;
        
nCellsInCoarsestLevel 10;
        
agglomerator    faceAreaPair;
        
mergeLevels     1;
        
maxIter         50;
    }

    
"(U|k|epsilon)"
    
{
        
solver          smoothSolver;
        
smoother        GaussSeidel;
        
tolerance       1e-5;
        
relTol          0.01;
        
nSweeps         1;
    }

    
"(U|k|epsilon)Final"
    
{
        
solver          smoothSolver;
        
smoother        GaussSeidel;
        
tolerance       1e-5;
        
relTol          0.01;
        
nSweeps         1;
    }
}

PIMPLE
{    
    
momentumPredictor no;
    
nCorrectors     1;
    
nNonOrthogonalCorrectors 1;
    
nAlphaCorr      1;
    
nAlphaSubCycles 1;
    
cAlpha          1;


Thanks in advance
Attached Images
File Type: jpg Screenshot-6.jpg (69.7 KB, 77 views)
MOHAMMAD67 is offline   Reply With Quote

Old   August 6, 2012, 12:36
Default
  #4
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
it seems ok and whats the solver output?
nimasam is offline   Reply With Quote

Old   August 6, 2012, 14:24
Default solver's output
  #5
Member
 
Mohammad Fereshtehpour
Join Date: Jul 2011
Location: Iran
Posts: 61
Rep Power: 15
MOHAMMAD67 is on a distinguished road
Send a message via Skype™ to MOHAMMAD67
Here is the solver output:

PHP Code:
MULESSolving for alpha1
Liquid phase volume fraction 
0.0330484  Min(alpha1) = -1.15748e-23  Max(alpha1) = 1
MULES
Solving for alpha1
Liquid phase volume fraction 
0.0330484  Min(alpha1) = -1.15048e-23  Max(alpha1) = 1
GAMG
:  Solving for p_rghInitial residual 0.201866, Final residual 0.00856465No Iterations 3
GAMG
:  Solving for p_rghInitial residual 0.209174, Final residual 0.00630481No Iterations 2
GAMG
:  Solving for p_rghInitial residual 0.173578, Final residual 0.00635693No Iterations 3
GAMG
:  Solving for p_rghInitial residual 0.152033, Final residual 8.54373e-07No Iterations 23
time step continuity errors 
sum local 1.25125e-13, global = -1.54146e-14cumulative 1.47964e-09
DILUPBiCG
:  Solving for epsilonInitial residual 0.00134759, Final residual 9.0678e-09No Iterations 2
DILUPBiCG
:  Solving for kInitial residual 2.46775e-12, Final residual 2.46775e-12No Iterations 0
ExecutionTime 
6962.9 s  ClockTime 8418 s

Courant Number mean
1.59301e-07 max1.05363
Interface Courant Number mean2.82136e-08 max0.665542
deltaT 
8.34841e-13
Time 
1.6333948505147

MULES
Solving for alpha1
Liquid phase volume fraction 
0.0330484  Min(alpha1) = -1.14338e-23  Max(alpha1) = 1
MULES
Solving for alpha1
Liquid phase volume fraction 
0.0330484  Min(alpha1) = -1.13629e-23  Max(alpha1) = 1
GAMG
:  Solving for p_rghInitial residual 0.203644, Final residual 0.00866759No Iterations 3
GAMG
:  Solving for p_rghInitial residual 0.208914, Final residual 0.00638119No Iterations 2
GAMG
:  Solving for p_rghInitial residual 0.175399, Final residual 0.00646363No Iterations 3
GAMG
:  Solving for p_rghInitial residual 0.15647, Final residual 9.16554e-07No Iterations 23
time step continuity errors 
sum local 1.3088e-13, global = -1.61591e-14cumulative 1.47963e-09
DILUPBiCG
:  Solving for epsilonInitial residual 0.00138643, Final residual 9.5623e-09No Iterations 2
DILUPBiCG
:  Solving for kInitial residual 2.72518e-12, Final residual 2.72518e-12No Iterations 0
ExecutionTime 
6965.43 s  ClockTime 8423 s

Courant Number mean
1.58469e-07 max1.04362
Interface Courant Number mean2.81469e-08 max0.663303
deltaT 
6.29306e-13
Time 
1.6333948505153

MULES
Solving for alpha1
Liquid phase volume fraction 
0.0330484  Min(alpha1) = -1.12914e-23  Max(alpha1) = 1
MULES
Solving for alpha1
Liquid phase volume fraction 
0.0330484  Min(alpha1) = -1.122e-23  Max(alpha1) = 1
GAMG
:  Solving for p_rghInitial residual 0.205891, Final residual 0.00883203No Iterations 3
GAMG
:  Solving for p_rghInitial residual 0.208221, Final residual 0.00648681No Iterations 2
GAMG
:  Solving for p_rghInitial residual 0.178515, Final residual 0.00658447No Iterations 3
GAMG
:  Solving for p_rghInitial residual 0.162664, Final residual 9.85524e-07No Iterations 23
time step continuity errors 
sum local 1.38197e-13, global = -1.7544e-14cumulative 1.47961e-09
DILUPBiCG
:  Solving for epsilonInitial residual 0.00142635, Final residual 2.52095e-11No Iterations 3
DILUPBiCG
:  Solving for kInitial residual 3.15238e-12, Final residual 3.15238e-12No Iterations 0
ExecutionTime 
6969.43 s  ClockTime 8428 s

Courant Number mean
1.57471e-07 max1.0371
Interface Courant Number mean2.80299e-08 max0.661185
deltaT 
4.75892e-13
Time 
1.6333948505158

MULES
Solving for alpha1
Liquid phase volume fraction 
0.0330484  Min(alpha1) = -1.11484e-23  Max(alpha1) = 1
MULES
Solving for alpha1
Liquid phase volume fraction 
0.0330484  Min(alpha1) = -1.10768e-23  Max(alpha1) = 1
GAMG
:  Solving for p_rghInitial residual 0.211674, Final residual 0.00908677No Iterations 3
GAMG
:  Solving for p_rghInitial residual 0.213446, Final residual 0.00662337No Iterations 2
GAMG
:  Solving for p_rghInitial residual 0.182018, Final residual 0.00671829No Iterations 3
GAMG
:  Solving for p_rghInitial residual 0.167692, Final residual 6.68266e-07No Iterations 24
time step continuity errors 
sum local 9.37782e-14, global = -1.39631e-14cumulative 1.4796e-09
DILUPBiCG
:  Solving for epsilonInitial residual 0.00153278, Final residual 2.84973e-11No Iterations 3
DILUPBiCG
:  Solving for kInitial residual 3.75016e-12, Final residual 3.75016e-12No Iterations 0
ExecutionTime 
6973.01 s  ClockTime 8432 s

Courant Number mean
1.57009e-07 max1.03355
Interface Courant Number mean2.84262e-08 max0.659437
deltaT 
3.60832e-13
Time 
1.6333948505162

MULES
Solving for alpha1
[0#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0#2   in "/lib/libc.so.6"
[0#3  void Foam::MULES::limiter<Foam::geometricOneField, Foam::zeroField, Foam::zeroField>(Foam::Field<double>&, Foam::geometricOneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::zeroField const&, Foam::zeroField const&, double, double, int) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
[0#4  void Foam::MULES::explicitSolve<Foam::geometricOneField, Foam::zeroField, Foam::zeroField>(Foam::geometricOneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::zeroField const&, Foam::zeroField const&, double, double) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
[0#5  Foam::MULES::explicitSolve(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, double, double) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
[0#6  
[0]  in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/interFoam"
[0#7  __libc_start_main in "/lib/libc.so.6"
[0#8  
[0]  in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/interFoam"
[mohammad-laptop:06692] *** Process received signal ***
[
mohammad-laptop:06692SignalFloating point exception (8)
[
mohammad-laptop:06692Signal code:  (-6)
[
mohammad-laptop:06692Failing at address0x3e800001a24
[mohammad-laptop:06692] [ 0] /lib/libc.so.6(+0x33af0) [0x7fe40823faf0]
[
mohammad-laptop:06692] [ 1] /lib/libc.so.6(gsignal+0x35) [0x7fe40823fa75]
[
mohammad-laptop:06692] [ 2] /lib/libc.so.6(+0x33af0) [0x7fe40823faf0]
[
mohammad-laptop:06692] [ 3] /opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so(_ZN4Foam5MULES7limiterINS_17geometricOneFieldENS_9zeroFieldES3_EEvRNS_5FieldIdEERKT_RKNS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEERKNSA_IdNS_13fvsPatchFieldENS_11surfaceMeshEEESK_RKT0_RKT1_ddi+0xe70) [0x7fe409d25da0]
[
mohammad-laptop:06692] [ 4] /opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so(_ZN4Foam5MULES13explicitSolveINS_17geometricOneFieldENS_9zeroFieldES3_EEvRKT_RNS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEERKNS7_IdNS_13fvsPatchFieldENS_11surfaceMeshEEERSE_RKT0_RKT1_dd+0x271) [0x7fe409d2d6e1]
[
mohammad-laptop:06692] [ 5] /opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so(_ZN4Foam5MULES13explicitSolveERNS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEERKNS1_IdNS_13fvsPatchFieldENS_11surfaceMeshEEERS8_dd+0x24) [0x7fe409d1bff4]
[
mohammad-laptop:06692] [ 6interFoam() [0x42bc49]
[
mohammad-laptop:06692] [ 7] /lib/libc.so.6(__libc_start_main+0xfd) [0x7fe40822ac4d]
[
mohammad-laptop:06692] [ 8interFoam() [0x4246b9]
[
mohammad-laptop:06692] *** End of error message ***
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 6692 on node mohammad-laptop exited on signal 8 (Floating point exception). 
MOHAMMAD67 is offline   Reply With Quote

Old   August 6, 2012, 15:21
Default
  #6
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
hi dear mohamad
some general recommendations:
1) decrease your courant number (less than 0.2)
2)increase your corrector (nCorrectors 3;
nNonOrthogonalCorrectors 2;
)
3)start with a very small timestep forexample 1e-8

your mean courant number is small, but your maximum courant number is some how high, it seems somewhere in domain,you get a high velocity, which maybe due to mesh quality,also i recommend to initialize your field better and check where you get high courant number
nimasam is offline   Reply With Quote

Old   August 6, 2012, 15:49
Default
  #7
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22
MartinB will become famous soon enough
Hi Mohammad,

in addition to the hints of Nima you should try these settings in fvSchemes (you have a limiter of 0 there):
Code:
gradSchemes
{
    default         Gauss linear;
    grad(U)            cellLimited Gauss linear 1;
    grad(p)            cellLimited Gauss linear 1;
}
or
Code:
gradSchemes
{
    default         Gauss linear;
    grad(U)            cellLimited leastSquares 1;
    grad(p)            cellLimited leastSquares 1;
}
Martin
MartinB is offline   Reply With Quote

Old   August 6, 2012, 15:50
Default
  #8
Member
 
Mohammad Fereshtehpour
Join Date: Jul 2011
Location: Iran
Posts: 61
Rep Power: 15
MOHAMMAD67 is on a distinguished road
Send a message via Skype™ to MOHAMMAD67
Dear Nima

Decreasing courant number to 0.2 cuased sooner divergence. Now I run the case using ncorrectors 3 and nNonorth. 2 and Martins point.

By the way, how can I understand where the courant number is high?

Last edited by MOHAMMAD67; August 6, 2012 at 16:29.
MOHAMMAD67 is offline   Reply With Quote

Old   August 6, 2012, 16:42
Default
  #9
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
dear mohamad,
write out first steps, and see in para view which cells have high velocity
nimasam is offline   Reply With Quote

Old   September 29, 2012, 00:29
Default
  #10
Member
 
Jubayer
Join Date: Oct 2009
Location: The University of Western Ontario, London, Ontario
Posts: 42
Blog Entries: 1
Rep Power: 17
cm_jubayer is on a distinguished road
Hi Mohammad,

Did you figure out the problem? Was that the mesh? Thanks.

Jubayer
cm_jubayer is offline   Reply With Quote

Old   December 20, 2012, 19:16
Default
  #11
Member
 
Simon Arne
Join Date: May 2012
Posts: 42
Rep Power: 14
simpomann is on a distinguished road
Hey,

I simulate flow into a tank and experience the same error.
Simulation is stable for 25.000 iterations (Residuals super small like e-09, Courant and time step stable) and then suddenly time step decreases and I get the exact same error message while MULE solves for alpha.
There is no bounding of variables.
It might be because I have a rather coarse mesh (it stops in a moment where the flow reaches a badly meshed obstacle). But increasing resolution at this point brings down my timestep to non-acceptable values.

So I am interested in your progress Mohamad. Switching on momentum predictor increased stability for me.
The moment of the crash, does your liquid phase encounter a badly meshed region as well?

By the way: lowering CFL from 0.8 to 0.5 solved my problem, the mesh is fully tetrahederical (ist this an existing english word?).

Greetings,

Simon

Last edited by simpomann; December 21, 2012 at 10:35.
simpomann 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
Instability Vortex and Mesh Choice kristapsb Main CFD Forum 2 May 11, 2012 07:26
Unstable spray for small mesh size (dieselFoam) namCFD OpenFOAM 2 August 13, 2010 16:51
Asymmetry induced by the mesh Ale Main CFD Forum 3 December 14, 2007 15:44
small size cell problem(moving mesh) Elyor Siemens 1 May 13, 2007 00:45
Any mesh limitation for SSG Reynolds Stress Model? Sam Main CFD Forum 1 October 13, 2005 13:34


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