Skip to content

Commit 25c3793

Browse files
Doc update
1 parent a3219f3 commit 25c3793

26 files changed

+120
-66
lines changed

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# GitHub Actions Workflow with MATLAB Actions
2+
#
3+
# For a general overview of GitHub Actions, see
4+
# https://docs.github.com/en/actions
5+
#
6+
# For using MathWorks products in GitHub Actions, see
7+
# https://github.com/matlab-actions/overview
8+
#
9+
# For details about the syntax of this file, see
10+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
11+
12+
# Copyright 2024 The MathWorks, Inc.
13+
14+
name: CI using MATLAB
15+
16+
on:
17+
push:
18+
paths-ignore:
19+
- 'docs/**'
20+
- '**.md'
21+
- '**.png'
22+
- '**.svg'
23+
- '**.txt'
24+
- '**.xml'
25+
26+
pull_request:
27+
paths-ignore:
28+
- 'docs/**'
29+
- '**.md'
30+
- '**.png'
31+
- '**.svg'
32+
- '**.txt'
33+
- '**.xml'
34+
35+
schedule:
36+
- cron: '55/61 20/25 1/6 * *' # schedule a weekly-ish build
37+
38+
jobs:
39+
40+
job-check-project:
41+
runs-on: ubuntu-latest
42+
steps:
43+
44+
- name: Check out repository
45+
uses: actions/checkout@v3
46+
47+
- name: Setup MATLAB
48+
uses: matlab-actions/setup-matlab@v1
49+
with:
50+
release: R2023a
51+
52+
- name: Run tests
53+
uses: matlab-actions/run-command@v1
54+
with:
55+
command: openProject(pwd);SandBatteryTestRunner;

Overview/ResidentialBuildingTESandPVcell.m

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
%% Residential Building Heating with TES and PV
2-
3-
2+
%
43
% Copyright 2023 - 2024 The MathWorks, Inc.
54

65
%% Model Overview
@@ -32,7 +31,7 @@
3231
% This picture shows equivalent circuit of MPPT.
3332
%
3433
%
35-
% <<MPPTcircuit.PNG>>
34+
% <<MPPTcircuit.png>>
3635
%
3736
%
3837
% The MPPT Converter subsystem receives two inputs:
@@ -65,12 +64,10 @@
6564
%
6665
% To model the sand battery, the Thermal energy storage subsystem uses a
6766
% Sand TES custom block.
68-
% To learn more about the custom block, see <blockDescriptionTES.html Sand
67+
% To learn more about the custom block, see <matlab:web('blockDescriptionTES.html') Sand
6968
% Battery>
7069
%
71-
7270
%% Set Model Parameters
7371
% * <matlab:open('ThermalBatterySetParam.m') Set Thermal Battery Parameters>
7472
% * <matlab:open('residentialUnitSetParam.m') Set Residential Unit Parameters>
75-
76-
73+
%

Overview/blockDescriptionTES.m

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
%% Sand Battery
2-
%%
32
%
4-
% <<maskIcon.PNG>>
3+
% <<maskIcon.png>>
54
%
6-
7-
85
% Copyright 2023 - 2024 The MathWorks, Inc.
96

10-
117
%% Description
128
% The Sand Battery block models a thermal energy storage by using sand as the energy storage medium.
139
% The block stores the energy in form of sensible heat of the sand.
@@ -26,15 +22,14 @@
2622
% parallel-connected cells. To ensure the accuracy of the energy
2723
% calculation, the Biot number criterion internally constraints the mass of
2824
% the sand associated with the heating coil or moist air pipe.
29-
3025
%%
3126
%
32-
% <<TESnetwork.PNG>>
27+
% <<TESnetwork.png>>
3328
%
3429
% This figure shows the sand battery configuration when you set the |Number of coil rows| and |Number of coils in each row| parameters to 2.
3530
%%
3631
%
37-
% <<sandBattery.PNG>>
32+
% <<sandBattery.png>>
3833
%
3934
%% Ports
4035
%%
@@ -51,12 +46,10 @@
5146
%%%
5247
% * *tH* — Thermal conserving port associated with the heat leakage from the thermal energy storage (TES).
5348
%
54-
55-
5649
%% Parameters
5750
%
5851
%
59-
% <<blockMaskTES.PNG>>
52+
% <<blockMaskTES.png>>
6053
%
6154
%
6255
%
@@ -114,8 +107,4 @@
114107
% * *Specific heat of sand* — Specific heat of the sand, specified as a positive scalar.
115108
%
116109
% * *Initial sand mass temperature* — Initial temperature of the sand at the beginning of the simulation, specified as a positive scalar.
117-
%
118-
119-
120-
121-
110+
%

