Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added emissions reporting for different fuel types #108

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

rawadelkontar
Copy link
Collaborator

No description provided.

Copy link
Contributor

@bonnema bonnema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think when we get the measure looking good, we also want to update the measure XML

@@ -345,6 +368,9 @@ def run(model, runner, usr_args)
ems_prgm.addLine("SET his_hr_intensity = his_hr * 1000 / #{floor_area}") # unit: kg/ft2 - changed mt to kg
ems_prgm.addLine("SET fut_yr_intensity = fut_yr * 1000 / #{floor_area}") # unit: kg/ft2 - changed mt to kg
ems_prgm.addLine("SET his_yr_intensity = his_yr * 1000 / #{floor_area}") # unit: kg/ft2 - changed mt to kg

#nat gas
ems_prgm.addLine("SET nat_gas_intensity = nat_gas * 1000 / #{floor_area}") # unit: kg/ft2 - changed mt to kg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The units here are confusing. What are the units that are ultimately desired? kilograms per square foot? It seems like we're converting to from kilograms to metric tons then back to kilograms. Just leave it at kilograms if that is what is desired in the end.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nllong requested metric ton (mt) . I can make the emissions intensity in metric ton per square feet. In this case we dont convert back to kg

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

total annual should be metric ton, but intensities are kg/ft2.

ems_prgm.addLine('SET conv = 1000000 * 60 * 60') # J to MWh (1000000J/MJ * 60hr/min * 60 min/sec)
ems_prgm.addLine('SET conv_kg_mt = 0.001') # kg to metric ton
ems_prgm.addLine('SET nat_gas = (nat_gas_val * gas / conv) * conv_kg_mt')

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra lines

ems_var5.setTypeOfDataInVariable('Summed')
ems_var5.setUpdateFrequency('SystemTimestep')
ems_var5.setEMSProgramOrSubroutineName(ems_prgm)
ems_var5.setUnits('kg/ft2')
ems_var5.setUnits('mt')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same units question

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will make it mt/ft2

# add natural gas intensity reporting output variable
out_var10 = OpenStudio::Model::OutputVariable.new('Natural_Gas_Emissions_Intensity_Var', model)
out_var10.setKeyValue('EMS')
out_var10.setReportingFrequency('hourly')

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason you added the natural gas in the middle and then incremented the existing objects? it makes the diff messier, couldn't you just add the natural gas at the end? maybe there is a reason, but I was curious.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no reason. I will replace the natural gas, propane, fuel oil to be at the end.

@@ -285,6 +285,7 @@ def run(model, runner, usr_args)
lim_type.setName('Emissions Sch File Type Limits')

# add future schedule file
puts "fut_hr_file = #{fut_hr_file}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can probably remove this print statement

@@ -296,6 +297,7 @@ def run(model, runner, usr_args)
sch_file.setMinutesperItem(60)

# add historical schedule file
puts "his_hr_file = #{his_hr_file}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can probably remove this print statement

fut_sens = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Schedule Value')
fut_sens.setKeyName("#{future_subregion} #{future_year} Future Hourly Emissions Sch")
fut_sens.setName('Fut_Sen')

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra line

sch_sens = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Schedule Value')
sch_sens.setKeyName("#{future_subregion} #{future_year} Future Hourly Emissions Sch")
sch_sens.setName('Fut_Sen')
fut_sens = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Schedule Value')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing the sensor name!

sch_sens = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Schedule Value')
sch_sens.setKeyName("#{hourly_historical_subregion} #{hourly_historical_year} Historical Hourly Emissions Sch")
sch_sens.setName('His_Sen')
his_sens = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Schedule Value')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing the sensor name!

ems_prgm.addLine('SET lpg_val = 323.896704')
ems_prgm.addLine('SET lpg = Lpg_Sen')
ems_prgm.addLine('SET conv = 1000000 * 60 * 60') # J to MWh (1000000J/MJ * 60hr/min * 60 min/sec)
ems_prgm.addLine('SET conv_kg_mt = 0.001') # kg to metric ton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to repeat setting these conversion lines

ems_prgm.addLine('SET fo1_val = 294.962046')
ems_prgm.addLine('SET fo1 = Fo1_Sen')
ems_prgm.addLine('SET conv = 1000000 * 60 * 60') # J to MWh (1000000J/MJ * 60hr/min * 60 min/sec)
ems_prgm.addLine('SET conv_kg_mt = 0.001') # kg to metric ton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to repeat setting these conversion lines

ems_prgm.addLine('SET fo2_val = 294.962046')
ems_prgm.addLine('SET fo2 = Fo2_Sen')
ems_prgm.addLine('SET conv = 1000000 * 60 * 60') # J to MWh (1000000J/MJ * 60hr/min * 60 min/sec)
ems_prgm.addLine('SET conv_kg_mt = 0.001') # kg to metric ton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to repeat setting these conversion lines

ems_prgm.addLine("SET nat_gas_em_intensity = nat_gas_em / #{floor_area}")
ems_prgm.addLine("SET lpg_em_intensity = lpg_em / #{floor_area}")
ems_prgm.addLine("SET lpg_em_intensity = fo1_em / #{floor_area}")
ems_prgm.addLine("SET lpg_em_intensity = fo2_em / #{floor_area}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add unit comments back in? I think you said mt/ft2

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah add units, but intensities are reported in kgCO2/ft2/year.

out_var16 = OpenStudio::Model::OutputVariable.new('FuelOil2_Emissions_Intensity_Var', model)
out_var16.setKeyValue('EMS')
out_var16.setReportingFrequency('hourly')

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra line

Copy link
Contributor

@bonnema bonnema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me! maybe a quick measure XML update, and you can merge?

Copy link
Member

@nllong nllong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great! One comment regarding the units that needs addressed.

ems_prgm.addLine("SET fut_yr_intensity = fut_yr * 1000 / #{floor_area}") # unit: kg/ft2 - changed mt to kg
ems_prgm.addLine("SET his_yr_intensity = his_yr * 1000 / #{floor_area}") # unit: kg/ft2 - changed mt to kg
#add emissions intensity metric
ems_prgm.addLine("SET fut_hr_intensity = fut_hr / #{floor_area}") # unit mt/ft2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the confusion in the past. The units are

  • Total annual = metric tons (mt/year)
  • annual intensities = kilogram CO2e / ft2 (kgCO2e/ft^2) or (kgCO2e/ft^2/year)

@nllong
Copy link
Member

nllong commented Jun 20, 2022

From the Carbon Spec Doc.

image

image

@mdahlhausen
Copy link
Collaborator

Adding comments here per @DavidGoldwasser suggestion:

I don't think hourly emissions from one particular year are necessarily that helpful from a building design perspective. The res team is using a 30-year average of long-run marginal emissions, which I think is a more sensible approach. Thanks to Elaina Present for thinking through it.

Data here:
https://github.com/NREL/resstock/tree/develop/resources/data/cambium

I made a measure that implements it for ComStock:
https://github.com/NREL/comstock-internal/pull/119

@nllong nllong mentioned this pull request Jun 22, 2022
@kflemin kflemin marked this pull request as draft June 22, 2022 21:29
@DavidGoldwasser
Copy link
Collaborator

@rawadelkontar I assume this isn't needed for next measure gem release? If it is lets try to get it ready to merge later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants