Skip to content

MeasuredPillarLayer::clone() missing -- measured conductance lost during IGU copy #246

@vidanovic

Description

@vidanovic

Problem

MeasuredPillarLayer inherits from CIGUGapLayer but does not override clone(). The base CIGUGapLayer::clone() does:

std::shared_ptr<CBaseLayer> CIGUGapLayer::clone() const
{
    return std::make_shared<CIGUGapLayer>(*this);
}

This slices MeasuredPillarLayer to a plain CIGUGapLayer, losing:

  • m_MeasuredConductance (the computed pillar conductance from cStar())
  • The calculateConvectionOrConductionFlow() override

Impact

When CSingleSystem copies the IGU in its constructor, all layers are cloned. The measured pillar gap becomes a plain air gap at 0 pressure. The solver then computes thermal performance without the pillar conductance.

The NFRC102_NFRC102_VacuumMeasuredPillar test passes on main, but with values that correspond to a vacuum gap without pillar conductance (U-value ~2.06) rather than a gap with measured pillar conductance of 65.7 W/m²K (U-value ~5.34).

How to verify on main branch

Put a breakpoint in MeasuredPillarLayer::calculateConvectionOrConductionFlow() (SupportPillarMeasured.cpp line 53) and run the NFRC102_NFRC102_VacuumMeasuredPillar test. The breakpoint will never be hit during the solver iterations because the cloned layer in the solver's IGU is a CIGUGapLayer, not a MeasuredPillarLayer.

Related

Same category of inheritance/clone bug as #245 (environment surface disconnection during replaceLayer).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions