• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

armancodv/building-energy-model-matlab: It is a small software which is develope ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

armancodv/building-energy-model-matlab

开源软件地址(OpenSource Url):

https://github.com/armancodv/building-energy-model-matlab

开源编程语言(OpenSource Language):

MATLAB 100.0%

开源软件介绍(OpenSource Introduction):

Building Energy Model (MATLAB)

It is a small software which is developed by MATLAB for modeling the energy system of a building or a HVAC system.

Method of Solution

In this code, the temperatures are considered variables of the problem, which are solved implicitly by solving a system of linear equations based on energy equations of each element.

Elements Classes

Boiler

The boiler contains an inlet fluid pipe, an outlet fluid pipe, a fluid tank which is heated up, and the rest. The class of boiler receives input values including the id of the inlet, the id of outlet, the solver, the specific heat capacity of the rest, the mass of the rest, specific heat capacity of the fluid, mass of the fluid, the boiler power, the mass flow rate, and the status. The inlet and outlet should be outlet and inlet of pipes which are connected to the boiler respectively. The solver is the class of the solver that is used. Next, there are specific heat capacity and mass of the boiler except containing fluid. Then, there are those of the fluid. The next argument is the power of the boiler. The mass flow rate also should be given as an input value. The status works as a switch in the boiler which can be controlled by the smart controller in the next stages of the project.

Equations

Schematic Equations

Variables

Symbol Description Unit
m Mass kg
C Specific Heat Capacity J/(K.kg)
T Temperature K
E. Energy Rate W
Subscript Description
b Boiler
f fluid
b,f Fluid inside Boiler
b,i Boiler Inlet
b,o Boiler Outlet

Code

Construction
boiler = Boiler(id_inlet, id_outlet, solver, specific_heat_capacity, mass, specific_heat_capacity_fluid, mass_fluid, power, mass_flow_rate, status);
Input Description Type Unit
id_inlet Boiler Inlet ID integer -
id_outlet Boiler Outlet ID integer -
solver Class of the Solver solver -
specific_heat_capacity Specific Heat Capacity of the Boiler (without fluid) double J/(K.kg)
mass Mass of the Boiler (without fluid) double kg
specific_heat_capacity_fluid Specific Heat Capacity of the Fluid double J/(K.kg)
mass_fluid Mass of Fluid inside the Boiler double kg
power Power of the Boiler double W
mass_flow_rate Mass Flow Rate of the Boiler double kg/s
status Status of the Boiler (ON/OFF) boolean -
Create Matrix
create(solver)
Input Description Type Unit
solver Class of the Solver solver -

Pipe

Another element in the model is the pipe. The input values of the pipe class are the id of inlet, the id of outlet, the id of zone, the solver, specific heat capacity of the pipe wall, density of the pipe wall, specific heat capacity of the fluid, density of the fluid, mass flow rate of the fluid, inner heat transfer coefficient, outer heat transfer coefficient, thermal conductivity of the tube wall, inner radius of the pipe, outer radius of the pipe, and length of the pipe. The inlet and outlet of the pipe are the elements which are connected to the pipe. The zone which is in contact with the outer side of the pipe is also the argument of the class.

Equations

Schematic Equations

Variables

Symbol Description Unit
h Heat Transfer Coefficient W/(m2K)
r Radius m
D Diameter m
k Thermal Conductivity W.m-1.K-1
L Length m
U equivalent heat transfer coefficient W/(m2K)
Nu Nusselt Number -
Re Reynolds Number -
Pr Prandtl Number -
Ra Rayleigh Number -
g Gravitational Acceleration m/s2
&‌beta; Coefficient of Volume Expansion 1/K
&‌nu; Kinematic Viscosity m2/s
&‌mu; Dynamic Viscosity kg·m−1·s−1
Subscript Description
t Pipe
t,f Fluid inside Pipe
t,i Pipe Inlet
t,o Pipe Outlet
t,in Pipe Inner Side
t,out Pipe Outer Side

Code

