Skip to content

Conversation

@JanghyunJK
Copy link
Contributor

@JanghyunJK JanghyunJK commented Jan 14, 2026

Pull request overview

coming from DualFuelRTU project:

  • expanding existing HPRTU measure to reflect Carrier's dual fuel RTU (48QE model) performance

  • other than some clean ups in the measure script, major implementations/changes are,

    • performance maps:

      image
    • hybrid gas coil:


      • initially tried implementing as close as possible to the real control (i.e., SAT based control) as shown below but decided to go with simpler approach (i.e., load based control) after a discussion with @eringold @ChristopherCaradonna which is more fair to ComStock baseline models.
      image
      • ended up using Coil:UserDefined object for modeling two-stage hybrid gas coil. because of the suspected issue with the OS forward translator, this is how the final model looks like in terms of branch structure:
      image
      • applied realistic gas coil capacities from catalog data:
      image
      • single model test results 1:

        • HP sized @ 0F and HP compressor lockout @ 0F
        image
        • HP sized @ 47F and HP compressor lockout @ 32F
        image

      • single model test results 2:

        • HP sized @ 0F and HP compressor lockout @ 0F
        image
        • HP sized @ 47F and HP compressor lockout @ 32F
        image
  • remaining TODOs:

    • just noticed, I have to let the hybrid gas coil to run when compressor is locked out.
    • I do need to do the rubocop

Pull Request Author

This pull request makes changes to (select all the apply):

  • Documentation
  • Infrastructure (includes apptainer image, buildstock batch, dependencies, continuous integration tests)
  • Sampling
  • Workflow Measures
  • Upgrade Measures
  • Reporting Measures
  • Postprocessing

Pull Request Author Checklist:

  • Tagged the pull request with the appropriate label (documentation, infrastructure, sampling, workflow measure, upgrade measure, reporting measure, postprocessing) to help categorize changes in the release notes.
  • Added or edited tests for measures that adequately cover anticipated cases
  • New or changed register values reflected in comstock_column_definitions.csv
  • Both options_lookup.tsv files updated
  • New measure tests add to to test/reporting_measure_tests.txt, test/workflow_measure_tests.txt, or test/upgrade_measure_tests.txt
  • Added 'See ComStock License' language to first two lines of each code file
  • Run rubocop and check log
  • Updated measure .xml(s)
  • Ran 10k+ test run and checked failure rate to make sure no new errors were introduced
  • Measure documentation written or updated
  • ComStock documentation written or updated
  • Change document written and assigned to a reviewer
  • Changes reflected in example .yml files and README.md files

Pull Request Reviewer Checklist:

  • Perform a code review on GitHub
  • All changes have been implemented: data, methods, tests, documentation
  • If fixing a defect, verify by running main branch to reproduce the defect and the PR branch to verify the fix
  • Measure tests written and adequately cover anticipated cases
  • Run measure tests and ensure they pass
  • New measure tests add to to test/reporting_measure_tests.txt, test/workflow_measure_tests.txt, or test/upgrade_measure_tests.txt
  • Ensured code files contain License reference
  • Run rubocop and check log
  • Measure .xml updated
  • CI status: all tests pass
  • ComStock documentation adequately describes the new assumptions
  • Reviewed change documentation, results differences are reasonable, and no new errors introduced
  • Author has addressed comments in change documentation
  • .yml and README.md files updated

ComStock Licensing Language - Add to Beginning of Each Code File

# ComStock™, Copyright (c) 2025 Alliance for Sustainable Energy, LLC. All rights reserved.
# See top level LICENSE.txt file for license terms.

@JanghyunJK JanghyunJK added the upgrade measure PR improves or adds upgrade measures label Jan 14, 2026
@JanghyunJK JanghyunJK changed the base branch from main to ccaradon/sdr_2025_r4 January 14, 2026 16:44
@JanghyunJK
Copy link
Contributor Author

