Thermal Equipment and Building Component Modeling in Modelica
Kaustubh Phalak
Scope • Traditional building simulation programs
• Modelica
• Equation-based language • Features for model development :object-instantiation, object-
inheritance • Examples and results
• Validation of Buildings Library
• Challenges
• Modelica: for a Mechanical/Equipment Engineer
2
Traditional Building Simulation Programs • Written in FORTRAN, C, C++ • Procedural programming • Developer writes a sequence of computer instructions that
assigns values to variables in predefined order of execution • Mix of physical model and numerical solution algorithm,
example: implementation of pump-system curve • Idealized controllers within HVAC components: hard to
implement control algorithms
3
Physical model
Fixed program
flow logic
Own solver Hard to
maintain & add new models
Modelica: Equation-based language • Components/Models described by algebraic and differential
equations
• Equations encapsulated and represented by an icon
• Standardized interface enable modeling across multiple engineering domains: electrical, mechanical, thermal
4
Encapsulation of equations
Standardized interface
Model reuse and easy model exchange
• Write equations as they are.
• Number of unknowns = Number of equations
5
𝑈𝑈𝑈𝑈𝑐𝑐𝑝𝑝
= �̇�𝑚 ln(𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏_𝑓𝑓𝑏𝑏𝑐𝑐𝑓𝑓)
𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏_𝑓𝑓𝑏𝑏𝑐𝑐𝑓𝑓=ℎ𝑜𝑜 − ℎ𝐴𝐴𝐴𝐴𝐴𝐴ℎ𝑖𝑖 − ℎ𝐴𝐴𝐴𝐴𝐴𝐴
ℎ𝐴𝐴𝐴𝐴𝐴𝐴 = 𝐸𝐸𝐸𝐸𝑓𝑓ℎ(𝜔𝜔𝐴𝐴𝐴𝐴𝐴𝐴,𝑇𝑇𝐴𝐴𝐴𝐴𝐴𝐴, 𝑏𝑏)
𝜔𝜔𝐴𝐴𝐴𝐴𝐴𝐴 = 𝑈𝑈𝑏𝑏𝑏𝑏𝐴𝐴𝐴𝐴𝑚𝑚(𝜑𝜑𝐴𝐴𝐴𝐴𝐴𝐴,𝑇𝑇𝐴𝐴𝐴𝐴𝐴𝐴, 𝑏𝑏)
𝑇𝑇𝑜𝑜 − 𝑇𝑇𝑖𝑖𝑇𝑇𝐴𝐴𝐴𝐴𝐴𝐴 − 𝑇𝑇𝑖𝑖
=𝜔𝜔𝑜𝑜 − 𝜔𝜔𝑖𝑖𝜔𝜔𝐴𝐴𝐴𝐴𝐴𝐴 − 𝜔𝜔𝑖𝑖
Modelica: for a Mechanical Engineer
Modelica Features: Object-instantiation
• To use and parameterize an object in a model
• Two-port HX: No source-side mass flow rate or heat exchange is independent of source mass flow. e.g. GLHE, DX coil (air cooled condenser), cooling tower
• Four-port HX: parallel and counter flow HX, heat pumps
6
Instantaneously mixed volume: no pressure drop, exchange heat through its heatport
Flow resistance: fixed flow coefficient
Four port heat exchanger: Model transporting two fluid streams between four ports with storing mass or energy
Modelica Features: Object-inheritance • To reuse existing
basic models and refine their implementation
• Four port heat exchanger now can be modified as chiller, water to water heat pump
• Final model depends on how the physics of heat exchange and control system are designed
7
Modelica Features: Object-inheritance
• Medium = Air
• Latent heat: moisture added or condensed
8
Instantaneously mixed volume: with heatPort and latent heat calculation (moisture added/removed)
Multi-stage water to air heat pump
Example: DX Cooling Coil
9
DX Cooling Coil: Results and Validation • Results of the DX cooling coil model are compared with the
model in E+
10
Building Components Overhang and side-fins
11
Buildings Library Validation: ASHRAE Standard 140 • Standard 140 used for testing the accuracy of building
simulation models
• Standard 140 documents energy performance of a thermal zone using different building energy simulation tools
• Validation cases: 600, 610, 620, 630, 600FF, 900, and 900FF (low and high mass building )
• Presented at 9th International Modelica Conference 2012
12
Buildings Library Validation: ASHRAE Standard 140 • Results are not the same
• Each simulation tool use different assumptions, physical models and implementations
• The variation of the results is usually in a reasonable range.
13
Source: LBNL-5932E
Modelica: Challenges • Cost, proprietary solvers
• Open source tools do not support all the features: Fluid package
• High simulation time for multi-zone building envelopes
• Limited number of models
14
Modelica: Promising future • Expands capability of building simulation tools: interfacing
with multiple engineering domains
• Flexible environment for modeling
• Reuse of models
• Less time required for model development
15
Modelica: for Mechanical/Equipment Engineer • Easy to read and understand
• Less lines of code • Similarity with physical systems • Closely represent actual components
• Easy to modify or write new model
• More focus on model development rather than struggling with implementation issues
• Easy to use: drag and drop
• Easy to control the boundary conditions
16
Questions?
17
Thank you!