MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / translateModel

Method translateModel

src/isomodel/ForwardTranslator.cpp:147–2270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 }
146
147 UserModel ForwardTranslator::translateModel(const openstudio::model::Model& t_model) {
148 m_logSink.resetStringStream();
149
150 /// \todo this should probably be a clone in case the uniqueModelObject calls manipulate the model?
151 openstudio::model::Model model = t_model;
152
153 LOG(Debug, "...Setting() Defaults");
154 LOG(Debug, "*****************************");
155 LOG(Debug, " Setting Defaults");
156 LOG(Debug, "*****************************");
157
158 // set the flags below to true or false to try to get info from OSM file or simply use defaults below
159 bool OSM_extract_occupancy = true; // extract days and hours of occupancy
160 bool OSM_extract_temp_setpoint = true; // extract temperature setpoints
161 bool OSM_extract_dhw = true; // extract dhw info
162 bool OSM_extract_vent_rate = true; // extract the ventilation rate
163 bool OSM_extract_infil_rate = true; // extract infiltration rate info
164 bool OSM_extract_HVAC = true; // extract HVAC info like cooling COP, heating efficiencies, fuel type.
165 /// \todo unused
166 //bool OSM_extract_glazing_info = true; // extract glazing info (U & SHGC)
167 //bool OSM_extract_wallroof_info = true; // extract the wall and roof U and other info
168
169 // NOTE YOU *MUST* SET HVAC SYSTEM TYPE and IPLV/COP ratio below
170
171 // set fan and pump control factors; (1.0 = no energy saving features)
172 // start the strings with a floating point as that's what is stripped off to set the falue
173 // fan control 1 = no control, 0.75 = inlet blade adjuct, 0.65= variable speed see NEN 2916 7.3.3.4
174 double fan_flow_control_factor_default = 1.0; // set default fan flow control factor to 1.0 (no energy savings)
175 // pump control 0 = no pump, 0.5 = auto pump controls for more 50% of pumps, 1.0 = all other cases. See NEN 2914 9.4.3
176 double heating_pump_control_factor_default = 1.0; // set default heating pump control factor to 1.0 (no control or vfd)
177 double cooling_pump_control_factor_default = 1.0; // set default cooling pump control factor to 1.0 (no control or vfd)
178
179 // until we can extract HVAC inputs and guess at HVAC type, set these defaults
180 // give the HVAC type number first and a descriptive string after
181 int hvac_type_default = 24; // set default HVAC type to VAV
182 double cooling_IPLVToCop_ratio = 1.0; // set default system partial load ratio
183 int ventilation_type_default = 1; //set ventilation type (1 = mech only, 2 = natural, 3 = mixed)
184 int bem_type_default = 1; // set bem_type=1 (1 = none or minimal BEM, 2 = modern BEM, 3 = advanced BEM w/ FDD)
185
186 // HVAC settings that are hard to extract but might be changed
187 double exhaust_recirculation_fraction = 0.0; // set fraction of air recirculated to 0.0 (i.e. total outside air)
188 double heat_recovery_fraction = 0.0; // set ventilation heat recovery fraction to 0 since OS doesn't support heat recovery yet
189
190 //these are items that aren't modeled in OS or are hard to extract so set default values
191 int occupancy_sensors_default = 1; // occupancy sensors: false = none or minimal true > if 60% of floor space has it
192 int const_illum_ctrl_default = 1; //constant illumination control: false = none, true
193
194 // this can be changed within OS, but it is often not sent.
195 double specific_fan_power = 1 / 0.7733; // set default specific fan power (L/W) to match EnergyPlus default
196
197 // set default SCF and SDF for all windows.
198 double solar_control_factor = 1.0;
199 double shading_device_factor = 1.0;
200
201 // set fall through defaults in case extraction fails or we decide not to extract
202
203 // default occupancy info if we can't extract
204 int occupancy_day_start = 1; // set default starting day of occupancy as monday (Su=0, Mon=1 Sa=6)

Callers 1

TEST_FFunction · 0.45

Calls 15

UserModelClass · 0.85
resetStringStreamMethod · 0.80
layersMethod · 0.80
getDaySchedulesMethod · 0.80
getValueMethod · 0.80
beginMethod · 0.80
dayOfWeekMethod · 0.80
activityLevelScheduleMethod · 0.80

Tested by 1

TEST_FFunction · 0.36