|April 15, 2014, 14:07||
Expression =1 every 2 Timesteps
Join Date: Sep 2013
Posts: 77Rep Power: 3
im looking for an expression that is 1 every 2 timesteps.
I tried to build the expression with a sin function but somehow it does not work propably.
is there a easier way?
|April 15, 2014, 14:53||
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 494Rep Power: 10
Your way is close but you have the expression slightly wrong. And are you interested in every 2 "timesteps" or do you want this as a function of time?
For timesteps your variable needs to be ctstep not Time.
Also, your sin function would need to be
cos(ctstep*pi) in order to get it to "1" on every even step.
But I would be afraid of roundoff error on this and wouldnt trust it to return true using a boolean to evaluate it, so I would switch to a step function. Perhaps:
|Thread||Thread Starter||Forum||Replies||Last Post|
|outputTime in Swak function||immortality||OpenFOAM Post-Processing||8||June 28, 2015 16:25|
|writing execFlowFunctionObjects||immortality||OpenFOAM Post-Processing||30||September 15, 2013 06:16|
|How to install CGNS under windows xp?||lzgwhy||Main CFD Forum||1||January 11, 2011 19:44|
|CGNS lib and Fortran compiler||manaliac||Main CFD Forum||2||November 29, 2010 07:25|
|Lift, Drag Vs time chart,calculations||Jamesd69climber||CFX||8||February 17, 2005 18:23|