NREL / OpenStudio

OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.
https://www.openstudio.net/
Other
494 stars 188 forks source link

Lifecycle Cost categories in EnergyPlus aren't what I expected #784

Closed DavidGoldwasser closed 10 years ago

DavidGoldwasser commented 10 years ago

@macumber I know that in the forward translation to E+ that I think you used a non-recurring cost for the first occurrence, and then a recurring cost for the future instances, but I thought the category for those costs would be the same. Below are three screenshots from a simple example using the add cost to construcion per area. It is the only lifecycle cost item in the model, other than utility costs added with an E+ measures. The analysis period is 25 years.

Below are the argument fields for the object. 1-12-2014 1-30-26 am

Here is the relevant code in that measure that creates the lifecycle objects.

    #add lifeCycleCost objects if there is a non-zero value in one of the cost arguments
    if costs_requested == true

      #converting doubles to si values from ip
      material_cost_si = OpenStudio::convert(OpenStudio::Quantity.new(material_cost_ip, OpenStudio::createUnit("1/ft^2").get), OpenStudio::createUnit("1/m^2").get).get.value
      demolition_cost_si = OpenStudio::convert(OpenStudio::Quantity.new(demolition_cost_ip, OpenStudio::createUnit("1/ft^2").get), OpenStudio::createUnit("1/m^2").get).get.value
      om_cost_si = OpenStudio::convert(OpenStudio::Quantity.new(om_cost_ip, OpenStudio::createUnit("1/ft^2").get), OpenStudio::createUnit("1/m^2").get).get.value

      #adding new cost items
      lcc_mat = OpenStudio::Model::LifeCycleCost.createLifeCycleCost("LCC_Mat - #{construction.name}", construction, material_cost_si, "CostPerArea", "Construction", expected_life, years_until_costs_start)
      if demo_cost_initial_const
        lcc_demo = OpenStudio::Model::LifeCycleCost.createLifeCycleCost("LCC_Demo - #{construction.name}", construction, demolition_cost_si, "CostPerArea", "Salvage", expected_life, years_until_costs_start)
      else
        lcc_demo = OpenStudio::Model::LifeCycleCost.createLifeCycleCost("LCC_Demo - #{construction.name}", construction, demolition_cost_si, "CostPerArea", "Salvage", expected_life, years_until_costs_start+expected_life)
      end
      lcc_om = OpenStudio::Model::LifeCycleCost.createLifeCycleCost("LCC_OM - #{construction.name}", construction, om_cost_si, "CostPerArea", "Maintenance", om_frequency, 0)

    end #end of costs_requested == true

And here is a screenshot of my new Analysis period cash flow measure. This core code of this is based on Andrew's QAQC measure. 1-12-2014 1-32-08 am

Everything looked fine until 2021. Except for 1k the big "O&M" bar in 2021 should be added to "Capital" costs which currently only shows the demo cost at the first replacement cycle. Then in 2031 all of the costs of the 0&M bar except for 900 should be Capital again. In these case not even demo shows as "Capital" like it did in 2021.

@asparke2 I would like to make a second chart, or an argument to make current day dollar adjusted graph? Or I thought about a simple line chart for total lifecycle cost using this data. I assume I should be able to get out of the SQL or calculate.

@nllong thanks for finding the dimple, works great and almost as easy as adding chart to Excel. Here is the code for it.

var svg = dimple.newSvg("body", 1200, 600);
var data = [<%= data_cashFlow_merge %>];
var myChart = new dimple.chart(svg, data);
myChart.setBounds(60, 30, 1140, 400)
var x = myChart.addCategoryAxis("x", ["Year","Type"]);
x.addOrderRule("Year");
myChart.addMeasureAxis("y", "Cash Flow");
myChart.addSeries("Type", dimple.plot.bar);
myChart.addLegend(60, 10, 1100, 20, "right");
myChart.draw();
DavidGoldwasser commented 10 years ago

For reference, here are the lifecycle objects in the OSM model.

OS:LifeCycleCost,
  {f27aaec3-cc46-49fc-971e-5d670f9f73bf}, !- Handle
  LCC_Mat - ASHRAE 90.1-2004 ExtRoof IEAD ClimateZone 5-6, !- Name
  Construction,                           !- Category
  Construction,                           !- Item Type
  {93f87511-34ea-49f6-960f-3acfc6e2cec7}, !- Item Name
  107.639104167097,                       !- Cost
  CostPerArea,                            !- Cost Units
  ,                                       !- Start of Costs
  ,                                       !- Years from Start
  ,                                       !- Months from Start
  10;                                     !- Repeat Period Years

