if-then-else statement possible?

35 views
Skip to first unread message

D D

unread,
May 20, 2023, 4:17:38 AM5/20/23
to FDS and Smokeview Discussions
Hello to all,

I would like to ask if it is possible to implement an if-then-else logic through &CTRL (or any other way) in order to clip a range of values reported back by a &DEVC connected to the &CTRL logic.

To put it differently, the intent is to manipulate the values returned by the &DEVC, making them all zero as long as the value calculated by a mathematical &CTRL statement remains below a threshold value. So in other words, if the &CTRL result < "Value", then output zero for the &DEVC, else calculate and report the calculated value.

Of course, I know I could manipulate the data in excel, I just wanted to know if I could program FDS to report the values ready avoiding the hassle of editing.

Thank you.

dr_jfloyd

unread,
May 20, 2023, 7:14:55 AM5/20/23
to FDS and Smokeview Discussions
Use the math CTRL as the input to a custom CTRL whose RAMP returns 0 or 1 depending on if you are above or below the threshold. Then use a MULTIPLY CTRL with 0 or 1 and the DEVC value. You can then output using CONTROL VALUE with a DEVC.
Message has been deleted

D D

unread,
May 20, 2023, 12:10:04 PM5/20/23
to FDS and Smokeview Discussions
Thanks, it worked.
Reply all
Reply to author
Forward
0 new messages