|
[Sponsors] |
Time Average of Forces or Coefficient Values for Steady State Simulation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 11, 2020, 22:04 |
Time Average of Forces or Coefficient Values for Steady State Simulation
|
#1 |
New Member
Nian
Join Date: Jun 2019
Posts: 15
Rep Power: 7 |
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" } thank you! -Nian |
|
February 13, 2020, 05:31 |
|
#2 |
Senior Member
|
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 alternative would be to read the data from the outputfile with another program (I prefer python). |
|
February 13, 2020, 21:07 |
|
#3 |
New Member
Nian
Join Date: Jun 2019
Posts: 15
Rep Power: 7 |
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 |
|
June 16, 2023, 03:02 |
valueAverage
|
#4 |
New Member
Helloy
Join Date: Jul 2012
Posts: 4
Rep Power: 14 |
thanks for the info
but if I want to average the force instead of the force coefficient, I want to know what fields are the correct instead of Cm Cd Cl. valueAverage1 { type valueAverage; libs ("libfieldFunctionObjects.so"); writeToFile yes; log yes; functionObject forceCoeffs1; fields (Cm Cd Cl); window 0.5; } Regards |
|
Tags |
drag coefficient, time average |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Time Step Continuity Errors simpleFoam | Dorian1504 | OpenFOAM Running, Solving & CFD | 1 | October 9, 2022 10:23 |
Domain Reference Pressure and mass flow inlet boundary | AdidaKK | CFX | 75 | August 20, 2018 06:37 |
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 |