OS:LifeCycleCost,
  {afb1b713-2822-4a19-a1a7-6a32a3811e53}, !- Handle
  LCC_Demo - ASHRAE 90.1-2004 ExtRoof IEAD ClimateZone 5-6, !- Name
  Salvage,                                !- Category
  Construction,                           !- Item Type
  {93f87511-34ea-49f6-960f-3acfc6e2cec7}, !- Item Name
  32.2917312501292,                       !- Cost
  CostPerArea,                            !- Cost Units
  ,                                       !- Start of Costs
  10,                                     !- Years from Start
  ,                                       !- Months from Start
  10;                                     !- Repeat Period Years

OS:LifeCycleCost,
  {2473a3eb-f94a-42bd-96cd-277cea78199b}, !- Handle
  LCC_OM - ASHRAE 90.1-2004 ExtRoof IEAD ClimateZone 5-6, !- Name
  Maintenance,                            !- Category
  Construction,                           !- Item Type
  {93f87511-34ea-49f6-960f-3acfc6e2cec7}, !- Item Name
  10.7639104167097,                       !- Cost
  CostPerArea,                            !- Cost Units
  ,                                       !- Start of Costs
  ,                                       !- Years from Start
  ,                                       !- Months from Start
  2;                                      !- Repeat Period Years

And here they are in the IDF

! OS:Construction, ASHRAE 90.1-2004 ExtRoof IEAD ClimateZone 5-6
LifeCycleCost:NonrecurringCost,
  LCC_Mat - ASHRAE 90.1-2004 ExtRoof IEAD ClimateZone 5-6, !- Name
  Construction,                           !- Category
  9634.52365676109,                       !- Cost
  ServicePeriod;                          !- Start of Costs

! OS:Construction, ASHRAE 90.1-2004 ExtRoof IEAD ClimateZone 5-6
LifeCycleCost:RecurringCosts,
  LCC_Mat - ASHRAE 90.1-2004 ExtRoof IEAD ClimateZone 5-6 Replacement, !- Name
  Replacement,                            !- Category
  9634.52365676109,                       !- Cost
  ServicePeriod,                          !- Start of Costs
  10,                                     !- Years from Start
  ,                                       !- Months from Start
  10;                                     !- Repeat Period Years

! OS:Construction, ASHRAE 90.1-2004 ExtRoof IEAD ClimateZone 5-6
LifeCycleCost:RecurringCosts,
  LCC_OM - ASHRAE 90.1-2004 ExtRoof IEAD ClimateZone 5-6, !- Name
  Maintenance,                            !- Category
  963.452365676109,                       !- Cost
  ServicePeriod,                          !- Start of Costs
  ,                                       !- Years from Start
  ,                                       !- Months from Start
  2;                                      !- Repeat Period Years

! OS:Construction, ASHRAE 90.1-2004 ExtRoof IEAD ClimateZone 5-6
LifeCycleCost:NonrecurringCost,
  LCC_Demo - ASHRAE 90.1-2004 ExtRoof IEAD ClimateZone 5-6, !- Name
  Salvage,                                !- Category
  2890.35709702834,                       !- Cost
  ServicePeriod,                          !- Start of Costs
  10;                                     !- Years from Start

! OS:Construction, ASHRAE 90.1-2004 ExtRoof IEAD ClimateZone 5-6
LifeCycleCost:RecurringCosts,
  LCC_Demo - ASHRAE 90.1-2004 ExtRoof IEAD ClimateZone 5-6 Recurring, !- Name
  Replacement,                            !- Category
  2890.35709702834,                       !- Cost
  ServicePeriod,                          !- Start of Costs
  20,                                     !- Years from Start
  ,                                       !- Months from Start
  10;                                     !- Repeat Period Years

Looks like changing the objects using "Replacement" as a category to use "Construction" should get what I'm looking for. Is there any reason it has to be "Replacement".

macumber commented 10 years ago

@DavidGoldwasser look in the EnergyPlus IDD, I think those two objects have different allowable values for category

DavidGoldwasser commented 10 years ago

@macumber I didn't realize that, but see that now that I look at the input output guide. I even tried "MajorOverhall" But don't think that worked.Maybe this will require an e+ update in figure version. Maybe for now I should lump Capital and O&M together and just leave energy separate. I was also thinking of hiding water until there is a way to cost that.

DavidGoldwasser commented 10 years ago

I created a merged heading called "Building" that combines "Capital" and "O&M". If in the future EnergyPlus supports recurring capital cost I can break them out.