
[Sponsors] 
April 15, 2020, 13:05 
from interFoam to interIsoFoam

#1 
Member
Bram Kerkhofs1
Join Date: Oct 2016
Posts: 30
Rep Power: 9 
Hi
I'm trying to experiment with interIsoFoam. As a source for the alpha field and the other fields, I use a case which is made with interFoam. Problem: it looks like interIsoFoam with the isoAdvectionsolver diverges. I.e.: first iteration, first innerloop: Code:
isoAdvection: Before conservative bounding: min(alpha) = 1.240522232e83, max(alpha) = 1 + 0.0005295133074 Code:
isoAdvection: Before conservative bounding: min(alpha) = 0, max(alpha) = 1 + 0.05453439826 Code:
isoAdvection: Before conservative bounding: min(alpha) = 0, max(alpha) = 1 + 0.05925915669 Complete residual output: Code:
PIMPLE: iteration 13 AMI: Creating addressing and weights between 9100 source faces and 8832 target faces AMI: Patch source sum(weights) min:0.9999303843 max:1.000053447 average:0.9999900626 AMI: Patch target sum(weights) min:0.9999507692 max:1.000064161 average:1.000016928 GAMG: Solving for pcorr, Initial residual = 1, Final residual = 0.009026559663, No Iterations 4 GAMG: Solving for pcorr, Initial residual = 0.002355974942, Final residual = 1.763078088e05, No Iterations 9 GAMG: Solving for pcorr, Initial residual = 8.719498349e05, Final residual = 4.59847574e07, No Iterations 6 time step continuity errors : sum local = 7.176612991e15, global = 2.42387998e15, cumulative = 3.276703364e13 Number of isoAdvector surface cells = 186848 isoAdvection: Before conservative bounding: min(alpha) = 0, max(alpha) = 1 + 0.1004676957 isoAdvection: After conservative bounding: min(alpha) = 0, max(alpha) = 1 + 1.061161496e07 isoAdvection: time consumption = 9% Phase1 volume fraction = 0.3363172403 Min(alpha.water) = 0 Max(alpha.water) = 1 Number of isoAdvector surface cells = 186451 isoAdvection: Before conservative bounding: min(alpha) = 0, max(alpha) = 1 + 0.08699985256 isoAdvection: After conservative bounding: min(alpha) = 0, max(alpha) = 1 + 6.039899377e06 isoAdvection: time consumption = 10% Phase1 volume fraction = 0.33631726 Min(alpha.water) = 0 Max(alpha.water) = 1 DILUPBiCGStab: Solving for Ux, Initial residual = 1.069829319e05, Final residual = 5.84321495e17, No Iterations 2 DILUPBiCGStab: Solving for Uy, Initial residual = 5.240697493e06, Final residual = 3.936466577e17, No Iterations 2 DILUPBiCGStab: Solving for Uz, Initial residual = 7.094111304e06, Final residual = 1.364192158e15, No Iterations 2 GAMG: Solving for p_rgh, Initial residual = 0.005823560349, Final residual = 4.094078189e05, No Iterations 4 GAMG: Solving for p_rgh, Initial residual = 0.000686784676, Final residual = 5.994351588e06, No Iterations 5 GAMG: Solving for p_rgh, Initial residual = 0.0001680834125, Final residual = 1.503036888e06, No Iterations 5 time step continuity errors : sum local = 2.884203884e11, global = 3.31358195e14, cumulative = 3.608061559e13 GAMG: Solving for p_rgh, Initial residual = 7.030436671e05, Final residual = 4.803836496e07, No Iterations 6 GAMG: Solving for p_rgh, Initial residual = 2.313309644e05, Final residual = 2.1642675e07, No Iterations 5 GAMG: Solving for p_rgh, Initial residual = 7.406384726e06, Final residual = 9.159079788e10, No Iterations 41 time step continuity errors : sum local = 1.803777673e14, global = 1.83394836e16, cumulative = 3.606227611e13 DILUPBiCGStab: Solving for omega, Initial residual = 8.06232745e07, Final residual = 6.681602759e17, No Iterations 2 DILUPBiCGStab: Solving for k, Initial residual = 6.124043567e06, Final residual = 1.83465517e16, No Iterations 2 DILUPBiCGStab: Solving for ReThetat, Initial residual = 4.492151369e06, Final residual = 1.538420557e15, No Iterations 2 DILUPBiCGStab: Solving for gammaInt, Initial residual = 9.401681685e06, Final residual = 1.569161983e16, No Iterations 2 PIMPLE: converged in 13 iterations So the first iteration takes 12 innerloops, the second one 13, the third one 14 and the forth one I stopped after 39 innerloops. Reason why they don't converge anymore is because the Uresiduals are getting messedup and don't get below 1e5 anymore. The isoAdvection residual for this 39'th innerloop was: Code:
isoAdvection: Before conservative bounding: min(alpha) = 0, max(alpha) = 1 + 0.1084360555 Since the alphasolver diverges, it's my number 1 suspect of messing up the simulation. I tried to manipulate the alphafield in advance. So I clipped (rounded) all the alphavalues to 1, 0.5 or 0. This made some more contrast in the field. Results are shown in before_clipping.png and after_clipping.png But this didn't help. The results of the above iterations were with the case where the values were clipped. When the values aren't clipped, the simulation derails within the first iteration: it just never converges. The isoAdvectionresidual becomes something like: Code:
isoAdvection: Before conservative bounding: min(alpha) = 20, max(alpha) = 1 + 60 Code:
Courant Number mean: 0.0002644452277 max: 0.4862678596 Interface Courant Number mean: 1.950778666e06 max: 0.002363813456 The fvSolution: Code:
{ //INTERFOAM "alpha.water.*" { nAlphaCorr 2; nAlphaSubCycles 2; cAlpha 1; //interfaceMethod "isoAdvector"; // interIsoFoam MULESCorr yes; nLimiterIter 15; alphaApplyPrevCorr yes; solver smoothSolver; smoother symGaussSeidel; tolerance 1e10; relTol 0; minIter 1; maxIter 100; //interIsoFoam: isofaceTol 1e7; // Error tolerance on alph when cutting surface cells into subcells // interIsoFoam surfCellTol 1e6 ; // Only cells with surfCellTol < alpha < 1 surfCellTol, are treated as surface cells //interIsoFoam nAlphaBounds 3; //Number of times the adhoc bounding step should try to correct unboundedness. //Strictly volume conserving (provided that sum(phi)=0 for a cell) // interIsoFoam snapTol 1e12; //Optional: cells with alpha < snaphAlphaTol are snapped to 0 and cells with 1 alpha < snaphAlphaTol are snapped to 1 // interIsoFoam clip true; //Optional: clip remaining unboudedness // interIsoFoam //If present, the following variables can be removed from alpha.water in fvSolution: /* nAlphaCorr MULESCorr nLimiterIter solver smoother tolerance relTol */ } ".*(rhorhoFinal)" { solver diagonal; } cellDisplacement { solver GAMG; smoother GaussSeidel; tolerance 1e7; relTol 0.001; } "(p_rghpcorr.*)" { solver GAMG; // GAMG PBiCGStab PCG smoothSolver //tolerance 1e07; tolerance 1e09; //interIsoFoam, the tolerance needs to be < 10 100 times surfCellTol relTol 0.01; maxIter 100; minIter 2; cacheAgglomeration true; agglomerator faceAreaPair; nCellsInCoarsestLevel 1200; // mergeLevels 1; smoother DIC;//symGaussSeidel;//GaussSeidel; // nSweep 1; //Voor DICsmoother // nPreSweeps 0; nPostSweeps 3; //2 B // postSweepsLevelMultiplier 1; // maxPostSweeps 4; // nFinestSweeps 2; // scaleCorrection true; } "(p_rgh)Final" { $p_rgh; tolerance 1e09; relTol 0; maxIter 150; } My current OFversion is V1906. Anyone any idea how I get this working? Are there any other suspects I'm not getting? Cheers! Bram 

April 17, 2020, 10:28 

#2  
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15 
Quote:
Adjust the freesurface once, at the first PIMPLE loop, and then go on with the rest of the pimple loops WITHOUT updating the free surface. MY TWO CENTS.... 

April 18, 2020, 07:52 

#3 
Member
Bram Kerkhofs1
Join Date: Oct 2016
Posts: 30
Rep Power: 9 
Hi Santiago
Thanks for your input! So I looked at the tutorials and indeed: they run in 'PISO'mode, no additional internal pimple loops! This looks kind of a big thing to mention, since this ain't the real 'pimple'philosophy where you can get larger timesteps, residual parameters on convergence, .... . So I guess there is no other way to make the solver only do the alpha calculation once, than setting the nOuterCorrectors to 0 (PISOmode)? I tried the simulation in PISOmode. at the first time step: Code:
isoAdvection: Before conservative bounding: min(alpha) = 1.240522232e83, max(alpha) = 1 + 0.0005295133074 Code:
isoAdvection: Before conservative bounding: min(alpha) = 0, max(alpha) = 1 + 0.01646964113 Code:
isoAdvection: Before conservative bounding: min(alpha) = 0, max(alpha) = 1 + 0.06370722414 Code:
isoAdvection: Before conservative bounding: min(alpha) = 2.179964275, max(alpha) = 1 + 6.860999516 

Tags 
interfoam, interisofoam, isoadvector 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Adding diffusion term to interFoam transport equation  Gearb0x  OpenFOAM Programming & Development  3  February 14, 2023 04:16 
interFoam vs. simpleFoam channel flow comparison  DanM  OpenFOAM Running, Solving & CFD  12  January 31, 2020 15:26 
Question about interFoam Solver  Kahnbein.Kai  OpenFOAM Running, Solving & CFD  2  August 26, 2019 15:36 
interFoam (HELYXOS) pressure boundary conditions  SFr  OpenFOAM Running, Solving & CFD  8  June 23, 2016 16:36 
ke & GAMG interFoam Schemitisation Stability Issue  JFM  OpenFOAM Running, Solving & CFD  3  December 1, 2015 05:58 