Construction
pipe = Pipe(id_inlet, id_outlet, id_zone, solver, specific_heat_capacity, density, specific_heat_capacity_fluid, density_fluid, mass_flow_rate,thermal_conductivity,thermal_conductivity_fluid,radius_inner,radius_outer,length,dynamic_viscosity_fluid,dynamic_viscosity_air,density_air,specific_heat_capacity_air,thermal_conductivity_air);
Input Description Type Unit
id_inlet Pipe Inlet ID integer -
id_outlet Pipe Outlet ID integer -
id_zone Zone ID integer -
solver Class of the Solver solver -
specific_heat_capacity Specific Heat Capacity of the Pipe (without fluid) double J/(K.kg)
density Density of the Pipe (without fluid) double kg/m3
specific_heat_capacity_fluid Specific Heat Capacity of the Fluid double J/(K.kg)
density_fluid Density of Fluid inside the Pipe double kg/m3
mass_flow_rate Mass Flow Rate of the Pipe double kg/s
thermal_conductivity Thermal Conductivity of the Pipe double W.m-1.K-1
thermal_conductivity_fluid Thermal Conductivity of the Fluid double W.m-1.K-1
radius_inner Inner Radius of the Pipe double m
radius_outer Outer Radius of the Pipe double m
length Length of the Pipe double m
dynamic_viscosity_fluid Dynamic Viscosity of the Fluid double N·s/m2
dynamic_viscosity_air Dynamic Viscosity of the Air double N·s/m2
density_air Density of the Air double kg/m3
specific_heat_capacity_air Specific Heat Capacity of the Air double J/(K.kg)
thermal_conductivity_air Thermal Conductivity of the Air double W.m-1.K-1
Create Matrix
create(solver)
Input Description Type Unit
solver Class of the Solver solver -

Radiator

The input values of the radiator class are the id of inlet, the id of outlet, the id of zone, the solver, specific heat capacity of the radiator except containing fluid, mass of the radiator except containing fluid, specific heat capacity of the fluid, mass of fluid, mass flow rate of the fluid, heat transfer coefficient of the radiator to the zone, the surface of the radiator which is in contact to the air of the zone.

Equations

Schematic Equations

Variables

Subscript Description
r Radiator
r,f Fluid inside Radiator
r,i Radiator Inlet
r,o Radiator Outlet
z Zone

Code

Construction
radiator = Radiator(id_inlet, id_outlet, id_zone, solver, specific_heat_capacity, mass, specific_heat_capacity_fluid, mass_fluid, mass_flow_rate,heat_transfer_coefficient,surface);
Input Description Type Unit
id_inlet Radiator Inlet ID integer -
id_outlet Radiator Outlet ID integer -
id_zone Zone ID integer -
solver Class of the Solver solver -
specific_heat_capacity Specific Heat Capacity of the Radiator (without fluid) double J/(K.kg)
mass Mass of the Radiator (without fluid) double kg
specific_heat_capacity_fluid Specific Heat Capacity of the Fluid double J/(K.kg)
mass_fluid Mass of Fluid inside the Radiator double kg
mass_flow_rate Mass Flow Rate of the Radiator double kg/s
heat_transfer_coefficient Heat Transfer Coefficient of the Radiator double W/(m2K)
surface Surface of the Radiator double m2
Create Matrix
create(solver)
Input Description Type Unit
solver Class of the Solver solver -

Mixer

The mixer is an element that works as a mixer or manifold. It can mix multiple flowing fluids to multiple outlets. For the input arguments of the related class, there are the ids of inlets, the ids outlets, the solver, specific heat capacities of the inlets, mass flow rates of the inlets, and the fractions of outlets.

Equations

Schematic Equations

Variables

Subscript Description

Code

Construction
mixer = Mixer(id_inlets, id_outlets, solver, specific_heat_capacity_inlets, mass_flow_rate_inlets, fracrion_outlets);
Input Description Type Unit
id_inlets Array of Mixer Inlet ID array(integer) -
id_outlets Array of Mixer Outlet ID array(integer) -
solver Class of the Solver solver -
specific_heat_capacity_inlets Specific Heat Capacity of the Mixer Inlets array(double) J/(K.kg)
mass_flow_rate_inlets Mass Flow Rate of the Mixer Inlets array(double) kg/s
fracrion_outlets Heat Transfer Coefficient of the Radiator array(double) W/(m2K)
Create Matrix
create(solver)
Input Description Type Unit
solver Class of the Solver solver -

Zone

The zone class contains arguments including the id of the zone, the ids of neighbor zones as an array, the ids of radiators inlets as an array, the ids radiators outlets as an array, the solver, thickness of walls as an array, surface of the walls as an array, thickness of the windows as an array, surface of the windows as an array, surface of radiators as an array, heat transfer coefficient radiators as an array, density of the air, volume of the air, specific heat capacity of the air, density of the wall, volume of the wall, specific heat capacity of the wall, mass of the equipment, specific heat capacity of the equipment, thermal conductivity of the wall, thermal conductivity of the window.

Equations

Equations

Variables

Subscript Description

Code

