
[Sponsors] 
July 12, 2012, 12:17 
How to avoid checkerboard?

#1 
Member
Florian Ettner
Join Date: Mar 2009
Location: Munich, Germany
Posts: 41
Rep Power: 9 
Dear Foamers,
I created a density based (no PISO loop !) combustion solver which works fine as long as I use adiabatic walls. However, if I set the temperature on the walls to a fixed value, a checkerboard pattern in the pressure develops (not immediately, but after a few hundred timesteps). In short, the code looks like this (similar to rhoCentralFoam): Code:
#include "rhoEqn.H" // solve all other transport equations thermo.correct(); p.dimensionedInternalField() = rho.dimensionedInternalField() / thermo.psi().dimensionedInternalField(); p.correctBoundaryConditions(); rho.boundaryField() = psi.boundaryField()*p.boundaryField(); The p boundary condition on the walls is zeroGradient. Changing the grad scheme in fvSchemes from Gauss linear to fourth did not yield any improvement. Any suggestions are appreciated! Last edited by dohnie; July 12, 2012 at 12:28. Reason: typo 

July 12, 2012, 12:25 

#2 
Member
Florian Ettner
Join Date: Mar 2009
Location: Munich, Germany
Posts: 41
Rep Power: 9 


July 13, 2012, 02:55 

#3 
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 14 
Can you post your complete fvSchemes and fvSolution? Also, did you arefully check if your solution converges?


July 13, 2012, 06:14 

#4 
Member
Florian Ettner
Join Date: Mar 2009
Location: Munich, Germany
Posts: 41
Rep Power: 9 
Bernhard, I checked convergence, the residuals are nice.
Here are my schemes: Code:
FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; grad(scalarSlope) cellMDLimited Gauss linear 1; grad(USlope) cellMDLimited Gauss linear 1; } divSchemes { default none; div(tauShear) Gauss linear; div(tauMC) Gauss linear; div((tauShear&U)) Gauss linear; div((p*U)) Gauss linear; div((U+((sL*Xi)*grad(c)))) Gauss linear; div((sL*grad(b))) Gauss linear; div(U) Gauss linear; div((sL*grad(c))) Gauss linear; div(phiSt,c) Gauss vanLeer01; div(phiXi,Xi) Gauss vanLeer; div(phi,k) Gauss upwind; div(phi,omega) Gauss upwind; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default none; interpolate(tauMC) Gamma phi 1.0; interpolate(mu) Gamma phi 1.0; interpolate(muEff) Gamma phi 1.0; reconstruct(rho) limitedLinear 1.0; reconstruct(U) limitedLinearV 1.0; reconstruct(T) limitedLinear 1.0; interpolate(rho) linear; // for CFL reconstruct(cSound) linear; // for CFL // combustion stuff: interpolate(grad(c)) linear; interpolate(grad((1c))) linear; interpolate((((p*psiu)*sL)*Xi)) linear; interpolate((sL*((1Xi)Xi))) linear; interpolate(((rhoUnburned*sL)*Xi)) linear; interpolate((laplacian(interpolate(alphaEff),c)mag(grad(c)))) linear; } snGradSchemes { default corrected; } Code:
FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { rho { solver diagonal; } rhoE { solver diagonal; } U { solver PCG; preconditioner DIC; tolerance 1e06; relTol 0; }; fH { solver PCG; preconditioner DIC; tolerance 1e06; relTol 0; }; tau { solver PCG; preconditioner DIC; tolerance 1e06; relTol 0; }; c { solver PCG; preconditioner DIC; tolerance 1e06; relTol 0; }; hu { solver PCG; preconditioner DIC; tolerance 1e06; relTol 0; }; Xi { solver PBiCG; preconditioner DILU; tolerance 1e06; relTol 0; }; k { solver PBiCG; preconditioner DILU; tolerance 1e06; relTol 0; }; omega { solver PBiCG; preconditioner DILU; tolerance 1e06; relTol 0; }; } Riemann { secondOrder yes; // Riemann: 1st or 2nd order } relaxationFactors { // underrelaxation factors used in wavetransmissive schemes k 0.2; omega 0.2; } 

January 19, 2015, 13:13 

#5 
Member
james wilson
Join Date: Aug 2014
Location: Orlando, Fl
Posts: 38
Rep Power: 4 
Any updates on this problem? I am experiencing the same issues but in a modified version of porousInterFoam where increasing permeability[m^2] results in this checkerboard pressure field.
James 

January 19, 2015, 15:22 

#6 
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,679
Blog Entries: 39
Rep Power: 103 
Greetings to all!
@James: Can you provide a test case and respective solver? Either way, try following the same analysis strategy I used here: Strange Results at Tank Outlet with InterFoam post #17 Best regards, Bruno
__________________


January 23, 2015, 12:18 

#7  
Member
james wilson
Join Date: Aug 2014
Location: Orlando, Fl
Posts: 38
Rep Power: 4 
Quote:
Ive seen your posts all throughout the forums. Thanks for your help and input! I need to get better at following up on my own solutions since I have fixed my problem! My checkerboarding was caused by slip boundary conditions, i.e. checkerboarding would occur anywhere there were no gradients in the velocity field (resulting in unstable oscillations that still satisfied continuity). Im not sure what parameters/mat'l properties resulted in my cases diverging and not any of my others; however, I increased nOuterCorrectors in fvSolution for PIMPLE: Code:
PIMPLE { momentumPredictor no; nOuterCorrectors 2; // increased from 1 > 2 nCorrectors 3; nNonOrthogonalCorrectors 0; } I cant give you stats on the difference in iterations between the first and second loops; however, I know the second pass through the PIMPLE loop with nOuterCorrectors=2 resulted in nearly the order of iterations in the first pass. I believe in my first case (mixed slip and noslip boundaries), I had a high value of sigma (0.1N/m) and a small domain resulting in relatively large surface tension forces and consequently, unrealistic velocities on the slip walls across the interface since the BC is set to zeroGradient/slip/symetry and forced the liquid phase to adjust rapidly. In another case, I had a uniform inflow and slip conditions on various boundaries resulting in the checkerboarding due to the onset of instability from the lack of gradients anywhere in the flow field. I cannot reproduce the error since I have modified those cases. so I didnt provide a test case : / I hope this helps, James 

January 26, 2015, 04:12 

#8 
Senior Member
Join Date: Oct 2013
Posts: 369
Rep Power: 7 
If increasing the number of iterations fixes your problem, then this is a simple convergence issue. I suggest you monitor the convergence behaviour of the initial residuals.


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
[ANSYS Meshing] avoid to mesh the inside of the blade  swiss_zhang  ANSYS Meshing & Geometry  1  June 9, 2011 07:37 
how to avoid self intersection:Proam  bala  CDadapco  5  March 6, 2008 05:23 
HOW turbulene Grid (avoid too fine or too coarse)?  Toulouser  FLUENT  1  February 1, 2007 04:47 
How to avoid walls in moving referance frame (MRF)  san  FLUENT  5  March 31, 2006 01:17 
Pressure checkerboard problem  behzad  Main CFD Forum  7  July 4, 2005 10:51 