Building Thermal Management
This example shows how to model temperature and humidity in a large-scale building in Simscape™ using a custom BuildingHVAC domain and corresponding custom library blocks. The first of two models shows how to estimate the sensible and latent cooling requirement to maintain a desired temperature. The second model shows how to add simple HVAC controls and estimate energy usage.
Custom Building HVAC Library
The BuildingHVAC library is a set of blocks created using the Simscape language. It is built upon the custom BuildingHVAC domain for port connections between blocks. The domain across variables are
T -Dry-bulb temperature
HR -Humidity ratio
and the domain through variables are
Qs -Sensible heat transfer
mdot_w -Water vapor mass transfer
In addition, the following quantities are logged at the domain nodes for convenience:
RH -Relative humidity
Tdp -Dew-point temperature
Similarly to the thermal library in the Simscape Foundation library, the BuildingHVAC library models temperature and heat flow between basic components. However, the BuildingHVAC library also keeps track of humidity and water vapor mass transfer.
if exist("buildinghvac_lib", "file") ~= 4 ssc_build buildinghvac end open_system("buildinghvac_lib")
The library consists of the main Building block and a set of basic elements, sensors, and sources.
The blocks in the elements sublibrary represent basic pieces in a building model. The key element is the Zone Air Model, which models the internal air volume. A building typically consists of multiple air volumes connected together via heat and water vapor mass transfer. Another key element is the Planar Material, which models heat transfer through a wall, roof, or floor. Other elements model convective and radiative heat transfer between components.
While you can construct a building model using the blocks in the elements sublibrary directly, it becomes impractical for a larger building model with many elements. The Building block is a composite component that automatically instantiates arrays of basic elements and connects them together to represent a building or a portion of a building. It is the main block used in the example models.
The custom blocks in this example are intended to serve as a starting point for a building thermal management model and you are encouraged to modify the equations and correlations used in the blocks and to add new blocks.
The rest of the example goes through the workflow of gathering data and setting up the building model, estimating heat load in the building, and simulating the building with HVAC controls. It is divided into three separate livescripts.
Gather Data for Building Model
The first livescript
BuildingThermalManagementData.mlx shows the workflow of collecting and organizing the geometric and material property data for the building using MATLAB tables. The example building is the third floor of a fictitious office building with 38 offices, two conferences rooms, hallways, and a common area.
Relevant data include the dimensions of the offices, material properties of the walls and surfaces, external heat sources such as environment temperature, humidity, and solar radiation, and internal heat sources such as occupants, lighting, and equipment. Once the relevant data are collected, it is processed into parameter arrays for the Building block in the model.
Estimate Building Head Load
The second livescript
BuildingThermalManagementHeatLoad.mlx shows how to configure a model of the example building to calculate the heat load and thus the cooling requirement necessary to maintain a desired temperature.
Simulate Building HVAC Controls
The final livescript
BuildingThermalManagementControl.mlx shows how to add a simplified HVAC system to the building model to simulate HVAC controls and calculate energy usage.