CONTINUOUS_MODEL flHeat ABSTRACT "Floor heat model Ver 1.1 010522 MV The power in the boiler was not correct, because massflow and outcoming water temp are calculated in this model and incoming water temp was Tmax. In the boiler side the temperature difference was TBoiler - TOut with the calculated water massflow. This one has been fixed to calculate a new massflow called MBoiler with temperature difference in boiler side. The pump has to be added into model as well. Will be done later. The floor cooling system is the one added feature in the future as well. " EQUATIONS /* Calculate leaving water temperature */ ExpLoc:=-hA /IF (Mcoil*cp_liq) > 0.0001 THEN Mcoil*cp_liq ELSE mmin*cp_liq END_IF; Tout=Tslab+(Tin-Tslab)*IF ExpLoc > -0.01 THEN EXP(-0.01) ELSE_IF ExpLoc < -20 THEN EXP(-20) ELSE EXP(ExpLoc) END_IF; /* Heat transfer */ Q := Mcoil* cp_liq * (Tin-Tout); /* Heat balance */ Q = SUM i=1,n Q_tq[i] END_SUM; Tmax_d:=MIN(Tmax,Tsupp); Tin=Tslab+(Tmax_d-Tslab)*ctrl; /* Pressure drop */ dP:=Pin-Pout; /* Mass flow */ MBoiler = MAX(Q/(cp_liq*(TSupp-TOut)),mmin); Mcoil=IF DPOk>0.5 THEN Mdim ELSE MIN(mmin*dP/dP0,mmin) END_IF; DpOk := IF Event(G0, Dp - dp0) > 0 THEN 1 ELSE 0 END_IF; LINKS /* type name variables */ FOR i=1, n TQ Term[i] Tslab, POS_OUT Q_tq[i] END_FOR; PMT Inlet Pin, POS_IN MBoiler, Tsupp; PMT Outlet Pout,POS_OUT MBoiler, Tout; ControlLink Control ctrl; VARIABLES /* type name role def min max description */ Temp Tout OUT 1 ABS_ZERO BIG "Outlet water temperature" Temp Tslab OUT 1 ABS_ZERO BIG "Mean water temperture" Temp Tsupp IN 1 ABS_ZERO BIG "Supply water temperature" Temp Tin OUT 1 ABS_ZERO BIG "Inlet water temperature" HeatFlux Q LOC 1 -BIG BIG "Heat flux " HeatFlux Q_tq[n] IN 1 -BIG BIG "Heat fluxiz _tq" Control ctrl IN 1 0 1 "Control value" Factor ExpLoc LOC 1 -BIG BIG "Value inside f:on exp(..)" Pressure Pin IN 1 -BIG BIG "Pressure with inlet" Pressure Pout IN 1 -BIG BIG "Pressure with outlet" Pressure dP LOC 1 -BIG BIG "Pressure difference" MassFlow Mcoil OUT 1 -BIG BIG "Design water flow" MassFlow MBoiler OUT 1 -BIG BIG "Boiler water flow" Temp Tmax_d LOC 1 ABS_ZERO BIG "Maximum coil water temperature" GENERIC DpOk A_S 1 "Mode memory, = 0 for linear behavior, = 1 for controlled" GENERIC G0 A_S 600 " " MODEL_PARAMETERS /* type name role def min max description */ INT n SMP 1 1 BIGINT "Number of links minus one " PARAMETERS RadA P S_P 0.0 0.0 BIG "Design power output" Area A S_P 10 SMALL BIG "Heated floor area" Temp dT S_P 5 ABS_ZERO BIG "Temperature drop across floor heating" Temp Tmax S_P 25 ABS_ZERO BIG "Maximum inlet water temperature" HeatCondA h S_P 10 SMALL BIG "Specific heat transfer coeff" MassFlow Mdim C_P "Design water flow" HeatCondA hA C_P "Total heat transfer coeff" MassFlow mmin S_P 1.e-4 SMALL BIG "Minimum water flow" Pressure dp0 S_P 100 SMALL BIG "Pressure drop under which water flow is no longer maintained" HeatCapM cp_liq S_P 4187 SMALL BIG "Liquid specific heat" PARAMETER_PROCESSING Mdim:=(A*P)/(dT*cp_liq); hA:=h*A; END_MODEL