adding some code walk-throughs below


# make list of backup heat options
li_backup_heat_options = %w[match_original_primary_heating_fuel electric_resistance_backup]
li_backup_heat_options = %w[match_original_primary_heating_fuel electric_resistance_backup dual_fuel_gas_furnace_backup]
Copy link
Contributor Author

@JanghyunJK JanghyunJK Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this new option triggers the addition of modeling hybrid gas coil via Coil:UserDefined object


# make list of cchpc scenarios
li_hprtu_scenarios = %w[two_speed_standard_eff two_speed_lab_data variable_speed_high_eff cchpc_2027_spec]
li_hprtu_scenarios = %w[two_speed_standard_eff two_speed_lab_data variable_speed_high_eff cchpc_2027_spec carrier_48qe_dualfuel]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this new option applies performance maps that resemble Carrier's 48QE models

modify_setbacks = OpenStudio::Measure::OSArgument.makeBoolArgument('modify_setbacks', false)
modify_setbacks.setDisplayName('Modify setbacks in heating mode? True will adjust setbacks, according to value in setback value argument.')
modify_setbacks.setDefaultValue(true)
modify_setbacks.setDefaultValue(false)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related to this work, but setting the default as false

end

#### End predefined functions
def create_two_stage_dual_fuel_gas_coil_with_ems(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the method that adds Coil:UserDefined object with EMS

Comment on lines +2053 to +2056
when 'carrier_48qe_dualfuel'
# read performance data
path_data_curve = "#{File.dirname(__FILE__)}/resources/performance_maps_carrier_48qe_dualfuel.json"
custom_data_json = JSON.parse(File.read(path_data_curve))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loading the new json that includes new performance maps

Comment on lines 3290 to 3303
# *********************************************************
# add dual fuel gas coil via ems
# *********************************************************
if (backup_ht_fuel_scheme == 'dual_fuel_gas_furnace_backup')
create_two_stage_dual_fuel_gas_coil_with_ems(
model,
runner,
air_loop_hvac,
new_dx_heating_coil,
orig_htg_coil_gross_cap_old,
new_air_to_air_heatpump,
hybrid_gas_coil_stage_ratio
)
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is where the new hybrid gas coil gets created and added to the airloop "after" the unitary system object

Comment on lines +1228 to +1237
label_map = {
'wholebuilding' => 'wb',
'office' => 'off',
'zone' => 'zn',
'story' => 'stry',
'ground' => 'grnd',
'psz-ac' => '',
'fullservicerestaurant' => 'fsr',
'dining' => 'din',
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to blow up names in ems variables. so created this map but it isn't certainly including all variations we see in our models. maybe it'd be nice to hear about other/better options for this.

@JanghyunJK JanghyunJK requested a review from eringold January 14, 2026 17:08
# Mechanical heating must be active
ems_program.addLine("IF #{s_dx_runtime_frac.name} > 0.0")
ems_program.addLine(" SET mech_heat_enable = 1")
ems_program.addLine("ELSEIF #{s_oat_t.name} < #{hp_min_comp_lockout_temp_f}")
Copy link
Contributor Author

@JanghyunJK JanghyunJK Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 1372: this IF means, hybrid gas coil operates when HP heating is running (and when SAT stpt is not met)

line 1375: this IF means, hybrid gas coil operates when HP is locked out (and when SAT stpt is not met)

num_steps_per_hr = model.getSimulationControl.timestep.get.numberOfTimestepsPerHour

# initialize constants
heating_capacity_stage_1_w, heating_capacity_stage_2_w = get_dual_fuel_gas_coil_capacity(dx_rated_htg_cap_applied)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assigning hybrid gas coil capacities from regressions generated from catalog data

@JanghyunJK
Copy link
Contributor Author

note:

  • merging SDR branch into Main soon, and that includes rubocop changes on HP RTU measure
  • so there may be merge conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upgrade measure PR improves or adds upgrade measures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants