|
[Sponsors] |
February 3, 2021, 10:59 |
Running PIMPLE in steady-state mode
|
#1 |
Member
Andrea Di Ronco
Join Date: Nov 2016
Location: Milano, Italy
Posts: 57
Rep Power: 9 |
Hello,
since the day I started writing my own solvers, I found it tedious to keep updated two separate versions of the solvers if I needed to test them both in transient and steady-state mode. Most of my problems are steady-state and I find it conceptually simpler to work with SIMPLE-based solvers, but from time to time also transient problems arise. Also for steady-state problems, it is sometimes useful to study how they behave in "real time". So I started considering the idea of having a single solver to deal with both modes, i.e. writing PIMPLE-based solvers but having them run in "SIMPLE mode" when needed. I want to share here my considerations and ask if maybe there are some aspects that I'm missing, or smarter ways to accomplish this task. Using the buoyantBoussinesq(SP)impleFoam solvers as reference (OpenFOAM 6), I've seen from comparison that indeed the code is almost identical for the two solvers. Besides trivial differences (ddt terms in equations, dictionary names, time controls, PISO pressure correctors, ...), I've only found a couple of lines in pEqn.H which differ in a way that I can't fully understand. Anyway, they don't seem to be crucial changes, so I "safely" concluded that in principle there are no particular reasons why I shouldn't be able to run PIMPLE as SIMPLE without modifying the default source code. Then I looked at how to write the cases. Again, I compared the available tutorials for the two solvers and I didn't find particular differences. Naturally, ddtSchemes have to be set on steadyState in fvSchemes. Apart from this, some care must be paid in fvSolutions: Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p_rgh { ... } p_rghFinal { $p_rgh; } "(U|T|k|epsilon|R)" { ... } "(U|T|k|epsilon|R)Final" { $U; } } PIMPLE { momentumPredictor yes; consistent yes; nOuterCorrectors 1; nCorrectors 1; nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; } relaxationFactors { fields { p 0.8; pFinal $p; } equations { U 0.5; Uc 0.5; T 0.5; c 0.8; UFinal $U; UcFinal $Uc; TFinal $T; cFinal $c; } } // ************************************************************************* // 1) In the PIMPLE subdict, nOuterCorrectors and nCorrectors should be seth both to 1 to replicate the pure SIMPLE behaviour. 2) Is there any conceptual difference in how the nNonOrthogonalCorrectors and consistent keywords are used between the two solvers?. 3) Regarding the solvers and relaxationFactors subdicts, "Final" entry options have be specified instead, since the only outer corrector is regarded as final. "non-Final" entries can be directly omitted for the same reason. 4) I've not considered residual control for the moment, but it shouldn't be a problem. With these settings, I've been able to replicate the corresponding SIMPLE behaviour on relatively simple cases of mine. Still, I would be glad to hear other opinions on this matter. For example I see that for some solvers a single version is offered (e.g. multiphaseEulerFoam or chtMultiRegionFoam) but I don't understand clearly if they are also supposed to work in steady-state mode and how they accomplish this capability with respect to a standard PIMPLE solver. Furthermore, more recent versions of the simpleFoam solver make use of local time-stepping features: how is this related to this problem? Thanks in advance for any comment! |
|
February 3, 2021, 13:38 |
|
#2 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
I've not used a PIMPLE-based solver specifically to replicate SIMPLE behavior, but have used transient solvers (including PIMPLE-based ones) to obtain steady solutions using local time stepping (LTS). So to address your last point a bit, here are a few thoughts in case you find them useful : (Also, the LTS release info is worth a quick read for more context : https://openfoam.org/release/2-0-0/steady-state-vof).
There are a few RAS reactingFoam tutorials that use LTS to obtain steady solutions -- at least in more recent releases... they might be in OF6 as well but I don't remember offhand. I've also used LTS with rhoCentralFoam without much difficulty. From an ease of use standpoint, LTS is also nice because you don't have to worry about adapting a solver for steady calculations (if one doesn't already exist, as in the case of e.g. rhoCentralFoam). It also might give you a bit more wiggle room in terms of retaining stability (as indicated, also, by the release notes). Caelan |
|
February 4, 2021, 04:05 |
|
#3 | |
Member
Andrea Di Ronco
Join Date: Nov 2016
Location: Milano, Italy
Posts: 57
Rep Power: 9 |
Quote:
Yes, I had a look at LTS features some time ago, but LTS is not embedded in pimpleFoam in OF6 by deafult. Since I don't plan to switch to newer releases for the moment (our solvers are based on the buoyantBoussinesq ones and 6 is the most recent release to support them), I haven't already tried myself... But you make me realise that the functionality is present in other solvers and direct comparison with pimpleFoam from OF7/8 (hopefully) should be enough to port it in our solvers. Anyway, since LTS (if I get it right) was implemented precisely to run steady-state calculations with transient solvers, do you have any idea on how it behaves in general with respect to standard SIMPLE-based solution? Mostly on rather big and complex cases, since I often work on large multiphysics problems with several additional equations and stuff. Or maybe you can suggest some other source where this topic was addressed . I'm definitely interested in trying LTS, but since convergence can be already quite messy I wouldn't really want to further complicate the problem with even less robust solutions. Thank you again very much! Andrea |
||
February 4, 2021, 11:21 |
|
#4 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
In my experience, LTS can be quite stable (or made to be, with the right settings). I'll quote directly from the link I shared earlier :
"...However, whereas under-relaxation lacks the control needed to limit the violations of conservation that can cause solution instability, LTS can include features to maintain stability." Indeed, because the timstep is local the equations are marched forward in "time" at different rates -- these rates are dictated by the local flow (and physics; uninteresting regions can be marched forward at a faster rate). If you take a look at the reactingFoam RAS tutorials you'll also see LTS used in a multi-step manner, where the simulation is first run/spunup with more restrictive LTS settings, before restarting with less restrictive settings thereafter. Caelan |
|
February 5, 2021, 03:50 |
|
#5 |
Member
Andrea Di Ronco
Join Date: Nov 2016
Location: Milano, Italy
Posts: 57
Rep Power: 9 |
Thanks a lot for the information, I will definitely give LTS a try!
Still, it bothers me a bit that some of the most popular solvers are given in two separate forms, allegedly for steady-state or transient calculations, while they are in practice identical. PIMPLE can be used to replicate exactly SIMPLE behaviour with minimum tweaks in the case setup and, in addition, some PIMPLE solvers feature LTS which seems to behave quite similarly to SIMPLE in general cases. I understand it could be for historical reason, but I find it a little confusing. Maybe someone else will enlighten me, but at this point is more like curiosity. Andrea |
|
Tags |
local time stepping, pimple, steady state |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 05:21 |
Convergence in steady state simulations vs transient ones | cardioCFD | CFX | 5 | January 21, 2018 10:59 |
Statically Compiling OpenFOAM Issues | herzfeldd | OpenFOAM Installation | 21 | January 6, 2009 09:38 |
Kubuntu uses dash breaks All scripts in tutorials | platopus | OpenFOAM Bugs | 8 | April 15, 2008 07:52 |
About the difference between steady and unsteady problems | Lisa | Main CFD Forum | 11 | July 5, 2000 14:37 |