First time here? Check out the Help page!
1 | initial version |
@Yan, I think you are right, looking at the code, it seems I may not have been able to directly enter therms for "The Conversion Factor Choice; so I convert from $/therm to $/kBtu within the measure. So the unit in the measure argument should be "$/therm". I'll review this, fix and push an update to BCL. Below is the relevant code. It affects both district heating and cooling.
# distclg tariff object
if args['distclg_rate'] > 0
new_object_string = "
UtilityCost:Tariff,
DistrictCooling Tariff, !- Name
DistrictCooling:Facility, !- Output Meter Name
KBtu, !- Conversion Factor Choice
, !- Energy Conversion Factor
, !- Demand Conversion Factor
, !- Time of Use Period Schedule Name
, !- Season Schedule Name
, !- Month Schedule Name
Day, !- Demand Window Length
0.0; !- Monthly Charge or Variable Name
"
distclg_tariff = workspace.addObject(OpenStudio::IdfObject::load(new_object_string).get).get
# make UtilityCost:Charge:Simple objects for distclg
#value = OpenStudio::convert(args['gas_rate'],"1/therms","1/Kbtu").get # todo - get conversion working
value = args['distclg_rate']/99.98 # $/therm to $/Kbtu
new_object_string = "
UtilityCost:Charge:Simple,
DistrictCoolingTariffEnergyCharge, !- Name
DistrictCooling Tariff, !- Tariff Name
totalEnergy, !- Source Variable
Annual, !- Season
EnergyCharges, !- Category Variable Name
#{value}; !- Cost per Unit Value or Variable Name
"
distclg_utility_cost = workspace.addObject(OpenStudio::IdfObject::load(new_object_string).get).get
end
2 | No.2 Revision |
@Yan, I think you are right, looking at the code, it seems I may not have been able to directly enter therms for "The Conversion Factor Choice; so I convert from $/therm dollars/therm to $/kBtu dollars/kBtu within the measure. So the unit in the measure argument should be "$/therm". I'll review this, fix and push an update to BCL. Below is the relevant code. It affects both district heating and cooling.
# distclg tariff object
if args['distclg_rate'] > 0
new_object_string = "
UtilityCost:Tariff,
DistrictCooling Tariff, !- Name
DistrictCooling:Facility, !- Output Meter Name
KBtu, !- Conversion Factor Choice
, !- Energy Conversion Factor
, !- Demand Conversion Factor
, !- Time of Use Period Schedule Name
, !- Season Schedule Name
, !- Month Schedule Name
Day, !- Demand Window Length
0.0; !- Monthly Charge or Variable Name
"
distclg_tariff = workspace.addObject(OpenStudio::IdfObject::load(new_object_string).get).get
# make UtilityCost:Charge:Simple objects for distclg
#value = OpenStudio::convert(args['gas_rate'],"1/therms","1/Kbtu").get # todo - get conversion working
value = args['distclg_rate']/99.98 # $/therm to $/Kbtu
new_object_string = "
UtilityCost:Charge:Simple,
DistrictCoolingTariffEnergyCharge, !- Name
DistrictCooling Tariff, !- Tariff Name
totalEnergy, !- Source Variable
Annual, !- Season
EnergyCharges, !- Category Variable Name
#{value}; !- Cost per Unit Value or Variable Name
"
distclg_utility_cost = workspace.addObject(OpenStudio::IdfObject::load(new_object_string).get).get
end
3 | No.3 Revision |
@Yan, I think you are right, looking at the code, it seems I may not have been able to directly enter therms for "The Conversion Factor Choice; so I convert from dollars/therm to dollars/kBtu within the measure. So the unit in the measure argument should be "$/therm". I'll review this, fix and push an update to BCL. Below is the relevant code. It affects both district heating and cooling.cooling. Thanks for pointing this out!
# distclg tariff object
if args['distclg_rate'] > 0
new_object_string = "
UtilityCost:Tariff,
DistrictCooling Tariff, !- Name
DistrictCooling:Facility, !- Output Meter Name
KBtu, !- Conversion Factor Choice
, !- Energy Conversion Factor
, !- Demand Conversion Factor
, !- Time of Use Period Schedule Name
, !- Season Schedule Name
, !- Month Schedule Name
Day, !- Demand Window Length
0.0; !- Monthly Charge or Variable Name
"
distclg_tariff = workspace.addObject(OpenStudio::IdfObject::load(new_object_string).get).get
# make UtilityCost:Charge:Simple objects for distclg
#value = OpenStudio::convert(args['gas_rate'],"1/therms","1/Kbtu").get # todo - get conversion working
value = args['distclg_rate']/99.98 # $/therm to $/Kbtu
new_object_string = "
UtilityCost:Charge:Simple,
DistrictCoolingTariffEnergyCharge, !- Name
DistrictCooling Tariff, !- Tariff Name
totalEnergy, !- Source Variable
Annual, !- Season
EnergyCharges, !- Category Variable Name
#{value}; !- Cost per Unit Value or Variable Name
"
distclg_utility_cost = workspace.addObject(OpenStudio::IdfObject::load(new_object_string).get).get
end