Construction
zone = Zone(id_zone, id_zones, id_radiator_inlets, id_radiator_outlets, solver, thickness_walls, surface_walls, thickness_windows, surface_windows, surface_radiators, heat_transfer_coefficient_radiators, density_air, volume_air, specific_heat_capacity_air, density_wall, volume_wall, specific_heat_capacity_wall, mass_equipment, specific_heat_capacity_equipment, thermal_conductivity_wall, thermal_conductivity_window);
Input Description Type Unit
id_zone Zone ID integer -
id_zones Array of Neigthbors' Zones IDs array(integer) -
id_radiator_inlets Array of Radiators Inlets IDs array(integer) -
id_radiator_outlets Array of Radiators Outlets IDs array(integer) -
solver Class of the Solver solver -
thickness_walls Array of Walls Thicknesses array(double) m
surface_walls Array of Walls Surfaces array(double) m2
thickness_windows Array of Windows Thicknesses array(double) m
surface_windows Array of Windows Surfaces array(double) m2
surface_radiators Array of Radiators Surfaces array(double) m2
heat_transfer_coefficient_radiators Array of Heat Transfer Coefficient of Radiators array(double) W/(m2K)
density_air Air Density double kg/m3
volume_air Volume of the Air double m3
specific_heat_capacity_air Air Specific Heat Capacity double J/(K.kg)
density_wall Wall Density double kg/m3
volume_wall Volume of the Wall double m3
specific_heat_capacity_wall Wall Heat Transfer Coefficient double J/(K.kg)
mass_equipment Mass of Equipment double kg
specific_heat_capacity_equipment Equipment Specific Heat Capacity double J/(K.kg)
thermal_conductivity_wall Wall Thermal Conductivity double W.m-1.K-1
thermal_conductivity_window Window Thermal Conductivity double W.m-1.K-1
Create Matrix
create(solver)
Input Description Type Unit
solver Class of the Solver solver -

Same

Code

Construction
same = Same(id_1, id_2, solver);
Input Description Type Unit
id_1 First Element ID integer -
id_2 Second Element ID integer -
solver Class of the Solver solver -
Create Matrix
create(solver)
Input Description Type Unit
solver Class of the Solver solver -

HeatExchanger

The class of heat exchanger contains the id of supply inlet, the id of supply outlet, the id of demand inlet, the id of demand outlet, the solver, specific heat capacity of the supply, specific heat capacity of the demand, mass flow rate of the supply, mass flow rate of the demand, heat transfer coefficient of the heat exchanger, and contact surface of the heat exchanger as inputs.

Equations

Equations

Variables

Variable Description
Rc Capacity Ratio
NTU Number of Transfer Units
? Effectiveness
Subscript Description
s Supply
d Demand
i Inlet
o Outlet
min Minimum
max Maximum

Code

Construction
heatExchanger = HeatExchanger(id_supply_inlet, id_supply_outlet, id_demand_inlet, id_demand_outlet, solver, specific_heat_capacity_supply, specific_heat_capacity_demand, mass_flow_rate_supply, mass_flow_rate_demand, heat_transfer_coefficient, surface);
Input Description Type Unit
id_supply_inlet Supply Inlet Element ID integer -
id_supply_outlet Supply Outlet Element ID integer -
id_demand_inlet Demand Inlet Element ID integer -
id_demand_outlet Demand Outlet Element ID integer -
solver Class of the Solver solver -
specific_heat_capacity_supply Specific Heat Capacity of the Supply double J/(K.kg)
specific_heat_capacity_demand Specific Heat Capacity of the Demand double J/(K.kg)
mass_flow_rate_supply Mass Flow Rate of the Supply double kg/s
mass_flow_rate_demand Mass Flow Rate of the Demand double kg/s
heat_transfer_coefficient Heat Transfer Coefficient of the Heat Exchanger double W/(m2K)
surface Surface of the Heat Exchanger double m2
Create Matrix
create(solver)
Input Description Type Unit
solver Class of the Solver solver -

Chiller

The chiller class needs the following arguments as input: the id of condenser inlet, the id of condenser outlet, the id evaporator inlet, the id of evaporator outlet, the solver, specific heat capacity of the fluid, the cooling power, the coefficient of performance, mass flow rate of the condenser, mass flow rate of the evaporator, and the status of chiller.

Equations

Equations

Variables

Variable Description
Q. Heat Transfer Rate
P Electrical Power (input)
COP Coefficient of Performance
C Water Specific Heat Capacity
Subscript Description
e Evaporator
c Condenser
i Inlet
o Outlet

Code

Construction
chiller = Chiller(id_condenser_inlet, id_condenser_outlet, id_evaporator_inlet, id_evaporator_outlet, solver, specific_heat_capacity_fluid, power, coefficient_of_performance, 
                      

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap