|
[Sponsors] |
March 13, 2012, 03:43 |
Check current time
|
#1 |
New Member
Jordi Muela
Join Date: Mar 2011
Posts: 27
Rep Power: 16 |
Hi all,
I'm programming a new class for six DoF motion to allow socket comunication for cosimulation with other tool (exchanging force data..). And I'm having a trouble, how can I consult the current time value? Now I'm doing a little (...big!) trick using system(): system("grep 'Time = ' log.interDyMFoam | tail -n 1 | sed 's/Time = //g' > calcTime"); and then I can read the time from file calcTime, but I thought must be a better and elegant way... I've taked a look to "timeVaryingUniformFixedValuePointPatchField" since this BC must consult the time to do the proper interpolation, and it looks like the solution must come from a function called db(), which is declared in "pointPatchField"... but I'm falling in black-hole of classes and I can't see the light. So please, if somebody can show me the way of do this I'll be very pleased! Thanks!! Best regards, Jordi. Edit: now I see that I've had a lapsus with thread title, I'm interested in the actual time, no in time step! Thanks! And sorry the mistake... Last edited by jordi.muela; March 13, 2012 at 05:05. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple floating objects | CKH | OpenFOAM Running, Solving & CFD | 14 | February 20, 2019 09:08 |
Set current time step | tsram90 | FLUENT | 0 | November 11, 2011 10:19 |
calculation diverge after continue to run | zhajingjing | OpenFOAM | 0 | April 28, 2010 04:35 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 18:07 |
How to read out time used for current solution | Angelo Sozzi | FLUENT | 1 | July 7, 2004 13:16 |