[TRNSYS-users] Dividing by Zero
Flynn Ciaran
ciaran.flynn at aalto.fi
Thu Aug 15 04:49:41 PDT 2013
Hei Amir,
You can work around this by making a separate equation for the denominator.
For example, set an equation for your denominator (assuming it is always positive) as: If denominator = 0, set "new_denominator" = (-1)
Then link this to your existing equation as: GT(new_denominator,0)*(numerator/new_denominator).
This way if your equation is negative you'll know that you had a division by zero...
Regards,
Ciarán
From: trnsys-users-bounces at cae.wisc.edu [mailto:trnsys-users-bounces at cae.wisc.edu] On Behalf Of Amir Nashed
Sent: 15. elokuuta 2013 11:58
To: trnsys-users at engr.wisc.edu
Subject: [TRNSYS-users] Dividing by Zero
Dear Users
I am facing a problem where whenever I insert an equation and divide by something, it receive an error that I am dividing by zero.
I made sure that all initial conditions are not zero and I even plotted the value of the variable and it does not equal zero.
I even put a condition that the division only occur if the denominator is >0 but still the same.
Does anyone know what's causing this?
Thank you
Regards,
Amir Nashed
PhD Candidate
School of Renewable Energy and Photovoltaic Engineering
University of New South Wales
Phone:+61405979282
Email:.a.nashed at unsw.edu.au
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20130815/9a7c8e9c/attachment-0009.htm>
More information about the TRNSYS-users
mailing list