Problems with profile formula

Post Reply
antonclaeys
VE Newbie
VE Newbie
Posts: 7
Joined: Tue Aug 23, 2011 9:12 am

Problems with profile formula

Post by antonclaeys »

Hey,

I'm trying to make formula for a heat recovery device.
What i want is:
When (ta <=23) OR ((0.2*to+0.8*ta)<=to), the output should be (0.2*to+0.8*ta)
elseif to>16, the output should be (to)
else, the output should be (16)

In matlab code (which gives me the right matrix of temperatures)
Image

matlab results (in excel):
Image

What I entered is:
Image

What I see on the graph is:
Image
Image

as you can see, the graph in VE does not give me what I get in Matlab (the temperatures are much higher). I probably made a mistake in the formula syntax, but I don't see it. Can someone enlighten me?
antonclaeys
VE Newbie
VE Newbie
Posts: 7
Joined: Tue Aug 23, 2011 9:12 am

Re: Problems with profile formula

Post by antonclaeys »

nevermind, the correct formula should be:


if((ta<=23)+((0.2*to+0.8*ta)<=to),0.2*to+0.8*ta,0)+if((ta>23)*(to<16),16,0)+if((ta>23)*(to>=16)*((0.2*to+0.8*ta)>to),to,0)


you should add the "elseif" function though :)
Post Reply