|
[Sponsors] |
interFoam - velocities too high with k-omega SST |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 12, 2019, 09:39 |
interFoam - velocities too high with k-omega SST
|
#1 |
New Member
David
Join Date: Oct 2018
Posts: 27
Rep Power: 8 |
Hello everybody,
I'm really in need as I am writing my master thesis and do have a few questions about the accuracy of my simulation. The situation: Simply said I need to simulate the filling process of a basin. There is no outlet at the basin, apart from the atmosphere. So I only use the inlet, the atmosphere and the walls as boundarys. The whole should run under normal conditions, so no increased pressure or anything else. At the inlet 5 m³/s run into the empty basin. Now I have results of an engineering office available, which simulated exactly this basin already. However, their speeds differ slightly from mine. For illustration I add a few pictures where you can see the approximate size. My question now is whether the deviations are simply model-dependent or whether there is an error in my calculations? I already did some research and tried different boundary conditions (e.g. nutUSpaldingWallFunction instead of nutkWallFunction) but this had no effect on my results. I would be very thankful if someone could check my datas or give me a hint as the end of my master's work is approaching. I suspect so far that the deviations are either due to the turbulence model used or to inaccuracies in my fvsolutions. Unfortunately I don't know with which turbulence model the engineering office achieved the results. Code:
FoamFile { version 2.0; format ascii; class volScalarField; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0.0212415; boundaryField { wall { type kqRWallFunction; value uniform 0.0212415; } atmosphere { type inletOutlet; inletValue uniform 0.0212415; value uniform 0.0212415; } inlet { type fixedValue; value uniform 0.0212415; } } Code:
FoamFile { version 2.0; format ascii; class volScalarField; object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { wall { type nutkWallFunction; value uniform 0; } atmosphere { type inletOutlet; inletValue uniform 0; value uniform 0; } inlet { type calculated; value $internalField; } } Code:
FoamFile { version 2.0; format ascii; class volScalarField; object omega; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 -1 0 0 0 0]; internalField uniform 2.597565634; boundaryField { wall { type omegaWallFunction; value uniform 2.597565634; } atmosphere { type inletOutlet; inletValue uniform 2.597565634; value uniform 2.597565634; } inlet { type fixedValue; // mixingLength 0.21; //lentgh scale 10% of characteristic dimensions value uniform 2.597565634; } } Code:
FoamFile { version 2.0; format ascii; class volScalarField; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0.0; boundaryField { wall { type fixedFluxPressure; value uniform 0.0; } atmosphere { type totalPressure; p0 uniform 0.0; U U; Phi phi; Rho rho; Psi none; Gamma 1; value uniform 0; } inlet { type fixedFluxPressure; gradient uniform 0; rho totalPressure; value uniform 0; } } Code:
FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type flowRateInletVelocity; volumetricFlowRate constant 5; extrapolateProfile true; value uniform (0 0 0); } atmosphere { type pressureInletOutletVelocity; value uniform (0 0 0); } wall { type noSlip; } } Code:
FoamFile { version 2.0; format ascii; class dictionary; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default cellMDLimited Gauss linear 1; grad(U) cellMDLimited Gauss linear 1; grad(alpha) cellMDLimited Gauss linear 1; } divSchemes { // Use second-order accurate convection div(rhoPhi,U) Gauss linearUpwindV grad(U); div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,k) Gauss upwind; div(phi,omega) Gauss upwind; div(phi,R) Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) Gauss upwind; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } wallDist { method meshWave; } Code:
FoamFile { version 2.0; format ascii; class dictionary; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // PIMPLE { momentumPredictor no; nOuterCorrectors 3; nNonOrthogonalCorrectors 1; nCorrectors 3; } solvers { pcorr { solver PCG; preconditioner DIC; tolerance 1e-10; relTol 0.0; } pcorrFinal { solver PCG; preconditioner DIC; tolerance 1e-7; relTol 0.0; } p_rgh { solver PCG; preconditioner DIC; tolerance 1e-07; relTol 0.05; } p_rghFinal { solver PCG; preconditioner DIC; tolerance 1e-07; relTol 0.0; } "alpha.*" { nAlphaCorr 2; nAlphaSubCycles 4; cAlpha 2; MULESCorr yes; nLimiterIter 3; solver smoothSolver; smoother symGaussSeidel; tolerance 1e-8; relTol 0; } "(U|k|omega)" { solver PBiCG; preconditioner DILU; tolerance 1e-06; relTol 0; } "(U|k|omega)Final" { solver PBiCG; preconditioner DILU; tolerance 1e-08; relTol 0; } Phi { solver GAMG; tolerance 1e-7; relTol 0.01; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration on; agglomerator faceAreaPair; nCellsInCoarsestLevel 10; mergeLevels 1; } } relaxationFactors { // Conservative settings to solve reliably on bad // meshes p 0.3; U 0.7; //UFinal 1; k 0.7; // kFinal 1; omega 0.7; // omegaFinal 1; } nAlphaCorr 2; nAlphaSubCycles 1; cAlpha 1; The rest is completely the same, except for the grid width, but these "waves" also occurred with the same grid width. The upper result would suit me better as a comparison to the pattern solution, but I don't know where this difference results from. ergebnis_bericht.JPG ergbnis.jpg |
|
February 12, 2019, 10:58 |
|
#2 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
Just a question. Did your equations converged in every timesteps? I think you should increase your nOuterCorrectors in the PIMPLE loop. At least 20-40 or even more. And let the solver step forward based on your residuals. Not the loop number. The first steps may need many loop iterations then it should decrease. And also you can use a relTol with 0.01 for example. I think you don't need that tight tolerances for the linear solvers. |
|
February 12, 2019, 11:04 |
|
#3 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
edit:
It dropped an error for the previous message and I wrote it again. Just ignore this post. |
|
February 12, 2019, 11:12 |
|
#4 |
New Member
David
Join Date: Oct 2018
Posts: 27
Rep Power: 8 |
Thanks so far.
This might be a stupid question but how do I know if it converged in every timestep? For now i only checked the residuals with gnuplot. Is that what you mean? You can see them in the picture. I didn't get the pressure displayed because it covered up the other values. And what do you mean by "let the solver step forward.."? residuals.png |
|
February 12, 2019, 11:22 |
|
#5 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Convergence:
Check slide 119: http://www.wolfdynamics.com/wiki/fvm_crash_intro.pdf I can't see your residuals. Where should I find it? :S "let the solver step": Use residualControl in the PIMPLE dict. You can define there the goal residual for every variable. And when all of your residuals are under this value, the solver will step to the next timestep. |
|
February 12, 2019, 11:31 |
|
#6 |
New Member
David
Join Date: Oct 2018
Posts: 27
Rep Power: 8 |
Sorry, I forgot to put the picture in. x)
Okay, I've already tried this once but then my delta T was getting smaller and smaller. I used to use residualControl { U 1e-05; p_rgh 1e-04; } Unfortunately I don't have the log file anymore. But I remember that it starts after 3-4 seconds. Were my values possibly too small? I will check the slides, thank you! |
|
February 12, 2019, 11:40 |
|
#7 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Noone knows. But without them it's a bit weird to put your results into your master thesis.
You should prove that your solver is converged. And if you had unconverged timesteps, your results are mostly garbage. |
|
February 12, 2019, 11:45 |
|
#8 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Sorry I just saw your residuals. I think they are mostly fine, but that Uz is a bit high.
|
|
February 12, 2019, 19:26 |
|
#9 |
New Member
David
Join Date: Oct 2018
Posts: 27
Rep Power: 8 |
Thank you so much for your help. I could now set the residual controls to converge my simulation. Approximately after 5-6 iIterations. But do I have to turn off the momentumPredictor for interFoam? Somewhere I read that they are not so relevant in Interfoam. I am unsure whether and how this can influence my results.
I hope for better results. But if anyone has further advice, I would be very grateful. .. forget the picture below Last edited by Fool; February 12, 2019 at 20:35. |
|
February 13, 2019, 03:56 |
|
#10 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Honestly I still don't know for sure when should you use predictor and when not. But as I know if you use, it shouldn't be a problem. But for interFoam I found the same as you, and previously I made some test cases and the results were the same with and without predictor but you can save some computation time.
And what about your results? Convergence was the problem or there is something else? ( I saw in the email from cfd-online that you ask: "Now I'm a bit confused about the residuals of p_rgh. Can someone explain me the behavior of it?" This is the behaviour what you can see in the pdf I sent you earlier. But there are many iterations and it seems like an orange rectangle. But this is just the p residual falling down, and jump up at the next timestep. Fall down again, then step... ) |
|
February 13, 2019, 13:50 |
|
#11 |
New Member
David
Join Date: Oct 2018
Posts: 27
Rep Power: 8 |
Thank you very much again. The results will take some time because the geometry is very large. So far only 10 seconds have been simulated and 7 iteration steps are still being performed.
My controlDict looks like this at the moment: deltaT 0.001; maxCo 0.6; maxAlphaCo 1; maxDeltaT 1; Do you think I should increase deltaT a bit to reduce the simulation time? |
|
February 27, 2019, 13:23 |
|
#12 |
New Member
David
Join Date: Oct 2018
Posts: 27
Rep Power: 8 |
can anyone tell me if I need relaxation factors for interfoam with PIMPLE if it converges without too?
I had previously set relaxation factors, but with p_rhg = 0.3 it took interFoam much longer to converge. Sometimes it even didn't converge at all. |
|
February 27, 2019, 14:52 |
.
|
#13 |
Member
Join Date: Nov 2015
Posts: 38
Rep Power: 11 |
||
February 28, 2019, 19:17 |
|
#14 |
New Member
David
Join Date: Oct 2018
Posts: 27
Rep Power: 8 |
okay, well, thank you. But I mean what does it mean when a simulation converges under exactly the same settings without relaxationfactors faster than with?
|
|
Tags |
basin, filling, interfoam, k-omega sst model, turbulence |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Weird result by k omega SST | bingo641 | OpenFOAM | 3 | May 28, 2018 00:05 |
Setting change from k omega to k omega SST | bingo641 | OpenFOAM Programming & Development | 0 | May 22, 2018 06:15 |
K-Omega SST BC set up for omega and K | joneill053 | OpenFOAM Pre-Processing | 2 | July 10, 2017 15:29 |
Interfoam Microchannel flow parasitic velocities | cfd_user2011 | OpenFOAM | 2 | June 12, 2011 16:43 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 06:12 |