lib/measures/ConstructionLayerZeroMaterialProperties/measure.rb in openstudio-calibration-0.9.0 vs lib/measures/ConstructionLayerZeroMaterialProperties/measure.rb in openstudio-calibration-0.10.0

- old
+ new

@@ -104,11 +104,11 @@ specific_heat.setUnits('J/(kg*K)') specific_heat.setDefaultValue(0) args << specific_heat args - end # end the arguments method + end # define what happens when the measure is run def run(model, runner, user_arguments) super(model, runner, user_arguments) @@ -141,11 +141,11 @@ construction = construction.get.to_Construction.get else runner.registerError('Script Error - argument not showing up as construction.') return false end - end # end of if construction.empty? + end initial_r_value_ip = OpenStudio.convert(1.0 / construction.thermalConductance.to_f, 'm^2*K/W', 'ft^2*h*R/Btu') runner.registerInitialCondition("The Initial R-value of #{construction.name} is #{initial_r_value_ip} (ft^2*h*R/Btu).") runner.registerValue('initial_r_value_ip', initial_r_value_ip.to_f, 'ft^2*h*R/Btu') # get layers @@ -182,10 +182,10 @@ final_r_value_ip = OpenStudio.convert(1 / construction.thermalConductance.to_f, 'm^2*K/W', 'ft^2*h*R/Btu') runner.registerFinalCondition("The Final R-value of #{construction.name} is #{final_r_value_ip} (ft^2*h*R/Btu).") runner.registerValue('final_r_value_ip', final_r_value_ip.to_f, 'ft^2*h*R/Btu') true - end # end the run method -end # end the measure + end +end # this allows the measure to be used by the application ConstructionLayerZeroMaterialProperties.new.registerWithApplication