|
[Sponsors] |
October 8, 2020, 03:18 |
Simple question abt force output interval
|
#1 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 400
Rep Power: 19 |
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! |
|
October 8, 2020, 03:35 |
|
#2 |
Senior Member
Join Date: Oct 2017
Posts: 121
Rep Power: 8 |
Try writeInterval instead of timeInterval (see tutorials/multiphase/interFoam/RAS/DTCHull).
|
|
October 9, 2020, 00:33 |
|
#3 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 400
Rep Power: 19 |
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? |
|
October 9, 2020, 03:03 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,053
Rep Power: 26 |
Hello quarkz,
What OpenFOAM version are you using? Yann |
|
October 9, 2020, 10:40 |
|
#5 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 400
Rep Power: 19 |
Hi Yann,
I'm using v2006 |
|
October 9, 2020, 11:15 |
|
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,053
Rep Power: 26 |
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 |
|
October 12, 2020, 02:05 |
|
#7 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 400
Rep Power: 19 |
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? |
|
October 12, 2020, 06:17 |
|
#8 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,053
Rep Power: 26 |
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 |
|
October 30, 2020, 03:02 |
|
#9 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 400
Rep Power: 19 |
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. |
|
|
|
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 |