CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

residual controls in chtMultiRegionSimpleFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By karlli
  • 1 Post By andre.weiner

Reply
 
LinkBack Thread Tools Display Modes
Old   December 17, 2013, 07:14
Default residual controls in chtMultiRegionSimpleFoam
  #1
New Member
 
Andre Weiner
Join Date: Aug 2012
Posts: 29
Rep Power: 6
andre.weiner is on a distinguished road
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; 
    }
I defined this in the SIMPLE sub-dictionary of each regions fvSolution-file and also in the global fvSolution file, just to see what happens.

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:

  • chtMultiRegionSimpleFoam does runTime.loop() while simpleFoam does simple.loop() for the global loop.
  • the .h-files readFluidMultiRegionSIMPLEControls and readFluidMultiRegionSIMPLEControls are just looking for nNonOrthogonalCorrectors in the SIMPLE sub-dictionary of each region
So, to my understanding it obviously can't work and i think it's not possible to make it work just with a few changes in the sources of chtMultiRegionSimpleFoam. (for instance the residual of a field that is present in multiple regions has to be checked region by region and this would require changes in simpleControl.C).


Are my assumptions right so far? If yes, is there any workaround?
Thanks for your answers :-)


Best regards Andre
andre.weiner is offline   Reply With Quote

Old   April 23, 2015, 20:53
Default
  #2
New Member
 
Dan
Join Date: Jan 2014
Location: Australia
Posts: 2
Rep Power: 0
scintilla is on a distinguished road
bump... I'm having the same problem, residual controls still (2.3.X.git) do not seem to work for chtMultiRegionSimpleFoam.
scintilla is offline   Reply With Quote

Old   April 24, 2015, 14:23
Default
  #3
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 332
Rep Power: 14
zfaraday will become famous soon enough
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!
zfaraday is offline   Reply With Quote

Old   April 24, 2015, 15:03
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,748
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
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:
  • The report is closed stating that such a feature can only be implemented if someone sponsors it.
  • And/or they ask for source code contribution with such a new feature.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   May 14, 2016, 07:44
Default
  #5
New Member
 
Karl Lindqvist
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 18
Rep Power: 6
karlli is on a distinguished road
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
Nomitude likes this.
karlli is offline   Reply With Quote

Old   May 16, 2016, 05:14
Thumbs up
  #6
New Member
 
Andre Weiner
Join Date: Aug 2012
Posts: 29
Rep Power: 6
andre.weiner is on a distinguished road
Thanks for sharing your approach!

Cheers Andre
andre.weiner is offline   Reply With Quote

Old   June 2, 2016, 06:00
Default
  #7
New Member
 
Stephan Derkohlkopf
Join Date: Feb 2016
Posts: 2
Rep Power: 0
Nomitude is on a distinguished road
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
Nomitude is offline   Reply With Quote

Old   December 1, 2016, 11:26
Default
  #8
New Member
 
Andrea Di Ronco
Join Date: Nov 2016
Location: Milano, Italy
Posts: 2
Rep Power: 0
Diro7 is on a distinguished road
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
Diro7 is offline   Reply With Quote

Old   December 2, 2016, 08:38
Default
  #9
New Member
 
Andre Weiner
Join Date: Aug 2012
Posts: 29
Rep Power: 6
andre.weiner is on a distinguished road
Quote:
Originally Posted by Diro7 View Post
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
Hello Andrea:

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
Diro7 likes this.
andre.weiner is offline   Reply With Quote

Old   December 2, 2016, 08:56
Default
  #10
New Member
 
Andrea Di Ronco
Join Date: Nov 2016
Location: Milano, Italy
Posts: 2
Rep Power: 0
Diro7 is on a distinguished road
Quote:
Originally Posted by andre.weiner View Post
Hello Andrea:

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
Hi Andre,

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
Diro7 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


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 05:24


All times are GMT -4. The time now is 17:14.