Basically this is how I would do it in hand calculation:
T_out_0 = 22 [degC] %% Guessed initial value.
%% at t=1:
COP(1) = 5[1/K] * T_out_0
T_out(1) = T_avg_Domain(1) - COP(1)/7[1/K]
%% at t=2:
COP(2) = 5[1/K] * T_out(1)
T_out(2) = T_avg_Domain(2) - COP(2)/7[1/K]
and so on ..
My problem is how to calculate COP from the previous T_out? When I define this in Variables node (As shown below), I got this warning: "circular variable dependencies".
COP : 5[1/K] * T_out
T_out : T_avg_Domain - COP/7[1/K]