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

Simple question abt force output interval

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By quarkz

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 8, 2020, 03:18
Default Simple question abt force output interval
  #1
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 400
Rep Power: 19
quarkz is on a distinguished road
Hi,

I'm trying to ask a rather simple question on force output interval.

How can I tell OF that I want the force output file to write every 10 steps or 0.001 interval?

I use the motorBike tutorial as an example:

forceCoeffs1
{
type forceCoeffs;

libs (forces);

writeControl timeStep;
timeInterval 10;

log yes;

So I modify timeInterval to 10. But when I check, it still outputs every timestep.

So is there any solution? Or did I do something wrong?

Thanks!
quarkz is offline   Reply With Quote

Old   October 8, 2020, 03:35
Default
  #2
Senior Member
 
Join Date: Oct 2017
Posts: 121
Rep Power: 8
Krapf is on a distinguished road
Try writeInterval instead of timeInterval (see tutorials/multiphase/interFoam/RAS/DTCHull).
Krapf is offline   Reply With Quote

Old   October 9, 2020, 00:33
Default
  #3
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 400
Rep Power: 19
quarkz is on a distinguished road
Hi Krapf,

I just changed the writeInterval to 10:

writeControl timeStep;
writeInterval 10;

but I'm still getting force output at every timestep:

602 (-1.658054e+01 1.597868e+03 3.869050e+03) (-3.151841e+00 1.598027e+03 3.869377e+03) (-1.342870e+01 -1.591310e-01 -3.273975e-01)
603 (-1.650899e+01 1.597155e+03 3.868442e+03) (-3.089344e+00 1.597315e+03 3.868768e+03) (-1.341965e+01 -1.600401e-01 -3.266844e-01)
604 (-1.640912e+01 1.597292e+03 3.868515e+03) (-2.998325e+00 1.597453e+03 3.868841e+03) (-1.341080e+01 -1.609618e-01 -3.262860e-01)
605 (-1.639075e+01 1.597377e+03 3.869334e+03) (-2.987208e+00 1.597539e+03 3.869660e+03) (-1.340354e+01 -1.617590e-01 -3.259897e-01)

Why is this so?
quarkz is offline   Reply With Quote

Old   October 9, 2020, 03:03
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,053
Rep Power: 26
Yann will become famous soon enough
Hello quarkz,


What OpenFOAM version are you using?


Yann
Yann is offline   Reply With Quote

Old   October 9, 2020, 10:40
Default
  #5
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 400
Rep Power: 19
quarkz is on a distinguished road
Hi Yann,

I'm using v2006
quarkz is offline   Reply With Quote

Old   October 9, 2020, 11:15
Default
  #6
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,053
Rep Power: 26
Yann will become famous soon enough
Thanks! Maybe give a try to these parameters:

Code:
executeControl  timeStep;
executeInterval 10;

Here is what I have found for OpenFOAM-v2006:

Code:
type            forces;
libs            ("libforces.so");

// How often force and moment volume fields will be written
writeControl    writeTime; // none

// How often the forces force.dat and moment.dat data files are updated
// Note: .dat files are always updated on writeControl times
executeControl  timeStep;
executeInterval 1;

Let us know if it solves your problem!


Yann
Yann is offline   Reply With Quote

Old   October 12, 2020, 02:05
Default
  #7
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 400
Rep Power: 19
quarkz is on a distinguished road
Thanks Yann, I ran Allclean and Allrun again with:

executeControl timeStep;
executeInterval 10;

but it still output every time step. So what's wrong? Does it work?
quarkz is offline   Reply With Quote

Old   October 12, 2020, 06:17
Default
  #8
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,053
Rep Power: 26
Yann will become famous soon enough
Hi quarkz,

I use the forces function object quite often and I don't remember having this issue but unfortunately I do not have OpenFOAM-v2006 installed anywhere to test it.

I don't really know how to help. Maybe you can post your controlDict file, just in case someone can spot an error somewhere.

Yann

Last edited by Yann; October 30, 2020 at 03:09. Reason: Typo on the OpenFOAM version
Yann is offline   Reply With Quote

Old   October 30, 2020, 03:02
Default
  #9
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 400
Rep Power: 19
quarkz is on a distinguished road
Hi all,

I finally found the solution.

The keywords are:

For time:

executeControl adjustableRunTime;
executeInterval 0.001;
writeControl adjustableRunTime;
writeInterval 0.001;

For timesteps:

executeControl writeTime;
executeInterval 40;

writeControl timeStep;
writeInterval 40;

Btw, I'm using OF 2006.
Yann and samik108 like this.
quarkz 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
Drag Force Ratio for Flat Plate Rob Wilk Main CFD Forum 40 May 10, 2020 04:47
Finding Drag Force from Skin Friction Rob Wilk Main CFD Forum 0 May 8, 2020 06:04
A simple cfd and aeroelasticity question i.sabahi Main CFD Forum 4 June 17, 2018 06:24
VOF Sloshing - beating pattern in force output? Brian FLUENT 0 May 18, 2006 10:59
Gas pressure question Dan Moskal Main CFD Forum 0 October 24, 2002 22:02


All times are GMT -4. The time now is 19:47.