CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

runTimeControl average

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 16, 2023, 05:45
Default runTimeControl average
  #1
New Member
 
Join Date: Nov 2023
Posts: 4
Rep Power: 2
maysan is on a distinguished road
Hello,

Is it possible to use the runTimeControl functionObject as shown in https://www.openfoam.com/documentati...e-control.html for the total force in the z-direction instead of the Drag Coefficient?

If so, how can I do it?
I tried to replace Cd with total_z but the output is:
Code:
runTimeControl runTimeControl1 output:
    runTimeControl: condition0 averages:
--> FOAM Warning :
    From virtual bool Foam::functionObjects::valueAverageBase::calculate(Foam::dictionary&)
    in file db/functionObjects/valueAverageBase/valueAverageBase.C at line 218
    From function object: forces1
Unprocessed fields:
            total_z
Can this be fixed?
maysan is offline   Reply With Quote

Old   November 16, 2023, 06:12
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26
Yann will become famous soon enough
Hello,

Did you define a force function object to computes forces beforehand?
How is your runTimeControl function defined?
Yann is offline   Reply With Quote

Old   November 16, 2023, 06:18
Default
  #3
New Member
 
Join Date: Nov 2023
Posts: 4
Rep Power: 2
maysan is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hello,

Did you define a force function object to computes forces beforehand?
How is your runTimeControl function defined?
Hi,
Like this:
Code:
functions
{
    forces1
    {
        type            forces;
        libs            (forces);
        patches         (patch1);
        rhoInf          1000;
        log             on;
        writeControl    timeStep;
        writeInterval   1;
        CofR            (0 0 1);
    }

    runTimeControl1
    {
        type            runTimeControl;
        libs            ("libutilityFunctionObjects.so");
        conditions
        {
            condition0
            {
                type            average;
                functionObject  forces1;
                fields          (total_z);
                tolerance       1e-3;
                window          10;
                groupID         1;
                windowType      approximate;
            }
        }
    }
}
maysan is offline   Reply With Quote

Old   November 16, 2023, 09:20
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26
Yann will become famous soon enough
Alright so it seems the question is: what are the proper names of the fields returned by the forces function object. You can find it if you look into a saved time directory in uniform/functionObjects/functionObjectProperties

It seems the forces function returns the following values:
  • pressureForce
  • viscousForce
  • internalForce
  • pressureMoment
  • viscousMoment
  • internalMoment

You can use one of those fields in your runTimeControl function but all are vectors, so I don't know how the runtimeControl function handles it (like, does it process the vector magnitude?)
And I don't know if there is a way to only use one of the vector component.

Not really an answer to your question, but I hope it gives some insights.
Yann
Yann 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
Favre average in OpenFOAM 1622+ elbatawy OpenFOAM Programming & Development 0 July 1, 2023 06:56
Converging Diverging Nozzle with dbnsTurbFoam Saleh Abuhanieh OpenFOAM Running, Solving & CFD 4 December 13, 2019 10:26
[solids4Foam] How to calculate drag coeff when using solids4Foam amuzeshi OpenFOAM CC Toolkits for Fluid-Structure Interaction 15 November 7, 2019 12:50
How to obtain turbulent kinetic energy data from LES model of Ansys CFX? rsin CFX 19 December 29, 2018 04:43
Near wall treatment in k-omega SST Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 13:48


All times are GMT -4. The time now is 15:31.