View Issue Details

IDProjectCategoryView StatusLast Update
0003609OpenFOAMFeaturepublic2021-01-08 13:21
ReporterTiberias_Assigned Tohenry 
PrioritynoneSeveritytrivialReproducibilityalways
Status resolvedResolutionfixed 
PlatformUnixOSUbuntuOS Version20.04
Product Version8 
Fixed in Version8 
Summary0003609: Included y+ function object doesnt show realtime values in simulation log
DescriptionIn controlDict I have included the yPlus function by:

functions
{
    #includeFunc residuals
    #includeFunc yPlus
}

For running simpleFoam for example I have a writeInterval of 10.
In Version 7 of OpenFOAM I got the current yPlus values during simulation at the point of timestep writing.

For example:

[...]
Time = 10

DILUPBiCGStab: Solving for Ux, Initial residual = 0.2159051, Final residual = 0.001826788, No Iterations 4
DILUPBiCGStab: Solving for Uy, Initial residual = 0.06784772, Final residual = 0.0002873746, No Iterations 5
DILUPBiCGStab: Solving for Uz, Initial residual = 0.1879635, Final residual = 0.0016049, No Iterations 4
DICPCG: Solving for p, Initial residual = 0.0353227, Final residual = 0.0003407865, No Iterations 46
DICPCG: Solving for p, Initial residual = 0.002074315, Final residual = 1.987197e-05, No Iterations 106
time step continuity errors : sum local = 0.0016527, global = 0.0001161923, cumulative = -0.001386994
DILUPBiCGStab: Solving for omega, Initial residual = 0.0134613, Final residual = 9.790165e-05, No Iterations 2
DILUPBiCGStab: Solving for k, Initial residual = 0.03926103, Final residual = 0.0001613133, No Iterations 2
bounding k, min: -6.874777e-06 max: 63.89042 average: 0.05916318
ExecutionTime = 152.19 s ClockTime = 158 s

yPlus yPlus write:
    writing object yPlus
    patch minZ y+ : min = 3.509461, max = 1217.934, average = 298.061
    patch wall y+ : min = 0.1989935, max = 129.9126, average = 4.696098

Time = 11

CDILUPBiCGStab: Solving for Ux, Initial residual = 0.1944093, Final residual = 0.001118355, No Iterations 5
[...]

Since Version 8 this information doesnt appear anymore. It´s just an inconspicuous feature but it was helpful for investigating the progress of simulation.
I am not that good at coding, I couldn´t find out if it´s a deliberate change or a bug.
TagsNo tags attached.

Activities

henry

2021-01-07 19:50

manager   ~0011801

Logging is now optional:

    #includeFunc yPlus(log=true)

Tiberias_

2021-01-07 19:55

reporter   ~0011802

I didn't noticed that change for optional logging, tried it out and works.
Thank you!

Tiberias_

2021-01-07 20:09

reporter   ~0011803

Maybe it could be helpful to add this optional logging information to the yPlus Header.
Something like:

        Property | Description | Required | Default value
        type | type name: yPlus | yes |
        phase | phase name | no | none
        log | write yPlus data to standard output | no | no

henry

2021-01-07 20:42

manager   ~0011804

It is a generic control applicable to all functionObjects documented in the base-class:

Description
    Namespace for functionObjects.

    OpenFOAM includes a collection of functionObjects selected by the user at
    run-time to manipulate the simulation and provide mechanisms to extract
    field and derived quantities. Alternatively, the same actions can be
    executed after the simulation using the \c -postProcess command-line option.

    \subsection secFunctionObjects Using functionObjects

    FunctionObjects are selected by additional entries in the
    $FOAM_CASE/system/controlDict dictionary. Each object is listed in the \c
    functions sub-dictionary, e.g. to select the \c functionObjectType
    functionObject the following entry would be specified:

    \verbatim
    functions
    {
        <functionObjectName>
        {
            type functionObjectType;
            libs ("libMyFunctionObjectlib.so");
            region defaultRegion;
            enabled yes;
            startTime 0;
            endTime 10;
            writeControl writeTime;
            writeInterval 1;
            ...
        }
    }
    \endverbatim

    Where:
    \table
        Property | Description | Required | Default value
        type | Type of functionObject | yes |
        libs | Libraries containing implementation | yes |
        region | Name of region for multi-region cases | no |
        enabled | On/off switch | no | yes
        log | Log information to standard output | no | yes
        startTime| Start time | no |
        endTime | End time | no |
        executeAtStart | Execute at start time switch | no | yes
        executeControl | See time controls below | no | timeStep
        executeInterval | Steps between each execute phase | no |
        writeControl | See time controls below | no | timeStep
        writeInterval | Steps between each write phase | no |
    \endtable

    Time controls:
    \table
        Option | Description
        timeStep | Execute/write every 'Interval' time-steps
        writeTime | Execute/write every 'Interval' output times
        adjustableRunTime | Execute/write every 'Interval' run time period
        runTime | Execute/write every 'Interval' run time period
        clockTime | Execute/write every 'Interval' clock time period
        cpuTime | Execute/write every 'Interval' CPU time period
        none | Execute/write every time-step
    \endtable

    The sub-dictionary name \c \<functionObjectName\> is chosen by the user, and
    is typically used as the name of the output directory for any data written
    by the functionObject. The \c type entry defines the type of function
    object properties that follow. FunctionObjects are packaged into separate
    libraries and the \c libs entry is used to specify which library should be
    loaded.

    Each functionObject has two separate run phases:

      - The \c execute phase is meant to be used for updating calculations
        or for management tasks.
      - The \c write phase is meant for writing the calculated data to disk.

    For each phase the respective time controls are provided, as listed above.

Class
    Foam::functionObject

Description
    Abstract base-class for Time/database functionObjects.

See also
    Foam::functionObjectList
    Foam::functionObjects::timeControl

SourceFiles
    functionObject.C

Tiberias_

2021-01-07 21:14

reporter   ~0011805

I see, that is what I was looking for.

Just a little thing: The properties table says that the default value for log is yes, is this information still up-to-date? As far as I have seen now the function object yPlus has the default value "no", I also tried forceCoeffs, same behaviour.

henry

2021-01-07 21:49

manager   ~0011806

The default is "no" I will correct the documentation.

henry

2021-01-08 13:21

manager   ~0011807

Resolved in OpenFOAM-8 by commit 2827872a22fa783f8d9cbe9c9f45792457b0039e
Resolved in OpenFOAM-dev by commit 0b21dbf1ec051280b79665687c3958c562991d13

Issue History

Date Modified Username Field Change
2021-01-07 19:27 Tiberias_ New Issue
2021-01-07 19:50 henry Note Added: 0011801
2021-01-07 19:55 Tiberias_ Note Added: 0011802
2021-01-07 20:09 Tiberias_ Note Added: 0011803
2021-01-07 20:42 henry Note Added: 0011804
2021-01-07 21:14 Tiberias_ Note Added: 0011805
2021-01-07 21:49 henry Note Added: 0011806
2021-01-08 13:21 henry Assigned To => henry
2021-01-08 13:21 henry Status new => resolved
2021-01-08 13:21 henry Resolution open => fixed
2021-01-08 13:21 henry Fixed in Version => 8
2021-01-08 13:21 henry Note Added: 0011807