Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

Looks like a bug due to a typo here. Feel free to open an issue in the OpenStudio repo. As a workaround you could write a simple EnergyPlus measure to fix the IDF after it's been translated by OpenStudio.

https://github.com/NREL/OpenStudio/blame/1e4f9fda38c9a4917b3a4a196a6c9f80d469502c/src/energyplus/ForwardTranslator/ForwardTranslateElectricLoadCenterStorageConverter.cpp#L75-L85

// SimpleFixedEfficiency, optD
optD = modelObject.simpleFixedEfficiency();
if (optD) {
  idfObject.setDouble(ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, *optD);
}

// designMaximumContinuousInputPower, optD
optD = modelObject.designMaximumContinuousInputPower();
if (optD) {
  idfObject.setDouble(ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, *optD);
}

Looks like a bug due to a typo here. (see below). Feel free to open an issue in the OpenStudio repo. As a workaround you could write a simple EnergyPlus measure to fix the IDF after it's been translated by OpenStudio.

https://github.com/NREL/OpenStudio/blame/1e4f9fda38c9a4917b3a4a196a6c9f80d469502c/src/energyplus/ForwardTranslator/ForwardTranslateElectricLoadCenterStorageConverter.cpp#L75-L85

// SimpleFixedEfficiency, optD
optD = modelObject.simpleFixedEfficiency();
if (optD) {
  idfObject.setDouble(ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, *optD);
}

// designMaximumContinuousInputPower, optD
optD = modelObject.designMaximumContinuousInputPower();
if (optD) {
  idfObject.setDouble(ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, *optD);
}

Looks like a bug due to a copy/paste typo (see below). below) where the code to ForwardTranslate the _Design Maximum Continuous Input Power_ field is actually setting the _Simple Fixed Efficiency_ field and using the same variable optD.

Feel free to open an issue in the OpenStudio repo. As a workaround you could write a simple EnergyPlus measure to fix the IDF after it's been translated by OpenStudio.

https://github.com/NREL/OpenStudio/blame/1e4f9fda38c9a4917b3a4a196a6c9f80d469502c/src/energyplus/ForwardTranslator/ForwardTranslateElectricLoadCenterStorageConverter.cpp#L75-L85

// SimpleFixedEfficiency, optD
optD = modelObject.simpleFixedEfficiency();
if (optD) {
  idfObject.setDouble(ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, *optD);
}

// designMaximumContinuousInputPower, optD
optD = modelObject.designMaximumContinuousInputPower();
if (optD) {
  idfObject.setDouble(ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, *optD);
}

Cause

Looks like a bug due to a copy/paste typo (see below) where the code to ForwardTranslate the _Design Maximum Continuous Input Power_ field is actually setting the _Simple Fixed Efficiency_ field and using the same variable optD.

Feel free to open an issue in the OpenStudio repo. As a workaround you could write a simple EnergyPlus measure to fix the IDF after it's been translated by OpenStudio.

https://github.com/NREL/OpenStudio/blame/1e4f9fda38c9a4917b3a4a196a6c9f80d469502c/src/energyplus/ForwardTranslator/ForwardTranslateElectricLoadCenterStorageConverter.cpp#L75-L85

// SimpleFixedEfficiency, optD
optD = modelObject.simpleFixedEfficiency();
if (optD) {
  idfObject.setDouble(ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, *optD);
}

// designMaximumContinuousInputPower, optD
optD = modelObject.designMaximumContinuousInputPower();
if (optD) {
  idfObject.setDouble(ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, *optD);
}

Solution

As a workaround you could write a simple EnergyPlus measure to fix the IDF after it's been translated by OpenStudio, which would look something like this.

# get all objects
electric_load_center_storage_converters = workspace.getObjectsByType('ElectricLoadCenter:Storage:Converter'.to_IddObjectType)
# OR
# get one object, e.g. if there's only one in the model
electric_load_center_storage_converter = workspace.getObjectsByType('ElectricLoadCenter:Storage:Converter'.to_IddObjectType).first

# set Simple Fixed Efficiency field to 0 rather than what's entered in the Design Maximum Continuous Input Power field
design_maximum_continuous_input_power = electric_load_center_storage_converter.setDouble(3, 0)

Cause

Looks like a bug due to a copy/paste typo (see below) where the code to ForwardTranslate the _Design Design Maximum Continuous Input Power_ Power field is actually setting the _Simple Simple Fixed Efficiency_ Efficiency field and using the same variable optD. Feel free to open an issue in the OpenStudio repo.

