|
[Sponsors] |
November 16, 2023, 06:45 |
runTimeControl average
|
#1 |
New Member
Join Date: Nov 2023
Posts: 5
Rep Power: 3 |
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 |
|
November 16, 2023, 07:12 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,200
Rep Power: 28 |
Hello,
Did you define a force function object to computes forces beforehand? How is your runTimeControl function defined? |
|
November 16, 2023, 07:18 |
|
#3 | |
New Member
Join Date: Nov 2023
Posts: 5
Rep Power: 3 |
Quote:
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; } } } } |
||
November 16, 2023, 10:20 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,200
Rep Power: 28 |
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:
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Favre average in OpenFOAM 1622+ | elbatawy | OpenFOAM Programming & Development | 0 | July 1, 2023 07:56 |
Converging Diverging Nozzle with dbnsTurbFoam | Saleh Abuhanieh | OpenFOAM Running, Solving & CFD | 4 | December 13, 2019 11:26 |
[solids4Foam] How to calculate drag coeff when using solids4Foam | amuzeshi | OpenFOAM CC Toolkits for Fluid-Structure Interaction | 15 | November 7, 2019 13:50 |
How to obtain turbulent kinetic energy data from LES model of Ansys CFX? | rsin | CFX | 19 | December 29, 2018 05:43 |
Near wall treatment in k-omega SST | Arnoldinho | OpenFOAM Running, Solving & CFD | 38 | March 8, 2017 14:48 |