NREL / EnergyPlus

EnergyPlus™ is a whole building energy simulation program that engineers, architects, and researchers use to model both energy consumption and water use in buildings.
https://energyplus.net
Other
1.07k stars 381 forks source link

Humidifier:Steam:Gas cannot find efficiency curve name #4992

Closed mjwitte closed 9 years ago

mjwitte commented 9 years ago

Helpdesk ticket 10579 User: I'm trying to use the new Humidifier:Steam:Gas object, and my simulation is crashing because the Thermal Efficiency Modifier Curve Name is not found. I've tried several different types of curve objects, including the curve from the example file, and none of them can be found. The example file does run successfully.

Reply: I see the problem in the code. The wrong variable name is being used when querying the curve manager. Frankly I'm not sure how the example file runs successfully - that's just a fluke. I cannot find a workaround.

The problem is here in the code https://github.com/NREL/EnergyPlus/blob/develop/src/EnergyPlus/Humidifiers.cc#L379

Humidifier( HumNum ).EfficiencyCurvePtr = GetCurveIndex( cAlphaArgs( 3 ) ); cAlphaArgs should be Alphas. And a few lines later } else if ( !lAlphaFieldBlanks( 3 ) ) { lAlphaFieldBlanks should be lAlphaBlanks

Nigusse commented 9 years ago

Committed bug fix and unit test codes. Run Energyplus test suite, found no diffs. Diffs were not expected. Also fixed other unit tests failure triggered by the new unit test added.

rraustad commented 9 years ago

This bug fix affects only the GetInput for the gas humidifier and corrects a cut-n-paste error with the correct value. Incorrect variable used: Humidifier( HumNum ).EfficiencyCurvePtr = GetCurveIndex( cAlphaArgs( 3 ) );

Changed to correct variable: Humidifier( HumNum ).EfficiencyCurvePtr = GetCurveIndex( Alphas( 3 ) );

Commendable effort on unit test development since I was also involved in what was required to call GetInput in a unit test environment.