CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

chtMultiRegionFoam diverges in second iteration

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 13, 2018, 05:03
Default chtMultiRegionFoam diverges in second iteration
  #1
Member
 
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9
TomasDenk is on a distinguished road
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
Attached Images
File Type: png T.png (61.2 KB, 57 views)
File Type: png p_rgh.png (32.6 KB, 53 views)
File Type: png U.png (41.7 KB, 46 views)
TomasDenk is offline   Reply With Quote

Old   November 27, 2018, 08:04
Default Divergence occurs even on orthogonal mesh
  #2
Member
 
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9
TomasDenk is on a distinguished road
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.
Attached Files
File Type: zip chtMRFTest.zip (14.6 KB, 26 views)
TomasDenk is offline   Reply With Quote

Old   November 27, 2018, 09:16
Default
  #3
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12
pete20r2 is on a distinguished road
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.
pete20r2 is offline   Reply With Quote

Old   November 28, 2018, 08:28
Default
  #4
Member
 
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9
TomasDenk is on a distinguished road
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
TomasDenk is offline   Reply With Quote

Old   November 30, 2018, 13:59
Default
  #5
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
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;
    }
}
BlnPhoenix and TomasDenk like this.
Bloerb is offline   Reply With Quote

Old   December 3, 2018, 08:52
Default
  #6
Member
 
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9
TomasDenk is on a distinguished road
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
and the solution oscilates even though I decreased relaxation factors further. I would kindly ask for more help if I get stuck for too long.
TomasDenk is offline   Reply With Quote

Old   December 3, 2018, 09:28
Default
  #7
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12
pete20r2 is on a distinguished road
I haven't seen your fvSchemes, but you may need to go to lower order schemes if you still see oscillation.
pete20r2 is offline   Reply With Quote

Old   March 2, 2022, 21:53
Default
  #8
New Member
 
lee wei
Join Date: Dec 2020
Posts: 11
Rep Power: 5
KKlee is on a distinguished road
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.
KKlee is offline   Reply With Quote

Old   March 3, 2022, 08:53
Default
  #9
Member
 
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9
TomasDenk is on a distinguished road
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.
TomasDenk is offline   Reply With Quote

Old   March 3, 2022, 10:39
Default
  #10
New Member
 
lee wei
Join Date: Dec 2020
Posts: 11
Rep Power: 5
KKlee is on a distinguished road
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
KKlee is offline   Reply With Quote

Old   March 3, 2022, 17:02
Default similar problem, but the fvSolution changes didn't help
  #11
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 278
Rep Power: 6
boffin5 is on a distinguished road
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.
Attached Files
File Type: pptx radiator-case(2).pptx (103.5 KB, 13 views)
File Type: txt runlog.txt (23.0 KB, 6 views)
boffin5 is offline   Reply With Quote

Old   March 3, 2022, 20:59
Default
  #12
New Member
 
lee wei
Join Date: Dec 2020
Posts: 11
Rep Power: 5
KKlee is on a distinguished road
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
KKlee is offline   Reply With Quote

Old   March 4, 2022, 11:19
Default
  #13
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 278
Rep Power: 6
boffin5 is on a distinguished road
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!
boffin5 is offline   Reply With Quote

Old   March 4, 2022, 12:02
Default
  #14
New Member
 
lee wei
Join Date: Dec 2020
Posts: 11
Rep Power: 5
KKlee is on a distinguished road
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
KKlee is offline   Reply With Quote

Old   March 6, 2022, 18:25
Default chtMultiRegionFoam - 3 months of frustration
  #15
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 278
Rep Power: 6
boffin5 is on a distinguished road
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
So I looked in this forum, and found that you can edit the fvOptions file to add temperature limits. Here are the lines that I added to the fvOptions files in both fluid and solid:

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 ??:?
It's a simple shape with a straightforward mesh. The radiator is at an angle, so I accordingly modified the direction cosines in fvOptions.
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
Attached Files
File Type: zip radiator-n.zip (84.8 KB, 8 views)
File Type: txt runlog(3).txt (7.9 KB, 1 views)
File Type: txt runlog2.txt (8.0 KB, 2 views)
File Type: txt runscript.txt (1.9 KB, 2 views)
boffin5 is offline   Reply With Quote

Old   March 9, 2022, 04:13
Default
  #16
New Member
 
Praharsha Reddy
Join Date: Dec 2019
Posts: 12
Rep Power: 6
lonewanderer is on a distinguished road
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 ?
lonewanderer is offline   Reply With Quote

Old   March 12, 2022, 15:51
Default change to thermophysicalProperties - transport didn't work
  #17
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 278
Rep Power: 6
boffin5 is on a distinguished road
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
Attached Files
File Type: zip constant.zip (30.0 KB, 10 views)
File Type: txt checkMesh-solid.txt (3.2 KB, 5 views)
File Type: txt checkMesh-fluid.txt (3.2 KB, 4 views)
boffin5 is offline   Reply With Quote

Old   March 13, 2022, 01:02
Default
  #18
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
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.
lonewanderer and KKlee like this.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   March 13, 2022, 14:18
Default
  #19
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
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.
Bloerb is offline   Reply With Quote

Old   March 15, 2022, 04:54
Default
  #20
New Member
 
Praharsha Reddy
Join Date: Dec 2019
Posts: 12
Rep Power: 6
lonewanderer is on a distinguished road
Hello Alan

In your constant directory 'regionProperties'. You defined both solid and fluid in fluid domain.
Quote:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object regionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

regions
(
fluid (fluid solid)
solid ()
);
??
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
lonewanderer is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
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


All times are GMT -4. The time now is 21:52.