|
[Sponsors] |
residual controls in chtMultiRegionSimpleFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 17, 2013, 07:14 |
residual controls in chtMultiRegionSimpleFoam
|
#1 |
New Member
Andre Weiner
Join Date: Aug 2012
Posts: 29
Rep Power: 14 |
Hello!
I set up a chtMultiRegionSimpleFoam-case in OpenFOAM 2.2.2 . After everything was working fine, i tried to apply residual control in the typical way: Code:
residualControl { p 1e-2; U 1e-3; "(k|omega)" 1e-3; } After trying some konfigurations i noticed that it doesn't work. So i took a look at the sources of chtMultiRegionSimpleFoam and compared them to simpleFoam.C:
Are my assumptions right so far? If yes, is there any workaround? Thanks for your answers :-) Best regards Andre |
|
April 23, 2015, 21:53 |
|
#2 |
New Member
Dan
Join Date: Jan 2014
Location: Australia
Posts: 2
Rep Power: 0 |
bump... I'm having the same problem, residual controls still (2.3.X.git) do not seem to work for chtMultiRegionSimpleFoam.
|
|
April 24, 2015, 15:23 |
|
#3 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 |
Residual controls don't work in OF 2.2.x nor in 2.3.x either. It's a shame that such tool is not implemented to work in multi region cases. I hope that some day this issue will be fixed so that we will be able to control multi region runs and make them stop once the final solution is reached...
Best regards, Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! |
|
April 24, 2015, 16:03 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
I've had a look into the source code for OpenFOAM 2.3.x and Andre's original diagnosis is still correct and accurate. It's not exactly easy to implement this feature in chtMultiRegionSimpleFoam, due to the fact that each region has its own levels of residual values, therefore it would be necessary to implement a special class derived from solutionControl specifically for multi-region cases, which would check for the residuals for all regions and see if all are below the desired values. My guess is that if someone reports this on the bug tracker for OpenFOAM, either one of the following scenarios might occur:
Bruno
__________________
|
|
May 14, 2016, 08:44 |
|
#5 |
New Member
Karl Lindqvist
Join Date: Jul 2012
Posts: 21
Rep Power: 14 |
Dear all,
I have made some modifications to the original multi-region solvers (steady state and transient) to incorporate residuals checking in ONE fluid region. This can be useful for those of you working on heat transfer between a solid and a single fluid region, where the solid residuals can be managed separately. The code is available at https://github.com/kelindqv/chtMultiRegionResFoam Best regards, Karl |
|
May 16, 2016, 06:14 |
|
#6 |
New Member
Andre Weiner
Join Date: Aug 2012
Posts: 29
Rep Power: 14 |
Thanks for sharing your approach!
Cheers Andre |
|
June 2, 2016, 07:00 |
|
#7 |
New Member
Stephan Derkohlkopf
Join Date: Feb 2016
Posts: 2
Rep Power: 0 |
Hello Karl,
I find your code very interesting since residual control would speed up my simulations a lot. thanks for sharing Just to be sure - is it intended for 2.3.x or 3.0.x? I'm running 3.0.1 and it's crashing after the mesh creation greetings Stephan |
|
December 1, 2016, 11:26 |
|
#8 |
Member
Andrea Di Ronco
Join Date: Nov 2016
Location: Milano, Italy
Posts: 57
Rep Power: 10 |
Hello everyone,
I'm basically new to openfoam and I'm trying to use chtmultiregionsimplefoam to simulate a problem related to my thesis work. Everything seems to work (more or less), except for residual control which apparently is not providing sensible effect on the simulation. This seems the only thread on the topic and I see that it was created quite long time ago: does anyone know wheter this feature is now implemented in chtmultiregionsimplefoam or not? Thank you very much. Greetings to everyone, Andrea |
|
December 2, 2016, 08:38 |
|
#9 | |
New Member
Andre Weiner
Join Date: Aug 2012
Posts: 29
Rep Power: 14 |
Quote:
I just checked the chtMultiRegionSimpleFoam solver in openfoam-dev and there is still no residual control. The easiest way is currently to check the residuals manually. Cheers Andre |
||
December 2, 2016, 08:56 |
|
#10 | |
Member
Andrea Di Ronco
Join Date: Nov 2016
Location: Milano, Italy
Posts: 57
Rep Power: 10 |
Quote:
thank you so much for your quick reply. I'll just continue checking manually the residuals, it's not such a big problem Have a nice day, Andrea |
||
March 12, 2020, 03:19 |
h residual goes on increasing
|
#11 |
Member
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 7 |
Hello everyone,
I'm using chtMultiRegionSimpleFoam and in the attached residual image, h residual are goes on increasing after even stopping the solver at 16000 iterations.. Could anyone please provide any solution or suggestion for this issue ? This is the Residuals file i'm using: Code:
set logscale y set title "Residuals" set ylabel 'Residual' set xlabel 'Iteration' plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,\ "< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,\ "< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines,\ "< cat log | grep 'Solving for epsilon' | cut -d' ' -f9 | tr -d ','" title 'epsilon' with lines,\ "< cat log | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines,\ "< cat log | grep 'Solving for h' | cut -d' ' -f9 | tr -d ','" title 'h' with lines,\ "< cat log | grep 'Solving for p_rgh' | cut -d' ' -f9 | tr -d ','" title 'p_rgh' with lines pause 1 reread Code:
application chtMultiRegionSimpleFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 50000; deltaT 1; writeControl timeStep; writeInterval 1000; purgeWrite 0; writeFormat binary; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; graphFormat raw; runTimeModifiable true; Code:
ddtSchemes { default steadyState; } gradSchemes { default cellLimited leastSquares 1.0; } divSchemes { //default none; div(phi,U) bounded Gauss upwind; div(phi,h) bounded Gauss upwind; div(phi,e) bounded Gauss upwind; div(phi,K) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p_rgh; } Code:
solvers { p_rgh { solver GAMG; tolerance 1e-7; relTol 0.1; smoother DIC; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } "(U|e|k|h|epsilon)" { solver PBiCG; preconditioner DILU; tolerance 1e-7; relTol 0.1; } } SIMPLE { nNonOrthogonalCorrectors 0; rhoMin rhoMin [1 -3 0 0 0] ****; rhoMax rhoMax [1 -3 0 0 0] ****; residualControl { h { tolerance 1e-7; } } } relaxationFactors { fields { p_rgh 0.7; } equations { h 0.95; U 0.3; k 0.8; epsilon 0.8; } } Code:
ddtSchemes { default steadyState; } gradSchemes { default cellLimited leastSquares 1.0; } divSchemes { default none; } laplacianSchemes { //default none; laplacian(alpha,h) Gauss linear limited corrected 0.33; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; } Code:
solvers { h { solver PCG; preconditioner DIC; tolerance 1e-7; relTol 0.1; } } SIMPLE { nNonOrthogonalCorrectors 0; residualControl { h { tolerance 1e-7; } } } relaxationFactors { fields { } equations { h 0.95; } } Vishsel Last edited by Vishsel; March 12, 2020 at 06:46. Reason: Adding of solver setting files |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unstabil Simulation with chtMultiRegionFoam | mbay101 | OpenFOAM Running, Solving & CFD | 13 | December 28, 2013 14:12 |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 14:58 |
pimpleFoam: turbulence->correct(); is not executed when using residualControl | hfs | OpenFOAM Running, Solving & CFD | 3 | October 29, 2013 09:35 |
calculation stops after few time steps | sivakumar | OpenFOAM Running, Solving & CFD | 7 | March 17, 2013 07:37 |
Orifice Plate with a fully developed flow - Problems with convergence | jonmec | OpenFOAM Running, Solving & CFD | 3 | July 28, 2011 06:24 |