Skip to content

Add hot-gas reheat unitary system (Coil:Heating:Desuperheater) - #1

Closed
Ski90Moo wants to merge 3 commits into
developfrom
feature/desuperheater-hotgas-reheat
Closed

Ski90Moo wants to merge 3 commits into
developfrom
feature/desuperheater-hotgas-reheat

Conversation

@Ski90Moo

Copy link
Copy Markdown
Owner

Summary

  • Adds a new default HVAC library template, "Unitary - Single Speed DX cooling - Elec heat - CAV - Hotgas reheat", pairing the existing single-speed DX cooling coil with a new Coil:Heating:Desuperheater as the supplemental/reheat coil under CoolReheat dehumidification control, so reheat is sourced from the cooling coil's waste heat instead of resistance heat.
  • Fixes AirLoopHVACUnitarySystem cloning (drag-from-library and "copy system"): ModelObject::clone() only remaps true parent-child relationships, so lateral (sibling-to-sibling) object-list references — like CoilHeatingDesuperheater::heatingSource() — were left pointing at the original objects after a clone. Replaced the initial desuperheater-specific fix with a generic post-clone reference remapper (buildCloneHandleMap + remapLateralReferences, using IddObject::objectLists()/WorkspaceObject::getTarget()/setPointer()) so it covers this bug class generically rather than one special case per object type.
  • Adds .gitignore rules for the in-source CMake/Conan/Qt build artifacts this repo's local build layout produces (it builds in-place at the repo root rather than out-of-source), including AnalyticsHelperSecrets.hxx, which is populated with real secret values at configure time and should never be committed.

Test plan

  • cmake --build . --target openstudio_lib --config Release succeeds
  • Drag the new "Hotgas reheat" system onto a zone in the App UI and confirm the desuperheater coil wires up correctly in the HVAC diagram
  • Run a simulation on a model using the new system and confirm no EnergyPlus errors
  • Exercise "copy system" on an existing loop containing a desuperheater coil and confirm heatingSource() is correctly re-linked on the clone

🤖 Generated with Claude Code

Ski90Moo and others added 3 commits July 14, 2026 11:42
Adds 'Unitary - Single Speed DX cooling - Elec heat - CAV - Hotgas reheat' to
the default HVAC library, using CoolReheat dehumidification control with a
Coil:Heating:Desuperheater as the reheat coil. The desuperheater reclaims
waste heat from the unitary system's own DX cooling coil rather than using
resistance reheat, avoiding the extra energy cost of electric reheat.

Also fixes AirLoopHVACUnitarySystem cloning (drag-from-library and "copy
system"): ModelObject::clone() only remaps parent-child ownership, but
CoilHeatingDesuperheater::heatingSource() is a lateral reference to a sibling
coil, so it was left unset on the clone. fixupClonedDesuperheaterHeatingSource()
re-links the cloned desuperheater coil to the cloned cooling coil.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ModelObject::clone() clones each child individually and reattaches it via
setParent(), so parent-child edges are correctly remapped, but lateral
(sibling-to-sibling) object-list references within the cloned subtree are
left pointing at the original objects. The previous fix special-cased just
CoilHeatingDesuperheater::heatingSource(), but the same bug applies to any
lateral reference (e.g. SetpointManager:MixedAir's node fields).

Replace it with a generic fixup: build an old-handle -> clone map by
walking the original and cloned subtrees in parallel, then use
IddObject::objectLists()/WorkspaceObject::getTarget()/setPointer() to
rewrite any object-list field in the clone that still points into the
original subtree. This fixes the desuperheater case as before, and any
future lateral-reference case, without needing a new special case per
object type.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This repo is built in-place at the repo root rather than in an
out-of-source build/ dir, so CMake, Conan, MSBuild, and Qt's moc/rcc all
drop generated files directly alongside tracked source. None of that was
covered by the existing (out-of-source-build-oriented) ignore rules,
so every local build left ~150+ untracked files/dirs in git status.

Also ignores the handful of configure_file()-generated files produced
from tracked .in templates -- notably AnalyticsHelperSecrets.hxx, which
is populated with real secret values at configure time and should never
be committed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Ski90Moo

Copy link
Copy Markdown
Owner Author

Closing — this bundled the desuperheater feature commits along with the gitignore commit by mistake. Gitignore-only PR is #2; the desuperheater work will get its own PR separately.

@Ski90Moo Ski90Moo closed this Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant