CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

RuntimeControl with surfaceFieldValue (v2012)

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By tomf
  • 1 Post By simrego

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 21, 2021, 03:45
Default RuntimeControl with surfaceFieldValue (v2012)
  #1
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Dear All!


How can I combine the runtimeControl function object with the surfaceFieldValue function object?
In the following dummy example I get the following warning:
Code:
runTimeControl runTimeControl1 output:
    average: condition0 averages:
--> FOAM Warning :
    From virtual bool Foam::functionObjects::runTimeControls::averageCondition::apply()
    in file runTimeControl/runTimeCondition/averageCondition/averageCondition.C at line 151
    From function object: inletPres
Unprocessed fields:
        p
Code:
functions
 {
    inletPres
    {
        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
        writeControl    timeStep;
        log             yes;
        writeFields     no;
        regionType      patch;
        name            inlet;
        operation       areaAverage;

        fields
        (
            p
        );
    }

    runTimeControl1
    {
        type            runTimeControl;
        libs            ("libutilityFunctionObjects.so");
        conditions
        {
            condition0
            {
                type            average;
                functionObject  inletPres;
                fields          (p);
                tolerance       5;
                windowType      approximate;
                window          5;
                // groupID         1;
            }
        }
    }
 }
I have tried many combinations for the field name in the condition0 entry without any success.
It seems like the surfaceFieldValue is using some weird name for the results field which I wasn't able to figure out or they are just not compatible (it would be surprising)?


Thanks!
simrego is offline   Reply With Quote

Old   January 22, 2021, 08:21
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

It happens to be I am also trying to do something similar. I hope to test if it works soon, but I have to wait a bit until I can run the case, but in the past (v1712) we found out that the field name would need to be something as in <timeDirectory>/uniform/funtionObjectProperties. It is a bit of a weird construction, but based on how we did it in the past and also how I have now prepared my case, I would estimate that you would need to use

fields (areaAverage(inlet,p));

as in:

Code:
    runTimeControl1
    {
        type            runTimeControl;
        libs            ("libutilityFunctionObjects.so");
        conditions
        {
            condition0
            {
                type            average;
                functionObject  inletPres;
                fields          (areaAverage(inlet,p));
                tolerance       5;
                windowType      approximate;
                window          5;
                // groupID         1;
            }
        }
    }
I hope to be able to update you soon if it works, or if you can confirm, that would be great.

Cheers,
Tom
simrego likes this.
tomf is offline   Reply With Quote

Old   January 22, 2021, 08:37
Default
  #3
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Hi!


Thank you very much! This is it. Working properly!


Thanks again!


EDIT:

In the postProcess folder it writes as "areaAverage(p)" which I have already tried so this seems to be a really inconsistent naming for me.
tomf likes this.
simrego is offline   Reply With Quote

Old   April 23, 2021, 15:11
Default
  #4
New Member
 
Join Date: Oct 2017
Posts: 2
Rep Power: 0
hinmanws is on a distinguished road
Has anyone accomplished this using probes? I.e. for convergence based on a local field value? I haven't had success with this yet. It seems that since probes doesn't use the "setResult" command, maybe these results aren't available to the runTimeControl utility?
hinmanws is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.com] Compilation of OF v2012 sihaqqi OpenFOAM Installation 1 January 8, 2021 14:14
surfaceFieldValue from faceZone issue ginop OpenFOAM Post-Processing 2 December 1, 2020 09:35
[swak4Foam] Problem to calculate grad(U) using swak4Foam Hugoles OpenFOAM Community Contributions 12 November 24, 2020 10:28
surfaceFieldValue, sampledSurface, areaAverage at no slip wall, velocity not zero Tom Lauriks Main CFD Forum 3 September 16, 2020 03:05


All times are GMT -4. The time now is 18:58.