View Issue Details

IDProjectCategoryView StatusLast Update
0001420OpenFOAMBugpublic2015-01-29 09:52
Reporteruser838Assigned Touser21 
PriorityimmediateSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
PlatformScientific Linux Red Hat 6OSScientific Linux Red Hat 6OS Version6
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:

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

Whereas at time n:

    helium_to_solid-top
    {
        type compressible::turbulentTemperatureCoupledBaffleMixed;
        refValue nonuniform List<scalar>
40
(
5.41715015178131
....
.....
4.91474706352108
)
;
        refGradient uniform 0;
        valueFraction nonuniform List<scalar>
40
(
1.20119635156812e-07
...
...
1.20119635156812e-07
)
;
        value nonuniform List<scalar>
40
(
4.50000209276883
...
...
4.50000209276883
)
;
        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.

Activities

user838

2014-10-23 18:50

 

user21

2014-10-24 10:01

  ~0003263

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

user838

2014-10-24 14:46

  ~0003264

Last edited: 2014-10-24 14:47

Sergio,

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:

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

    temperatureCoupledBase::write(os);
}

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

I look forward to hearing from you

Kind regards

Gennaro

billie

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.

henry

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