is it possible and correct to set a logical condition in variables of groovyBC?
like "a=t1<=time()<t1+deltaT;"
And then use a in expressions? |
Quote:
a) deltaT is a function (write deltaT()) b) checking ranges like this won't work you've got to split it into two comparisons "t1<=time() && time()<(t1+deltaT())". What you're doing only works in C++ itself and there it wouldn't give the result you're expecting: first you compare t1 and time() which is either true or false. C++ interprets these as either 1 or 0 and compares these numbers with t1+deltaT() |
Hi Ehsan,
Did you solve your problem? Could you share your solution? Thank you. Quote:
|
|
I wanted to have a boundary condition that follows a function up to a time and then use a constant value:
f(x) = F+101325; when t<0.0012 and f(x) = 101325; when t>0.0012 Here is what I used (and it worked): Code:
inlet |
Quote:
|
All times are GMT -4. The time now is 14:27. |