|
[Sponsors] |
August 13, 2009, 23:10 |
timeVaryingUniformFixedValue BC questions
|
#1 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18 |
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>:perator== " means? why I cannot do fvPatchField<Type>:perator== 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? Pei |
|
August 17, 2009, 04:51 |
|
#2 | |
Senior Member
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18 |
Dear phsieh2005,
Quote:
Code:
fvPatchField<Type>:operator== pTraits<Type>::one; Henrik |
||
August 17, 2009, 08:07 |
|
#3 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18 |
Thanks a lot for the answer, Henrik!
I was about to give up on this. Pei |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Some perhaps stupid questions about calculix | lynx | OpenFOAM Meshing & Mesh Conversion | 11 | May 17, 2010 07:48 |
So many questions in DPM & UDF - Help! URGENT! | Prashanth | FLUENT | 0 | March 3, 2009 23:26 |
Fluent FAQ Started - Fill it With Questions | Jonas Larsson | FLUENT | 0 | September 12, 2005 11:41 |
Few questions | phi | FLUENT | 0 | March 4, 2005 10:23 |
turbulence modeling questions | llowen | Main CFD Forum | 3 | September 11, 1998 05:24 |