
[Sponsors] 
interFoam wave propagation and explosion of Courant number and residuals 

LinkBack  Thread Tools  Search this Thread  Display Modes 
June 20, 2019, 12:42 
interFoam wave propagation and explosion of Courant number and residuals

#1 
New Member
Chiara Viola
Join Date: Jun 2019
Posts: 7
Rep Power: 2 
Hello openFOAM users! I am new to openFOAM and also new in this forum.
I am trying to make a simulation of regular waves propagation against an impermeable dike using interFoam but it is more than one month that I am not able to finish my run. I'm using a laminar model. I really hope that someone can help me to understand what i'm doing wrong. I want to modify the tutorial from waveExample using both StokesI and StokesV theories adding an obstacle in stl format that is my dike. I changed the dimensions of the tutorial since I want to simulate a model scale problem. I had several errors with snappyHexMesh but now I think it works well since I don't have any errors and the checkMesh says that everythink is OK. I'm interested in a 2D problem but due to snappyHexMesh errors I had to create a 3D case and I set my lateral faces (front and back) as patch instead of empty and I want to consider them as open sea and not as wall because I remember that with empty type I got several errors but I don't remember what kind of errors they were. I tried to run in parallel on my laptop with 4 processors and also in serial but I my simulations never reach the end of 20 seconds. Now, when I start the run, I don't have any error message but after 2 or 3 days of running I have an explosion of the Courant number and the residuals and I think I've tried everything I understood about OpenFOAM but I still have no results and no any idea about what is going wrong. In the past tests after several iteration I had the error related to floating point but now the solver is running for days but it's blocked on the same time step. I thought it could be a problem related to the boundary conditions but i didn't change them from the tutorial except for the lateral sides and I set my obstacle as wall. Any kind of help is highly appreciated! PS: I'm working on ubuntu 18.04.2 LTS and openFOAM v1812 version. Best regards, Chiara Here it is possible to see my last iterations: Code:
PIMPLE: iteration 1 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144587 Min(alpha.water) = 4.83978e06 Max(alpha.water) = 1.05476 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144587 Min(alpha.water) = 1.20682e08 Max(alpha.water) = 1.05474 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144586 Min(alpha.water) = 1.17575e08 Max(alpha.water) = 1.05472 Updating StokesV wave model for patch inlet Updating shallowWaterAbsorption wave model for patch outlet DICPCG: Solving for p_rgh, Initial residual = 0.0110037, Final residual = 0.000119618, No Iterations 5 DICPCG: Solving for p_rgh, Initial residual = 0.000119827, Final residual = 1.08106e05, No Iterations 15 time step continuity errors : sum local = 2.71305e06, global = 2.46732e09, cumulative = 0.000126835 DICPCG: Solving for p_rgh, Initial residual = 1.14898e05, Final residual = 1.12811e06, No Iterations 44 DICPCG: Solving for p_rgh, Initial residual = 1.1281e06, Final residual = 8.34745e07, No Iterations 5 time step continuity errors : sum local = 2.09471e07, global = 2.92403e09, cumulative = 0.000126838 DICPCG: Solving for p_rgh, Initial residual = 1.01653e06, Final residual = 4.85196e07, No Iterations 5 GAMG: Solving for p_rgh, Initial residual = 4.85196e07, Final residual = 5.68095e09, No Iterations 5 time step continuity errors : sum local = 1.42558e09, global = 2.21529e10, cumulative = 0.000126838 PIMPLE: iteration 2 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144587 Min(alpha.water) = 0.00106242 Max(alpha.water) = 1.05476 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144587 Min(alpha.water) = 0.0010097 Max(alpha.water) = 1.05473 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144586 Min(alpha.water) = 0.000959591 Max(alpha.water) = 1.05471 Updating StokesV wave model for patch inlet DICPCG: Solving for p_rgh, Initial residual = 0.000276663, Final residual = 2.8651e06, No Iterations 5 DICPCG: Solving for p_rgh, Initial residual = 2.86468e06, Final residual = 7.33919e07, No Iterations 5 time step continuity errors : sum local = 1.83962e07, global = 3.28297e10, cumulative = 0.000126838 DICPCG: Solving for p_rgh, Initial residual = 8.84302e07, Final residual = 4.67304e07, No Iterations 5 DICPCG: Solving for p_rgh, Initial residual = 4.67304e07, Final residual = 3.07381e07, No Iterations 5 time step continuity errors : sum local = 7.70472e08, global = 5.25822e10, cumulative = 0.000126837 DICPCG: Solving for p_rgh, Initial residual = 3.08887e07, Final residual = 1.91071e07, No Iterations 5 GAMG: Solving for p_rgh, Initial residual = 1.91071e07, Final residual = 1.11243e09, No Iterations 5 time step continuity errors : sum local = 2.7884e10, global = 1.00294e10, cumulative = 0.000126837 PIMPLE: converged in 2 iterations ExecutionTime = 92059.4 s ClockTime = 92106 s Courant Number mean: 0.00624004 max: 0.509682 Interface Courant Number mean: 0.000303199 max: 0.404414 deltaT = 0.000915501 Time = 12.129 PIMPLE: iteration 1 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144586 Min(alpha.water) = 5.35741e06 Max(alpha.water) = 1.05469 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144586 Min(alpha.water) = 1.40226e08 Max(alpha.water) = 1.05467 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144585 Min(alpha.water) = 1.27883e08 Max(alpha.water) = 1.05464 Updating StokesV wave model for patch inlet Updating shallowWaterAbsorption wave model for patch outlet DICPCG: Solving for p_rgh, Initial residual = 0.0110179, Final residual = 0.000120469, No Iterations 5 DICPCG: Solving for p_rgh, Initial residual = 0.000120677, Final residual = 1.15472e05, No Iterations 15 time step continuity errors : sum local = 2.8992e06, global = 2.1739e09, cumulative = 0.000126839 DICPCG: Solving for p_rgh, Initial residual = 1.22061e05, Final residual = 1.16741e06, No Iterations 43 DICPCG: Solving for p_rgh, Initial residual = 1.1674e06, Final residual = 8.35719e07, No Iterations 5 time step continuity errors : sum local = 2.0981e07, global = 2.58869e09, cumulative = 0.000126842 DICPCG: Solving for p_rgh, Initial residual = 1.02409e06, Final residual = 4.87693e07, No Iterations 5 GAMG: Solving for p_rgh, Initial residual = 4.87693e07, Final residual = 5.78942e09, No Iterations 5 time step continuity errors : sum local = 1.45345e09, global = 2.36671e10, cumulative = 0.000126841 PIMPLE: iteration 2 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144586 Min(alpha.water) = 0.00138511 Max(alpha.water) = 1.05469 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144586 Min(alpha.water) = 0.00131392 Max(alpha.water) = 1.05466 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144585 Min(alpha.water) = 0.00124639 Max(alpha.water) = 1.05463 Updating StokesV wave model for patch inlet DICPCG: Solving for p_rgh, Initial residual = 0.000291126, Final residual = 2.79373e06, No Iterations 5 DICPCG: Solving for p_rgh, Initial residual = 2.79331e06, Final residual = 7.36053e07, No Iterations 5 time step continuity errors : sum local = 1.84598e07, global = 3.46771e10, cumulative = 0.000126841 DICPCG: Solving for p_rgh, Initial residual = 9.25743e07, Final residual = 4.5891e07, No Iterations 5 DICPCG: Solving for p_rgh, Initial residual = 4.5891e07, Final residual = 3.24245e07, No Iterations 5 time step continuity errors : sum local = 8.13187e08, global = 5.43872e10, cumulative = 0.000126841 DICPCG: Solving for p_rgh, Initial residual = 3.32579e07, Final residual = 1.97878e07, No Iterations 5 GAMG: Solving for p_rgh, Initial residual = 1.97878e07, Final residual = 1.17233e09, No Iterations 5 time step continuity errors : sum local = 2.94013e10, global = 1.04298e10, cumulative = 0.00012684 PIMPLE: converged in 2 iterations ExecutionTime = 92080.4 s ClockTime = 92127 s Courant Number mean: 0.0062403 max: 0.504923 Interface Courant Number mean: 0.000302312 max: 0.403648 deltaT = 0.000915501 Time = 12.13 PIMPLE: iteration 1 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144585 Min(alpha.water) = 6.22537e06 Max(alpha.water) = 1.0546 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144585 Min(alpha.water) = 4.22846e08 Max(alpha.water) = 1.05458 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144584 Min(alpha.water) = 3.80532e08 Max(alpha.water) = 1.05455 Updating StokesV wave model for patch inlet Updating shallowWaterAbsorption wave model for patch outlet DICPCG: Solving for p_rgh, Initial residual = 0.0109772, Final residual = 0.000120993, No Iterations 5 DICPCG: Solving for p_rgh, Initial residual = 0.000121207, Final residual = 1.09356e05, No Iterations 15 time step continuity errors : sum local = 2.74231e06, global = 2.31784e09, cumulative = 0.000126843 DICPCG: Solving for p_rgh, Initial residual = 1.16013e05, Final residual = 1.15908e06, No Iterations 43 DICPCG: Solving for p_rgh, Initial residual = 1.15907e06, Final residual = 8.5041e07, No Iterations 5 time step continuity errors : sum local = 2.13239e07, global = 2.77346e09, cumulative = 0.000126846 DICPCG: Solving for p_rgh, Initial residual = 1.02343e06, Final residual = 4.93126e07, No Iterations 5 GAMG: Solving for p_rgh, Initial residual = 4.93126e07, Final residual = 5.70577e09, No Iterations 5 time step continuity errors : sum local = 1.43071e09, global = 2.31627e10, cumulative = 0.000126845 PIMPLE: iteration 2 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144585 Min(alpha.water) = 0.0017968 Max(alpha.water) = 1.0546 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144585 Min(alpha.water) = 0.00170086 Max(alpha.water) = 1.05457 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144584 Min(alpha.water) = 0.00161004 Max(alpha.water) = 1.05453 Updating StokesV wave model for patch inlet DICPCG: Solving for p_rgh, Initial residual = 0.000323175, Final residual = 9.54125e06, No Iterations 9 DICPCG: Solving for p_rgh, Initial residual = 9.53947e06, Final residual = 9.32001e07, No Iterations 16 time step continuity errors : sum local = 2.33577e07, global = 3.29532e10, cumulative = 0.000126845 DICPCG: Solving for p_rgh, Initial residual = 1.09139e06, Final residual = 4.62161e07, No Iterations 5 DICPCG: Solving for p_rgh, Initial residual = 4.62161e07, Final residual = 6.44307e07, No Iterations 5 time step continuity errors : sum local = 1.61475e07, global = 3.33242e10, cumulative = 0.000126845 DICPCG: Solving for p_rgh, Initial residual = 6.60649e07, Final residual = 3.59502e07, No Iterations 5 GAMG: Solving for p_rgh, Initial residual = 3.59503e07, Final residual = 1.07345e+136, No Iterations 50 time step continuity errors : sum local = 2.69028e+135, global = 6.34714e+124, cumulative = 6.34714e+124 PIMPLE: converged in 2 iterations ExecutionTime = 92110.6 s ClockTime = 92157 s Courant Number mean: 4.56044e+135 max: 9.79846e+141 Interface Courant Number mean: 3.28203e+134 max: 1.47078e+141 deltaT = 4.67165e146 Time = 12.13 PIMPLE: iteration 1 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144584 Min(alpha.water) = 0.000136131 Max(alpha.water) = 1.05453 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144584 Min(alpha.water) = 4.49755e06 Max(alpha.water) = 1.05453 Updating StokesV wave model for patch inlet MULES: Solving for alpha.water Phase1 volume fraction = 0.144584 Min(alpha.water) = 4.47453e06 Max(alpha.water) = 1.05453 Updating StokesV wave model for patch inlet Updating shallowWaterAbsorption wave model for patch outlet Code:
#0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in /lib/x86_64linuxgnu/libc.so.6 #3 double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) at ??:? #4 Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:? #5 Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:? #6 Foam::fvMatrix<double>::solveSegregatedOrCoupled(Foam::dictionary const&) at ??:? #7 Foam::fvMesh::solve(Foam::fvMatrix<double>&, Foam::dictionary const&) const at ??:? #8 ? in ~/OpenFOAM/OpenFOAMv1812/platforms/linux64GccDPInt32Opt/bin/interFoam #9 __libc_start_main in /lib/x86_64linuxgnu/libc.so.6 #10 ? in ~/OpenFOAM/OpenFOAMv1812/platforms/linux64GccDPInt32Opt/bin/interFoam https://www.dropbox.com/s/owd46aybld...kMesh.log?dl=0 https://www.dropbox.com/s/r9n21x4iaw...vSolution?dl=0 https://www.dropbox.com/s/ghs117a8p2...fvSchemes?dl=0 https://www.dropbox.com/s/9ukcjsejzrw51sv/log?dl=0 https://www.dropbox.com/s/9pu588n9qf4z8mb/U?dl=0 https://www.dropbox.com/s/uic2345rvqcb936/p_rgh?dl=0 https://www.dropbox.com/s/7w8qlajzup...ater.orig?dl=0 Many thanks in advance for any suggestion!! 

June 26, 2019, 06:36 

#2 
Senior Member
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 131
Rep Power: 12 
Hi Chiara,
From your explanation I can't immediately see what exactly is wrong, except that your simulation diverges (as you said, the Courant number is blowing up, the time step is close to zero, and the error message you included is what you usually get after a simulation diverges). Some things that you might try are:  adapt the tutorial case you were using without scaling it yet; many of the settings (fvSolution, fvSchemes) depend on the dimensions and velocities of your case. Once you get it to work without scaling, you can take a look at the solver settings  try to keep your mesh 2D (instructions for 2D meshing with SnappyHexMesh can be found here https://openfoamwiki.net/index.php/S...rate_2D_meshes). The empty BC only works for 2D geometries (one cell thickness). If you still end up with a 3D geometry, you may need to take a closer look at your boundary conditions, and the thickness of your domain.  start with a smaller time step. Even if you set adjustTimeStep to true, starting with a smaller time step may help Hope this helps, Sita 

Tags 
courant number increasing, foam::error::printstack, interfoam, residuals, stokes flow 
Thread Tools  Search this Thread 
Display Modes  

