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

Revision history [back]

Set Custom Boiler Curves

Hello Unment!

I am currently writing a measure to replace the existing hot water boiler curves with custom bi cubic and bi quadratic curve coefficients. I have run into an issue with the curve replacement. I run through the current curves for the boilers and delete them, and then try to plunk in the new curve objects.

I've been met with this error within the hot water boiler object field:

"Undefined method setNormalizedBoilerEfficiencyCurveName for #.

I convert the hot water boiler to the correct class but I am not sure why I am unable to access this field? I am able to modify the other fields of the Boiler object besides the ones with hashed values. Bellow is code for reference.

# define the new Biquadratic curve object
condensingBoilerEfficiency = OpenStudio::Model::CurveBiquadratic.new(model)
condensingBoilerEfficiency.setName("CondensingBoilerEff")
condensingBoilerEfficiency.setCoefficient1Constant(1.124970374)
condensingBoilerEfficiency.setCoefficient2x(0.014963852)
condensingBoilerEfficiency.setCoefficient3xPOW2(-0.02599835)
condensingBoilerEfficiency.setCoefficient4y(0)
condensingBoilerEfficiency.setCoefficient5yPOW2(-0.00000140464)
condensingBoilerEfficiency.setCoefficient6xTIMESY(-0.00153624)
condensingBoilerEfficiency.setMinimumValueofx(0.1)
condensingBoilerEfficiency.setMaximumValueofx(1.0)
condensingBoilerEfficiency.setMinimumValueofy(30)
condensingBoilerEfficiency.setMaximumValueofy(85)



    model.getCurves.each do |curve|
      if curve.name.to_s == "Boiler with No Minimum Turndown"
        handle = curve.handle
        model.removeObject(curve.handle)

      end

    end
    water_unit = boiler_water.to_BoilerHotWater.get
    water_unit.setName("CondensingBoilerEff")
    water_unit.setNormalizedBoilerEfficiencyCurveName("CondensingBoilerEff")
    water_unit.setNominalThermalEfficiency(1)

  end

here is a reference to the class that I am using. Any help would be greatly appreciated!

Particle Swarm

Set Custom Boiler Curves

Hello Unment!

I am currently writing a measure to replace the existing hot water boiler curves with custom bi cubic and bi quadratic curve coefficients. I have run into an issue with the curve replacement. I run through the current curves for the boilers and delete them, and then try to plunk in the new curve objects.

I've been met with this error within the hot water boiler object field:

"Undefined method setNormalizedBoilerEfficiencyCurveName for #.

I convert the hot water boiler to the correct class but I am not sure why I am unable to access this field? I am able to modify the other fields of the Boiler object besides the ones with hashed values. Bellow is code for reference.

# define the new Biquadratic curve object
condensingBoilerEfficiency = OpenStudio::Model::CurveBiquadratic.new(model)
condensingBoilerEfficiency.setName("CondensingBoilerEff")
condensingBoilerEfficiency.setCoefficient1Constant(1.124970374)
condensingBoilerEfficiency.setCoefficient2x(0.014963852)
condensingBoilerEfficiency.setCoefficient3xPOW2(-0.02599835)
condensingBoilerEfficiency.setCoefficient4y(0)
condensingBoilerEfficiency.setCoefficient5yPOW2(-0.00000140464)
condensingBoilerEfficiency.setCoefficient6xTIMESY(-0.00153624)
condensingBoilerEfficiency.setMinimumValueofx(0.1)
condensingBoilerEfficiency.setMaximumValueofx(1.0)
condensingBoilerEfficiency.setMinimumValueofy(30)
condensingBoilerEfficiency.setMaximumValueofy(85)



    model.getCurves.each do |curve|
      if curve.name.to_s == "Boiler with No Minimum Turndown"
        handle = curve.handle
        model.removeObject(curve.handle)

      end

    end
    water_unit = boiler_water.to_BoilerHotWater.get
    water_unit.setName("CondensingBoilerEff")
    water_unit.setNormalizedBoilerEfficiencyCurveName("CondensingBoilerEff")
    water_unit.setNominalThermalEfficiency(1)

  end

here is a reference to the class that I am using. Any help would be greatly appreciated!

Particle Swarm