2017-12-15 23:39 GMT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002776OpenFOAM[All Projects] Bugpublic2017-11-30 19:59
Reporterwyldckat 
Assigned Tohenry 
PrioritylowSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Versiondev 
Target VersionFixed in Versiondev 
Summary0002776: 'wallHeatFlux' function object does not work in parallel due to issue with "coupledFvPatchField::snGrad"
DescriptionFollowing up on what I commented in report #2722, I've now got more details on the issue regarding the tutorial case "chtMultiRegionSimpleFoam/multiRegionHeaterRadiation" and using the function object 'wallHeatFlux':

 - If the script 'Allrun' is used, everything works just fine.

 - If the script 'Allrun-parallel' is used, it crashes with the following message on all processes (only showing for the master here):

    [0] --> FOAM FATAL ERROR:
    [0] Not implemented
    [0]
    [0] From function Foam::tmp<Foam::Field<Type> > Foam::coupledFvPatchField<Type>::snGrad() const [with Type = double]
    [0] in file lnInclude/coupledFvPatchField.H at line 151.

    [...]

    [0] #2 Foam::coupledFvPatchField<double>::snGrad() const
    [0] #3 Foam::functionObjects::wallHeatFlux::calcHeatFlux[...]


I've confirmed that this only happens with OpenFOAM-dev (latest Deb, dev-17954fc1734a), since OpenFOAM-5.x (latest Deb, 5.x-197d9d3bf20a) works just fine.


Steps To ReproduceAppend the following to 'system/controlDict':

    functions
    {
        #includeFunc wallHeatFlux(region=heater)
        //#includeFunc wallHeatFlux(region=bottomAir)
        //#includeFunc wallHeatFlux(region=topAir)
        //#includeFunc wallHeatFlux(region=leftSolid)
        //#includeFunc wallHeatFlux(region=rightSolid)
    }

(Left commented out the other entries, so that it's easier to uncomment and re-check once the issue is fixed.)


Then run the script:

   ./Allrun-parallel

Wait a few seconds, the solver crashes at time step 300 (at write time), then check the file 'log.chtMultiRegionSimpleFoam' to see the complete stack trace.
Additional InformationGiven the error message and the indication that one version works and the other doesn't, is the reason why I suspect that this is due to the optimization that was done for #2725: https://bugs.openfoam.org/view.php?id=2725


However, I suspected that this issue was related to the region-coupled boundaries, but instead it's related to the processor boundaries... or at least so it seems, since I haven't investigated any further than this.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0009112

henry (manager)

The simplest solution to this problem is to filter out coupled patches:

commit 9fb9dbe922012da2766ff4b12d8b8e318af5643e

as the wall heat flux functionObject is not really appropriate to calculate the heat flux across patches other than walls.
+Notes

-Issue History
Date Modified Username Field Change
2017-11-29 21:14 wyldckat New Issue
2017-11-29 21:14 wyldckat Status new => assigned
2017-11-29 21:14 wyldckat Assigned To => henry
2017-11-30 19:59 henry Status assigned => resolved
2017-11-30 19:59 henry Resolution open => fixed
2017-11-30 19:59 henry Fixed in Version => dev
2017-11-30 19:59 henry Note Added: 0009112
+Issue History