[TRNSYS-users] using conditionals sentences in "insert new equation"
leen peeters
leen.peeters at mech.kuleuven.be
Mon May 25 08:06:07 PDT 2009
Tiago,
you can easily do it. But you need to avoid the 'then' by formulating it
differently. Introduce a flag; flowratezero which is zero if the flow rate
is zero and one else.
Then the calculation of Tout. Suppose that is given by an equation a*b-c,
then the new line for that becomes:
flowratezero*(a*b-c). If the aim is to avoid the result being zero, you can
use:
flowratezero*(a*b-c)+(1-flowratezero)*Tsafe
where Tsafe is a safety value, which for example equals Tin
Hope this helps,
Leen
----- Original Message -----
From: <em04143 at fe.up.pt>
To: <trnsys-users at cae.wisc.edu>
Sent: Monday, May 25, 2009 4:00 PM
Subject: [TRNSYS-users] using conditionals sentences in "insert new
equation"
Dear Trnsys Users,
Does anyone knows if it's possible to use conditionals sentences
(ig-then-else) in the insert new equation functionality? For example,
i'm using an equation that describes the Tout of a collector, but i
don't want to calculate the Tout, if the flow rate is equal to zero.
Does anyone knows if it´s possible to do this?
Kind regards, Tiago Teixeira
_______________________________________________
TRNSYS-users mailing list
TRNSYS-users at cae.wisc.edu
https://www-old.cae.wisc.edu/mailman/listinfo/trnsys-users
More information about the TRNSYS-users
mailing list