
[Sponsors] 
2D airfoil simulation pressure not getting lower than 0.1 

LinkBack  Thread Tools  Search this Thread  Display Modes 
May 22, 2019, 06:28 
2D airfoil simulation pressure not getting lower than 0.1

#1 
Member
Os
Join Date: Jun 2017
Posts: 80
Rep Power: 5 
Hello Foamers ,
I am making a 2D airfoil simualtion for an airfoil using both simpleFoam (steadyState) and pimpleFoam (transient) i ve generated my mesh uding Gambit than converted it to Openfoam . I want to calculate the Cd Cl and Cm aerodynamic Coefficient and i am using the KOmega SST turbulence Model with wall functions (y+>30) once i run the simualtion for different angles of attack ( alpha > 8 ) i get Cd Cl that are far from the experimental data so i visualised the residuals in real time and i vve noticed that the residuals for pressure and velovity and are not getting anyLower than 0.1and 0.001 (like in the picture attached ). and these are the files for my case in the system directory : controlDict Code:
application pimpleFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 5; deltaT 1e5; writeControl adjustableRunTime; writeInterval 1e2; purgeWrite 0; writeFormat binary; writePrecision 10; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; adjustTimeStep yes; maxCo 0.9; functions { #includeFunc residuals forces { type forces; libs ("libforces.so"); writeControl timeStep; writeInterval 10; patches (wing); rho rhoInf; log true; rhoInf 1.2047; CofR (0 0 0); } forceCoeffs1 { // Mandatory entries type forceCoeffs; libs ("libforces.so"); patches (wing); // Optional entries // Field names p p; U U; rho rhoInf; rhoInf 1.2047; // rhoInf 1.204; // Reference pressure [Pa] pRef 0; // Include porosity effects? porosity no; // Store and write volume field representations of forces and moments writeFields yes; // Centre of rotation for moment calculations CofR (0 0 0); // Lift direction liftDir (0 1 0); // Drag direction dragDir (1 0 0); // Pitch axis pitchAxis (0 0 1); // Freestream velocity magnitude [m/s] magUInf 10.578; // Reference length [m] lRef 1; // Reference area [m2] Aref 1; // Spatial data binning //  extents given by the bounds of the input geometry } } Code:
ddtSchemes { default Euler; } gradSchemes { default Gauss linear; grad(p) Gauss linear; grad(U) Gauss linear; } divSchemes { default none; div(phi,U) Gauss linearUpwind grad(U); div(phi,k) Gauss limitedLinear 1; div(phi,omega) Gauss limitedLinear 1; div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear limited corrected 0.5; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } wallDist { method meshWave; } Code:
solvers { "pcorr.*" { solver GAMG; tolerance 0.02; relTol 0; smoother GaussSeidel; } p { $pcorr; tolerance 1e7; relTol 0.01; } pFinal { $p; tolerance 1e7; relTol 0; } "(Ukomega)" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e06; relTol 0.1; } "(Ukomega)Final" { $U; tolerance 1e06; relTol 0; } } PIMPLE { // correctPhi yes; nOuterCorrectors 2; nCorrectors 2; nNonOrthogonalCorrectors 2; } relaxationFactors { fields { p 0.3; } equations { "(Ukomega)" 0.7; "(Ukomega)Final" 1.0; } } cache { grad(U); } I ve tried to increse the number of iterations of PIMPLE by setting nOuterCorrectors to 100 , and in the log display i can see that there is an improvement of the pressure residuals whith each iteration but after T= 0.09 s i ve noticed that in the final iteration the initial residuals jumps back up as you can see and the residuals continue to be the same for the rest of the simualtion (t =1.4 sec) Code:
PIMPLE: Iteration 98 smoothSolver: Solving for Ux, Initial residual = 1.616474724e11, Final residual = 1.616474724e11, No Iterations 0 smoothSolver: Solving for Uy, Initial residual = 1.960368055e12, Final residual = 1.960368055e12, No Iterations 0 GAMG: Solving for p, Initial residual = 1.657865185e05, Final residual = 3.719486792e07, No Iterations 2 time step continuity errors : sum local = 4.844632515e14, global = 9.071970864e17, cumulative = 1.122173492e10 GAMG: Solving for p, Initial residual = 1.642056378e05, Final residual = 3.701244997e07, No Iterations 2 time step continuity errors : sum local = 4.820884777e14, global = 8.295166997e17, cumulative = 1.122174321e10 PIMPLE: Iteration 99 smoothSolver: Solving for Ux, Initial residual = 1.577131026e11, Final residual = 1.577131026e11, No Iterations 0 smoothSolver: Solving for Uy, Initial residual = 1.910454271e12, Final residual = 1.910454271e12, No Iterations 0 GAMG: Solving for p, Initial residual = 1.631649698e05, Final residual = 3.667338769e07, No Iterations 2 time step continuity errors : sum local = 4.776725338e14, global = 8.843266574e17, cumulative = 1.122175206e10 GAMG: Solving for p, Initial residual = 1.616322336e05, Final residual = 3.649894645e07, No Iterations 2 time step continuity errors : sum local = 4.754015883e14, global = 8.080533709e17, cumulative = 1.122176014e10 PIMPLE: Iteration 100 smoothSolver: Solving for Ux, Initial residual = 2.21101886e11, Final residual = 2.21101886e11, No Iterations 0 smoothSolver: Solving for Uy, Initial residual = 2.667586351e12, Final residual = 2.667586351e12, No Iterations 0 GAMG: Solving for p, Initial residual = 0.3573363803, Final residual = 0.002989077632, No Iterations 4 time step continuity errors : sum local = 4.237840817e10, global = 6.188044041e13, cumulative = 1.11598797e10 GAMG: Solving for p, Initial residual = 0.08131779127, Final residual = 7.551108567e07, No Iterations 22 time step continuity errors : sum local = 7.381833497e14, global = 8.421218529e16, cumulative = 1.115996391e10 smoothSolver: Solving for omega, Initial residual = 1.444649303e06, Final residual = 8.852480069e08, No Iterations 1 smoothSolver: Solving for k, Initial residual = 2.061374964e06, Final residual = 1.15509241e07, No Iterations 1 ExecutionTime = 639.93 s ClockTime = 640 s forceCoeffs forceCoeffs1 write: Cm = 0.08949366665 Cd = 0.173624454 Cl = 1.367788881 Cl(f) = 0.5944007738 Cl(r) = 0.7733881071 Courant Number mean: 0.006269592047 max: 0.8947602155 deltaT = 0.0001149425287 Time = 0.091954 Do you hav nay idea about why is the pressure residuals not getting any lower residual values or do you have any ideas about how can i fixe the problem ?!! thank you 

May 30, 2019, 06:53 

#2 
New Member
Join Date: Sep 2018
Posts: 27
Rep Power: 4 
If you want lower residuals, you can change the tolerance in the fvsolution file.
However I dont know if you need lower, when your final residual for pressure is Final residual = 3.719486792e07 

June 15, 2019, 07:48 

#3  
Member
Os
Join Date: Jun 2017
Posts: 80
Rep Power: 5 
Quote:
Hello , Thank you for the reply well.. i have found that the plots i ve been getting are for the initial residuals for each time step, and are not the final residuals for each time step . after plotting the final residuals for each time step i ve found that , indeed ,the residuals are lower than 1e6 . so my question is :since i am conducting transient simulation , How Can i know if my simulation is converging ?should the initial residuals converge too like in steady state(see pic ) ?Or it's okk that the initial residuals in each timestep are between (0.10.5) ? and how can i get the righ plot for transient simualtion convergence ?!! Many Thanks 

August 2, 2019, 04:18 

#4 
New Member
WJ
Join Date: Feb 2016
Location: MyHome
Posts: 11
Rep Power: 6 
As long as other parameters are ok, p residual value of 0.10.5 are ok, it is quite high though.
Because it is transient, you need to catch not a specific time, but to catch a range or a period. If Cd or Cl is periodic, you may extract 1 cycle to plot your result. And kwSST model phenomena in 2D airfoil of high AoA is wellknown, kwSST can predict drag well but can not in lift because it overestimates vortext generation at trail edge. Simply say, stall will occur at much lower angle in simulation. So it will give you much lower lift than experimental data at high AoA. 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Ffd_control_point_2d  feiyi  SU2  4  September 30, 2019 13:42 
Simulation of ballvalve opening w.r.t to varying inlet pressure  wasim_03  Main CFD Forum  1  January 6, 2018 13:40 
Meshing an axissymetric 2D case  Problems  Andyjoe  OpenFOAM  10  January 29, 2010 03:37 
OpenFOAM book  betakv  OpenFOAM  5  January 13, 2009 08:06 
Hydrostatic pressure in 2phase flow modeling (long)  DS & HB  Main CFD Forum  0  January 8, 2000 16:00 