Skip to content

Hard crash in WAHP CurveValue lookup #11025

@Myoldmopar

Description

@Myoldmopar

Issue overview

Summary

There is a hard crash occurring in a defect file when CurveValue is evaluated in the WAHP code. I tracked down the issue, but I'm not able to provide the defect file just yet in case it contains anything proprietary. It's pretty easy to see what's going on though.

Detective Work

In the WaterToAirHeatPumpSimple.cc file, inside GetSimpleWatertoAirHPInput(), the curves are retrieved from the curve manager. If the curve lookup is invalid, it sets ErrorsFound to true. This occurs in both develop and the curve API branch:

This is all good, except that just a little while later in the same get input routine, there is a call to CheckSimpleWAHPRatedCurvesOutput:

The CheckSimpleWAHPRatedCurvesOutput ends up making an attempted call to CurveValue on develop, or wahp.TotalCoolCapCurve->v on the CurveAPI branch, which causes the hard crash.

Fix

I'm guessing that we just need to check ErrorsFound before making the call to CheckSimpleWAHPRatedCurvesOutputs, and I think the rest of the get input could continue "successfully". It should still respect the ErrorsFound variable and give a fatal error, but it should be OK to continue processing the remaining objects.

Verify

I will try to get a defect file, but if it turns out I can't, the assignee can work up an example file that misspells the total cooling capacity curve on the simple WAHP. Alternatively, I can just verify the fix locally on the actual defect file and report back. Either way, a unit test should be moderately easy to set up to confirm.

Operating System (Multiple choices)

Any

Operating System Version

Any

Version of EnergyPlus

Reported with 24.2, transitioned and confirmed still occurs with 25.1

Unmethours link or helpdesk ticket number

N/A

Defect file

No response

Metadata

Metadata

Assignees

Labels

TriageIssue needs to be assessed and labeled, further information on reported might be neededUnconfirmedDefectDefect has not yet confirmed to be an actual issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions