View Issue Details

IDProjectCategoryView StatusLast Update
0001420OpenFOAM[All Projects] Bugpublic2015-01-29 09:52
Reporteruser838Assigned Touser21 
Status resolvedResolutionfixed 
PlatformScientific Linux Red Hat 6OSScientific Linux Red Hat 6OS Version6
Product Version 
Fixed in Version 
Summary0001420: Thermal baffles prevent a simulation from correctly restarting due to the solver wrongly writing kappaLayers as thicknessLayers
DescriptionI have a very simple 2D test geometry, solved with chtMultiRegionSimpleFoam, which has 2 regions: a solid square inside a big fluid circle.

The solid square is heated with an internal heat source W/m3 and is cooled by the surrounding fluid. The fluid surrounds the solid square and its circle walls have fixed temperature.

The boundary between the fluid and the solid are obviously the edges of the square. At this boundary, thermal baffles are applied.

Due to the bug hereby being reported, the solver writes, in the T file at iteration number n, the value of kappaLayers as the value of thicknessLayers.

Please check it out below:

At time 0:

        type compressible::turbulentTemperatureCoupledBaffleMixed;
        Tnbr T;
        kappa fluidThermo;
        kappaName none;
        value $internalField;
     thicknessLayers (1.5e-4);
     kappaLayers (1e0);

Whereas at time n:

        type compressible::turbulentTemperatureCoupledBaffleMixed;
        refValue nonuniform List<scalar>
        refGradient uniform 0;
        valueFraction nonuniform List<scalar>
        value nonuniform List<scalar>
        Tnbr T;
        thicknessLayers List<scalar> 1(0.00015);
        kappaLayers List<scalar> 1(0.00015);
        kappa fluidThermo;
        kappaName none;

The value of kappaLayers now magically equals thicknessLayers, due to the bug!

The current workaround is manually changing the value of kappaLayers back to normal.

Can you please fix this?
Steps To ReproduceCreate a case which has regions and use chtMultiRegionSimpleFoam.

Apply baffles at an interface between two regions.

Start a simulation and make it run also for only a few iterations.

Check the T file at the latest timeStep: kappaLayers now equals thicknessLayers!
Additional InformationN/A
TagsNo tags attached.



2014-10-23 18:50


testCaseBaffleTfilesfrom0folderAnd3000Folder.tar.gz (10,971 bytes)


2014-10-24 10:01


Try to pull our latest 2.3.x. I believe it was corrected


2014-10-24 14:46


Last edited: 2014-10-24 14:47

View 2 revisions


it was not corrected yet in the last repository. But I found where the problem is. You just have to modify the following:

1- go to $FOAM_SRC/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C

2- from line 278 to 286 there is:

    os.writeKeyword("Tnbr")<< TnbrName_
        << token::END_STATEMENT << nl;
    thicknessLayers_.writeEntry("thicknessLayers", os);
    thicknessLayers_.writeEntry("kappaLayers", os);


3- please change thicknessLayers_.writeEntry("kappaLayers", os); with kappaLayers_.writeEntry("kappaLayers", os);

I look forward to hearing from you

Kind regards



2014-10-28 07:30

reporter   ~0003267

I have reported this in issue 1294 and it should be fixed in commit ce6ad3e49b4d0984a86a71317eec63ef5. In my git tree this is fixed. Sourceforge doxygen is still wrong however I do not know if this is up to date.


2015-01-28 20:04

manager   ~0003612

Already resolved but not closed

Issue History

Date Modified Username Field Change
2014-10-23 18:50 user838 New Issue
2014-10-23 18:50 user838 File Added: testCaseBaffleTfilesfrom0folderAnd3000Folder.tar.gz
2014-10-24 10:01 user21 Note Added: 0003263
2014-10-24 10:01 user21 Assigned To => user21
2014-10-24 10:01 user21 Status new => acknowledged
2014-10-24 14:46 user838 Note Added: 0003264
2014-10-24 14:47 user838 Note Edited: 0003264 View Revisions
2014-10-28 07:30 billie Note Added: 0003267
2015-01-28 20:04 henry Note Added: 0003612
2015-01-28 20:04 henry Status acknowledged => resolved
2015-01-28 20:04 henry Resolution open => fixed