| 2210 | } |
| 2211 | |
| 2212 | ISOResults SimModel::outputGeneration(const Vector& v_Qelec_ht, const Vector& v_Qcl_elec_tot, const Vector& v_Q_illum_tot, |
| 2213 | const Vector& v_Q_illum_ext_tot, const Vector& v_Qfan_tot, const Vector& v_Q_pump_tot, |
| 2214 | const Vector& v_Q_dhw_elec, const Vector& v_Qgas_ht, const Vector& v_Qcl_gas_tot, const Vector& v_Q_dhw_gas, |
| 2215 | double frac_hrs_wk_day) const { |
| 2216 | EndUses results[12]; |
| 2217 | ISOResults allResults; |
| 2218 | |
| 2219 | double E_plug_elec = |
| 2220 | building->electricApplianceHeatGainOccupied() * frac_hrs_wk_day + building->electricApplianceHeatGainUnoccupied() * (1.0 - frac_hrs_wk_day); |
| 2221 | double E_plug_gas = |
| 2222 | building->gasApplianceHeatGainOccupied() * frac_hrs_wk_day + building->gasApplianceHeatGainUnoccupied() * (1.0 - frac_hrs_wk_day); |
| 2223 | |
| 2224 | Vector v_Q_plug_elec = div(mult(hoursInMonth, E_plug_elec, 12), 1000.0); |
| 2225 | Vector v_Q_plug_gas = div(mult(hoursInMonth, E_plug_gas, 12), 1000.0); |
| 2226 | printVector("v_Q_plug_elec", v_Q_plug_elec); |
| 2227 | printVector("v_Q_plug_gas", v_Q_plug_gas); |
| 2228 | |
| 2229 | /* |
| 2230 | %% Plugload |
| 2231 | |
| 2232 | E_plug_elec =( In.elec_plug_dens_occ*frac_hrs_wk_day + In.elec_plug_dens_unocc*(1-frac_hrs_wk_day)); % average electric plugloads in W/m2 |
| 2233 | E_plug_gas = (In.gas_plug_dens_occ*frac_hrs_wk_day + In.gas_plug_dens_unocc*(1-frac_hrs_wk_day)); % averaged gas plugloads in W/m2 |
| 2234 | |
| 2235 | v_Q_plug_elec = E_plug_elec*v_hrs_ina_mo/1000; % Electric plugload kWh/m2 |
| 2236 | v_Q_plug_gas = E_plug_gas*v_hrs_ina_mo/1000; % gas plugload kWh/m2 |
| 2237 | |
| 2238 | */ |
| 2239 | Vector Eelec_ht = div(div(v_Qelec_ht, structure->floorArea()), kWh2MJ); //% Total monthly electric usage for heating |
| 2240 | Vector Eelec_cl = div(div(v_Qcl_elec_tot, structure->floorArea()), kWh2MJ); //% Total monthly electric usage for cooling |
| 2241 | Vector Eelec_int_lt = div(v_Q_illum_tot, structure->floorArea()); //% Total monthly electric usage density for interior lighting |
| 2242 | Vector Eelec_ext_lt = div(v_Q_illum_ext_tot, structure->floorArea()); //% Total monthly electric usage for exterior lights |
| 2243 | Vector Eelec_fan = v_Qfan_tot; //%Total monthly elec usage for fans |
| 2244 | Vector Eelec_pump = div(div(v_Q_pump_tot, structure->floorArea()), kWh2MJ); //% Total monthly elec usage for pumps |
| 2245 | Vector Eelec_plug = v_Q_plug_elec; //% Total monthly elec usage for elec plugloads |
| 2246 | Vector Eelec_dhw = div(v_Q_dhw_elec, structure->floorArea()); |
| 2247 | /* |
| 2248 | %% Generating output table |
| 2249 | |
| 2250 | Eelec_ht = v_Qelec_ht./In.cond_flr_area./kWh2MJ; % Total monthly electric usage for heating |
| 2251 | Eelec_cl = v_Qcl_elec_tot./In.cond_flr_area./kWh2MJ; % Total monthly electric usage for cooling |
| 2252 | Eelec_int_lt = v_Q_illum_tot./In.cond_flr_area; % Total monthly electric usage density for interior lighting |
| 2253 | Eelec_ext_lt = v_Q_illum_ext_tot./In.cond_flr_area; % Total monthly electric usage for exterior lights |
| 2254 | Eelec_fan = v_Qfan_tot; %Total monthly elec usage for fans |
| 2255 | Eelec_pump = v_Q_pump_tot./In.cond_flr_area./kWh2MJ; % Total monthly elec usage for pumps |
| 2256 | Eelec_plug = v_Q_plug_elec; % Total monthly elec usage for elec plugloads |
| 2257 | Eelec_dhw = v_Q_dhw_elec/In.cond_flr_area; |
| 2258 | |
| 2259 | */ |
| 2260 | |
| 2261 | Vector Egas_ht = div(div(v_Qgas_ht, structure->floorArea()), kWh2MJ); //% total monthly gas usage for heating |
| 2262 | Vector Egas_cl = div(div(v_Qcl_gas_tot, structure->floorArea()), kWh2MJ); //% total monthly gas usage for cooling |
| 2263 | Vector Egas_plug = v_Q_plug_gas; //% total monthly gas plugloads |
| 2264 | Vector Egas_dhw = div(v_Q_dhw_gas, structure->floorArea()); //% total monthly dhw gas plugloads |
| 2265 | |
| 2266 | for (int i = 0; i < 12; i++) { |
| 2267 | results[i].addEndUse(Eelec_ht[i], EndUseFuelType::Electricity, EndUseCategoryType::Heating); |
| 2268 | results[i].addEndUse(Eelec_cl[i], EndUseFuelType::Electricity, EndUseCategoryType::Cooling); |
| 2269 | results[i].addEndUse(Eelec_int_lt[i], EndUseFuelType::Electricity, EndUseCategoryType::InteriorLights); |
nothing calls this directly
no test coverage detected