|
[Sponsors] |
April 8, 2017, 16:05 |
Add PIMPLE instade of SIMPLE
|
#1 |
Senior Member
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 184
Rep Power: 11 |
Hello dear Foamers. I'm using openFoam ext 1.6 to do some internal combustion engine simulations with sonicTurbDyMEngineFoam . To keep Courant number below 1, timestep must be set to 1.5e^-7s. For a simple geometry, it takes 90000sec to simulate 720 CA degree. Geometry example:
https://www.youtube.com/watch?v=THJvHIk0n0Y https://www.youtube.com/watch?v=jVls41R8j_c I decided to add PIMPLE loop instead of SIMPLE for sonicTurbDyMEngineFoam to increase maximum Courant Number and to gain some experience in modifying solvers. It shouldn’t be very complicated for the beginners. First of all I have changed sonicTurbDyMEngineFoam.C from Code:
[...] # include "rhoEqn.H" // --- SIMPLE loop for (int corr=1; corr<=nCorr; corr++) { # include "UEqn.H" # include "hEqn.H" # include "pEqn.H" } turbulence->correct(); [...] Code:
[...] // PIMPLE LOOP for (int oCorr=0; oCorr<nOuterCorr; oCorr++) { # include "rhoEqn.H" # include "UEqn.H" # include "hEqn.H" // --- PISO loop for (int corr=1; corr<=nCorr; corr++) { # include "pEqn.H" } turbulence->correct(); } [...] Then I have changed from Code:
#include <readPISOcontrols.H> Code:
#include <readPIMPLEcontrols.H> Is that solver properly prepared? I have compiled it (with different name) but with warnings about no used variables like nNonOrthoCorr, etc. . I think those warnings comes from nowhere because those warnings appears also when I compile original solver. In case from sonicTurbDyMEngineFoam I have only modify fvSolutions from: Code:
PISO { // SIMPLE correctors nOuterCorrectors 2; // PISO correctors nCorrectors 3; momentumPredictor yes; transonic no; nNonOrthogonalCorrectors 0; } relaxationFactors { U 0.7; p 0.25; h 0.5; k 0.7; epsilon 0.7; } Code:
PIMPLE { nNonOrthogonalCorrectors 0; nCorrectors 3; nOuterCorrectors 10; residualControl { U { tolerance 1e-8; relTol 0.01; } p { tolerance 1e-7; relTol 0; } k { tolerance 1e-8; relTol 0.01; } epsilon { tolerance 1e-8; relTol 0.01; } h { tolerance 1e-8; relTol 0.01; } } } relaxationFactors { fields { p 0.25; pFinal 1; } equations { U 0.7; h 0.5; k 0.7; epsilon 0.7; "(U|h|k|epsilon)Final" 1; } } Code:
[...] From function specieThermo<thermo>::T(scalar f, scalar T0, scalar (specieThermo<thermo>::*F)(const scalar) const, scalar (specieThermo<thermo>::*dFdT)(const scalar) const) const in file /home/sheaker/OpenFOAM/OpenFOAM-1.6-ext/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 73 Maximum number of iterations exceeded. Rescue by HJ From function specieThermo<thermo>::T(scalar f, scalar T0, scalar (specieThermo<thermo>::*F)(const scalar) const, scalar (specieThermo<thermo>::*dFdT)(const scalar) const) const in file /home/sheaker/OpenFOAM/OpenFOAM-1.6-ext/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 73 Maximum number of iterations exceeded. Rescue by HJ From function specieThermo<thermo>::T(scalar f, scalar T0, scalar (specieThermo<thermo>::*F)(const scalar) const, scalar (specieThermo<thermo>::*dFdT)(const scalar) const) const in file /home/sheaker/OpenFOAM/OpenFOAM-1.6-ext/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 73 Maximum number of iterations exceeded. Rescue by HJ BiCGStab: Solving for epsilon, Initial residual = 3.61942e-05, Final residual = 6.94297e-13, No Iterations 1 bounding epsilon, min: 1.68981e-20 max: 2.56723e+07 average: 70394.6 BiCGStab: Solving for k, Initial residual = 0.0717658, Final residual = 1.22763e-12, No Iterations 1 bounding k, min: -3.38742 max: 544.101 average: 5.35043 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 Floating point exception (core dumped) sheaker@sheakerLAPTOP:~/sonicTDMEFoamPIMPLEtest$ I wish You all good time. Thank You for reading. sheaker Last edited by sheaker; April 18, 2017 at 05:42. |
|
April 8, 2017, 16:28 |
|
#2 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
Without analysing all the material:
The need of a very small time step is often caused by a unbalanced mesh: The Co number is very different in different parts of the mesh. The solution log gives max and min Co number so you may look at this. A relation of 10 may be acceptable, much higher quotients needs to work at the mesh.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
April 8, 2017, 16:46 |
|
#3 |
Senior Member
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 184
Rep Power: 11 |
Thank You Uwe for Your replay. The mesh is pretty simple, the simulation is not steady-state and in different timesteps different velocities occur in some regions so it is rather impossible to keep maxCo / minCo = 10 without auto remeshing.
After all I would really like to understand how to successfully add the PIMPLE algorithm because I think there is a problem with my implementation or case setup. Have a nice day. sheaker |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[DesignModeler] add two area around Cylinder in ansys | sajjadcheraghian | ANSYS Meshing & Geometry | 0 | May 23, 2016 13:42 |
error while running modified pimple solver | R_21 | OpenFOAM Programming & Development | 0 | May 28, 2015 07:59 |
A question on the PIMPLE algorithm | GerhardHolzinger | OpenFOAM Running, Solving & CFD | 4 | February 13, 2015 07:49 |
Help for the small implementation in turbulence model | shipman | OpenFOAM Programming & Development | 25 | March 19, 2014 11:08 |
why PIMPLE doesn't converge at each time step but no diverging? | immortality | OpenFOAM Running, Solving & CFD | 7 | May 19, 2013 15:16 |