| 1633 | */ |
| 1634 | } |
| 1635 | void SimModel::hvac(const Vector& v_Qneed_ht, const Vector& v_Qneed_cl, double Qneed_ht_yr, double Qneed_cl_yr, Vector& v_Qelec_ht, |
| 1636 | Vector& v_Qgas_ht, Vector& v_Qcl_elec_tot, Vector& v_Qcl_gas_tot) const { |
| 1637 | double DH_YesNo = 0; |
| 1638 | double n_eta_DH_network = 0.9; |
| 1639 | double n_eta_DH_sys = 0.87; |
| 1640 | double n_frac_DH_free = 0.000; |
| 1641 | |
| 1642 | double DC_YesNo = 0; |
| 1643 | double n_eta_DC_network = 0.9; |
| 1644 | double n_eta_DC_COP = 5.5; |
| 1645 | double n_eta_DC_frac_abs = 0; |
| 1646 | double n_eta_DC_COP_abs = 1; |
| 1647 | double n_frac_DC_free = 0; |
| 1648 | /* |
| 1649 | %% District H/C info |
| 1650 | |
| 1651 | DH_YesNo =0; % building connected to DH (0=no, 1=yes. Assume DH is powered by natural gas) |
| 1652 | n_eta_DH_network = 0.9; % efficiency of DH network. Typical value 0l75-0l9 EN 15316-4-5 |
| 1653 | n_eta_DH_sys = 0.87; % efficiency of DH heating system |
| 1654 | n_frac_DH_free = 0.000; % fraction of free heat source to DH (0 to 1) |
| 1655 | |
| 1656 | DC_YesNo = 0; % building connected to DC (0=no, 1=yes) |
| 1657 | n_eta_DC_network = 0.9; % efficiency of DC network. |
| 1658 | n_eta_DC_COP = 5.5; % COP of DC elec Chillers |
| 1659 | n_eta_DC_frac_abs = 0; % fraction of DC chillers that are absorption |
| 1660 | n_eta_DC_COP_abs = 1; % COP of DC absorption chillers |
| 1661 | n_frac_DC_free = 0; % fraction of free heat source to absorption DC chillers (0 to 1) |
| 1662 | */ |
| 1663 | double IEER = cooling->cop() * cooling->partialLoadValue(); |
| 1664 | double f_waste = heating->hotcoldWasteFactor(); |
| 1665 | double a_ht_loss = heating->hvacLossFactor(); |
| 1666 | double a_cl_loss = cooling->hvacLossFactor(); |
| 1667 | |
| 1668 | /* %% HVAC System |
| 1669 | % |
| 1670 | % From EN 15243-2007 Annex E. |
| 1671 | % HVAC system info table from EN 15243:2007 Table E1. columns are |
| 1672 | |
| 1673 | % SEER = COP *mPLV or maybe more properly , IEER = COP * IPLV |
| 1674 | IEER = In.COP*In.PLV ; % compute IEER the effective average COP for the cooling system |
| 1675 | |
| 1676 | % copy over the HVAC loss/waste factors into local variables with names |
| 1677 | % that match the equations better |
| 1678 | f_waste=In.hotcold_waste_factor; |
| 1679 | a_ht_loss=In.heat_loss_factor; |
| 1680 | a_cl_loss=In.cool_loss_factor; |
| 1681 | |
| 1682 | */ |
| 1683 | double f_dem_ht = std::max(Qneed_ht_yr / (Qneed_cl_yr + Qneed_ht_yr), 0.1); |
| 1684 | double f_dem_cl = std::max((1.0 - f_dem_ht), 0.1); |
| 1685 | double eta_dist_ht = 1.0 / (1.0 + a_ht_loss + f_waste / f_dem_ht); //% overall distribution efficiency for heating |
| 1686 | double eta_dist_cl = 1.0 / (1.0 + a_cl_loss + f_waste / f_dem_cl); //%overall distrubtion efficiency for cooling |
| 1687 | |
| 1688 | Vector v_Qloss_ht_dist = div(mult(v_Qneed_ht, (1 - eta_dist_ht)), eta_dist_ht); |
| 1689 | Vector v_Qloss_cl_dist = div(mult(v_Qneed_cl, (1 - eta_dist_cl)), eta_dist_cl); |
| 1690 | printVector("v_Qloss_ht_dist", v_Qloss_ht_dist); |
| 1691 | printVector("v_Qloss_cl_dist", v_Qloss_cl_dist); |
| 1692 | /* |
nothing calls this directly
no test coverage detected