timeVaryingUniformFixedValue BC questions
Dear OpenFOAM experts:
I am trying to modify timeVaryingUniformFixedValue BC so that it can handle time varying with cycles.
Can someone explaim what "fvPatchField<Type>::operator== " means?
why I cannot do fvPatchField<Type>::operator== 1?
I can read in t1, t2, and tPeriod into the code, then, I want to
1. calculate cycle number: nCycle = int(runTime.value()/tPeriod)
2. localTime = runTime.value() - nCycle * tPeriod;
if(localTime >= 0 && localTime < t1)
operator == 0;
else if (localTime >= t1 && localTime < t2)
operator == 1;
else if(localTime <= tPeriod)
operator = 0;
my problem with 1 above is that, OpenFOAM gave type cast error. If I use floor() function, it is not support in foam name space.
in 2 above, how to assign the patch value to either 0 or 1?
Can someone shed some light on this?
Thanks a lot for the answer, Henrik!
I was about to give up on this.
|All times are GMT -4. The time now is 23:18.|