https://github.com/NREL/OpenStudio/blame/1e4f9fda38c9a4917b3a4a196a6c9f80d469502c/src/energyplus/ForwardTranslator/ForwardTranslateElectricLoadCenterStorageConverter.cpp#L75-L85

// SimpleFixedEfficiency, optD
optD = modelObject.simpleFixedEfficiency();
if (optD) {
  idfObject.setDouble(ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, *optD);
}

// designMaximumContinuousInputPower, optD
optD = modelObject.designMaximumContinuousInputPower();
if (optD) {
  idfObject.setDouble(ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, *optD);
}

Solution

As a workaround you could write a simple EnergyPlus measure to fix the IDF after it's been translated by OpenStudio, which would look something like this.

# get all objects
electric_load_center_storage_converters = workspace.getObjectsByType('ElectricLoadCenter:Storage:Converter'.to_IddObjectType)
# OR
# get one object, e.g. if there's only one in the model
electric_load_center_storage_converter = workspace.getObjectsByType('ElectricLoadCenter:Storage:Converter'.to_IddObjectType).first

# set Simple Fixed Efficiency field to 0 rather than what's entered in the Design Maximum Continuous Input Power field
design_maximum_continuous_input_power = electric_load_center_storage_converter.setDouble(3, 0)

Cause

Looks like a bug due to a copy/paste typo (see below) where the code to ForwardTranslate the Design Maximum Continuous Input Power field is actually setting the Simple Fixed Efficiency field and using the same variable optD. Feel free to open an issue in the OpenStudio repo.

https://github.com/NREL/OpenStudio/blame/1e4f9fda38c9a4917b3a4a196a6c9f80d469502c/src/energyplus/ForwardTranslator/ForwardTranslateElectricLoadCenterStorageConverter.cpp#L75-L85

// SimpleFixedEfficiency, optD
optD = modelObject.simpleFixedEfficiency();
if (optD) {
  idfObject.setDouble(ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, *optD);
}

// designMaximumContinuousInputPower, optD
optD = modelObject.designMaximumContinuousInputPower();
if (optD) {
  idfObject.setDouble(ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, *optD);
}

Solution

As a workaround you could write a simple EnergyPlus measure to fix the IDF after it's been translated by OpenStudio, which would look something like this.

# get all objects
electric_load_center_storage_converters = workspace.getObjectsByType('ElectricLoadCenter:Storage:Converter'.to_IddObjectType)
# OR
# get one object, e.g. if there's only one in the model
electric_load_center_storage_converter = workspace.getObjectsByType('ElectricLoadCenter:Storage:Converter'.to_IddObjectType).first

# set Simple Fixed Efficiency field to 0 rather than what's entered in the Design Maximum Continuous Input Power field
design_maximum_continuous_input_power = electric_load_center_storage_converter.setDouble(3, 0)

Cause

Looks like a bug due to a copy/paste typo (see below) where the code to ForwardTranslate the Design Maximum Continuous Input Power field is actually setting the Simple Fixed Efficiency field and using the same variable optD. Feel free to open an issue in the OpenStudio repo.

https://github.com/NREL/OpenStudio/blame/1e4f9fda38c9a4917b3a4a196a6c9f80d469502c/src/energyplus/ForwardTranslator/ForwardTranslateElectricLoadCenterStorageConverter.cpp#L75-L85

https://github.com/NREL/OpenStudio/blob/develop/src/energyplus/ForwardTranslator/ForwardTranslateElectricLoadCenterStorageConverter.cpp#L75-L85

// SimpleFixedEfficiency, optD
optD = modelObject.simpleFixedEfficiency();
if (optD) {
  idfObject.setDouble(ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, *optD);
}

// designMaximumContinuousInputPower, optD
optD = modelObject.designMaximumContinuousInputPower();
if (optD) {
  idfObject.setDouble(ElectricLoadCenter_Storage_ConverterFields::SimpleFixedEfficiency, *optD);
}

I opened an issue in the OpenStudio SDK repo here.

https://github.com/NREL/OpenStudio/issues/4174


Solution

As a workaround you could write a simple EnergyPlus measure to fix the IDF after it's been translated by OpenStudio, which would look something like this.

# get all objects
electric_load_center_storage_converters = workspace.getObjectsByType('ElectricLoadCenter:Storage:Converter'.to_IddObjectType)
# OR
# get one object, e.g. if there's only one in the model
electric_load_center_storage_converter = workspace.getObjectsByType('ElectricLoadCenter:Storage:Converter'.to_IddObjectType).first

# set Simple Fixed Efficiency field to 0 rather than what's entered in the Design Maximum Continuous Input Power field
electric_load_center_storage_converter.setDouble(3, 0)