GUIDEBOOK · HOW-TOS

Variable naming in CEA

Variable naming in CEA

A reference for naming variables in CEA. Read this before adding new variables to the code so that names stay consistent with the rest of the codebase.

📖 For the full list of variables actually in use (with descriptions, units, and ranges), see the Variable & File Glossary — auto-generated from cea/schemas.yml.


1. Demand-side load nomenclature

(LOAD_TYPE)(LOAD)_(LOSSES)_(UNITS)

Load type

CodeMeaning
QThermal
EElectrical

Load

CodeMeaning
alAppliances
cdataData-centre cooling
csSpace cooling
creRefrigeration
hsSpace heating
lLighting
proIndustrial processes
TTotal
wwHot water (domestic)

Losses

CodeMeaning
sysIncludes emission, distribution, and storage losses inside the building
(omitted)End-use demand, no system losses

Units

CodeMeaning
WWatts
kWhKilowatt-hours
MWhyrMegawatt-hours per year

Examples

  • El_sys_W — End-use electricity for lighting, including system losses (Watts)
  • El_W — End-use electricity for lighting, no system losses (Watts)
  • ET_sys_MWhyr — Total end-use electricity demand including system losses (MWh/yr)

2. Supply-side load nomenclature

(LOAD_TYPE)(LOAD)_(GENERATION_UNIT)_(LOAD_DIRECTION)_(UNITS)

Load type, load, and units are the same as above.

Generation unit codes

CEA uses component codes from inputs/database/COMPONENTS/CONVERSION/*.csv. The most common short codes are:

CodeMeaning
PVPhotovoltaic panel
PVTPhotovoltaic-thermal hybrid
SC (SC1, SC2)Solar collector — flat-plate (SC1) or evacuated tube (SC2)
BO* (e.g. BO1, BO5)Boilers — gas, oil, wood, electric, etc.
HP* (e.g. HP1)Heat pumps — air, water, ground source
CH* (e.g. CH1)Vapor-compression chillers
CT*Cooling towers
FCFuel cell
CCGTCombined-cycle gas turbine
GSHPGround-source heat pump

For the authoritative list, check inputs/database/COMPONENTS/CONVERSION/.

Load direction

CodeMeaning
GRIDTo the local grid
DIRECTTo the direct load

Examples

  • Qww_PVT_DIRECT_MWhyr — Heat from PVT supplied to the direct hot-water load (MWh/yr)
  • ET_PV_GRID_MWhyr — Total PV electricity exported to the grid (MWh/yr)

3. Cost nomenclature

(COST_TYPE_1)_(COST_TYPE_2)_(COST_TYPE_3)_(GENERATION_UNIT)_(UNITS)

Cost type 1

CodeMeaning
CapexCapital expenditure
OpexOperational expenditure

Cost type 2

CodeMeaning
TTotal
a / AAnnualised

Cost type 3

CodeMeaning
varVariable
fixedFixed

Units

CodeMeaning
USDUS dollars (year specified by the column, often 2015)
MUSDMillion USD
USD2015kWhPer-kWh price expressed in 2015 US dollars

Examples (current column names in CEA outputs)

  • Capex_a_USD — Annualised CAPEX, total (USD/yr)
  • Capex_a_building_scale_USD — Annualised CAPEX, building-scale subset
  • Opex_var_a_USD — Annualised variable OPEX (USD/yr)
  • Opex_var_buy_USD2015kWh — Variable OPEX rate for purchased energy (2015 USD per kWh)

4. Fuel / feedstock nomenclature

(FUEL_TYPE)_(FUEL_DIRECTION)_(GENERATION_UNIT)_(UNITS)

Fuel type

The feedstock codes used in inputs/database/COMPONENTS/FEEDSTOCKS/:

CodeMeaning
NATURALGASNatural gas
OILHeating oil
COALCoal
WOODWood
BIOGASBiogas
DRYBIOMASSDry biomass
WETBIOMASSWet biomass
HYDROGENHydrogen
SOLAROn-site solar thermal
GRIDGrid electricity

Fuel direction

CodeMeaning
usedFuel consumed by the unit
genResource produced by the unit

Examples

  • NATURALGAS_used_BO1_W — Natural gas consumed by boiler type 1 (W)
  • WOOD_used_Furnace_W — Wood consumed by a furnace (W)

5. Emissions nomenclature

(LCA_TYPE)_(GENERATION_UNIT)_(UNITS)

LCA type

CodeMeaning
GHGGreenhouse-gas emissions
PENPrimary energy (legacy)

Units

CodeMeaning
kgCO2Kilograms of CO₂-equivalent
tonCO2Tonnes of CO₂-equivalent
kgCO2m2kg CO₂-equivalent per m² (intensity)
kgCO2MJkg CO₂-equivalent per MJ (emission factor)
MJoilMega-Joules oil equivalent (legacy PEN)
GJoilGiga-Joules oil equivalent (legacy PEN)

Examples (current column names in CEA outputs)

  • GHG_floor_kgCO2m2 — Embodied emissions intensity of the floor envelope component
  • GHG_biogenic_wall_kgCO2m2 — Biogenic carbon stored in the wall envelope (negative)
  • GHG_kgCO2MJ — Emission factor of an energy carrier

General conventions

  • Snake_case for column names with units appended (Qhs_sys_kWh), not camelCase.
  • Plurals for collections — use plural names for lists, tuples, sets, dicts (e.g. buildings, not building_list).
  • No abbreviations other than loop indices. Short names are not cooler.
  • Domain-faithful names — names should match the literature so a reader can connect code to publications.
  • Same thing, same name — don’t switch between temperature_C and T_C in different files for the same quantity.
  • Spelling matters, including in comments. PyCharm’s spellchecker catches most issues.

When in doubt

Source: view raw on GitHub ↗