|
| 1 | +within IDEAS.Examples.Tutorial.DetailedHouse; |
| 2 | +model DetailedHouse1 "First example model of a one-zone building" |
| 3 | + extends Modelica.Icons.Example; |
| 4 | + package MediumAir = IDEAS.Media.Air "Air medium"; |
| 5 | + |
| 6 | + parameter Modelica.Units.SI.Length l=8 "Zone length"; |
| 7 | + parameter Modelica.Units.SI.Length w=4 "Zone width"; |
| 8 | + parameter Modelica.Units.SI.Length h=zon.hZone "Zone height (Default)"; |
| 9 | + |
| 10 | + // SimInfoManager must be 'inner' at the top level |
| 11 | + inner IDEAS.BoundaryConditions.SimInfoManager sim |
| 12 | + annotation (Placement(transformation(extent={{-100,80},{-80,100}}))); |
| 13 | + IDEAS.Buildings.Components.Zone zon( |
| 14 | + redeclare package Medium = MediumAir, |
| 15 | + nSurf=7, |
| 16 | + V=l*h*w) |
| 17 | + "Zone model" annotation (Placement(transformation(extent={{-20,0},{0,20}}))); |
| 18 | + IDEAS.Buildings.Components.OuterWall outWalWes( |
| 19 | + redeclare IDEAS.Buildings.Validation.Data.Constructions.HeavyWall |
| 20 | + constructionType, |
| 21 | + inc=IDEAS.Types.Tilt.Wall, |
| 22 | + azi=IDEAS.Types.Azimuth.W, |
| 23 | + A=l*h) "Western outer wall model" |
| 24 | + annotation (Placement(transformation(extent={{-60,10},{-48,30}}))); |
| 25 | + IDEAS.Buildings.Components.OuterWall outWalEas( |
| 26 | + redeclare IDEAS.Buildings.Validation.Data.Constructions.HeavyWall |
| 27 | + constructionType, |
| 28 | + inc=IDEAS.Types.Tilt.Wall, |
| 29 | + azi=IDEAS.Types.Azimuth.E, |
| 30 | + A=l*h) "Eastern outer wall model" |
| 31 | + annotation (Placement(transformation(extent={{40,0},{28,20}}))); |
| 32 | + IDEAS.Buildings.Components.OuterWall outWalNor( |
| 33 | + redeclare IDEAS.Buildings.Validation.Data.Constructions.HeavyWall |
| 34 | + constructionType, |
| 35 | + inc=IDEAS.Types.Tilt.Wall, |
| 36 | + azi=IDEAS.Types.Azimuth.N, |
| 37 | + A=w*h) "Northern outer wall model" |
| 38 | + annotation (Placement(transformation( |
| 39 | + extent={{6,-10},{-6,10}}, |
| 40 | + rotation=90, |
| 41 | + origin={-10,54}))); |
| 42 | + IDEAS.Buildings.Components.OuterWall outWalSou( |
| 43 | + redeclare IDEAS.Buildings.Validation.Data.Constructions.HeavyWall |
| 44 | + constructionType, |
| 45 | + inc=IDEAS.Types.Tilt.Wall, |
| 46 | + azi=IDEAS.Types.Azimuth.S, |
| 47 | + A=w*h - win.A) "Southern outer wall model" |
| 48 | + annotation (Placement(transformation( |
| 49 | + extent={{-6,-10},{6,10}}, |
| 50 | + rotation=90, |
| 51 | + origin={-10,-34}))); |
| 52 | + IDEAS.Buildings.Components.Window win( |
| 53 | + inc=IDEAS.Types.Tilt.Wall, |
| 54 | + A=3*1.4, |
| 55 | + azi=IDEAS.Types.Azimuth.S, |
| 56 | + redeclare IDEAS.Buildings.Data.Glazing.Ins2Ar2020 glazing) |
| 57 | + "Window model" annotation (Placement(transformation(extent={{-6,-10},{6,10}}, |
| 58 | + rotation=0, |
| 59 | + origin={-54,-10}))); |
| 60 | + |
| 61 | + IDEAS.Buildings.Components.SlabOnGround slaOnGro( |
| 62 | + redeclare IDEAS.Buildings.Data.Constructions.FloorOnGround constructionType, |
| 63 | + inc=IDEAS.Types.Tilt.Floor, |
| 64 | + azi=IDEAS.Types.Azimuth.S, |
| 65 | + A=l*w) "Floor model" annotation (Placement(transformation( |
| 66 | + extent={{-6,-11},{6,11}}, |
| 67 | + rotation=90, |
| 68 | + origin={30,-35}))); |
| 69 | + IDEAS.Buildings.Components.OuterWall cei( |
| 70 | + redeclare IDEAS.Buildings.Validation.Data.Constructions.LightRoof |
| 71 | + constructionType, |
| 72 | + inc=IDEAS.Types.Tilt.Ceiling, |
| 73 | + A=w*l) "Ceiling model" annotation (Placement(transformation( |
| 74 | + extent={{6,-10},{-6,10}}, |
| 75 | + rotation=90, |
| 76 | + origin={30,54}))); |
| 77 | +equation |
| 78 | + connect(outWalWes.propsBus_a, zon.propsBus[1]) annotation (Line( |
| 79 | + points={{-49,22},{-30,22},{-30,14},{-20,14},{-20,13.1429}}, |
| 80 | + color={255,204,51}, |
| 81 | + thickness=0.5)); |
| 82 | + connect(zon.propsBus[2], outWalNor.propsBus_a) annotation (Line( |
| 83 | + points={{-20,13.4286},{-22,13.4286},{-22,30},{-12,30},{-12,49}}, |
| 84 | + color={255,204,51}, |
| 85 | + thickness=0.5)); |
| 86 | + connect(zon.propsBus[3], outWalEas.propsBus_a) annotation (Line( |
| 87 | + points={{-20,13.7143},{-20,14},{-22,14},{-22,30},{20,30},{20,12},{29,12}}, |
| 88 | + color={255,204,51}, |
| 89 | + thickness=0.5)); |
| 90 | + connect(outWalSou.propsBus_a, zon.propsBus[4]) annotation (Line( |
| 91 | + points={{-12,-29},{-12,-10},{-20,-10},{-20,14}}, |
| 92 | + color={255,204,51}, |
| 93 | + thickness=0.5)); |
| 94 | + connect(win.propsBus_a, zon.propsBus[5]) annotation (Line( |
| 95 | + points={{-49,-8},{-30,-8},{-30,14},{-20,14},{-20,14.2857}}, |
| 96 | + color={255,204,51}, |
| 97 | + thickness=0.5)); |
| 98 | + connect(slaOnGro.propsBus_a, zon.propsBus[6]) annotation (Line( |
| 99 | + points={{27.8,-30},{28,-30},{28,-10},{-20,-10},{-20,14.5714}}, |
| 100 | + color={255,204,51}, |
| 101 | + thickness=0.5)); |
| 102 | + connect(cei.propsBus_a, zon.propsBus[7]) annotation (Line( |
| 103 | + points={{28,49},{28,30},{-22,30},{-22,14.8571},{-20,14.8571}}, |
| 104 | + color={255,204,51}, |
| 105 | + thickness=0.5)); |
| 106 | + annotation ( |
| 107 | + Icon(coordinateSystem(preserveAspectRatio=false)), |
| 108 | + Diagram(coordinateSystem(preserveAspectRatio=false)), |
| 109 | + experiment( |
| 110 | + StartTime=10000000, |
| 111 | + StopTime=11000000, |
| 112 | + __Dymola_NumberOfIntervals=5000, |
| 113 | + Tolerance=1e-06, |
| 114 | + __Dymola_Algorithm="Dassl"), |
| 115 | + __Dymola_Commands(file= |
| 116 | + "Resources/Scripts/Dymola/Examples/Tutorial/DetailedHouse/DetailedHouse1.mos" |
| 117 | + "Simulate and plot"), |
| 118 | + Documentation(info="<html> |
| 119 | +<p> |
| 120 | +This first example instantiates a simple building model that consists of one zone, four walls, |
| 121 | +a window, a floor and a ceiling. The zone dimensions are <i>8 m</i> (with walls oriented |
| 122 | +north and south) by <i>4 m</i>, and the window measures <i>3 m</i> by <i>1.4 m</i>. Use the default |
| 123 | +zone height of <i>2.8 m</i>. Apply double glazing and a heavy wall, which provide high thermal mass. |
| 124 | +</p> |
| 125 | +<h4>Required models</h4> |
| 126 | +<ul> |
| 127 | +<li> |
| 128 | +<a href=\"modelica://IDEAS.BoundaryConditions.SimInfoManager\"> |
| 129 | +IDEAS.BoundaryConditions.SimInfoManager</a> |
| 130 | +</li> |
| 131 | +<li> |
| 132 | +<a href=\"modelica://IDEAS.Buildings.Components.Zone\"> |
| 133 | + IDEAS.Buildings.Components.Zone</a> |
| 134 | +</li> |
| 135 | +<li> |
| 136 | +<a href=\"modelica://IDEAS.Buildings.Components.OuterWall\"> |
| 137 | +IDEAS.Buildings.Components.OuterWall</a> |
| 138 | +</li> |
| 139 | +<li> |
| 140 | +<a href=\"modelica://IDEAS.Buildings.Components.Window\"> |
| 141 | +IDEAS.Buildings.Components.Window</a> |
| 142 | +</li> |
| 143 | +<li> |
| 144 | +<a href=\"modelica://IDEAS.Buildings.Components.SlabOnGround\"> |
| 145 | +IDEAS.Buildings.Components.SlabOnGround</a> |
| 146 | +</li> |
| 147 | +</ul> |
| 148 | +<h4>Connection instructions</h4> |
| 149 | +<p> |
| 150 | +Each yellow bus connector of a surface (<code>Window</code>, <code>OuterWall</code> |
| 151 | +or <code>SlabOnGround</code>) has to be connected to exactly one zone bus connector. |
| 152 | +To support multiple connections, the zone has an array of bus connectors with size |
| 153 | +<code>nSurf</code>, where <code>nSurf</code> is a parameter of <code>Zone</code>, |
| 154 | +which has to be set by the user. It is the user’s responsibility to ensure that each |
| 155 | +element of this array is connected to exactly one surface and that there is a total |
| 156 | +of <code>nSurf</code> connections to the zone. |
| 157 | +</p> |
| 158 | +<p> |
| 159 | +In addition to connecting each surface, the parameters of each component have to be set. Components typically |
| 160 | +have many default values that are appropriate for many purposes. When a parameter does not have a default |
| 161 | +value, it must be set by the user. Notable examples are the dimensions and orientation of the zone, walls |
| 162 | +and windows. The surface orientation can be set using the parameters <code>incOpt</code>, which automatically sets the |
| 163 | +inclination depending on the type of outer wall (wall, floor, ceiling), and <code>aziOpt</code>, which automatically sets the |
| 164 | +azimuth (north, east, south, west). Furthermore, the zone Medium must be set to <a href=\"modelica://IDEAS.Media.Air\"> |
| 165 | +IDEAS.Media.Air</a>. Glazing and wall types must also be specified. This example uses the <i>BESTEST Heavy Wall</i> for the |
| 166 | +walls, the <i>FloorOnGround</i> construction type for the floor, the <i>BESTEST light roof</i> for the roof and the double glazing |
| 167 | +type <i>Saint Gobain Planitherm</i> and a south orientation for the window. |
| 168 | +</p> |
| 169 | +<p> |
| 170 | +The <code>SimInfoManager</code> by default has the modifier <code>inner</code> in its declaration. All IDEAS building components |
| 171 | +have the modifier <code>outer</code> in their respective declarations of the <code>SimInfoManager</code>. This causes the component |
| 172 | +declarations to point towards the higher level <code>SimInfoManager</code> declaration. This way all model equations for |
| 173 | +the weather data have to be generated only once, instead of for each surface. |
| 174 | +</p> |
| 175 | +<h4>Reference result</h4> |
| 176 | +<p> |
| 177 | +This model is simulated with the following settings: |
| 178 | +</p> |
| 179 | +<ol> |
| 180 | +<li>Dassl as the solver with tolerance = 1e-06 </li> |
| 181 | +<li>Start time = 1e7,</li> |
| 182 | +<li>Stop time = 1.1e7,</li> |
| 183 | +<li>Number of intervals = 5000.</li> |
| 184 | +</ol> |
| 185 | +<p> |
| 186 | +The simulation starts 10<sup>7</sup> seconds after New Year and ends 10<sup>6</sup> seconds later, covering a period of 11.6 days. |
| 187 | +The figure below shows the operative zone temperature, <code>zon.TSensor</code>, |
| 188 | +which represents the mean of the air temperature and the mean radiative temperature of all surfaces. |
| 189 | +</p> |
| 190 | +<p align=\"center\"> |
| 191 | +<img alt=\"Zone temperature as function of time.\" |
| 192 | +src=\"modelica://IDEAS/Resources/Images/Examples/Tutorial/DetailedHouse/DetailedHouse1.png\" width=\"700\"/> |
| 193 | +</p> |
| 194 | +</html>", revisions="<html> |
| 195 | +<ul> |
| 196 | +<li> |
| 197 | +April 14, 2025, by Anna Dell'Isola and Lone Meertens:<br/> |
| 198 | +Update and restructure IDEAS tutorial models. |
| 199 | +See <a href=\"https://github.com/open-ideas/IDEAS/issues/1374\">#1374</a> |
| 200 | +and <a href=\"https://github.com/open-ideas/IDEAS/issues/1389\">#1389</a>. |
| 201 | +</li> |
| 202 | +<li> |
| 203 | +September 18, 2019 by Filip Jorissen:<br/> |
| 204 | +First implementation for the IDEAS crash course. |
| 205 | +</li> |
| 206 | +</ul> |
| 207 | +</html>")); |
| 208 | +end DetailedHouse1; |
0 commit comments