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

Time Average of Forces or Coefficient Values for Steady State Simulation

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 11, 2020, 22:04
Smile Time Average of Forces or Coefficient Values for Steady State Simulation
  #1
New Member
 
Nian
Join Date: Jun 2019
Posts: 11
Rep Power: 3
noodleluvmay is on a distinguished road
Hello,

This might be a really basic question, but haven't found much information on it.

I am currently using OpenFOAM 18.10, running a simulation at steady state for 500 time steps with simpleFoam, and output gives me forces and force coefficient values. But because of the nature of the geometry, the flow appears to be transient, and all of the force values would vary slightly for each of the time steps.

So my question is, would there be any ways to generate a time averaged value for the force coefficients, say for example from time step 450-500 out of all the values?

If so, what kind of code or function should I be adopting?
Or would it also be possible to achieve in post processing?
(Sorry if this question ends up being more suited to the post processing topic)

Here's my very basic version of controlDict, not sure if this will be the place where I define these things:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     simpleFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         500;

deltaT          1;

writeControl    timeStep;

writeInterval   100;

purgeWrite      0;

writeFormat     binary;

writePrecision  6;

writeCompression uncompressed;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

functions
{
    #include "streamLines"
    #include "cuttingPlane"
    #include "forceCoeffs"
	#include "forces"
}
I would really appreciate if someone could point me in the right direction,

thank you!
-Nian
noodleluvmay is offline   Reply With Quote

Old   February 13, 2020, 05:31
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 561
Rep Power: 22
tomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

I am not sure if this is already available in your version of OpenFOAM, but at least for v1912 there is the valueAverage functionObject:

Code:
valueAverage1
{
    type        valueAverage;
    libs        ("libfieldFunctionObjects.so");
    writeToFile yes;
    log         yes;
    functionObject forceCoeffs1;
    fields      (Cm Cd Cl);
    window      0.5;
}
(The above code was copied from the documentation)

The alternative would be to read the data from the outputfile with another program (I prefer python).
tomf is offline   Reply With Quote

Old   February 13, 2020, 21:07
Default
  #3
New Member
 
Nian
Join Date: Jun 2019
Posts: 11
Rep Power: 3
noodleluvmay is on a distinguished road
Hi,

There seems to be only fieldAverage function in 18.10, but I appreciate you posting the documentation!

I suppose post processing in another program would be the easiest in this case then, just wanted to check in case there is an easier way.

Thank you!
-Nian
noodleluvmay is offline   Reply With Quote

Reply

Tags
drag coefficient, time average

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Domain Reference Pressure and mass flow inlet boundary AdidaKK CFX 75 August 20, 2018 06:37
Time Step Continuity Errors simpleFoam Dorian1504 OpenFOAM Running, Solving & CFD 0 January 17, 2018 05:18
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 01:01
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 08:56
Two-Phase Buoyant Flow Issue Miguel Baritto CFX 4 August 31, 2006 13:02


All times are GMT -4. The time now is 12:07.