# Divide Block outputs inf for devision of 10/0.04

11 views (last 30 days)
Klaas Albers on 21 May 2019
Answered: Klaas Albers on 21 May 2019
Hello,
I build a Simulink Model to Simulation the behavior of a heating system for domestic hot water. I used the NTU-Method to describe the heat exchanger. I´m currently trubbleshooting the model and i already resolved many issues.
The divide block I´m talking about outputs the value R_2 = m_dot,2 / m_dot,1 where m_dot,1 is controlled based on a tempreture and m_dot,2 is defined by a lookup table which resembles a user opening the tap for hot water. At the point where m_dot,2 goes from 0 to 10 l/min the Simulation stops and the Problem occures. I saturated both m´s at the lower level to 0.04 to avoid division by zero so the division in this block should be 10 / 0.04 = 250 which definitly isnt infinite :D
I attached the model an two scripts for constants and the profile for the lookup table for m_dot,2
I hope somebody can help me!
Kind Regards,
Klaas

Klaas Albers on 21 May 2019
I investigated the Problem further and think found the cause for the problem. Within the NTU-Method there is a special case when R_1 = 1 (for my case this means R_1 = R_2 = 1, because i have water on both side which means the cp is equal on both sides), in this case phi_i is calculated through a different formula than normal.
I caculated phi 1 and 2 for m_dot,2 = const. = 5 l/min and m_dot,1 = 0.1...10 in 0.1 increments using an excel sheet. Furthermore i caculated phi_1 = phi_2 for m_dot,2 = m_dot,1 = 5 l/min. I put all of this into a graph to showcase the Problem.
I think the problem originates because of the jump from the normaly caculated phi to the phi caculated with the formula for the special case.
Could i just interpolate the values in between? What would be the best way to do this?
I really hope somebody can help me to solve this issue!