View Issue Details

IDProjectCategoryView StatusLast Update
0002724OpenFOAMFeaturepublic2017-10-20 17:23
ReporterShorty Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version16.04
Product Versiondev 
Fixed in Versiondev 
Summary0002724: Added residual control output for log files
DescriptionHi all,

recently I made a study with the cht solver using different residual controls. However, after a few runs I realized that I cannot check out the used residual controls anymore because it was not written into the log file (I was using always the same case). Based on that and the fact that commonly the other FOAM solvers outputs the residual criteria at the beginning, I patched the solver in order to display the residual control criteria at the beginning. The patch is not really a must have but keeps consistency to other solvers.

Further changes for consistency:

ETol and EConv -> renamed to hTol and hConv (for both, transient and steady state solver)

Further c++ formatting:

Pimple Loop line break at the beginning for readability of the solver output (chtMultiRegionFoam.C)

Removed indention in files readFluidMultiRegionResidualControls.H


If I have to make any other changes to the files please let me know (like formating etc.). I used the latest dev version (hopefully) :)
A nice weekend,
TagschtMultiregionFoam, chtMultiRegionSimpleFoam



2017-10-15 12:07



2017-10-19 10:22

manager   ~0008890

> ETol and EConv -> renamed to hTol and hConv

Why? The formulation solves for either h or e and conserves E, that is why the equation is called E. Naming it h would be missleading when solving for e.


2017-10-19 10:30

manager   ~0008891

Last edited: 2017-10-19 12:27

For solvers which can solve for either h or e the energy variable is named he so ETol and EConv -> renamed to heTol and heConv would be more consistent.


2017-10-19 12:11

reporter   ~0008892

You are right it should be heTol. I will patch it and attach it today evening.


2017-10-19 22:37



2017-10-19 22:38

reporter   ~0008896

I changed the names to solvPerfhe, heTol and heConv for the fluid region. Patch is attached


2017-10-20 14:52

manager   ~0008909

I have pushed your changes: commit fcb142d64d25e6d643dd08a0f8b5ed8178338989

but unfortunately this make the solvers even more complex and increases code duplication. I think we should plan to develop the transient solver so that it can also perform steady simulations with suitable settings then we can get rid of
chtMultiRegionSimpleFoam and all the associated complexity and code duplication.


2017-10-20 15:11

reporter   ~0008910

That is a good idea Henry. The CHT is already a bit complex with the steady-state and transient one. My Ph.D. has to be finished to there is lack of time but I might find some time to start. Lets close this patch report and I will open a new one after the solver is finished.

Any suggestions which do come to your mind we should take care about? Would you like to set a keyword steadyState in the fvSolutions -> PIMPLE dict in order to e.g. change deltaT = 1, set all time derivatives to steadyState etc. or should the user take care about that.


2017-10-20 15:23

manager   ~0008912

> Would you like to set a keyword steadyState in the fvSolutions

No, it would be better to lookup the ddt and if it is set to steadyState run in steady-state mode. This interface is already provided by fvSchemes:

            //- Return true if the default ddtScheme is steadyState
            bool steady() const
                return steady_;

I would hope by doing this way very little will need to change in the transient solver other than ensuring that all equations can be relaxed. In fact it is likely that the transient solver can already be run in steady-state mode but slightly less efficiently than with the steady solver.

> e.g. change deltaT = 1

Not necessary, the user may want to run the steady solver with a "time" increment other than 1;

Issue History

Date Modified Username Field Change
2017-10-15 12:07 Shorty New Issue
2017-10-15 12:07 Shorty File Added: chtMultiRegionFoam.tar.gz
2017-10-15 12:07 Shorty Tag Attached: chtMultiregionFoam
2017-10-15 12:07 Shorty Tag Attached: chtMultiRegionSimpleFoam
2017-10-19 10:22 henry Note Added: 0008890
2017-10-19 10:30 henry Note Added: 0008891
2017-10-19 12:11 Shorty Note Added: 0008892
2017-10-19 12:27 henry Note Edited: 0008891
2017-10-19 22:37 Shorty File Added: chtMultiRegionFoam.tar-2.gz
2017-10-19 22:38 Shorty Note Added: 0008896
2017-10-20 14:52 henry Note Added: 0008909
2017-10-20 15:11 Shorty Note Added: 0008910
2017-10-20 15:23 henry Note Added: 0008912
2017-10-20 17:23 henry Assigned To => henry
2017-10-20 17:23 henry Status new => resolved
2017-10-20 17:23 henry Resolution open => fixed
2017-10-20 17:23 henry Fixed in Version => dev