Component List for building definition elements
Building
Base component for the definition of a building. The building is made up of a set of spaces (Space component).
Parameters
- azimuth [float, unit = "°", default = 0, min = -180, max = 180]: Angle formed between the x-axis of the building and the east (Global x-axis). The coordinates of all building elements refer to the building coordinate system.
- ref_point [float-list, unit = "m", default = [0,0,0]]: Three-dimensional coordinate of the building reference point (coordinates origin). All surfaces in the building will be defined relative to the building's coordinate origin.
- initial_temperature [float, unit = "°C", default = 20]: Initial temperature of all building components at the beginning of the simulation.
- initial_humidity [float, unit = "g/kg", default = 7.3]: Initial absolute humidity of all building spaces at the beginning of the simulation.
The following figure shows the building's coordinate system:

Example:
...
building = osm.components.Building("building",project)
param = {
"azimuth": 90
"ref_point": [10,10,0]
}
building.set_parameters(param)
Space_type
Component used to define the type of space. This component will be referenced by all spaces that are of the same type. This component defines the internal loads and some of the functional characteristics of the space.
Parameters
- input_variables [variable_list, default = []]: List of variables from other components used in this component. They may be used in parameters of the type math_exp.
- people_density [math_exp, unit = "p/m²", default = "0.1"]: Occupancy density, defined in persons per m² of floor. The mathematical expression may contain any of the variables declared in the "input_variables" parameter, to be able to reflect the time variation of this value. See example below
- people_sensible [float, unit = "W/p", default = 70, min = 0]: Sensible heat generated by each of the occupants of the space.
- people_latent [float, unit = "W/p", default = 35, min = 0]: Latent heat generated by each of the occupants of the space.
- people_radiant_fraction [float, unit = "frac", default = 0.6, min = 0, max = 1]: Long wave radiant fraction of heat generated by occupants. The rest of the heat is assumed to be convective.
- light_density [math_exp, unit = "W/m²", default = "10"]: Lighting density, defined as the electrical lighting power [W] per m² of floor. The mathematical expression may contain any of the variables declared in the "input_variables" parameter, to be able to reflect the time variation of this value. See example below.
- light_radiant_fraction [float, unit = "frac", default = 0.6, min = 0, max = 1]: Short wave radiant fraction of heat generated by lights. The rest of the heat is assumed to be convective.
- other_gains_density [math_exp, unit = "W/m²", default = "10"]: Other gains density, defined as the heat generated by other gains (Household appliances, office automation, miscellaneous electrical equipment, etc.) [W] per m² of floor. The mathematical expression may contain any of the variables declared in the "input_variables" parameter, to be able to reflect the time variation of this value. See example below.
- other_gains_radiant_fraction [float, unit = "frac", default = 0.5, min = 0, max = 1]: Long wave radiant fraction of the heat generated by other gains. The convective fraction is calculated by subtracting the radiant and latent fractions.
- other_gains_latent_fraction [float, unit = "frac", default = 0.0, min = 0, max = 1]: Latent fraction of the heat generated by other gains. The convective fraction is calculated by subtracting the radiant and latent fractions.
- infiltration [math_exp, unit = "1/h", default = "1"]: Air flow rate infiltrated into the space from outside and expressed in volumes of the space per hour. The mathematical expression may contain any of the variables declared in the "input_variables" parameter, to be able to reflect the time variation of this value.
Assuming that the variation of occupancy, lighting and other loads has been defined in a "Year_schedule" component, named "schedule" with values between 0 and 1, the following example would capture that variation.
Example:
...
office_space = osm.components.Space_type("office_space",project)
param = {
"input_variables": ["f = schedule.values"]
"people_density": "0.1*f",
"light_density": "10*f",
"other_gains_density": "4.2*f",
"other_gains_radiant_fraction": 0.6,
"infiltration": "0.5"
}
office_space.set_parameters(param)
Variables
After the simulation we will have the following variables of this component:
- people_convective [W/m²]: Convective heat due to occupancy.
- people_radiant [W/m²]: Radiant heat (long wave) due to occupancy.
- people_latent [W/m²]: Latent heat due to occupancy.
- light_convective [W/m²]: Convective heat due to lighting.
- light_radiant [W/m²]: Radiant heat (short wave) due to lighting.
- other_gains_convective [W/m²]: Convective heat due to other gains.
- other_gains_radiant [W/m²]: Radiant heat (long wave) due to other gains.
- other_gains_latent [W/m²]: Latent heat due to other gains.
- infiltration_rate [1/h]: Air flow rate infiltrated into the space from outside, expressed in volumes of the space per hour.
Space
Component used to define each of the building's spaces. The spaces of a building are each of the volumes of the building where we can find a different temperatures. The spaces will be referenced by the different surfaces that comprise them.
Parameters
- building [component, default = "not_defined", component type = Building]: Reference to the "Building" component of which it is a part.
- space_type [component, default = "not_defined", component type = Space_type]: Reference to the "Space_type" component that defines its occupational and functional characteristics.
- floor_area [float, unit = "m²", default = 1, min = 0]: Floor area of the space.
- volume [float, unit = "m³", default = 1, min = 0]: Volume of the space.
- furniture_weight [float, unit = "kg/m²", default = 10, min = 0]: Weight of the furniture in the space. Used to increase the thermal inertia of the space which will be added to that of the air (for the furniture a specific heat of 1000 J/kg·K will be used).
- convergence_DT [float, unit = "°C", default = 0.01, min = 0]: Convergence temperature difference. In the iterative process, convergence will be considered to have occurred when the temperature difference between two successive iterations is less than this value.
- convergence_Dw [float, unit = "g/kg", default = 0.01, min = 0]: Convergence hunidity difference. In the iterative process, convergence will be considered to have occurred when the absolute humidity difference between two successive iterations is less than this value.
Example:
...
space_1 = osm.components.Space("spaces_1",project)
param = {
"building": "building",
"spaces_type": "office_space",
"floor_area": 30,
"volume": 90
}
space_1.set_parameters(param)
Variables
After the simulation we will have the following variables of this component:
- temperature [°C]: Space dry air temperature.
- abs_humidity [g/kg]: Absolute space air humidity.
- rel_humidity [%]: Relative space air humidity.
- people_convective [W]: Convective heat due to occupancy.
- people_radiant [W]: Radiant heat (long wave) due to occupancy.
- people_latent [W]: Latent heat due to occupancy.
- light_convective [W]: Convective heat due to lighting.
- light_radiant [W]: Radiant heat (short wave) due to lighting.
- other_gains_convective [W]: Convective heat due to other gains.
- other_gains_radiant [W]: Radiant heat (long wave) due to other gains.
- other_gains_latent [W]: Latent heat due to other gains.
- solar_direct_gains [W]: Direct solar radiation gains.
- infiltration_flow [m³/s]: Air flow rate infiltrated into the space from outside.
- infiltration_sensible_heat [W]: Sensible heat due to air infiltration from outdoor.
- surfaces_convective [W]: Convective heat flux exchanged between interior surfaces and space air.
- delta_int_energy [W]: Increase of internal energy of the space (air and furniture).
- u_system_sensible_heat [W]: Sensible heat introduced by uncontrolled systems in space. Spaces can collect airflows from various types of systems, those that are not capable of controlling the room temperature are called ‘uncontrolled systems’. For example, a flow of outside air, a flow from a dedicated outdoor air system, etc.
- u_system_sensible_latent [W]: Latent heat introduced by uncontrolled systems in space.
- system_sensible_heat [W]: Sensible heat introduced by the system responsible for space control. Positive for heating and negative for cooling.
- system_sensible_latent [W]: Latent heat introduced by control system in space. Positive for humidification and negative for dehumidification.
Building_surface
Component to define the Building surfaces of the building: vertical or inclined walls,horizontal or inclined roofs, interior walls, slabs, underground walls, etc.
Parameters
- shape [option, default = "RECTANGLE", options = ["RECTANGLE","POLYGON"]]: Shape of the surface, for a rectangle the parameters "width" and "height" will be used and for a polygon the parameters "x-polygon" and "y-polygon".
- width [float, unit = "m", default = 1, min = 0]: Width of the rectangular surface. Only used if "shape" is equal to "RECTANGLE".
- height [float, unit = "m", default = 1, min = 0]: Height of the rectangular surface. Only used if "shape" is equal to "RECTANGLE".
- ref_point [float-list, unit = "m", default = [0,0,0]]: Three-dimensional coordinate of the surface reference point. For rectangular surfaces the lower left corner of the surface viewed from the outside (side 0), for surfaces defined by polygons the three-dimensional location of the coordinate origin used to define the polygon in two dimensions.
- x_polygon [float-list, unit = "m", default = [0,10,10,0]]: List with the x-coordinates of the points defining the surface polygon. Only used if "shape" is equal to "POLYGON".
- y_polygon [float-list, unit = "m", default = [0,0,10,10]]: List with the y-coordinates of the points defining the surface polygon. Only used if "shape" is equal to "POLYGON".
- azimuth [float, unit = "°", default = 0, min = -180, max = 180]: Angle formed between the x-axis of the building and the projection of the x-axis of the surface.
- altitude [float, unit = "°", default = 0, min = -90, max = 90]: Angle formed between the z-axis of the building and the y-axis of the surface.
- surface_type [option, default = "EXTERIOR", options = ["EXTERIOR", "INTERIOR", "UNDERGROUND", "VIRTUAL"]]: Surface type: “EXTERIOR” for exterior walls, roofs, and ceilings; “INTERIOR” for interior walls or floors; ‘UNDERGROUND’ for buried walls or floors in contact with the ground; and “VIRTUAL” used to define gaps between two spaces. Spaces in opensimula must be completely enclosed by surfaces for the radiant exchange calculation to work correctly.
- construction [component, default = "not_defined", component type = Construction]: Reference to the "Construction" component that defines its composition, not used for "VIRTUAL" surface_type.
- spaces [component-list, default = ["not_defined","not_defined], component type = Space]: Reference to the "Space" components for the side 0 and the side 1 in "INTERIOR" and "VIRTUAL" surface_type. For "EXTERIOR" and "UNDERGROUND" only de first element fo de list is used.
- h_cv [float-list, unit = "W/m²K", default = [19.3,2], min = 0]: Convective film coefficients of the exterior and interior surfaces or side 0 and 1, respectively. For "VIRTUAL" surface_type these values are not used, and for "UNDERGROUND" only the first value is used as interior coefficient.
The following figures show the surface coordinate system versus the building coordinate system for rectangular or polygonal surfaces.


Example:
...
north_wall = osm.components.Building_surface("north_wall",project)
param = {
"ref_point": [8,0,-6],
"width": 8,
"height": 2.7,
"azimuth": 180,
"altitude": 0,
"surface_type": "EXTERIOR"
"construction": "Multilayer_wall",
"spaces": ["space_1"]
}
north_wall.set_parameters(param)
Variables
After the simulation we will have the following variables of this component, all variables ending in 0 refer to the outer surface and those ending in 1 to the inner surface:
- T_s0, T_s1 [°C]: Surface temperatures
- q_cd0, q_cd1 [W/m²]: Conductive heat flux at the surfaces.
- q_cv0, q_cv1 [W/m²]: Convective heat flux at the surfaces.
- q_sol0, q_sol1 [W/m²]: Solar heat flux at the surfaces.
- q_swig0, q_swig1 [W/m²]: Radiant short wave heat flux at the surfaces due to internal gains.
- q_lwig0, q_lwig1 [W/m²]: Radiant long wave heat flux at the surfaces due to internal gains.
- q_lwt0, q_lwt1 [W/m²]: Radiant long wave heat flux at the surfaces due other surfaces temperatures.
- p_0, p_1 [W/m²]: Conductive heat flux at the surfaces due to previous time steps.
- T_rm [°C]: Exterior radiant mean temperature.
- E_dir [W/m²]: Direct solar radiation incident on the exterior surface.
- E_dif [W/m²]: Diffuse solar radiation incident on the exterior surface.
These variables will be 0 for “VIRTUAL” surface_type, and some of the variables only make sense for exterior surfaces, such as E_dir, E_dif, or T_rm.
Opening
Component for defining openings in exterior surfaces or interior surfaces, e.g. windows or doors.
Parameters
- surface [component, default = "not_defined", component type = Building_surface]: Reference to the "Building_surface" in which it is located, it must be "EXTERIOR" or "INTERIOR" surface_type.
- shape [option, default = "RECTANGLE", options = ["RECTANGLE","POLYGON"]]: Shape of the opening, for a rectangle the parameters "width" and "height" will be used and for a polygon the parameters "x-polygon" and "y-polygon".
- width [float, unit = "m", default = 1, min = 0]: Width of the opening.
- height [float, unit = "m", default = 1, min = 0]: Height of the opening.
- ref_point [float-list, unit = "m", default = [0,0]]: Two-dimensional coordinate of the opening reference point in the exterior wall coordinate system. The reference point is the lower left corner of the opening viewed from the outside.
- x_polygon [float-list, unit = "m", default = [0,10,10,0]]: List with the x-coordinates of the points defining the opening polygon. Only used if "shape" is equal to "POLYGON".
- y_polygon [float-list, unit = "m", default = [0,0,10,10]]: List with the y-coordinates of the points defining the opening polygon. Only used if "shape" is equal to "POLYGON".
- opening_type [component, default = "not_defined", component type = Opening_type]: Reference to the "Opening_type" component that defines its composition.
- setback [float, unit = "m", default = 0, min = 0]: Setback for rectangular openings (not used if shape = “POLYGON”). Distance between the outer surface of the window or door and the outer face of the enclosure in which it is located. Used to calculate the shadows cast in the opening.
- h_cv [float-list, unit = "W/m²K", default = [19.3,2], min = 0]: Convective film coefficients of the exterior and interior surfaces or side 0 an 1, respectively.
The following figure show geometrical definition of the opening in the surface coordinate system.

Example:
...
south_window = osm.components.Opening("south_window",project)
param = {
"surface": "south_wall"
"ref_point": [2,1],
"width": 3,
"height": 1.3,
"opening_type": "double_glazed_window"
}
south_window.set_parameters(param)
Variables
After the simulation we will have the following variables of this component, all variables ending in 0 refer to the outer surface and those ending in 1 to the inner surface:
- T_s0, T_s1 [°C]: Surface temperatures
- q_cd [W/m²]: Conductive heat flux.
- q_sol_dir_trans [W/m²]: Direct solar radiation passing through into space.
- q_cv0, q_cv1 [W/m²]: Convective heat flux at the surfaces.
- q_sol0, q_sol1 [W/m²]: Solar heat flux at the surfaces.
- q_sol01, q_sol10 [W/m²]: Solar heat flux appearing on surface "i" due to the absorption of solar radiation on surface "j".
- q_swig0, q_swig1 [W/m²]: Radiant short wave heat flux at the surfaces due to internal gains.
- q_lwig0, q_lwig1 [W/m²]: Radiant long wave heat flux at the surfaces due to internal gains.
- q_lwt0, q_lwt1 [W/m²]: Radiant long wave heat flux at the surfaces due other surfaces temperatures.
- T_rm [°C]: Exterior radiant mean temperature.
- E_dir [W/m²]: Direct solar radiation incident on the exterior surface.
- E_dif [W/m²]: Diffuse solar radiation incident on the exterior surface.
Solar_surface
Component for defining shading surfaces external to the building or surface on which we want to calculate incident solar radiation.
Parameters
- coordinate_system [option, default = "BUILDING", options = ["BUILDING","GLOBAL"]]: Coordinate system used to define the surface.
- building [component, default = "not_defined", component type = Building]: Reference to the building for which the surface will be defined. If coordinate_system = “BUILDING,” the coordinate origin will be that building.
- shape [option, default = "RECTANGLE", options = ["RECTANGLE","POLYGON"]]: Shape of the surface, for a rectangle the parameters "width" and "height" will be used and for a polygon the parameters "x-polygon" and "y-polygon".
- width [float, unit = "m", default = 1, min = 0]: Width of the rectangular surface. Only used if "shape" is equal to "RECTANGLE".
- height [float, unit = "m", default = 1, min = 0]: Height of the rectangular surface. Only used if "shape" is equal to "RECTANGLE".
- ref_point [float-list, unit = "m", default = [0,0,0]]: Three-dimensional coordinate of the surface reference point. For rectangular surfaces the lower left corner of the surface viewed from the outside, for surfaces defined by polygons the three-dimensional location of the coordinate origin used to define the polygon in two dimensions.
- x_polygon [float-list, unit = "m", default = [0,10,10,0]]: List with the x-coordinates of the points defining the surface polygon. Only used if "shape" is equal to "POLYGON".
- y_polygon [float-list, unit = "m", default = [0,0,10,10]]: List with the y-coordinates of the points defining the surface polygon. Only used if "shape" is equal to "POLYGON".
- azimuth [float, unit = "°", default = 0, min = -180, max = 180]: Angle formed between the x-axis of the building or global and the projection of the x-axis of the surface.
- altitude [float, unit = "°", default = 0, min = -90, max = 90]: Angle formed between the z-axis of the building or global and the y-axis of the surface.
- cast_shadows [boolean, default = True]: Use this surface to cast shadows on buildings and other solar surfaces.
- calculate_solar_radiation [boolean, default = False]: Calculate the incident solar radiation, taking into account shadows, on this surface. Only if this parameter is True will the hourly variables for this component be calculated..
Example:
...
overhang = osm.components.Solar_surface("overhang")
param = {
"coordinate_system": "BUILDING"
"building": "Building",
"ref_point": [0,-1,2.7],
"width": 8,
"height": 1,
"azimuth": 0,
"altitude": 90
},
overhang.set_parameters(param)

Variables
After the simulation we will have the following variables of this component:
- E_dir [W/m²]: Direct solar radiation incident on the surface.
- E_dif [W/m²]: Diffuse solar radiation incident on the surface.