Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

How to extract surface heat capacity (J/K.m²) from a model

Hello, I can't manage to extract the thermal capacity of my building (J/K or J/K.m²) although this value seems to be quite fundamental in the framework of dynamic study. I have tried to extract it by an Openstudio measurement with this code (sorry i can't put picture because not enough karma) :

def run(model, runner, user_arguments) super(model, runner, user_arguments)

  thermalmass = 0

# report initial condition of model
runner.registerInitialCondition("Depart  #{thermalmass} J/K.")

# calcul
  model_surfaces = model.getPlanarSurfaces

  model_surfaces.each do |surface|
    if not surface.heatCapacity.empty?
      thermalmass += surface.heatCapacity.get
    end
  end
  puts thermalmass


# report final condition of model
runner.registerFinalCondition("thermal mass finale = #{thermalmass} J/K.")

return true

end

, but I can't get this value, this is always 0. If you have an idea of how I could get this value or any other tips, I would be very grateful.

How to extract surface heat capacity (J/K.m²) from a model

Hello, I can't manage to extract the thermal capacity of my building (J/K or J/K.m²) although this value seems to be quite fundamental in the framework of dynamic study. I have tried to extract it by an Openstudio measurement with this code (sorry i can't put picture because not enough karma) :

def run(model, runner, user_arguments) super(model, runner, user_arguments)

  thermalmass = 0

# report initial condition of model
runner.registerInitialCondition("Depart  #{thermalmass} J/K.")

# calcul
  model_surfaces = model.getPlanarSurfaces

  model_surfaces.each do |surface|
    if not surface.heatCapacity.empty?
      thermalmass += surface.heatCapacity.get
    end
  end
  puts thermalmass


# report final condition of model
runner.registerFinalCondition("thermal mass finale = #{thermalmass} J/K.")

return true

end

, but I can't get this value, this is always 0. If you have an idea of how I could get this value or any other tips, I would be very grateful.

How to extract surface heat capacity (J/K.m²) from a model

Hello, I can't manage to extract the thermal capacity of my building (J/K or J/K.m²) although this value seems to be quite fundamental in the framework of dynamic study. I have tried to extract it by an Openstudio measurement with this code (sorry i can't put picture because not enough karma) :

def run(model, runner, user_arguments) super(model, runner, user_arguments)

  thermalmass = 0

# report initial condition of model
runner.registerInitialCondition("Depart  #{thermalmass} J/K.")

# calcul
  model_surfaces = model.getPlanarSurfaces

  model_surfaces.each do |surface|
    if not surface.heatCapacity.empty?
      thermalmass += surface.heatCapacity.get
    end
  end
  puts thermalmass


# report final condition of model
runner.registerFinalCondition("thermal mass finale = #{thermalmass} J/K.")

return true

end

, but I can't get this value, this is always 0. If you have an idea of how I could get this value or any other tips, I would be very grateful.

How to extract surface heat capacity (J/K.m²) from a model

Hello, I can't manage to extract the thermal capacity of my building (J/K or J/K.m²) although this value seems to be quite fundamental in the framework of dynamic study. I have tried to extract it by an Openstudio measurement with this code (sorry i can't put picture because not enough karma) :

def run(model, runner, user_arguments) super(model, runner, user_arguments)

  thermalmass = 0

# report initial condition of model
runner.registerInitialCondition("Depart  #{thermalmass} J/K.")

# calcul
  model_surfaces = model.getPlanarSurfaces

  model_surfaces.each do |surface|
    if not surface.heatCapacity.empty?
      thermalmass += surface.heatCapacity.get
    end
  end
  puts thermalmass


# report final condition of model
runner.registerFinalCondition("thermal mass finale = #{thermalmass} J/K.")

return true

end

, but I can't get this value, this is always 0. If you have an idea of how I could get this value or any other tips, I would be very grateful.