Wednesday 30 May 2012

system/fvSolution

From http://www.foamcfd.org/Nabla/guides/UserGuidese15.html
Equation solvers, tolerances and algorithms.

solvers {  // specify the linear solver.
   p       ICCG  1e-06 0;  // Incomplete-Cholesky preconditioned conjugate gradient for symmetric sparse matrices.   
   p       DCG   1e-06 0;  // Diagonally preconditioned conjugate gradient for symmetric sparse matrices.      
   p       AMG   1e-06 0 100;  // Algebraic multi-grid for symmetric sparse matrices.    

   U       BICCG 1e-05 0; // Incomplete-Cholesky preconditioned biconjugate gradient for asymmetric sparse matrices.   
   U       BDCG  1e-05 0; // Diagonally preconditioned biconjugate gradient for asymmetric sparse matrices.   
   U       BICCG 1e-05 0 2; // Gauss-Seidel for asymmetric sparse matrices.    


   U { solver smoothSolver; smoother GaussSeidel; tolerance 1e-06; relTol 0.01; nSweeps 1; maxIter 100; }
   k       BICCG 1e-05 0.1;

   epsilon BICCG 1e-05 0.1;
   epsilon{solver PBiCG; preconditioner DILU; tolerance 1E-9; relTol 0;}

   nuTilda BICCG 1e-05 0.1;

   R{solver PBiCG; preconditioner DILU; tolerance 1E-9; relTol 0;}

   }

Solution stops when tol or relTol are reached.  The tolerance is the difference between the lhs and rhs of the equation being solved.
 is often 0.

AMG:  Quick solution on coarse mesh; map results; second solution on fine mesh.




relaxationFactors { 
   p       0.3;
   U       0.7;
   k       0.7;
   epsilon 0.7;
   R       0.7;
   nuTilda 0.7;
   }

// ---------------------

PISO { // Pressure Implicit Split Operator
   nCorrectors 2;
   nNonOrthogonalCorrectors 0;
   }

OR

SIMPLE { // Semi-implicit method for pressure-linked equations.
   nNonOrthogonalCorrectors 0;  // I've have best residuals with 1 with structured 2D mesh; blow with 2; good with 3, 4, 5.
   }

SIMPLE makes one correction to an initial solution; PISO requires more but usually < 4.
This sets nCorrectors.  nNonOrthogonalCorrectors is used to compensate for a face not
being normal to the cell centre.
// ---------------------------

No comments:

Post a Comment