|
[Sponsors] |
chtMultiRegionFoam diverges in second iteration |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9 ![]() |
Hello Foamers,
I'm using the latest foundation release OpenFOAM-6. I'm trying to simulate steady-state flow of dense+viscous liquid (molten glass) with heat losses through walls. In the first iteration, unrealistic temperature, velocity and pressure fields are produced (see attached screenshots), divergence follows in the second iteration. Can someone take a look at my case? https://www.dropbox.com/s/oseb60588f...FTest.zip?dl=0 |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9 ![]() |
Original results were obtained on non-orthogonal polyhedral mesh. The mesh had reasonable quality, but I wanted to rule out mesh induced divergence completely. The whole case is in the attachment. Can someone try it out (just execute AllRun script, takes only few seconds) and look at the results + settings? I suppose there is some trivial flaw in the set up, please, help me find it.
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12 ![]() |
I can have a look later tonight but for now try a limitTemperature function in fvOptions. See
https://www.openfoam.com/documentati...8H_source.html This can help get over the initialisation steps without crashing. |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Member
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9 ![]() |
Hi Peter,
thanks for taking the time to help me. Have you had a chance to look at my setup? I followed your advice and tried limiting the temperature, but it didn't prevent divergence. The cause is probably more fundamental as the velocity equation is the first to be solved and it results in U~10^4 in the first iteration (picture attached in the first post). I tried to start from tuorial case HeatedDuct, which converges quite nice. I only changed thermophysicalProperties of the fluid to match those of glass (all constant) and I can also achieve convergence thanks to lower relaxation factors. When I set temperature dependent properties - polynomial rho, Cp and kappa, the simulation diverges very quickly. Any thoughts on what might cause it and how to resolve it? Thanks, Tomas |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 20 ![]() |
You did the relaxation factors wrong. The crash is due to the fact that you aren't relaxing at all. A pimple solver has two kind of relaxation factors. E.g p and pFinal. pFinal is used in the last nOuterCorrector. Since you are using one outer corrector loop here. You are not relaxing any fields.
Code:
/* relaxationFactors { equations { h 0.8; U 0.2; p_rgh 0.4; } } */ relaxationFactors { fields { "rho.*" 1; "p_rgh.*" 0.7; } equations { "U.*" 0.3; "(h|e).*" 0.3; "k.*" 0.3; "epsilon.*" 0.3; } } |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Member
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9 ![]() |
Dear Bloerb,
Thank you very much for your help. The suggested relaxation factors work and I obtained realistic solution. The next step for me is to introduce temperature dependent properties of glass - rho, cp and mu. I started with Code:
rho = 2540.76-0.0738*T |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Senior Member
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12 ![]() |
I haven't seen your fvSchemes, but you may need to go to lower order schemes if you still see oscillation.
|
|
![]() |
![]() |
![]() |
![]() |
#8 |
New Member
lee wei
Join Date: Dec 2020
Posts: 11
Rep Power: 5 ![]() |
Hi,Tomas,
I know it is an old post, but I am wondering if you have resolve the issue, cause I have also encoutered a similar problem. Any hint or idea would be highly appreciated. |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Member
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9 ![]() |
Hi KKlee,
As I have written in my original post, I was using OpenFOAM 6 Foundation Edition. As far as I can remember I was able to stabilize my simulations with temperature dependent density. However, I no longer remember how. I encountered more issues when using mju=exp(A+B/(T-C)), because it was difficult to align even with high order polynomial. I ended up adjusting thermophysical model to resolve it. Couple years ago I moved to another project and I get in touch with OF only occasionally now. Colleague who took over my part is now using ESI OpenFOAM v2112 and he can run simulations with temperature dependent properties without problems. Good luck with you models and sorry I couldn't help you any better. |
|
![]() |
![]() |
![]() |
![]() |
#10 |
New Member
lee wei
Join Date: Dec 2020
Posts: 11
Rep Power: 5 ![]() |
Hi Tomas,
Thank you anyway, I know OF9 can tackle this kind of problem with the tabulated method in thermoProperties file, but I have no idea about OF-V2112. I will go through them all. I am struggling with my thesis right now, your reply throws light into my heart, thanks again. Best regards. Lee |
|
![]() |
![]() |
![]() |
![]() |
#11 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 278
Rep Power: 6 ![]() |
Hi,
I'm having trouble with my chtMultiRegionFoam cased as I described in another thread. It sounded like bloerb's suggested changes to the fvSolution file might solve the problem, but unfortunately it did not. I still get this 'failed to converge' output: From function Foam::scalar Foam::species::thermo<Thermo, Type>::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar) const, bool) const [with Thermo = Foam::hPolynomialThermo<Foam::icoPolynomial<Foam:: specie> >; Type = Foam::sensibleEnthalpy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hPolynomialThermo<Foam ::icoPolynomial<Foam::specie> >, Foam::sensibleEnthalpy>] in file /home/ubuntu/OpenFOAM/OpenFOAM-8/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 70 Energy -> temperature conversion failed to converge: [0] iter Test e/h Cv/p Tnew [0] 0 486.244 193799 1037.72 2539.29 [1] iter Test e/h Cv/p Tnew [1] 0 551.55 261164 1049.09 -58898.4 [1] 1 -58898.4 9.2188e+13 -7.75261e+09 -47007.2 [1] 2 -47007.2 3.02078e+13 -3.1755e+09 -37494.4 [1] 3 -37494.4 9.89833e+12 -1.3007e+09 -29884.3 To make it easier to wake through case files, and to describe my case, I created the attached powerpoint file to to show my case geometry and setup. If desired, I could also supply some stl files. Also attached is the complete output log. I hope I can get help to resolve the problem, as I have tried everything, but there is still some error in my boundary conditions and/or my fundamental case structure. Maddeningly, in all the online OpenFOAM videos, there aren't any examples that show something like what I am working with, a simple porous radiator in a duct. One would think that with all the Formula SAE people using OF, examples would be available. There are, however, examples in ANSYS, but that's of scant help. |
|
![]() |
![]() |
![]() |
![]() |
#12 |
New Member
lee wei
Join Date: Dec 2020
Posts: 11
Rep Power: 5 ![]() |
Hi Alan,
I have little knowledge about your problem, especially involved porosity, but maybe you can check the BCs setting or other useful information in tutorial/heatTransfer/coolingSphere, cause it is the only turbulent example(maybe wrong?) in the official heatTransfer folder. Hope it helps. PS: one question, why do you set the water in the solid region in your case? Lee |
|
![]() |
![]() |
![]() |
![]() |
#13 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 278
Rep Power: 6 ![]() |
Thanks KKlee,
Yes, I have gone through the heatTransfer/chtMultiRegion tutorials over and over again, with no luck. I was so hopeful that Bloerb's comments would help, but rats! I am approximating a radiator with a porous zone, in lieu of trying to model the multiplicity of tubes and fins. A real radiator is an amalgam of metal and water, but mostly the latter, so I am starting by using water in thermophysicalProperties. My intent is, once I have the case running, to adjust the properties to achieve the characteristics of a radiator. But first I must get the case to work; this is becoming a perplexing challenge that has taken a great amount of time so far, and continuing. But thanks for your comments, and I hope to hear more! |
|
![]() |
![]() |
![]() |
![]() |
#14 |
New Member
lee wei
Join Date: Dec 2020
Posts: 11
Rep Power: 5 ![]() |
Hi Alan,
First of all, I think you use water as the medium in the solid area, which doesn't seem to meet the specification of CHT solver. Secondly, the error you mentioned in your previous post reminds me of a similar error prompt I faced before, which was caused by improper use of buoyantsimplefoam. I remember I fixed it by modifying the boundary conditions compared with the official example of that solver. I can't say it will help, but you might as well give it a try. In fact, I've been stuck in the CHT solver for a long time too! Keep going and Good luck. Lee |
|
![]() |
![]() |
![]() |
![]() |
#15 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 278
Rep Power: 6 ![]() |
This has become an exasperating problem, starting with my post, "*My First MultiregionFoam*' After 3 months + of effort, I still cannot get the case to run. In the latest attempt, I religiously followed the heatExchanger tutorial, substituting in my own radiator in a body, fed by a duct. And the example uses toposet, whereas mine uses 2 regions with 2 snappyHexMeshDicts.
A Powerpoint file showing the setup is in my previous post in this thread. As usual, the case failed; here is a snippet of the output message: Code:
in file /home/ubuntu/OpenFOAM/OpenFOAM-8/src/thermophysicalModels/specie/lnI nclude/janafThermoI.H at line 117 attempt to use janafThermo<EquationOfState> out of temperature range 200 -> 3500; T = 9879.88 TemperatureLimit1 { type limitTemperature; active yes; selectionMode all; min 0; max 1000; } Then it failed with an unintelligible (to me, anyway) output. Here is some of it: Code:
Solving for fluid region fluid Porosity region porosityBlockage: selecting model: DarcyForchheimer creating porous zone: porosityBlockage:porous DILUPBiCGStab: Solving for Ux, Initial residual = 1, Final residual = 0.0100312, No Iterations 1 DILUPBiCGStab: Solving for Uy, Initial residual = 1, Final residual = 0.00731564, No Iterations 1 DILUPBiCGStab: Solving for Uz, Initial residual = 1, Final residual = 0.00750704, No Iterations 1 DILUPBiCGStab: Solving for e, Initial residual = 1.51254e-05, Final residual = 1.57508e-07, No Iterations 1 [0] #0 Foam::error::printStack(Foam::Ostream&)[1] #0 Foam::error::printStack(Foam::Ostream&) at ??:? [0] #1 Foam::sigFpe::sigHandler(int) at ??:? [1] #1 Foam::sigFpe::sigHandler(int) at ??:? [0] #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" [0] #3 Foam::heThermo<Foam::rhoReactionThermo, Foam::SpecieMixture<Foam::singleComponentMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > > >::he(Foam::Field<double> const&, Foam::List<int> const&) const at ??:? Attached is my run script, also more complete run outputs. I desperately hoping that someone can help me get past this roadblock. Help! Best regards, Alan w |
|
![]() |
![]() |
![]() |
![]() |
#16 |
New Member
Praharsha Reddy
Join Date: Dec 2019
Posts: 12
Rep Power: 6 ![]() |
Hello Alan,
I think the problem is with thermophysical properties transport:sutherland and thermo:janaf. Did you try with any other properties like giving transport:const ? |
|
![]() |
![]() |
![]() |
![]() |
#17 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 278
Rep Power: 6 ![]() |
Thank you lonewanderer, Bloerb and Yann,
I'm sorry that I didn't thank you immediately, but I got caught in some immediate tasks, now done. So now I am returning to Project EndFrustration! In constant/fluid/thermophysicalProperties, I tried changing thermoType-transport from sutherland to const, and the run immediately failed. Actually, for both fluid and solid, I copied thermophysicalProperties from the heatTransfer/chtMultiRegion/heatExchanger tutorial, so that part, at least should be okay. The culprit lies somewhere else. So I am attaching some files per Bloerb's suggestion. I hope this data helps find the problem!! Alan w |
|
![]() |
![]() |
![]() |
![]() |
#18 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 ![]() |
I think you should come to another approach:
Start with the tutorial and change ist step by step to your application. Not all steps at once. The main problem may be in the mesh. Meshing is an art, and in more complicated physical situations (fluid dynamics AND something else) you get wrong or exploding simulation quite easily. Or yor stat with your mesh, but with simple physics and add the physics step by step. If you may help you mpore directly, you should describe: - What is your real word application. It may be it can be simalated another ways with not so complicated models. - Make a few sketches about your cfd model. Geometry boundary conditions, your thoughts about physics.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
![]() |
![]() |
![]() |
![]() |
#19 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 20 ![]() |
Comment out the constantHeatTransfer fvOption in both regions. If you get the case to run without coupling them thermally you have basically solved it.
Once that runs smoothly add it back in. Because it seems, that your region coupling approach crashes. And that can be a multitude of things. So are you able to run the simulation without those two fvOption parts? And you are using polynomials in your thermophysicalProperties...just start with easy to use constant values. And if you've got the time model it with two overlapping blockmeshes. It's simply two blocks. That makes it so much easier to figure out if it doesn't run at all or if your settings are messed up etc. You can likely set that up within minutes. |
|
![]() |
![]() |
![]() |
![]() |
#20 | |
New Member
Praharsha Reddy
Join Date: Dec 2019
Posts: 12
Rep Power: 6 ![]() |
Hello Alan
In your constant directory 'regionProperties'. You defined both solid and fluid in fluid domain. Quote:
Please correct it and also i think the problem lies in boundary definition. please check these tutorials. These will help you in setting up your case. https://www.youtube.com/watch?v=MD3cjOF8S60 https://www.youtube.com/watch?v=5z5Jix6tZAk |
||
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free surface issues with interDyMFoam for hydroturbine | oumnion | OpenFOAM Running, Solving & CFD | 0 | October 6, 2017 14:05 |
Floating point exception error | lpz_michele | OpenFOAM Running, Solving & CFD | 53 | October 19, 2015 02:50 |
Hardware-Configuration for Fluent HPC-Pack (8x) | JohHaas | Hardware | 9 | March 3, 2015 13:25 |
iteration no. explodes, solution diverges | adamsinan | OpenFOAM Running, Solving & CFD | 3 | September 27, 2012 02:45 |
Parallel runs slower with MTU=9000 than MTU=1500 | Javier Larrondo | FLUENT | 0 | October 28, 2007 22:30 |