View Issue Details

IDProjectCategoryView StatusLast Update
0003384OpenFOAMBugpublic2019-11-13 09:58
ReporterHTauberAssigned Tohenry 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version18.04
Product Versiondev 
Fixed in Versiondev 
Summary0003384: surfaceFieldValue causes error at inlet patches
DescriptionIn the case tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel I make an additional entry in controlDict/functions for the patch "inletSides".

    surfaceFieldValue2
    {
        type surfaceFieldValue;
        libs ("libfieldFunctionObjects.so");
        enabled yes;
        writeControl writeTime;
        log yes;
        writeFields no;
        regionType patch;
        name inletSides;
        operation weightedAverage;
        weightField phi;
        fields
        (
            T
            //p -> comes to an error
        );
    }

The result for the field "T" in postProcessing is as follows:

# Time weightedAverage(T)
0 -1.0787610941e+308
10 -1.7686424138e+308

For the field "p" I get an error at the run:

surfaceFieldValue surfaceFieldValue2 write:
    weightedAverage(inletSides) of T = -1.078761094e+308
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 double Foam::functionObjects::fieldValues::surfaceFieldValue::processSameTypeValues<double>(Foam::Field<double> const&, Foam::Field<Foam::Vector<double> > const&, Foam::Field<double> const&) const at ??:?
#4 double Foam::functionObjects::fieldValues::surfaceFieldValue::processValues<double>(Foam::Field<double> const&, Foam::Field<Foam::Vector<double> > const&, Foam::Field<double> const&) const at ??:?
#5 bool Foam::functionObjects::fieldValues::surfaceFieldValue::writeValues<double>(Foam::word const&, Foam::Field<double> const&, bool) at ??:?
#6 Foam::functionObjects::fieldValues::surfaceFieldValue::write() at ??:?
#7 Foam::functionObjects::timeControl::write() at ??:?
#8 Foam::functionObjectList::start() at ??:?
#9 Foam::Time::run() const at ??:?
#10 Foam::Time::loop() at ??:?
#11 ? in "/opt/openfoam-dev/platforms/linux64GccDPInt32Opt/bin/simpleReactingParcelFoam"
#12 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#13 ? in "/opt/openfoam-dev/platforms/linux64GccDPInt32Opt/bin/simpleReactingParcelFoam"
Gleitkomma-Ausnahme
Steps To Reproducetutorials/lagrangian/simpleReactingParcelFoam/verticalChannel
TagsNo tags attached.

Activities

henry

2019-11-11 11:36

manager   ~0010879

The problem with this setup is that the weighting field phi is 0 on the inletSides patch at the start of the run; it is set on the first U BC update, so you will need to set

        executeAtStart no;

to avoid weighting by a 0 field.

HTauber

2019-11-11 12:06

reporter   ~0010880

I have added "executeAtStart no", but the error messages have remained the same.

henry

2019-11-11 12:11

manager   ~0010881

Last edited: 2019-11-11 12:14

View 2 revisions

For me it starts fine with

        executeAtStart no;

however it fails on the first dump, I will investigate further.

henry

2019-11-11 12:22

manager   ~0010882

Try this:

commit a5c33c5e18401fc369fc0d120e31d32641e378b6 (HEAD -> master, origin/master, origin/HEAD)
Author: Henry Weller <http://openfoam.org>
Date: Mon Nov 11 12:20:35 2019 +0000

    functionObject::surfaceFieldValue: Added support for weighting with negative fields
    
    For example this allows the an inlet flux to be used to create a weighted
    average.
    
    Resolves bug-report https://bugs.openfoam.org/view.php?id=3384

tniemi

2019-11-11 12:52

reporter   ~0010883

Just by looking at the commit, is the Info-output intentional (line 156)?

henry

2019-11-11 13:21

manager   ~0010885

No, temporary diagnostics statement I put in for testing. I think the fix resolves the issue so I have removed the diagnostics.

henry

2019-11-13 09:58

manager   ~0010892

Resolved by commit a5c33c5e18401fc369fc0d120e31d32641e378b6

Issue History

Date Modified Username Field Change
2019-11-11 10:26 HTauber New Issue
2019-11-11 11:36 henry Note Added: 0010879
2019-11-11 12:06 HTauber Note Added: 0010880
2019-11-11 12:11 henry Note Added: 0010881
2019-11-11 12:14 henry Note Edited: 0010881 View Revisions
2019-11-11 12:22 henry Note Added: 0010882
2019-11-11 12:52 tniemi Note Added: 0010883
2019-11-11 13:21 henry Note Added: 0010885
2019-11-13 09:58 henry Assigned To => henry
2019-11-13 09:58 henry Status new => resolved
2019-11-13 09:58 henry Resolution open => fixed
2019-11-13 09:58 henry Fixed in Version => dev
2019-11-13 09:58 henry Note Added: 0010892