Overview/html/ResidentialBuildingTESandPVcell.html

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<!--
77
This HTML was auto-generated from MATLAB code.
88
To make changes, update the MATLAB code and republish this document.
9-
--><title>Residential Building Heating with TES and PV</title><meta name="generator" content="MATLAB 9.14"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2024-06-19"><meta name="DC.source" content="ResidentialBuildingTESandPVcell.m"><style type="text/css">
9+
--><title>Residential Building Heating with TES and PV</title><meta name="generator" content="MATLAB 9.14"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2024-11-26"><meta name="DC.source" content="ResidentialBuildingTESandPVcell.m"><style type="text/css">
1010
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
1111

1212
html { min-height:100%; margin-bottom:1px; }
@@ -67,11 +67,10 @@
6767

6868

6969

70-
</style></head><body><div class="content"><h1>Residential Building Heating with TES and PV</h1><!--introduction--><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">Model Overview</a></li><li><a href="#4">Model Subsystems</a></li><li><a href="#8">Set Model Parameters</a></li></ul></div><h2 id="1">Model Overview</h2><p>The residential heating model comprises a rooftop photovoltaic (PV) panel for charging the thermal battery, a thermal energy storage for storing renewable energy, a hot water tank for storing hot water, a heat exchanger (HEX) for heating the water, a pump for supplying hot water to the house, and an air blower for taking out the stored heat from the thermal battery.</p><p>To increase the efficiency of the system PV panels, the model recovers the heat by circulating the water through the channels below the PV panels. The Control subsystem controls the water pump and air blower pressure to achieve the set temperature of the hot water tank. The subsystem also operates the flow control valve. The flow control valve allows the water to flow towards the PV panels that are hotter than the tank temperature.</p><p><img vspace="5" hspace="5" src="thermalEnergyStorageDesignOverview_01.png" alt=""> </p><h2 id="4">Model Subsystems</h2><p><b>Photovoltaic Panel Subsystem</b></p><p>The Photovoltaic panel subsystem models the solar battery that converts the sunlight into electricity. The subsystem uses a Solar Cell block that allows you to choose a pre-parameterized PV component.</p><p><b>MPPT Converter Subsystem</b></p><p>The PV panel produces a power as a function of the load resistance that connects to the panel. To maximize the power that the PV panels produce when they connect to the heating coil network of a given resistance, you require an MPPT converter. This picture shows equivalent circuit of MPPT.</p><p><img vspace="5" hspace="5" src="MPPTcircuit.PNG" alt=""> </p><p>The MPPT Converter subsystem receives two inputs:</p><div><ul><li>The net heating coil resistance that connects to the PV panel <img src="ResidentialBuildingTESandPVcell_eq08783089781685090913.png" alt="$R_L$" style="width:17px;height:13px;"></li><li>The Voltage <img src="ResidentialBuildingTESandPVcell_eq10400070808277276123.png" alt="$V_m$" style="width:17px;height:13px;"> at which the PV panel produces the maximum power.</li></ul></div><p>PV panel suppliers provide the value of <img src="ResidentialBuildingTESandPVcell_eq10400070808277276123.png" alt="$V_m$" style="width:17px;height:13px;"> in the product datasheet. To maximize the PV power, the MPPT sets the voltage across the panel to <img src="ResidentialBuildingTESandPVcell_eq10400070808277276123.png" alt="$V_m$" style="width:17px;height:13px;">. If the current from the PV panel is <img src="ResidentialBuildingTESandPVcell_eq04234782492993571773.png" alt="$I_m$" style="width:15px;height:13px;">, then the power that the PV panel produces is equal to <img src="ResidentialBuildingTESandPVcell_eq14958545416380561496.png" alt="$V_m*I_m$" style="width:47px;height:13px;">.</p><p>The heater coil dissipates a power equal to <img src="ResidentialBuildingTESandPVcell_eq14440076464137941470.png" alt="$V_L^2/R_L$" style="width:43px;height:17px;">.</p><p>To calculate the MPPT terminal voltage, the MPPT Converter subsystem equates the two powers and solve for <img src="ResidentialBuildingTESandPVcell_eq13778725294678372914.png" alt="$V_L$" style="width:12px;height:11px;">:</p><p><img src="ResidentialBuildingTESandPVcell_eq05957124644736009177.png" alt="$V_L \ =\ \sqrt{V_m \times I_m \times R_L }$" style="width:147px;height:15px;">.</p><p><b>Residential Unit Subsystem</b></p><p>The Residential Unit subsystem comprises an electrical resistor to model the household power consumption and a thermal network to model the temperature variation of the rooms. Hot water radiators heat the rooms when the outside atmosphere temperature drops below the room set point temperature. The roof of the rooms thermally connects to the PV panel. The floor of the rooms thermally connects to the TES by using a Conductive Heat Transfer block.</p><p><b>Thermal Energy Storage Subsystem</b></p><p>To model the sand battery, the Thermal energy storage subsystem uses a Sand TES custom block. To learn more about the custom block, see <a href="blockDescriptionTES.html">Sand Battery</a></p><h2 id="8">Set Model Parameters</h2><div><ul><li><a href="matlab:open('ThermalBatterySetParam.m')">Set Thermal Battery Parameters</a></li><li><a href="matlab:open('residentialUnitSetParam.m')">Set Residential Unit Parameters</a></li></ul></div><p class="footer">Copyright 2023 - 2024 The MathWorks, Inc.<br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2023a</a><br></p></div><!--
70+
</style></head><body><div class="content"><h1>Residential Building Heating with TES and PV</h1><!--introduction--><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">Model Overview</a></li><li><a href="#4">Model Subsystems</a></li><li><a href="#8">Set Model Parameters</a></li></ul></div><h2 id="1">Model Overview</h2><p>The residential heating model comprises a rooftop photovoltaic (PV) panel for charging the thermal battery, a thermal energy storage for storing renewable energy, a hot water tank for storing hot water, a heat exchanger (HEX) for heating the water, a pump for supplying hot water to the house, and an air blower for taking out the stored heat from the thermal battery.</p><p>To increase the efficiency of the system PV panels, the model recovers the heat by circulating the water through the channels below the PV panels. The Control subsystem controls the water pump and air blower pressure to achieve the set temperature of the hot water tank. The subsystem also operates the flow control valve. The flow control valve allows the water to flow towards the PV panels that are hotter than the tank temperature.</p><p><img vspace="5" hspace="5" src="thermalEnergyStorageDesignOverview_01.png" alt=""> </p><h2 id="4">Model Subsystems</h2><p><b>Photovoltaic Panel Subsystem</b></p><p>The Photovoltaic panel subsystem models the solar battery that converts the sunlight into electricity. The subsystem uses a Solar Cell block that allows you to choose a pre-parameterized PV component.</p><p><b>MPPT Converter Subsystem</b></p><p>The PV panel produces a power as a function of the load resistance that connects to the panel. To maximize the power that the PV panels produce when they connect to the heating coil network of a given resistance, you require an MPPT converter. This picture shows equivalent circuit of MPPT.</p><p><img vspace="5" hspace="5" src="MPPTcircuit.png" alt=""> </p><p>The MPPT Converter subsystem receives two inputs:</p><div><ul><li>The net heating coil resistance that connects to the PV panel <img src="ResidentialBuildingTESandPVcell_eq08783089781685090913.png" alt="$R_L$" style="width:17px;height:13px;"></li><li>The Voltage <img src="ResidentialBuildingTESandPVcell_eq10400070808277276123.png" alt="$V_m$" style="width:17px;height:13px;"> at which the PV panel produces the maximum power.</li></ul></div><p>PV panel suppliers provide the value of <img src="ResidentialBuildingTESandPVcell_eq10400070808277276123.png" alt="$V_m$" style="width:17px;height:13px;"> in the product datasheet. To maximize the PV power, the MPPT sets the voltage across the panel to <img src="ResidentialBuildingTESandPVcell_eq10400070808277276123.png" alt="$V_m$" style="width:17px;height:13px;">. If the current from the PV panel is <img src="ResidentialBuildingTESandPVcell_eq04234782492993571773.png" alt="$I_m$" style="width:15px;height:13px;">, then the power that the PV panel produces is equal to <img src="ResidentialBuildingTESandPVcell_eq14958545416380561496.png" alt="$V_m*I_m$" style="width:47px;height:13px;">.</p><p>The heater coil dissipates a power equal to <img src="ResidentialBuildingTESandPVcell_eq14440076464137941470.png" alt="$V_L^2/R_L$" style="width:43px;height:17px;">.</p><p>To calculate the MPPT terminal voltage, the MPPT Converter subsystem equates the two powers and solve for <img src="ResidentialBuildingTESandPVcell_eq13778725294678372914.png" alt="$V_L$" style="width:12px;height:11px;">:</p><p><img src="ResidentialBuildingTESandPVcell_eq05957124644736009177.png" alt="$V_L \ =\ \sqrt{V_m \times I_m \times R_L }$" style="width:147px;height:15px;">.</p><p><b>Residential Unit Subsystem</b></p><p>The Residential Unit subsystem comprises an electrical resistor to model the household power consumption and a thermal network to model the temperature variation of the rooms. Hot water radiators heat the rooms when the outside atmosphere temperature drops below the room set point temperature. The roof of the rooms thermally connects to the PV panel. The floor of the rooms thermally connects to the TES by using a Conductive Heat Transfer block.</p><p><b>Thermal Energy Storage Subsystem</b></p><p>To model the sand battery, the Thermal energy storage subsystem uses a Sand TES custom block. To learn more about the custom block, see <a href="matlab:web('blockDescriptionTES.html')">Sand Battery</a></p><h2 id="8">Set Model Parameters</h2><div><ul><li><a href="matlab:open('ThermalBatterySetParam.m')">Set Thermal Battery Parameters</a></li><li><a href="matlab:open('residentialUnitSetParam.m')">Set Residential Unit Parameters</a></li></ul></div><p class="footer">Copyright 2023 - 2024 The MathWorks, Inc.<br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2023a</a><br></p></div><!--
7171
##### SOURCE BEGIN #####
7272
%% Residential Building Heating with TES and PV
73-
74-
73+
%
7574
% Copyright 2023 - 2024 The MathWorks, Inc.
7675
7776
%% Model Overview
@@ -103,7 +102,7 @@
103102
% This picture shows equivalent circuit of MPPT.
104103
%
105104
%
106-
% <<MPPTcircuit.PNG>>
105+
% <<MPPTcircuit.png>>
107106
%
108107
%
109108
% The MPPT Converter subsystem receives two inputs:
@@ -136,14 +135,12 @@
136135
%
137136
% To model the sand battery, the Thermal energy storage subsystem uses a
138137
% Sand TES custom block.
139-
% To learn more about the custom block, see <blockDescriptionTES.html Sand
138+
% To learn more about the custom block, see <matlab:web('blockDescriptionTES.html') Sand
140139
% Battery>
141140
%
142-
143141
%% Set Model Parameters
144142
% * <matlab:open('ThermalBatterySetParam.m') Set Thermal Battery Parameters>
145143
% * <matlab:open('residentialUnitSetParam.m') Set Residential Unit Parameters>
146-
147-
144+
%
148145
##### SOURCE END #####
149146
--></body></html>

0 commit comments

Comments
 (0)