I'm coding the LMTD method in the heat transfer and met some errors when using the and operators more than two times simultaneously.
if (del_T1 > beta) and (del_T2 > beta) and (del_T1<>del_T2) then
T_LMTD = (del_T1-del_T2) / ( (log(del_T1)) - (log(del_T2)));
elseif (del_T1 > beta) and (del_T2 > beta) and (del_T1==del_T2) then
T_LMTD = (del_T1-del_T2) / 2;
elseif (del_T1 > beta) and (del_T2 < beta) then
T_LMTD = (del_T1 - beta) / ( (log(del_T1/beta)) * (1 - zeta * (del_T2 - beta)));
elseif (del_T1 < beta) and (del_T2 > beta) then
T_LMTD = (del_T2 - beta) / ( (log(del_T2/beta)) * (1 - zeta * (del_T1 - beta)));
elseif (del_T1 < beta) and (del_T2 < beta) then
T_LMTD = beta / ( (1 - zeta * (del_T1 - beta)) * (1 - zeta * (del_T2 - beta)));
else
T_LMTD = beta / ( (1 - zeta * (del_T1 - beta)) * (1 - zeta * (del_T2 - beta)));
end if;
Unfortunately, the error messages are printed like below when i simulate the model only when i used the And operators more than two times in one line.
How can i use And operator in multiple times? or Because of other problems?
Aucun commentaire:
Enregistrer un commentaire