├── DesignPrinciples.pdf ├── DesignPrinciples.rst ├── FastBuildings ├── Buildings │ ├── BaseClasses │ │ ├── Partial2Zone.mo │ │ ├── PartialBuilding_IDEAS.mo │ │ ├── PartialSingleZone.mo │ │ ├── package.mo │ │ └── package.order │ ├── SZ_Controlled.mo │ ├── SZ_Design.mo │ ├── SZ_Inputs.mo │ ├── SZ_Inputs_powEle.mo │ ├── SZ_TAmb_QHea.mo │ ├── Z2_Inputs.mo │ ├── package.mo │ └── package.order ├── DesignPrinciples.pdf ├── DesignPrinciples.rst ├── Examples │ ├── SingleZone_ArtificialInputs.mo │ ├── SingleZone_Controlled.mo │ ├── SingleZone_Design.mo │ ├── SingleZone_Inputs_defined.mo │ ├── TwoZone_ArtificialInputs.mo │ ├── package.mo │ └── package.order ├── HVAC │ ├── Heating_Emb_Input.mo │ ├── Heating_Ideal.mo │ ├── Heating_Input.mo │ ├── Heating_OnOff.mo │ ├── Partial_HVAC.mo │ ├── package.mo │ └── package.order ├── Input │ ├── BaseClasses │ │ ├── Partial_SIM.mo │ │ ├── package.mo │ │ └── package.order │ ├── SIM_2Zones_Artificial.mo │ ├── SIM_ArtificialInput.mo │ ├── SIM_Design.mo │ ├── SIM_Inputs.mo │ ├── SIM_Inputs_2Zones.mo │ ├── package.mo │ └── package.order ├── Users │ ├── package.mo │ ├── package.order │ └── powEleFra.mo ├── Zones │ ├── BaseClasses │ │ ├── Capacitor.mo │ │ ├── Partials │ │ │ ├── Partial_Bound.mo │ │ │ ├── Partial_BoundCap.mo │ │ │ ├── Partial_Ground.mo │ │ │ ├── Partial_SZ.mo │ │ │ ├── Partial_SZ_Zon.mo │ │ │ ├── Partial_SZ_ZonEmb.mo │ │ │ ├── Partial_SZ_ZonEmbInt.mo │ │ │ ├── Partial_SZ_ZonInt.mo │ │ │ ├── Partial_SZ_ZonWal.mo │ │ │ ├── Partial_SZ_ZonWalEmb.mo │ │ │ ├── Partial_SZ_ZonWalInt.mo │ │ │ ├── Partial_SZ_ZonWalIntEmb.mo │ │ │ ├── Partial_SZ_ZonWalInt_fraResInt.mo │ │ │ ├── TwoPort.mo │ │ │ ├── package.mo │ │ │ └── package.order │ │ ├── Resistance.mo │ │ ├── Wall_1C.mo │ │ ├── package.mo │ │ └── package.order │ ├── Windows │ │ ├── PartialWindow.mo │ │ ├── Window_gA.mo │ │ ├── Window_gA_2.mo │ │ ├── package.mo │ │ └── package.order │ ├── ZonBou_A.mo │ ├── ZonEmbInt_A.mo │ ├── ZonEmbInt_B.mo │ ├── ZonEmb_A.mo │ ├── ZonEmb_B.mo │ ├── ZonIntBou_A.mo │ ├── ZonInt_A.mo │ ├── ZonInt_B.mo │ ├── ZonInt_C.mo │ ├── ZonInt_D.mo │ ├── ZonInt_E.mo │ ├── ZonInt_F.mo │ ├── ZonWalEmb_A.mo │ ├── ZonWalEmb_B.mo │ ├── ZonWalEmb_C.mo │ ├── ZonWalEmb_D.mo │ ├── ZonWalIntBouCel_A.mo │ ├── ZonWalIntBou_A.mo │ ├── ZonWalIntBou_B.mo │ ├── ZonWalIntBou_C.mo │ ├── ZonWalIntEmb_A.mo │ ├── ZonWalIntEmb_B.mo │ ├── ZonWalInt_A.mo │ ├── ZonWalInt_B.mo │ ├── ZonWalInt_C.mo │ ├── ZonWalInt_D.mo │ ├── ZonWalInt_E.mo │ ├── ZonWalInt_F.mo │ ├── ZonWalInt_G.mo │ ├── ZonWalInt_H.mo │ ├── ZonWalInt_I.mo │ ├── ZonWalInt_J.mo │ ├── ZonWalInt_fraResInt_A.mo │ ├── ZonWal_A.mo │ ├── ZonWal_B.mo │ ├── ZonWal_C.mo │ ├── Zon_A.mo │ ├── Zon_B.mo │ ├── Zon_C.mo │ ├── package.mo │ └── package.order ├── Zones_stochastic │ ├── BaseClasses │ │ ├── Capacitor.mo │ │ ├── Partials │ │ │ ├── Partial_Ground.mo │ │ │ ├── Partial_SZ.mo │ │ │ ├── Partial_SZ_Zon.mo │ │ │ ├── Partial_SZ_ZonEmb.mo │ │ │ ├── Partial_SZ_ZonInt.mo │ │ │ ├── Partial_SZ_ZonWal.mo │ │ │ ├── Partial_SZ_ZonWalEmb.mo │ │ │ ├── Partial_SZ_ZonWalInt.mo │ │ │ ├── Partial_SZ_ZonWalIntEmb.mo │ │ │ ├── package.mo │ │ │ └── package.order │ │ ├── Resistance.mo │ │ ├── package.mo │ │ └── package.order │ ├── Windows │ │ ├── PartialWindow.mo │ │ ├── Window_gA.mo │ │ ├── Window_gA_2.mo │ │ ├── package.mo │ │ └── package.order │ ├── ZonEmb_A.mo │ ├── ZonEmb_B.mo │ ├── ZonInt_A.mo │ ├── ZonInt_B.mo │ ├── ZonWalEmb_A.mo │ ├── ZonWalEmb_B.mo │ ├── ZonWalIntEmb_A.mo │ ├── ZonWalIntEmb_B.mo │ ├── ZonWalInt_A.mo │ ├── ZonWalInt_B.mo │ ├── ZonWal_A.mo │ ├── ZonWal_B.mo │ ├── ZonWal_C.mo │ ├── Zon_A.mo │ ├── Zon_B.mo │ ├── package.mo │ └── package.order ├── package.mo └── package.order └── README.md /DesignPrinciples.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-ideas/FastBuildings/34e7296a025e789fa12b6d39699d9c287b60e008/DesignPrinciples.pdf -------------------------------------------------------------------------------- /FastBuildings/Buildings/BaseClasses/Partial2Zone.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Buildings.BaseClasses; 2 | partial model Partial2Zone "Two-zone partial" 3 | 4 | replaceable FastBuildings.Zones.BaseClasses.Partials.Partial_SZ zon1 5 | annotation (Placement(visible=true, transformation( 6 | origin={-29.0598,0.34188}, 7 | extent={{-10,-10},{10,10}}, 8 | rotation=0))); 9 | replaceable FastBuildings.HVAC.Partial_HVAC hva1 annotation (Placement( 10 | visible=true, transformation( 11 | origin={18.1197,0.683761}, 12 | extent={{-10,-10},{10,10}}, 13 | rotation=0))); 14 | outer Input.SIM_Inputs_2Zones simFasBui 15 | "Weather data, to be provided by an inner submodel of Partial_SIM" annotation(Placement(visible = true, transformation(origin={-90.1538, 16 | 89.5214}, extent = {{-10,-10},{10,10}}, rotation = 0))); 17 | replaceable FastBuildings.Zones.BaseClasses.Partials.Partial_SZ zon2 18 | annotation (Placement(visible=true, transformation( 19 | origin={-27.0598,-59.6581}, 20 | extent={{-10,-10},{10,10}}, 21 | rotation=0))); 22 | replaceable Zones.BaseClasses.Wall_1C bou constrainedby 23 | FastBuildings.Zones.BaseClasses.Partials.TwoPort 24 | "boundary wall between zon1 and zon2" annotation (ChoicesAllMatching=true, 25 | Placement(transformation( 26 | extent={{-10,-10},{10,10}}, 27 | rotation=90, 28 | origin={-6,-30}))); 29 | replaceable FastBuildings.HVAC.Partial_HVAC hva2 annotation (Placement( 30 | visible=true, transformation( 31 | origin={20.1197,-59.3162}, 32 | extent={{-10,-10},{10,10}}, 33 | rotation=0))); 34 | equation 35 | connect(zon1.TZon, hva1.TZon) annotation (Line(points={{-19.0598,-7.65812},{ 36 | 7.86325,-7.65812},{7.86325,-7.35031},{8.1619,-7.35031}})); 37 | connect(zon1.heaPorRad, hva1.heaPorRad) annotation (Line(points={{-19.0598, 38 | -3.65812},{8.20513,-3.65812},{8.20513,-3.31624},{8.1027,-3.31624}})); 39 | connect(zon1.heaPorCon, hva1.heaPorCon) annotation (Line(points={{-19.0598, 40 | 0.34188},{8.20513,0.34188},{8.20513,0.690581},{8.1367,0.690581}})); 41 | connect(zon1.heaPorEmb, hva1.heaPorEmb) annotation (Line(points={{-19.0598, 42 | 4.33245},{8.54701,4.33245},{8.54701,4.67694},{8.1367,4.67694}})); 43 | connect(bou.heaPor_b, hva1.heaPorCon) annotation (Line( 44 | points={{-6,-20},{-6,0},{8.20513,0},{8.20513,0.690581},{8.1367,0.690581}}, 45 | color={191,0,0}, 46 | smooth=Smooth.None)); 47 | 48 | connect(zon2.TZon, hva2.TZon) annotation (Line( 49 | points={{-17.0598,-67.6581},{-4,-67.6581},{-4,-67.3503},{10.1619,-67.3503}}, 50 | color={0,0,127}, 51 | smooth=Smooth.None)); 52 | 53 | connect(zon2.heaPorEmb, hva2.heaPorEmb) annotation (Line( 54 | points={{-17.0598,-55.6675},{-3.5299,-55.6675},{-3.5299,-55.323},{10.1367, 55 | -55.323}}, 56 | color={191,0,0}, 57 | smooth=Smooth.None)); 58 | connect(zon2.heaPorCon, hva2.heaPorCon) annotation (Line( 59 | points={{-17.0598,-59.6581},{-3.5299,-59.6581},{-3.5299,-59.3094},{ 60 | 10.1367,-59.3094}}, 61 | color={191,0,0}, 62 | smooth=Smooth.None)); 63 | connect(zon2.heaPorRad, hva2.heaPorRad) annotation (Line( 64 | points={{-17.0598,-63.6581},{-3.5299,-63.6581},{-3.5299,-63.3162},{ 65 | 10.1027,-63.3162}}, 66 | color={191,0,0}, 67 | smooth=Smooth.None)); 68 | connect(bou.heaPor_a, hva2.heaPorCon) annotation (Line( 69 | points={{-6,-40},{-6,-60},{-3.5299,-60},{-3.5299,-59.3094},{10.1367, 70 | -59.3094}}, 71 | color={191,0,0}, 72 | smooth=Smooth.None)); 73 | annotation(Diagram(coordinateSystem(extent={{-100,-100},{100,100}}, preserveAspectRatio=false, initialScale = 0.1, grid = {2,2}), 74 | graphics), Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}), graphics={ Rectangle(origin= {0.854701,-33.6752}, extent= {{-77.7778,-66.4957},{77.7778,66.4957}}),Polygon(origin= {-1.03388,65.2156}, points= {{-95.7183,-32.3951},{95.7347,-32.3951},{-2.04304,32.5622},{-95.7183,-32.3951}}),Text(origin= {0,-40.17}, lineColor= 75 | {170,0,0}, extent= {{-58.8,37.44},{58.8,-37.44}}, 76 | textString="Z2")})); 77 | end Partial2Zone; 78 | -------------------------------------------------------------------------------- /FastBuildings/Buildings/BaseClasses/PartialBuilding_IDEAS.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Buildings.BaseClasses; 2 | partial model PartialBuilding_IDEAS "Multizone building, compatible with IDEAS" 3 | 4 | extends IDEAS.Interfaces.BaseClasses.Structure(nZones=1, final nEmb=nZones); 5 | parameter Integer nIrr(min = 1) "Number of irradiation vectors"; 6 | inner FastBuildings.Input.SIM_Inputs simFasBui(nIrr=nIrr) 7 | "Weather data, to be provided by an inner submodel of Partial_SIM" annotation(Placement(visible = true, transformation(origin={-138.154, 8 | 89.5214}, extent = {{-10,-10},{10,10}}, rotation = 0))); 9 | replaceable Zones.BaseClasses.Partials.Partial_SZ[nZones] zon(nIrr=nIrr) 10 | "Array of zones" annotation(choicesAllMatching = true, Placement(visible = true, transformation(origin={1.4701, 11 | -2.8291}, extent={{ 12 | -64.5299,-42.8291},{64.5299,42.8291}}, rotation = 0))); 13 | IDEAS.Climate.Meteo.Solar.RadSol[nIrr] radSol( 14 | each A=1, 15 | inc=inc, 16 | azi=azi) "Solar radiation processor for each nIrr" 17 | annotation (Placement(transformation(extent={{-148,34},{-128,54}}))); 18 | 19 | parameter SI.Angle inc[nIrr] 20 | "inclination, one value for each solar radiation to be computed"; 21 | parameter SI.Angle azi[nIrr] 22 | "azimuth, one value for each solar radiation to be included"; 23 | equation 24 | simFasBui.TAmb = sim.Te; 25 | simFasBui.TSet = 0; 26 | simFasBui.qHeaCoo = 0; 27 | simFasBui.powEle = 0; 28 | for i in 1:nIrr loop 29 | simFasBui.irr[i] = radSol[i].solDir + radSol[i].solDif; 30 | end for; 31 | 32 | connect(zon.heaPorEmb, heatPortEmb) annotation (Line( 33 | points={{66,14.2622},{105,14.2622},{105,60},{150,60}}, 34 | color={191,0,0}, 35 | smooth=Smooth.None)); 36 | connect(zon.heaPorCon, heatPortCon) annotation (Line( 37 | points={{66,-2.8291},{90,-2.8291},{90,-4},{120,-4},{120,20},{150,20}}, 38 | color={191,0,0}, 39 | smooth=Smooth.None)); 40 | connect(zon.heaPorRad, heatPortRad) annotation (Line( 41 | points={{66,-19.9607},{106,-19.9607},{106,-20},{150,-20}}, 42 | color={191,0,0}, 43 | smooth=Smooth.None)); 44 | connect(zon.TZon, TSensor) annotation (Line( 45 | points={{66,-37.0924},{106,-37.0924},{106,-60},{156,-60}}, 46 | color={0,0,127}, 47 | smooth=Smooth.None)); 48 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-150, 49 | -100},{150,100}}), graphics)); 50 | end PartialBuilding_IDEAS; 51 | -------------------------------------------------------------------------------- /FastBuildings/Buildings/BaseClasses/PartialSingleZone.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Buildings.BaseClasses; 2 | partial model PartialSingleZone 3 | 4 | replaceable FastBuildings.Zones.BaseClasses.Partials.Partial_SZ zon annotation(Placement(visible = true, transformation(origin = {-29.0598,0.34188}, extent = {{-10,-10},{10,10}}, rotation = 0))); 5 | replaceable FastBuildings.HVAC.Partial_HVAC hva annotation(Placement(visible = true, transformation(origin = {18.1197,0.683761}, extent = {{-10,-10},{10,10}}, rotation = 0))); 6 | outer FastBuildings.Input.BaseClasses.Partial_SIM simFasBui 7 | "Weather data, to be provided by an inner submodel of Partial_SIM" annotation(Placement(visible = true, transformation(origin={-90.1538, 8 | 89.5214}, extent = {{-10,-10},{10,10}}, rotation = 0))); 9 | equation 10 | connect(zon.TZon,hva.TZon) annotation(Line(points={{-19.0598,-7.65812},{ 11 | 7.86325,-7.65812},{7.86325,-7.35031},{8.1619,-7.35031}})); 12 | connect(zon.heaPorRad,hva.heaPorRad) annotation(Line(points={{-19.0598, 13 | -3.65812},{8.20513,-3.65812},{8.20513,-3.31624},{8.1027,-3.31624}})); 14 | connect(zon.heaPorCon,hva.heaPorCon) annotation(Line(points={{-19.0598, 15 | 0.34188},{8.20513,0.34188},{8.20513,0.690581},{8.1367,0.690581}})); 16 | connect(zon.heaPorEmb,hva.heaPorEmb) annotation(Line(points={{-19.0598, 17 | 4.33245},{8.54701,4.33245},{8.54701,4.67694},{8.1367,4.67694}})); 18 | annotation(Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}), graphics={ Rectangle(origin= {0.854701,-33.6752}, extent= {{-77.7778,-66.4957},{77.7778,66.4957}}),Polygon(origin= {-1.03388,65.2156}, points= {{-95.7183,-32.3951},{95.7347,-32.3951},{-2.04304,32.5622},{-95.7183,-32.3951}}),Text(origin= {0,-40.17}, lineColor= {170,0,0}, extent= {{-58.8,37.44},{58.8,-37.44}}, textString= "SZ")})); 19 | end PartialSingleZone; 20 | -------------------------------------------------------------------------------- /FastBuildings/Buildings/BaseClasses/package.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Buildings; 2 | package BaseClasses 3 | import SI = Modelica.SIunits; 4 | import HT = Modelica.Thermal.HeatTransfer; 5 | 6 | 7 | 8 | end BaseClasses; 9 | -------------------------------------------------------------------------------- /FastBuildings/Buildings/BaseClasses/package.order: -------------------------------------------------------------------------------- 1 | PartialSingleZone 2 | PartialBuilding_IDEAS 3 | Partial2Zone 4 | -------------------------------------------------------------------------------- /FastBuildings/Buildings/SZ_Controlled.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Buildings; 2 | model SZ_Controlled "Single zone building with on/off heating control" 3 | extends BaseClasses.PartialSingleZone(redeclare 4 | FastBuildings.HVAC.Heating_OnOff hva); 5 | Users.powEleFra use 6 | annotation (Placement(transformation(extent={{-40,26},{-20,46}}))); 7 | equation 8 | connect(simFasBui.TSet, hva.TSet) annotation (Line( 9 | points={{-90.193,78.5462},{-90.193,-42},{18.1619,-42},{18.1619,-8.95031}}, 10 | color={0,0,127}, 11 | smooth=Smooth.None)); 12 | 13 | connect(simFasBui.powEle, use.powEle) annotation (Line( 14 | points={{-86.193,78.5462},{-86.193,36.0261},{-40.6128,36.0261}}, 15 | color={0,0,127}, 16 | smooth=Smooth.None)); 17 | connect(use.heaPorRad, zon.heaPorRad) annotation (Line( 18 | points={{-20.013,32.0365},{-10,32.0365},{-10,-3.65812},{-19.0598,-3.65812}}, 19 | color={191,0,0}, 20 | smooth=Smooth.None)); 21 | 22 | connect(use.heaPorCon, zon.heaPorCon) annotation (Line( 23 | points={{-19.987,39.9896},{-6,39.9896},{-6,0.34188},{-19.0598,0.34188}}, 24 | color={191,0,0}, 25 | smooth=Smooth.None)); 26 | annotation (Diagram(graphics)); 27 | end SZ_Controlled; 28 | -------------------------------------------------------------------------------- /FastBuildings/Buildings/SZ_Design.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Buildings; 2 | model SZ_Design "Single zone building simulation with design conditions" 3 | extends FastBuildings.Buildings.BaseClasses.PartialSingleZone(redeclare 4 | FastBuildings.HVAC.Heating_Ideal hva); 5 | equation 6 | connect(simFasBui.TSet,hva.TSet) annotation(Line(points={{-90.193,78.5462},{ 7 | -90.193,-26},{18.1619,-26},{18.1619,-8.95031}}, color = {0,0,127}, smooth = Smooth.None)); 8 | annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2,2}), graphics)); 9 | end SZ_Design; 10 | -------------------------------------------------------------------------------- /FastBuildings/Buildings/SZ_Inputs.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Buildings; 2 | model SZ_Inputs 3 | extends FastBuildings.Buildings.BaseClasses.PartialSingleZone(redeclare 4 | FastBuildings.HVAC.Heating_Input hva); 5 | equation 6 | connect(simFasBui.qHeaCoo,hva.qHeaCoo) annotation(Line(points={{-82.193, 7 | 78.5462},{-82.193,50},{-10,50},{-10,8.72124},{8.0938,8.72124}}, color = {0,0,127}, smooth = Smooth.None)); 8 | annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2,2}), graphics)); 9 | end SZ_Inputs; 10 | -------------------------------------------------------------------------------- /FastBuildings/Buildings/SZ_Inputs_powEle.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Buildings; 2 | model SZ_Inputs_powEle 3 | "Single zone building, with HVAC and internal gains all read from inputs" 4 | extends FastBuildings.Buildings.BaseClasses.PartialSingleZone(redeclare 5 | FastBuildings.HVAC.Heating_Input hva); 6 | replaceable FastBuildings.Users.powEleFra use annotation(Placement(visible = true, transformation(origin = {-27.6923,-40.6838}, extent = {{-10,-10},{10,10}}, rotation = 0))); 7 | equation 8 | connect(simFasBui.powEle,use.powEle) annotation(Line(points={{-86.193,78.5462}, 9 | {-81.0256,78.5462},{-81.0256,-40.6838},{-38.3051,-40.6838},{-38.3051, 10 | -40.6577}})); 11 | connect(use.heaPorRad,zon.heaPorRad) annotation(Line(points={{-17.7053, 12 | -44.6473},{-5.47009,-44.6473},{-5.47009,-4.10256},{-19.0598,-4.10256}, 13 | {-19.0598,-3.65812}})); 14 | connect(use.heaPorCon,zon.heaPorCon) annotation(Line(points={{-17.6793, 15 | -36.6942},{-7.86325,-36.6942},{-7.86325,0.683761},{-18.4615,0.683761}, 16 | {-18.4615,0.34188},{-19.0598,0.34188}})); 17 | connect(simFasBui.qHeaCoo,hva.qHeaCoo) annotation(Line(points={{-82.193, 18 | 78.5462},{-82.193,50},{-10,50},{-10,8.72124},{8.0938,8.72124}}, color = {0,0,127}, smooth = Smooth.None)); 19 | annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2,2}), graphics)); 20 | end SZ_Inputs_powEle; 21 | -------------------------------------------------------------------------------- /FastBuildings/Buildings/SZ_TAmb_QHea.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Buildings; 2 | model SZ_TAmb_QHea "replaceable RC model for the zone" 3 | 4 | Modelica.Blocks.Interfaces.RealInput TAmb annotation(Placement(visible = true, transformation(origin = {-103.237,22.1465}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin = {-103.237,22.1465}, extent = {{-12,-12},{12,12}}, rotation = 0))); 5 | replaceable FastBuildings.RCModels.Partial_RC RC "RC model" annotation(Placement(visible = true, transformation(origin = {54.4858,17.5143}, extent = {{-12,-12},{12,12}}, rotation = 0))); 6 | HT.Sources.PrescribedTemperature TAmb2HeaPor annotation(Placement(visible = true, transformation(origin = {-49.7445,22.1465}, extent = {{-7.45106,-7.45106},{7.45106,7.45106}}, rotation = 0))); 7 | FastBuildings.HVAC.H_Input hvac annotation(Placement(visible = true, transformation(origin = {-1.36286,0}, extent = {{-12,-12},{12,12}}, rotation = 0))); 8 | Modelica.Blocks.Interfaces.RealInput QHea annotation(Placement(visible = true, transformation(origin = {-103.578,-40.5452}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin = {-103.578,-40.5452}, extent = {{-12,-12},{12,12}}, rotation = 0))); 9 | equation 10 | connect(QHea,hvac.QHea) annotation(Line(points={{-103.578,-40.5452},{ 11 | -31.0051,-40.5452},{-31.0051,-7.49574},{-13.8739,-7.49574},{ 12 | -13.8739,-7.15502}})); 13 | connect(RC.TZon,hvac.TZon) annotation(Line(points={{66.9152,17.8823},{ 14 | 84.1567,17.8823},{84.1567,-57.2402},{-35.4344,-57.2402},{-35.4344, 15 | 4.70274e-005},{-13.7922,4.70274e-005},{-13.7922,-0.0408857}})); 16 | connect(hvac.heatPortCon,RC.heatPortCon) annotation(Line(points={{10.6575, 17 | 9.60818},{19.7615,9.60818},{19.7615,16.0136},{42.5894,16.0136},{ 18 | 42.5894,17.5143},{42.4858,17.5143}})); 19 | connect(hvac.heatPortRad,RC.heatPortRad) annotation(Line(points={{10.6167, 20 | 4.2657e-007},{22.1465,4.2657e-007},{22.1465,13.2879},{42.2487, 21 | 13.2879},{42.2487,12.7143},{42.4858,12.7143}})); 22 | connect(hvac.heatPortEmb,RC.heatPortEmb) annotation(Line(points={{10.6575, 23 | -9.60817},{30.6644,-9.60817},{30.6644,8.51789},{42.4858,8.51789},{ 24 | 42.4858,7.90298}})); 25 | connect(TAmb,TAmb2HeaPor.T) annotation(Line(points={{-103.237,22.1465},{ 26 | -65.5393,22.1465},{-65.5393,22.1465},{-58.6858,22.1465}})); 27 | connect(TAmb2HeaPor.port,RC.heatPortAmb) annotation(Line(points={{ 28 | -42.2934,22.1465},{38.4729,22.1465},{38.4729,22.3143},{42.4858, 29 | 22.3143}})); 30 | annotation(Icon(graphics={ Rectangle(rotation= 0, lineColor= {0,0,255}, fillColor= {170,0,0}, pattern= LinePattern.Solid, 31 | fillPattern= FillPattern.Solid, 32 | lineThickness= 0.25, extent= {{-79.046,-100.17},{80.4089,20.1022}}),Polygon(points= {{-99.4889,8},{0.340716,87.7274},{99.1482,8},{-99.4889,8}}, rotation= 0, lineColor= {0,0,255}, fillColor= {170,0,0}, pattern= LinePattern.Solid, 33 | fillPattern= FillPattern.Solid, 34 | lineThickness= 0.25)}), Diagram); 35 | end SZ_TAmb_QHea; 36 | -------------------------------------------------------------------------------- /FastBuildings/Buildings/Z2_Inputs.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Buildings; 2 | model Z2_Inputs "2-zone building, with HVAC read from inputs" 3 | extends FastBuildings.Buildings.BaseClasses.Partial2Zone( 4 | redeclare FastBuildings.HVAC.Heating_Input hva1, 5 | redeclare FastBuildings.HVAC.Heating_Input hva2, 6 | bou(r=1e-3, c=1e6)); 7 | equation 8 | connect(simFasBui.qHeaCoo1, hva1.qHeaCoo); 9 | connect(simFasBui.qHeaCoo2, hva2.qHeaCoo); 10 | 11 | annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent={{-100, 12 | -100},{100,100}}, preserveAspectRatio=false, initialScale = 0.1, grid = {2,2}), graphics)); 13 | end Z2_Inputs; 14 | -------------------------------------------------------------------------------- /FastBuildings/Buildings/package.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings; 2 | package Buildings "Package containing fully operational single building models" 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | end Buildings; 11 | -------------------------------------------------------------------------------- /FastBuildings/Buildings/package.order: -------------------------------------------------------------------------------- 1 | SZ_Design 2 | SZ_Inputs 3 | SZ_Inputs_powEle 4 | SZ_Controlled 5 | BaseClasses 6 | SZ_TAmb_QHea 7 | Z2_Inputs 8 | -------------------------------------------------------------------------------- /FastBuildings/DesignPrinciples.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-ideas/FastBuildings/34e7296a025e789fa12b6d39699d9c287b60e008/FastBuildings/DesignPrinciples.pdf -------------------------------------------------------------------------------- /FastBuildings/Examples/SingleZone_ArtificialInputs.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Examples; 2 | model SingleZone_ArtificialInputs 3 | "Single zone simulation based on artificial inputs for QHeaCoo and PEle" 4 | extends Modelica.Icons.Example; 5 | inner FastBuildings.Input.SIM_ArtificialInput simFasBui 6 | annotation(Placement(visible = true, transformation(origin = {-89.817,88.5229}, extent = {{-10,-10},{10,10}}, rotation = 0))); 7 | FastBuildings.Buildings.SZ_Inputs_powEle 8 | bui(redeclare FastBuildings.Zones.ZonInt_B zon( 9 | cZon=1e6, 10 | cInt=1e7, 11 | rInt=1e-2)) annotation(Placement(visible = true, transformation(origin = {28.1699,29.7255}, extent = {{-10,-10},{10,10}}, rotation = 0))); 12 | 13 | annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), experiment(StopTime = 604800, StartTime = 0, Tolerance = 1e-06, Interval = 1209.6), __Dymola_experimentSetupOutput); 14 | end SingleZone_ArtificialInputs; -------------------------------------------------------------------------------- /FastBuildings/Examples/SingleZone_Controlled.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Examples; 2 | model SingleZone_Controlled 3 | "Single zone simulation with controlled heating system" 4 | extends Modelica.Icons.Example; 5 | inner Input.SIM_ArtificialInput simFasBui 6 | annotation(Placement(visible = true, transformation(origin = {-89.817,88.5229}, extent = {{-10,-10},{10,10}}, rotation = 0))); 7 | FastBuildings.Buildings.SZ_Controlled bui(hva(QNom = 10000, dTHys = 1), redeclare 8 | FastBuildings.Zones.ZonWalEmb_B zon(cZon = 10000000.0, cWal = 100000000.0, cEmb = 100000.0, rInf = 0.01, rWal = 0.005, rEmb = 0.01)) annotation(Placement(visible = true, transformation(origin = {28.1699,29.7255}, extent = {{-10,-10},{10,10}}, rotation = 0))); 9 | annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), experiment(StopTime = 604800, StartTime = 0, Tolerance = 1e-06, Interval = 1209.6), __Dymola_experimentSetupOutput); 10 | end SingleZone_Controlled; -------------------------------------------------------------------------------- /FastBuildings/Examples/SingleZone_Design.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Examples; 2 | model SingleZone_Design 3 | extends Modelica.Icons.Example; 4 | inner FastBuildings.Input.SIM_Design simFasBui 5 | annotation(Placement(visible = true, transformation(origin = {-89.817,88.5229}, extent = {{-10,-10},{10,10}}, rotation = 0))); 6 | FastBuildings.Buildings.SZ_Design bui(redeclare FastBuildings.Zones.Zon_A zon( 7 | cZon = 10000000.0, rWal = 0.005), hva(tauHea = 1, cZon = bui.zon.cZon)) annotation(Placement(visible = true, transformation(origin = {28.1699,29.7255}, extent = {{-10,-10},{10,10}}, rotation = 0))); 8 | annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), 9 | experiment(StartTime = 0, StopTime = 604800, Tolerance = 1e-6, Interval = 1209.6)); 10 | end SingleZone_Design; -------------------------------------------------------------------------------- /FastBuildings/Examples/SingleZone_Inputs_defined.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Examples; 2 | 3 | model SingleZone_Inputs_defined "Single zone simulation based on inputs for QHeaCoo and PEle" 4 | extends Modelica.Icons.Example; 5 | inner FastBuildings.Input.SIM_Inputs simFasBui annotation( 6 | Placement(visible = true, transformation(origin = {-89.817, 88.5229}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); 7 | FastBuildings.Buildings.SZ_Inputs_powEle bui(redeclare FastBuildings.Zones.ZonInt_B zon(cZon = 1e6, cInt = 1e7, rInt = 1e-2)) annotation( 8 | Placement(visible = true, transformation(origin = {28.1699, 29.7255}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); 9 | Modelica.Blocks.Sources.Sine TAmbSin(amplitude = 8, f = 1 / 86400, offset = 283) annotation( 10 | Placement(visible = true, transformation(origin = {75.8688, -55.8229}, extent = {{-5.8688, -6.1771}, {5.8688, 6.1771}}, rotation = 0))); 11 | Modelica.Blocks.Sources.Step qHea(height = 1000, startTime = 86400) annotation( 12 | Placement(visible = true, transformation(origin = {54.3799, -81.3987}, extent = {{-6.3799, -6.6013}, {6.3799, 6.6013}}, rotation = 0))); 13 | Modelica.Blocks.Math.Max max1 annotation( 14 | Placement(visible = true, transformation(origin = {65.5952, -12.2887}, extent = {{-5.59521, -5.71125}, {5.59521, 5.71125}}, rotation = 0))); 15 | Modelica.Blocks.Sources.Sine IGloHor(amplitude = 600, f = 1 / 86400) annotation( 16 | Placement(visible = true, transformation(origin = {44.5922, -3.7885}, extent = {{-4.5922, -4.2115}, {4.5922, 4.2115}}, rotation = 0))); 17 | Modelica.Blocks.Sources.Constant const(k = 0) annotation( 18 | Placement(visible = true, transformation(origin = {44.6981, -21.4166}, extent = {{-4.6981, -4.5834}, {4.6981, 4.5834}}, rotation = 0))); 19 | Modelica.Blocks.Sources.Pulse powElePul(amplitude = 500, period = 86400, startTime = 25000) annotation( 20 | Placement(visible = true, transformation(origin = {20.6114, -81.648}, extent = {{-6.61139, -6.35201}, {6.61144, 6.352}}, rotation = 0))); 21 | Modelica.Blocks.Sources.Constant const1(k = 273.15 + 20) annotation( 22 | Placement(visible = true, transformation(origin = {-39.3019, -77.4166}, extent = {{-4.6981, -4.5834}, {4.6981, 4.5834}}, rotation = 0))); 23 | equation 24 | connect(IGloHor.y, max1.u1) annotation( 25 | Line(points = {{49.6436, -3.7885}, {52, -3.7885}, {52, -8}, {52, -8.86195}, {58.8809, -8.86195}})); 26 | connect(const.y, max1.u2) annotation( 27 | Line(points = {{49.866, -21.4166}, {54, -21.4166}, {54, -15.7154}, {58.8809, -15.7154}}, color = {0, 0, 127}, smooth = Smooth.None)); 28 | simFasBui.TAmb = TAmbSin.y; 29 | simFasBui.qHeaCoo = qHea.y; 30 | simFasBui.powEle = powElePul.y; 31 | simFasBui.TSet = const1.y; 32 | simFasBui.irr[1] = max1.y; 33 | annotation( 34 | Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})), 35 | Diagram(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})), 36 | experiment(StartTime = 0, StopTime = 604800, Tolerance = 1e-06, Interval = 1209.6)); 37 | end SingleZone_Inputs_defined; -------------------------------------------------------------------------------- /FastBuildings/Examples/TwoZone_ArtificialInputs.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Examples; 2 | model TwoZone_ArtificialInputs 3 | "Two zone simulation based on artificial inputs for QHeaCoo and PEle" 4 | extends Modelica.Icons.Example; 5 | inner Input.SIM_2Zones_Artificial simFasBui(nIrr=2) 6 | annotation(Placement(visible = true, transformation(origin = {-89.817,88.5229}, extent = {{-10,-10},{10,10}}, rotation = 0))); 7 | FastBuildings.Buildings.Z2_Inputs bui(redeclare 8 | FastBuildings.Zones.ZonWalInt_B zon1( 9 | nIrr=2, 10 | cZon=1e6, 11 | cWal=1e8, 12 | rWal=1e-3, 13 | cInt=1e7, 14 | rInt=1e-4, 15 | rInf=1e-3), redeclare FastBuildings.Zones.Zon_A zon2( 16 | nIrr=2, 17 | cZon=1e8, 18 | rWal=1e-3)) annotation(Placement(visible = true, transformation(origin={-11.8301, 19 | 21.7255}, extent = {{-10,-10},{10,10}}, rotation = 0))); 20 | 21 | annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), experiment(StopTime = 604800, StartTime = 0, Tolerance = 1e-06, Interval = 1209.6), __Dymola_experimentSetupOutput); 22 | end TwoZone_ArtificialInputs; -------------------------------------------------------------------------------- /FastBuildings/Examples/package.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings; 2 | package Examples "Examples and test models" 3 | import SI = Modelica.SIunits; 4 | import HT = Modelica.Thermal.HeatTransfer; 5 | 6 | 7 | 8 | 9 | 10 | 11 | end Examples; 12 | -------------------------------------------------------------------------------- /FastBuildings/Examples/package.order: -------------------------------------------------------------------------------- 1 | SingleZone_Design 2 | SingleZone_Controlled 3 | SingleZone_ArtificialInputs 4 | SingleZone_Inputs_defined 5 | TwoZone_ArtificialInputs 6 | -------------------------------------------------------------------------------- /FastBuildings/HVAC/Heating_Emb_Input.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.HVAC; 2 | model Heating_Emb_Input 3 | "Heating through embedded port, heating power read from input" 4 | extends Partial_HVAC; 5 | 6 | Modelica.Blocks.Interfaces.RealInput qHeaCoo "total heating/cooling input" annotation(Placement(visible = true, transformation(origin = {-100.259,80.3748}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin = {-100.259,80.3748}, extent = {{-12,-12},{12,12}}, rotation = 0))); 7 | equation 8 | heaPorCon.Q_flow = 0; 9 | heaPorRad.Q_flow = 0; 10 | heaPorEmb.Q_flow = -qHeaCoo; 11 | annotation(Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100,-100},{100,100}}), graphics), Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100,-100},{100,100}}), graphics)); 12 | end Heating_Emb_Input; 13 | -------------------------------------------------------------------------------- /FastBuildings/HVAC/Heating_Ideal.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.HVAC; 2 | model Heating_Ideal 3 | "Heating only, heating power calculated from ideal heating with time constant" 4 | extends Partial_HVAC; 5 | parameter Real fraRad = 0.3 "Fraction of heating to radiation"; 6 | parameter SI.HeatCapacity cZon "Capacity of the zone"; 7 | parameter SI.Time tauHea = 60 "Time constant of the ideal heating"; 8 | SI.Power qHeaCoo "Total heating power"; 9 | Modelica.Blocks.Interfaces.RealInput TSet annotation(Placement(visible = true, transformation(origin = {0.422,-104.341}, extent = {{-12,-12},{12,12}}, rotation = 90), iconTransformation(origin = {0.422,-96.3407}, extent = {{-12,-12},{12,12}}, rotation = 90))); 10 | equation 11 | qHeaCoo = cZon * (TSet - TZon) / tauHea; 12 | heaPorCon.Q_flow = -(1 - fraRad) * qHeaCoo; 13 | heaPorRad.Q_flow = -fraRad * qHeaCoo; 14 | heaPorEmb.Q_flow = 0; 15 | annotation(Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100,-100},{100,100}}), graphics), Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100,-100},{100,100}}), graphics)); 16 | end Heating_Ideal; 17 | -------------------------------------------------------------------------------- /FastBuildings/HVAC/Heating_Input.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.HVAC; 2 | model Heating_Input "Heating only, heating power read from input" 3 | extends Partial_HVAC; 4 | parameter Real fraRad = 0.3 "Fraction of heating to radiation"; 5 | Modelica.Blocks.Interfaces.RealInput qHeaCoo "total heating/cooling input" annotation(Placement(visible = true, transformation(origin = {-100.259,80.3748}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin = {-100.259,80.3748}, extent = {{-12,-12},{12,12}}, rotation = 0))); 6 | equation 7 | heaPorCon.Q_flow = -(1 - fraRad) * qHeaCoo; 8 | heaPorRad.Q_flow = -fraRad * qHeaCoo; 9 | heaPorEmb.Q_flow = 0; 10 | annotation(Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100,-100},{100,100}}), graphics), Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100,-100},{100,100}}), graphics)); 11 | end Heating_Input; 12 | -------------------------------------------------------------------------------- /FastBuildings/HVAC/Heating_OnOff.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.HVAC; 2 | model Heating_OnOff "Heating only, with hysteresis and variable setpoint" 3 | extends Partial_HVAC; 4 | parameter Real fraRad = 0.3 "Fraction of heating to radiation"; 5 | SI.Power QHeaCoo "Total heating power"; 6 | parameter SI.Power QNom "Nominal (= maximum) power"; 7 | parameter SI.TemperatureDifference dTHys = 1 8 | "Hysteresis on temperature set point"; 9 | Modelica.Blocks.Interfaces.RealInput TSet annotation(Placement(visible = true, transformation(origin = {0.422,-104.341}, extent = {{-12,-12},{12,12}}, rotation = 90), iconTransformation(origin = {0.422,-96.3407}, extent = {{-12,-12},{12,12}}, rotation = 90))); 10 | equation 11 | if noEvent(TZon < TSet) then 12 | QHeaCoo = QNom; 13 | elseif noEvent(TZon < TSet + dTHys and QHeaCoo > 0) then 14 | QHeaCoo = QNom; 15 | else 16 | QHeaCoo = 0; 17 | end if; 18 | // Zone too cold, system MUST be on 19 | // Heating is on and should stay on 20 | // all other cases: shut down 21 | heaPorCon.Q_flow = -(1 - fraRad) * QHeaCoo; 22 | heaPorRad.Q_flow = -fraRad * QHeaCoo; 23 | heaPorEmb.Q_flow = 0; 24 | annotation(Icon, Diagram); 25 | end Heating_OnOff; 26 | -------------------------------------------------------------------------------- /FastBuildings/HVAC/Partial_HVAC.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.HVAC; 2 | partial model Partial_HVAC 3 | 4 | Modelica.Blocks.Interfaces.RealInput TZon annotation(Placement(visible = true, transformation(origin = {-99.578,-80.3407}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin = {-99.578,-80.3407}, extent = {{-12,-12},{12,12}}, rotation = 0))); 5 | HT.Interfaces.HeatPort_a heaPorRad annotation(Placement(visible = true, transformation(origin = {-100.17,-40}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin = {-100.17,-40}, extent = {{-12,-12},{12,12}}, rotation = 0))); 6 | HT.Interfaces.HeatPort_a heaPorCon annotation(Placement(visible = true, transformation(origin = {-99.83,0.0682}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin = {-99.83,0.0682}, extent = {{-12,-12},{12,12}}, rotation = 0))); 7 | //parameter Boolean booEmb = true "if true, add a heatPort for Embedded heat transfer"; 8 | HT.Interfaces.HeatPort_b heaPorEmb annotation(Placement(visible = true, transformation(origin = {-100.614,40.944}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin = {-99.83,39.9318}, extent = {{-12,-12},{12,12}}, rotation = 0))); 9 | annotation(Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100,-100},{100,100}}), graphics), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, 10 | -100},{100,100}}), graphics={ 11 | Rectangle( 12 | extent={{-90,70},{90,-72}}, 13 | lineColor={95,95,95}, 14 | fillColor={95,95,95}, 15 | fillPattern=FillPattern.Solid), 16 | Ellipse( 17 | extent={{-78,50},{24,-50}}, 18 | lineColor={95,95,95}, 19 | fillColor={255,255,255}, 20 | fillPattern=FillPattern.Solid), 21 | Ellipse( 22 | extent={{44,10},{64,-10}}, 23 | lineColor={95,95,95}, 24 | fillColor={255,255,255}, 25 | fillPattern=FillPattern.Solid), 26 | Ellipse( 27 | extent={{-60,-12},{-40,-32}}, 28 | lineColor={0,255,128}, 29 | fillColor={0,255,128}, 30 | fillPattern=FillPattern.Solid), 31 | Ellipse( 32 | extent={{-36,38},{-16,18}}, 33 | lineColor={0,255,128}, 34 | fillColor={0,255,128}, 35 | fillPattern=FillPattern.Solid), 36 | Ellipse( 37 | extent={{-12,-12},{8,-32}}, 38 | lineColor={0,255,128}, 39 | fillColor={0,255,128}, 40 | fillPattern=FillPattern.Solid), 41 | Polygon( 42 | points={{-26,0},{-36,26},{-16,26},{-26,0}}, 43 | lineColor={0,255,128}, 44 | smooth=Smooth.None, 45 | fillColor={0,255,128}, 46 | fillPattern=FillPattern.Solid), 47 | Polygon( 48 | points={{-26,0},{-56,-14},{-42,-28},{-26,0}}, 49 | lineColor={0,255,128}, 50 | smooth=Smooth.None, 51 | fillColor={0,255,128}, 52 | fillPattern=FillPattern.Solid), 53 | Polygon( 54 | points={{-26,0},{4,-14},{-10,-28},{-26,0}}, 55 | lineColor={0,255,128}, 56 | smooth=Smooth.None, 57 | fillColor={0,255,128}, 58 | fillPattern=FillPattern.Solid)})); 59 | end Partial_HVAC; 60 | -------------------------------------------------------------------------------- /FastBuildings/HVAC/package.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings; 2 | package HVAC "HVAC systems, separated or combined" 3 | import HT = Modelica.Thermal.HeatTransfer; 4 | 5 | 6 | 7 | 8 | 9 | end HVAC; 10 | -------------------------------------------------------------------------------- /FastBuildings/HVAC/package.order: -------------------------------------------------------------------------------- 1 | Partial_HVAC 2 | Heating_Input 3 | Heating_Emb_Input 4 | Heating_Ideal 5 | Heating_OnOff 6 | -------------------------------------------------------------------------------- /FastBuildings/Input/BaseClasses/Partial_SIM.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Input.BaseClasses; 2 | partial model Partial_SIM 3 | parameter Integer nIrr(min = 1) = 1 "Number of irradiation vectors"; 4 | Modelica.Blocks.Interfaces.RealOutput TAmb "Ambient temperature" annotation(Placement(visible = true, transformation(origin = {105.5,-80.4273}, extent = {{-10,-10},{10,10}}, rotation = 0), iconTransformation(origin = {109.608,-79.7516}, extent = {{-10,-10},{10,10}}, rotation = 0))); 5 | Modelica.Blocks.Interfaces.RealOutput qHeaCoo "Heating/cooling" annotation(Placement(visible = true, transformation(origin = {79.5,-104.427}, extent = {{-10,-10},{10,10}}, rotation = 270), iconTransformation(origin = {79.6078,-109.752}, extent = {{-10,-10},{10,10}}, rotation = 270))); 6 | Modelica.Blocks.Interfaces.RealOutput powEle "Electricity consumption" annotation(Placement(visible = true, transformation(origin = {39.5,-104.427}, extent = {{-10,-10},{10,10}}, rotation = 270), iconTransformation(origin = {39.6078,-109.752}, extent = {{-10,-10},{10,10}}, rotation = 270))); 7 | Modelica.Blocks.Interfaces.RealOutput TSet "Zone temperature set point" annotation(Placement(visible = true, transformation(origin = {-0.5,-104.427}, extent = {{-10,-10},{10,10}}, rotation = 270), iconTransformation(origin = {-0.3922,-109.752}, extent = {{-10,-10},{10,10}}, rotation = 270))); 8 | Modelica.Blocks.Interfaces.RealOutput[nIrr] irr 9 | "Array with irradiation inputs" annotation(Placement(visible = true, transformation(origin = {105.5,-40.4273}, extent = {{-10,-10},{10,10}}, rotation = 0), iconTransformation(origin = {109.608,-39.7516}, extent = {{-10,-10},{10,10}}, rotation = 0))); 10 | annotation(defaultComponentName = "sim", defaultComponentPrefixes = "inner", missingInnerMessage = " 11 | Your model is using an outer \"sim\" component but 12 | an inner \"sim\" component is not defined. 13 | For simulation drag a sim from FastBuildings.Input 14 | into your model to specify your Simulation Input Manager.", Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2,2}), graphics), Icon(coordinateSystem(extent={{-100, 15 | -100},{100,100}}, preserveAspectRatio=false, initialScale = 0.1, grid = {2,2}), graphics={ 16 | Rectangle( 17 | extent={{-60,50},{60,-50}}, 18 | lineColor={95,95,95}, 19 | fillPattern=FillPattern.Solid, 20 | fillColor={95,95,95}), 21 | Rectangle( 22 | extent={{-50,40},{50,-30}}, 23 | fillPattern=FillPattern.Solid, 24 | fillColor={255,255,255}, 25 | pattern=LinePattern.None), 26 | Rectangle( 27 | extent={{-10,-60},{10,-50}}, 28 | pattern=LinePattern.None, 29 | fillColor={95,95,95}, 30 | fillPattern=FillPattern.Solid, 31 | lineColor={0,0,0}), 32 | Polygon( 33 | points={{-40,-60},{-40,-60}}, 34 | pattern=LinePattern.None, 35 | smooth=Smooth.None, 36 | fillColor={0,0,0}, 37 | fillPattern=FillPattern.Solid), 38 | Polygon( 39 | points={{-40,-60},{40,-60},{50,-70},{-52,-70},{-40,-60}}, 40 | smooth=Smooth.None, 41 | fillColor={95,95,95}, 42 | fillPattern=FillPattern.Solid, 43 | pattern=LinePattern.None), 44 | Rectangle( 45 | extent={{44,-26},{38,14}}, 46 | fillColor={0,0,127}, 47 | fillPattern=FillPattern.Solid, 48 | pattern=LinePattern.None), 49 | Rectangle( 50 | extent={{34,-26},{28,-14}}, 51 | fillColor={0,127,255}, 52 | fillPattern=FillPattern.Solid, 53 | pattern=LinePattern.None), 54 | Rectangle( 55 | extent={{24,-26},{18,30}}, 56 | fillColor={0,0,127}, 57 | fillPattern=FillPattern.Solid, 58 | pattern=LinePattern.None), 59 | Rectangle( 60 | extent={{14,-26},{8,10}}, 61 | fillColor={175,175,175}, 62 | fillPattern=FillPattern.Solid, 63 | pattern=LinePattern.None), 64 | Rectangle( 65 | extent={{4,-26},{-2,-14}}, 66 | fillColor={0,127,255}, 67 | fillPattern=FillPattern.Solid, 68 | pattern=LinePattern.None), 69 | Line( 70 | points={{-6,-26},{-46,-26}}, 71 | color={0,0,127}, 72 | smooth=Smooth.None), 73 | Text( 74 | extent={{-50,40},{-20,0}}, 75 | lineColor={95,95,95}, 76 | fillColor={95,95,95}, 77 | fillPattern=FillPattern.Solid, 78 | textStyle={TextStyle.Italic}, 79 | fontName="Bookman Old Style", 80 | textString="i"), 81 | Text( 82 | extent={{-100,100},{100,60}}, 83 | lineColor={0,0,193}, 84 | textString="%name")})); 85 | end Partial_SIM; 86 | -------------------------------------------------------------------------------- /FastBuildings/Input/BaseClasses/package.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Input; 2 | package BaseClasses 3 | 4 | 5 | annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}))); 6 | end BaseClasses; 7 | -------------------------------------------------------------------------------- /FastBuildings/Input/BaseClasses/package.order: -------------------------------------------------------------------------------- 1 | Partial_SIM 2 | -------------------------------------------------------------------------------- /FastBuildings/Input/SIM_2Zones_Artificial.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Input; 2 | model SIM_2Zones_Artificial 3 | extends SIM_Inputs_2Zones; 4 | Modelica.Blocks.Sources.Sine TAmbSin(amplitude = 8, f = 1 / 86400, offset = 283) annotation(Placement(visible = true, transformation(origin={39.8688, 5 | 4.1771}, extent = {{-5.8688,-6.1771},{5.8688,6.1771}}, rotation = 0))); 6 | Modelica.Blocks.Sources.Step qHea( startTime = 86400, height= 7 | 20000) annotation(Placement(visible = true, transformation(origin={-75.6201, 8 | -51.3987}, extent = {{-6.3799,-6.6013},{6.3799,6.6013}}, rotation = 0))); 9 | Modelica.Blocks.Math.Max[nIrr] max1 annotation(Placement(visible = true, transformation(origin={29.5952, 10 | 47.7113}, extent = {{-5.59521,-5.71125},{5.59521,5.71125}}, rotation = 0))); 11 | Modelica.Blocks.Sources.Sine[nIrr] IGloHor(each amplitude = 600, each f = 1 / 86400) annotation(Placement(visible = true, transformation(origin={8.5922, 12 | 56.2115}, extent = {{-4.5922,-4.2115},{4.5922,4.2115}}, rotation = 0))); 13 | Modelica.Blocks.Sources.Constant[nIrr] const(each k = 0) annotation(Placement(visible = true, transformation(origin={8.6981, 14 | 38.5834}, extent = {{-4.6981,-4.5834},{4.6981,4.5834}}, rotation = 0))); 15 | Modelica.Blocks.Sources.Pulse powElePul(amplitude = 500, period = 86400, startTime = 25000) annotation(Placement(visible = true, transformation(origin={-15.3886, 16 | -21.648}, extent = {{-6.61139,-6.35201},{6.61144,6.352}}, rotation = 0))); 17 | Modelica.Blocks.Sources.Constant const1(k = 273.15 + 20) annotation(Placement(visible = true, transformation(origin={-75.3019, 18 | -17.4166}, extent = {{-4.6981,-4.5834},{4.6981,4.5834}}, rotation = 0))); 19 | equation 20 | connect(IGloHor.y,max1.u1) annotation(Line(points={{13.6436,56.2115},{16, 21 | 56.2115},{16,52},{16,51.138},{22.8809,51.138}})); 22 | connect(powElePul.y,powEle) annotation(Line(points={{-8.11602,-21.648},{39.5, 23 | -21.648},{39.5,-104.427}}, color = {0,0,127}, smooth = Smooth.None)); 24 | connect(qHea.y,qHeaCoo) annotation(Line(points={{-68.6022,-51.3987},{79.5, 25 | -51.3987},{79.5,-104.427}}, color = {0,0,127}, smooth = Smooth.None)); 26 | connect(TAmbSin.y,TAmb) annotation(Line(points={{46.3245,4.1771},{52,4.1771}, 27 | {52,-80.4273},{105.5,-80.4273}}, color = {0,0,127}, smooth = Smooth.None)); 28 | connect(max1.y,irr) annotation(Line(points={{35.7499,47.7113},{48,47.7113},{ 29 | 48,-40.4273},{105.5,-40.4273}}, color = {0,0,127}, smooth = Smooth.None)); 30 | connect(const.y,max1.u2) annotation(Line(points={{13.866,38.5834},{18,38.5834}, 31 | {18,44.2846},{22.8809,44.2846}}, color = {0,0,127}, smooth = Smooth.None)); 32 | connect(const1.y,TSet) annotation(Line(points={{-70.134,-17.4166},{-0.5, 33 | -17.4166},{-0.5,-104.427}}, color = {0,0,127}, smooth = Smooth.None)); 34 | connect(qHea.y, qHeaCoo1) annotation (Line( 35 | points={{-68.6022,-51.3987},{-32.5,-51.3987},{-32.5,-104.427}}, 36 | color={0,0,127}, 37 | smooth=Smooth.None)); 38 | connect(qHea.y, qHeaCoo2) annotation (Line( 39 | points={{-68.6022,-51.3987},{-60.5,-51.3987},{-60.5,-104.427}}, 40 | color={0,0,127}, 41 | smooth=Smooth.None)); 42 | annotation (Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics), 43 | experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-6, Interval = 0.002)); 44 | end SIM_2Zones_Artificial; -------------------------------------------------------------------------------- /FastBuildings/Input/SIM_ArtificialInput.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Input; 2 | 3 | model SIM_ArtificialInput "Dummy weather and inputs " 4 | extends FastBuildings.Input.BaseClasses.Partial_SIM; 5 | Modelica.Blocks.Sources.Sine TAmbSin(amplitude = 8, f = 1 / 86400, offset = 283) annotation( 6 | Placement(visible = true, transformation(origin = {75.8688, -55.8229}, extent = {{-5.8688, -6.1771}, {5.8688, 6.1771}}, rotation = 0))); 7 | Modelica.Blocks.Sources.Step qHea(height = 1000, startTime = 86400) annotation( 8 | Placement(visible = true, transformation(origin = {54.3799, -81.3987}, extent = {{-6.3799, -6.6013}, {6.3799, 6.6013}}, rotation = 0))); 9 | Modelica.Blocks.Math.Max[nIrr] max1 annotation( 10 | Placement(visible = true, transformation(origin = {65.5952, -12.2887}, extent = {{-5.59521, -5.71125}, {5.59521, 5.71125}}, rotation = 0))); 11 | Modelica.Blocks.Sources.Sine[nIrr] IGloHor(each amplitude = 600, each f = 1 / 86400) annotation( 12 | Placement(visible = true, transformation(origin = {44.5922, -3.7885}, extent = {{-4.5922, -4.2115}, {4.5922, 4.2115}}, rotation = 0))); 13 | Modelica.Blocks.Sources.Constant[nIrr] const(each k = 0) annotation( 14 | Placement(visible = true, transformation(origin = {44.6981, -21.4166}, extent = {{-4.6981, -4.5834}, {4.6981, 4.5834}}, rotation = 0))); 15 | Modelica.Blocks.Sources.Pulse powElePul(amplitude = 500, period = 86400, startTime = 25000) annotation( 16 | Placement(visible = true, transformation(origin = {20.6114, -81.648}, extent = {{-6.61139, -6.35201}, {6.61144, 6.352}}, rotation = 0))); 17 | Modelica.Blocks.Sources.Constant const1(k = 273.15 + 20) annotation( 18 | Placement(visible = true, transformation(origin = {-39.3019, -77.4166}, extent = {{-4.6981, -4.5834}, {4.6981, 4.5834}}, rotation = 0))); 19 | equation 20 | connect(IGloHor.y, max1.u1) annotation( 21 | Line(points = {{49.6436, -3.7885}, {52, -3.7885}, {52, -8}, {52, -8.86195}, {58.8809, -8.86195}})); 22 | connect(powElePul.y, powEle) annotation( 23 | Line(points = {{27.884, -81.648}, {39.5, -81.648}, {39.5, -104.427}}, color = {0, 0, 127}, smooth = Smooth.None)); 24 | connect(qHea.y, qHeaCoo) annotation( 25 | Line(points = {{61.3978, -81.3987}, {79.5, -81.3987}, {79.5, -104.427}}, color = {0, 0, 127}, smooth = Smooth.None)); 26 | connect(TAmbSin.y, TAmb) annotation( 27 | Line(points = {{82.3245, -55.8229}, {88, -55.8229}, {88, -80.4273}, {105.5, -80.4273}}, color = {0, 0, 127}, smooth = Smooth.None)); 28 | connect(max1.y, irr) annotation( 29 | Line(points = {{71.7499, -12.2887}, {84, -12.2887}, {84, -40.4273}, {105.5, -40.4273}}, color = {0, 0, 127}, smooth = Smooth.None)); 30 | connect(const.y, max1.u2) annotation( 31 | Line(points = {{49.866, -21.4166}, {54, -21.4166}, {54, -15.7154}, {58.8809, -15.7154}}, color = {0, 0, 127}, smooth = Smooth.None)); 32 | connect(const1.y, TSet) annotation( 33 | Line(points = {{-34.134, -77.4166}, {-0.5, -77.4166}, {-0.5, -104.427}}, color = {0, 0, 127}, smooth = Smooth.None)); 34 | annotation( 35 | defaultComponentName = "sim", 36 | defaultComponentPrefixes = "inner", 37 | missingInnerMessage = " 38 | Your model is using an outer \"sim\" component but 39 | an inner \"sim\" component is not defined. 40 | For simulation drag a sim from FastBuildings.Input 41 | into your model to specify your Simulation Input Manager.", 42 | Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})), 43 | Diagram(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2, 2}), graphics), 44 | experiment(StartTime = 0, StopTime = 604800, Tolerance = 1e-06, Interval = 1209.6)); 45 | end SIM_ArtificialInput; -------------------------------------------------------------------------------- /FastBuildings/Input/SIM_Design.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Input; 2 | model SIM_Design "Design weather conditions" 3 | extends FastBuildings.Input.BaseClasses.Partial_SIM; 4 | parameter SI.Temperature TAmbDes = 263.15 "Design ambient temperature"; 5 | parameter SI.Temperature TSetDes = 273.15 + 21 "Design indoor temperature"; 6 | equation 7 | TAmb = TAmbDes; 8 | TSet = TSetDes; 9 | irr[1] = 0; 10 | powEle = 0; 11 | qHeaCoo = 0; 12 | annotation(defaultComponentName = "sim", defaultComponentPrefixes = "inner", missingInnerMessage = " 13 | Your model is using an outer \"sim\" component but 14 | an inner \"sim\" component is not defined. 15 | For simulation drag a sim from FastBuildings.Input 16 | into your model to specify your Simulation Input Manager.", Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}))); 17 | end SIM_Design; 18 | -------------------------------------------------------------------------------- /FastBuildings/Input/SIM_Inputs.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Input; 2 | model SIM_Inputs "SIM with inputs from filereaders or other means" 3 | extends FastBuildings.Input.BaseClasses.Partial_SIM; 4 | /* 5 | This model does not specify the trajectories for the realOutputs 6 | Instead, additional equations or inputs have to be provided in the 7 | model that instantiates this simFasBui. 8 | 9 | For example, if an irradiation and TAmb are provided, instantiate this model as follows: 10 | inner FastBuildings.Input.SIM_Inputs sim(nIrr=1, booTAmb=true) 11 | equation 12 | simFasBui.TAmb = ... ; 13 | simFasBui.irr[1] = ... ; 14 | 15 | */ 16 | annotation(defaultComponentName = "sim", defaultComponentPrefixes = "inner", missingInnerMessage = " 17 | Your model is using an outer \"sim\" component but 18 | an inner \"sim\" component is not defined. 19 | For simulation drag a sim from FastBuildings.Input 20 | into your model to specify your Simulation Input Manager.", Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = false, initialScale = 0.1, grid = {2,2}), graphics)); 21 | end SIM_Inputs; 22 | -------------------------------------------------------------------------------- /FastBuildings/Input/SIM_Inputs_2Zones.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Input; 2 | model SIM_Inputs_2Zones 3 | "SIM with inputs from filereaders or other means for 2zone buildings" 4 | extends FastBuildings.Input.BaseClasses.Partial_SIM; 5 | /* 6 | This model does not specify the trajectories for the realOutputs 7 | Instead, additional equations or inputs have to be provided in the 8 | model that instantiates this simFasBui. 9 | 10 | For example, if an irradiation and TAmb are provided, instantiate this model as follows: 11 | inner FastBuildings.Input.SIM_Inputs sim(nIrr=1, booTAmb=true) 12 | equation 13 | simFasBui.TAmb = ... ; 14 | simFasBui.irr[1] = ... ; 15 | 16 | */ 17 | Modelica.Blocks.Interfaces.RealOutput qHeaCoo1 "Heating/cooling" 18 | annotation(Placement(visible = true, transformation(origin={-32.5, 19 | -104.427}, extent = {{-10,-10},{10,10}}, rotation = 270), iconTransformation(origin = {79.6078,-109.752}, extent = {{-10,-10},{10,10}}, rotation = 270))); 20 | Modelica.Blocks.Interfaces.RealOutput qHeaCoo2 "Heating/cooling" 21 | annotation(Placement(visible = true, transformation(origin={-60.5, 22 | -104.427}, extent = {{-10,-10},{10,10}}, rotation = 270), iconTransformation(origin = {79.6078,-109.752}, extent = {{-10,-10},{10,10}}, rotation = 270))); 23 | annotation(defaultComponentName = "sim", defaultComponentPrefixes = "inner", missingInnerMessage = " 24 | Your model is using an outer \"sim\" component but 25 | an inner \"sim\" component is not defined. 26 | For simulation drag a sim from FastBuildings.Input 27 | into your model to specify your Simulation Input Manager.", Icon(coordinateSystem(extent={{-100, 28 | -100},{100,100}}, preserveAspectRatio=false, initialScale = 0.1, grid = {2,2}), 29 | graphics), Diagram(coordinateSystem(extent={{-100, 30 | -100},{100,100}}, preserveAspectRatio=false, initialScale = 0.1, grid = {2,2}), graphics)); 31 | end SIM_Inputs_2Zones; 32 | -------------------------------------------------------------------------------- /FastBuildings/Input/package.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings; 2 | package Input 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}))); 11 | end Input; 12 | -------------------------------------------------------------------------------- /FastBuildings/Input/package.order: -------------------------------------------------------------------------------- 1 | BaseClasses 2 | SIM_Design 3 | SIM_ArtificialInput 4 | SIM_Inputs 5 | SIM_Inputs_2Zones 6 | SIM_2Zones_Artificial 7 | -------------------------------------------------------------------------------- /FastBuildings/Users/package.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings; 2 | package Users 3 | end Users; 4 | -------------------------------------------------------------------------------- /FastBuildings/Users/package.order: -------------------------------------------------------------------------------- 1 | powEleFra 2 | -------------------------------------------------------------------------------- /FastBuildings/Users/powEleFra.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Users; 2 | model powEleFra 3 | "Converts a fraction of powEle into internal gains (distinction between convective and radiative)" 4 | 5 | parameter Real fraTot = 1 6 | "Fraction of powEle that is converted into internal gains"; 7 | parameter Real fraCon = 0.7 8 | "Fraction of PUsers that is converted in convective heat"; 9 | final parameter Real fraRad = 1-fraCon 10 | "Fraction of PUsers that is converted in radiative heat"; 11 | Modelica.Blocks.Interfaces.RealInput powEle annotation(Placement(visible = true, transformation(origin = {-106.128,0.260756}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin = {-106.128,0.260756}, extent = {{-12,-12},{12,12}}, rotation = 0))); 12 | Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heaPorCon annotation(Placement(visible = true, transformation(origin = {100.13,39.8957}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin = {100.13,39.8957}, extent = {{-12,-12},{12,12}}, rotation = 0))); 13 | Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heaPorRad annotation(Placement(visible = true, transformation(origin = {99.8696,-39.6349}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin = {99.8696,-39.6349}, extent = {{-12,-12},{12,12}}, rotation = 0))); 14 | equation 15 | heaPorCon.Q_flow = -powEle * fraTot * fraCon; 16 | heaPorRad.Q_flow = -powEle * fraTot * fraRad; 17 | annotation(Icon, Diagram); 18 | end powEleFra; 19 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Capacitor.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses; 2 | model Capacitor "Lumped thermal capacity" 3 | 4 | parameter SI.HeatCapacity c "Heat capacity of element (= cp*m)" annotation(Placement(visible = true, transformation(origin = {115.896,-84.5547}, extent = {{-12,-12},{12,12}}, rotation = 0))); 5 | parameter SI.Temperature TSta = 293.15 6 | "Initial temperature for the capacity, fixed=true"; 7 | Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heaPor(T(start = TSta, fixed = true)) annotation(Placement(visible = true, transformation(origin={-0.42165, 8 | -100.28}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin={0,-100}, extent={{-10,-10}, 9 | {10,10}}, rotation = 0))); 10 | equation 11 | c * der(heaPor.T) = heaPor.Q_flow; 12 | annotation(Diagram, Icon(graphics={ Text(rotation= 0, lineColor={95,95,95}, fillColor= 13 | {0,0,0}, pattern= 14 | LinePattern.Solid, 15 | fillPattern=FillPattern.None, 16 | lineThickness=0.25, extent={{ 17 | -100,92},{100,60}}, 18 | textString="%name"), 19 | Line( 20 | points={{0,-98},{0,0}}, 21 | color={95,95,95}, 22 | smooth=Smooth.None, 23 | thickness=0.5), 24 | Line( 25 | points={{-60,0},{60,0}}, 26 | color={95,95,95}, 27 | smooth=Smooth.None, 28 | thickness=1), 29 | Line( 30 | points={{-60,40},{60,40}}, 31 | color={95,95,95}, 32 | smooth=Smooth.None, 33 | thickness=1)})); 34 | end Capacitor; 35 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/Partial_Bound.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses.Partials; 2 | partial model Partial_Bound 3 | "Partial model for heat losses to a boundary with prescribed temperature" 4 | 5 | parameter SI.ThermalResistance rBou = 1 6 | "Total thermal resistance to the boundary, in K/W"; 7 | HT.Sources.PrescribedTemperature 8 | preTBou "Prescribed boundary temperature" 9 | annotation (Placement(transformation( 10 | extent={{-6,-6},{6,6}}, 11 | rotation=0, 12 | origin={-142,-80}))); 13 | Resistance resBou(r=rBou) 14 | "Resistance for heat losses to a prescribed boundary" 15 | annotation (Placement(transformation( 16 | extent={{-10,-10},{10,10}}, 17 | rotation=0, 18 | origin={-110,-80}))); 19 | equation 20 | connect(preTBou.port, resBou.heaPor_a) annotation (Line( 21 | points={{-136,-80},{-120,-80}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-160, 25 | -100},{100,100}}), 26 | graphics), Icon(coordinateSystem(extent={{-160,-100},{100, 27 | 100}}))); 28 | end Partial_Bound; 29 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/Partial_BoundCap.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses.Partials; 2 | partial model Partial_BoundCap 3 | "Partial model for heat losses to a boundary with prescribed temperature and with a state" 4 | 5 | parameter SI.ThermalResistance rBou = 1 6 | "Total thermal resistance to the boundary, in K/W"; 7 | parameter SI.HeatCapacity cBou = 1 "Thermal capacity of the boundary"; 8 | HT.Sources.PrescribedTemperature 9 | preTBou "Prescribed boundary temperature" 10 | annotation (Placement(transformation( 11 | extent={{-6,-6},{6,6}}, 12 | rotation=0, 13 | origin={-178,-40}))); 14 | Capacitor capBou(c=cBou) "State for the boundary with prescribed temperature" 15 | annotation (Placement(transformation(extent={{-138,-40},{-118,-20}}))); 16 | Resistance resBouInt(r=rBou/2) 17 | "Resistance for heat losses to a prescribed boundary" annotation (Placement( 18 | transformation( 19 | extent={{-10,-10},{10,10}}, 20 | rotation=0, 21 | origin={-98,-40}))); 22 | Resistance resBouExt(r=rBou/2) 23 | "Resistance for heat losses to a prescribed boundary" annotation (Placement( 24 | transformation( 25 | extent={{-10,-10},{10,10}}, 26 | rotation=0, 27 | origin={-156,-40}))); 28 | equation 29 | connect(capBou.heaPor, resBouInt.heaPor_a) annotation (Line( 30 | points={{-128,-40},{-108,-40}}, 31 | color={191,0,0}, 32 | smooth=Smooth.None)); 33 | connect(resBouExt.heaPor_b, capBou.heaPor) annotation (Line( 34 | points={{-146,-40},{-128,-40}}, 35 | color={191,0,0}, 36 | smooth=Smooth.None)); 37 | connect(preTBou.port, resBouExt.heaPor_a) annotation (Line( 38 | points={{-172,-40},{-166,-40}}, 39 | color={191,0,0}, 40 | smooth=Smooth.None)); 41 | annotation (Diagram(coordinateSystem(extent={{-200,-100},{100,100}}, 42 | preserveAspectRatio=false), 43 | graphics), Icon(coordinateSystem(extent={{-200,-100},{100, 44 | 100}}))); 45 | end Partial_BoundCap; 46 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/Partial_Ground.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses.Partials; 2 | partial model Partial_Ground 3 | "Partial model for heat losses to the ground, with fixed TGro" 4 | 5 | parameter SI.ThermalResistance rGro = 1 6 | "Total thermal resistance to the ground, in K/W"; 7 | parameter SI.Temperature TGro = 285.15 "Fixed ground temperature" annotation(Evaluate=false); 8 | HT.Sources.FixedTemperature preTGro(T=TGro) "Fixed ground temperature" 9 | annotation (Placement(transformation( 10 | extent={{-10,-10},{10,10}}, 11 | rotation=0, 12 | origin={-78,-42}))); 13 | Resistance resGro(r=rGro) "Resistance for heat losses to the ground" 14 | annotation (Placement(transformation( 15 | extent={{10,-10},{-10,10}}, 16 | rotation=0, 17 | origin={-24,-42}))); 18 | equation 19 | connect(preTGro.port, resGro.heaPor_b) annotation (Line( 20 | points={{-68,-42},{-68,-42},{-34,-42},{-34,-42}}, 21 | color={191,0,0}, 22 | smooth=Smooth.None)); 23 | annotation (Diagram(graphics)); 24 | end Partial_Ground; 25 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/Partial_SZ.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses.Partials; 2 | partial model Partial_SZ "Single zone partial model, no air node" 3 | 4 | parameter Integer nIrr = 1 "Number of irradiation inputs/windows"; 5 | HT.Interfaces.HeatPort_a heaPorCon "Convective heat transfer" annotation(Placement(visible = true, transformation(extent={{92,-8}, 6 | {108,8}}))); 7 | HT.Interfaces.HeatPort_a heaPorRad "Radiative heat transfer" annotation(Placement(transformation(extent={{92,-48}, 8 | {108,-32}}))); 9 | //parameter Boolean booEmb = true "if true, add a heatPort for Embedded heat transfer"; 10 | HT.Interfaces.HeatPort_b heaPorEmb 11 | "Heat transfer to embedded systems, like tabs" annotation(Placement( 12 | visible=true, 13 | transformation( 14 | origin={99.9999,39.9528}, 15 | extent={{-7.9999,-7.9528},{7.9999,7.9528}}, 16 | rotation=0), 17 | iconTransformation( 18 | origin={100,39.9057}, 19 | extent={{-10,-10},{10,10}}, 20 | rotation=0))); 21 | Modelica.Blocks.Interfaces.RealOutput TZon 22 | "Zone temperature. Most often this will be air temperature" 23 | annotation (Placement(transformation(extent={{96,-90},{116,-70}}), 24 | iconTransformation(extent={{90,-90},{110,-70}}))); 25 | outer Input.BaseClasses.Partial_SIM simFasBui 26 | "Input data, to be provided by an inner submodel of PartialSIM" 27 | annotation (Placement(transformation(extent={{-200,80},{-180,100}}))); 28 | 29 | annotation(Diagram(coordinateSystem(extent={{-200,-100},{100,100}}, preserveAspectRatio=false, initialScale = 0.1, grid = {2,2}), graphics), Icon(coordinateSystem(extent={{-200, 30 | -100},{100,100}}, preserveAspectRatio=true, initialScale = 0.1, grid = {2,2}), graphics={ Polygon(origin= {0.130719,0.130719}, points={{ 31 | -200.131,99.8693},{-200.131,-40.1307},{-60.1307,-40.1307},{ 32 | -60.1307,-100.131},{99.8693,-100.131},{99.8693,99.8693},{-200.131, 33 | 99.8693}})})); 34 | end Partial_SZ; 35 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/Partial_SZ_Zon.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses.Partials; 2 | partial model Partial_SZ_Zon 3 | "Single state, only zone temperature, array of windows" 4 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_SZ; 5 | 6 | parameter SI.HeatCapacity cZon = 1 "Thermal capacity of the zone"; 7 | parameter SI.ThermalResistance rWal = 1 8 | "Total thermal resistance of the walls, in K/W"; 9 | BaseClasses.Capacitor capZon(c=cZon) "Thermal capacity of the zone" 10 | annotation (Placement(transformation(extent={{10,60},{30,80}}))); 11 | replaceable Windows.Window_gA[nIrr] win constrainedby Windows.PartialWindow 12 | "Array of window models" 13 | annotation (Placement(transformation(extent={{-100,30},{-80,50}}))); 14 | BaseClasses.Resistance resWal(r=rWal) 15 | "Total thermal resistance of the walls, in K/W" 16 | annotation (Placement(transformation(extent={{-100,-10},{-80,10}}))); 17 | protected 18 | HT.Sources.PrescribedTemperature preTAmb 19 | annotation (Placement(transformation(extent={{-150,-10},{-130,10}}))); 20 | HT.Sensors.TemperatureSensor senTZon 21 | annotation (Placement(transformation(extent={{50,-90},{70,-70}}))); 22 | equation 23 | for i in 1:nIrr loop 24 | end for; 25 | connect(simFasBui.TAmb, preTAmb.T) annotation (Line( 26 | points={{-179.039,82.0248},{-166,82.0248},{-166,0},{-152,0}}, 27 | color={0,0,127}, 28 | smooth=Smooth.None)); 29 | connect(simFasBui.irr, win.irr) annotation (Line( 30 | points={{-179.039,86.0248},{-140,86.0248},{-140,40},{-120,40},{-120, 31 | 39.9651},{-99.8824,39.9651}}, 32 | color={0,0,127}, 33 | smooth=Smooth.None)); 34 | connect(preTAmb.port, resWal.heaPor_a) annotation (Line( 35 | points={{-130,0},{-100,0}}, 36 | color={191,0,0}, 37 | smooth=Smooth.None)); 38 | 39 | connect(resWal.heaPor_b, capZon.heaPor) annotation (Line( 40 | points={{-80,0},{20,0},{20,60}}, 41 | color={191,0,0}, 42 | smooth=Smooth.None)); 43 | connect(capZon.heaPor, senTZon.port) annotation (Line( 44 | points={{20,60},{20,-80},{50,-80}}, 45 | color={191,0,0}, 46 | smooth=Smooth.None)); 47 | connect(senTZon.T, TZon) annotation (Line( 48 | points={{70,-80},{106,-80}}, 49 | color={0,0,127}, 50 | smooth=Smooth.None)); 51 | annotation(Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 52 | -100},{100,100}}), graphics), Documentation(info = " 53 |
this is a simple test
54 |First version, 12/10/2011 - RDC
61 | "), 62 | Icon(coordinateSystem(extent={{-200,-100},{100,100}}))); 63 | end Partial_SZ_Zon; 64 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/Partial_SZ_ZonEmb.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses.Partials; 2 | partial model Partial_SZ_ZonEmb "States for zone and embedded heating" 3 | extends Partial_SZ_Zon; 4 | 5 | parameter SI.HeatCapacity cEmb = 1 "Thermal capacity of the embedded system"; 6 | parameter SI.ThermalResistance rEmb = 1 7 | "Total thermal resistance of the embedded system, in K/W"; 8 | parameter Real posCapEmb(min=0, max=1) = 0.5 9 | "Position of the capacity in the embedded system. 0=interor, 1=exterior"; 10 | 11 | Capacitor capEmb(c=cEmb) "Thermal capacity of the embedded system" 12 | annotation (Placement(transformation(extent={{50,60},{70,80}}))); 13 | Resistance resEmbExt(r=rEmbExt) 14 | "Thermal resistance of embedded heating, exterior" 15 | annotation (Placement(transformation(extent={{70,30},{90,50}}))); 16 | Resistance resEmbInt(r=rEmbInt) 17 | "Thermal resistance of embedded heating, interior" 18 | annotation (Placement(transformation(extent={{30,30},{50,50}}))); 19 | protected 20 | parameter SI.ThermalResistance rEmbInt = posCapEmb * rEmb 21 | "Thermal resistance of the interior resistance in K/W"; 22 | parameter SI.ThermalResistance rEmbExt = (1-posCapEmb) * rEmb 23 | "Thermal resistance of the exterior resistance in K/W"; 24 | 25 | equation 26 | connect(resEmbExt.heaPor_b, heaPorEmb) annotation (Line( 27 | points={{90,40},{94,40},{94,39.9528},{99.9999,39.9528}}, 28 | color={191,0,0}, 29 | smooth=Smooth.None)); 30 | connect(resEmbExt.heaPor_a, capEmb.heaPor) annotation (Line( 31 | points={{70,40},{60,40},{60,60}}, 32 | color={191,0,0}, 33 | smooth=Smooth.None)); 34 | connect(resEmbInt.heaPor_b, capEmb.heaPor) annotation (Line( 35 | points={{50,40},{60,40},{60,60}}, 36 | color={191,0,0}, 37 | smooth=Smooth.None)); 38 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 39 | {100,100}}), graphics)); 40 | end Partial_SZ_ZonEmb; 41 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/Partial_SZ_ZonEmbInt.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses.Partials; 2 | partial model Partial_SZ_ZonEmbInt "States for zone, wall and internal mass" 3 | extends Partial_SZ_ZonEmb; 4 | 5 | parameter SI.HeatCapacity cInt = 1 "Thermal capacity of the zone"; 6 | parameter SI.ThermalResistance rInt = 1 7 | "Total thermal resistance of the walls, in K/W"; 8 | Capacitor capInt( c=cInt) "Capacity of internal mass" 9 | annotation (Placement(transformation(extent={{-50,60},{-30,80}}))); 10 | Resistance resInt(r=rInt) "Resistance from zone to internal mass" 11 | annotation (Placement(transformation(extent={{-20,30},{0,50}}))); 12 | equation 13 | connect(capInt.heaPor,resInt. heaPor_a) annotation (Line( 14 | points={{-40,60},{-40,40},{-20,40}}, 15 | color={191,0,0}, 16 | smooth=Smooth.None)); 17 | connect(resInt.heaPor_b, capZon.heaPor) annotation (Line( 18 | points={{0,40},{20,40},{20,60}}, 19 | color={191,0,0}, 20 | smooth=Smooth.None)); 21 | connect(resEmbInt.heaPor_a, capZon.heaPor) annotation (Line( 22 | points={{30,40},{20,40},{20,60}}, 23 | color={191,0,0}, 24 | smooth=Smooth.None)); 25 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200, 26 | -100},{100,100}}), graphics)); 27 | end Partial_SZ_ZonEmbInt; 28 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/Partial_SZ_ZonInt.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses.Partials; 2 | partial model Partial_SZ_ZonInt "States for zone and internal mass" 3 | extends Partial_SZ_Zon; 4 | 5 | parameter SI.HeatCapacity cInt = 1 "Thermal capacity of the zone"; 6 | parameter SI.ThermalResistance rInt = 1 7 | "Total thermal resistance of the walls, in K/W"; 8 | Capacitor capInt( c=cInt) "Capacity of internal mass" 9 | annotation (Placement(transformation(extent={{-50,60},{-30,80}}))); 10 | 11 | Resistance resInt(r=rInt) "Resistance from zone to internal mass" 12 | annotation (Placement(transformation(extent={{-20,50},{0,70}}))); 13 | equation 14 | connect(capInt.heaPor, resInt.heaPor_a) annotation (Line( 15 | points={{-40,60},{-20,60}}, 16 | color={191,0,0}, 17 | smooth=Smooth.None)); 18 | connect(resInt.heaPor_b, capZon.heaPor) annotation (Line( 19 | points={{0,60},{20,60}}, 20 | color={191,0,0}, 21 | smooth=Smooth.None)); 22 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 23 | {100,100}}), graphics)); 24 | end Partial_SZ_ZonInt; 25 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/Partial_SZ_ZonWal.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses.Partials; 2 | partial model Partial_SZ_ZonWal "States for zone and wall" 3 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_SZ; 4 | parameter SI.HeatCapacity cZon = 1 "Thermal capacity of the zone"; 5 | parameter SI.HeatCapacity cWal = 1 "Thermal capacity of the wal"; 6 | parameter SI.ThermalResistance rWal = 1 7 | "Total thermal resistance of the walls, in K/W"; 8 | parameter Real posCapWal(min=0, max=1) = 0.5 9 | "Position of the capacity in the wall. 0=interor, 1=exterior"; 10 | BaseClasses.Capacitor capZon(c=cZon) "Thermal capacity of the zone" 11 | annotation (Placement(transformation(extent={{10,60},{30,80}}))); 12 | replaceable Windows.Window_gA[nIrr] win(each gA=1) "Array of window models" 13 | annotation (Placement(transformation(extent={{-100,30},{-80,50}}))); 14 | BaseClasses.Resistance resWalExt(r=rWalExt) 15 | "External thermal resistance of the walls, in K/W" 16 | annotation (Placement(transformation(extent={{-100,-10},{-80,10}}))); 17 | BaseClasses.Resistance resWalInt(r=rWalInt) 18 | "Internal thermal resistance of the walls, in K/W" 19 | annotation (Placement(transformation(extent={{-40,-10},{-20,10}}))); 20 | protected 21 | HT.Sources.PrescribedTemperature preTAmb 22 | annotation (Placement(transformation(extent={{-150,-10},{-130,10}}))); 23 | HT.Sensors.TemperatureSensor senTZon 24 | annotation (Placement(transformation(extent={{50,-90},{70,-70}}))); 25 | parameter SI.ThermalResistance rWalInt = posCapWal * rWal 26 | "Thermal resistance of the interior resistance in K/W"; 27 | parameter SI.ThermalResistance rWalExt = (1-posCapWal) * rWal 28 | "Thermal resistance of the exterior resistance in K/W"; 29 | 30 | public 31 | BaseClasses.Capacitor capWal(c=cWal) 32 | "Position of this capacity is determined by posCapWal" 33 | annotation (Placement(transformation(extent={{-70,10},{-50,30}}))); 34 | equation 35 | for i in 1:nIrr loop 36 | end for; 37 | connect(simFasBui.TAmb, preTAmb.T) annotation (Line( 38 | points={{-179.039,82.0248},{-166,82.0248},{-166,0},{-152,0}}, 39 | color={0,0,127}, 40 | smooth=Smooth.None)); 41 | connect(simFasBui.irr, win.irr) annotation (Line( 42 | points={{-179.039,86.0248},{-140,86.0248},{-140,40},{-120,40},{-120, 43 | 39.9651},{-99.8824,39.9651}}, 44 | color={0,0,127}, 45 | smooth=Smooth.None)); 46 | connect(preTAmb.port, resWalExt.heaPor_a) 47 | annotation (Line( 48 | points={{-130,0},{-100,0}}, 49 | color={191,0,0}, 50 | smooth=Smooth.None)); 51 | 52 | connect(capZon.heaPor, senTZon.port) annotation (Line( 53 | points={{20,60},{20,-80},{50,-80}}, 54 | color={191,0,0}, 55 | smooth=Smooth.None)); 56 | connect(senTZon.T, TZon) annotation (Line( 57 | points={{70,-80},{106,-80}}, 58 | color={0,0,127}, 59 | smooth=Smooth.None)); 60 | connect(resWalExt.heaPor_b, capWal.heaPor) annotation (Line( 61 | points={{-80,0},{-60,0},{-60,10}}, 62 | color={191,0,0}, 63 | smooth=Smooth.None)); 64 | connect(resWalInt.heaPor_a, capWal.heaPor) annotation (Line( 65 | points={{-40,0},{-60,0},{-60,10}}, 66 | color={191,0,0}, 67 | smooth=Smooth.None)); 68 | connect(resWalInt.heaPor_b, capZon.heaPor) annotation (Line( 69 | points={{-20,0},{20,0},{20,60}}, 70 | color={191,0,0}, 71 | smooth=Smooth.None)); 72 | annotation(Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 73 | -100},{100,100}}), graphics), Documentation(info = " 74 |this is a simple test
75 |First version, 12/10/2011 - RDC
82 | "), 83 | Icon(coordinateSystem(extent={{-200,-100},{100,100}}))); 84 | end Partial_SZ_ZonWal; 85 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/Partial_SZ_ZonWalEmb.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses.Partials; 2 | partial model Partial_SZ_ZonWalEmb 3 | "States for zone, walls and embedded heating" 4 | extends Partial_SZ_ZonWal; 5 | 6 | parameter SI.HeatCapacity cEmb = 1 "Thermal capacity of the embedded system"; 7 | parameter SI.ThermalResistance rEmb = 1 8 | "Total thermal resistance of the embedded system, in K/W"; 9 | parameter Real posCapEmb(min=0, max=1) = 0.5 10 | "Position of the capacity in the embedded system. 0=interor, 1=exterior"; 11 | 12 | Capacitor capEmb(c=cEmb) "Thermal capacity of the embedded system" 13 | annotation (Placement(transformation(extent={{50,60},{70,80}}))); 14 | Resistance resEmbExt(r=rEmbExt) 15 | "Thermal resistance of embedded heating, exterior" 16 | annotation (Placement(transformation(extent={{70,30},{90,50}}))); 17 | Resistance resEmbInt(r=rEmbInt) 18 | "Thermal resistance of embedded heating, interior" 19 | annotation (Placement(transformation(extent={{30,30},{50,50}}))); 20 | protected 21 | parameter SI.ThermalResistance rEmbInt = posCapEmb * rEmb 22 | "Thermal resistance of the interior resistance in K/W"; 23 | parameter SI.ThermalResistance rEmbExt = (1-posCapEmb) * rEmb 24 | "Thermal resistance of the exterior resistance in K/W"; 25 | 26 | equation 27 | connect(resEmbExt.heaPor_b, heaPorEmb) annotation (Line( 28 | points={{90,40},{94,40},{94,39.9528},{99.9999,39.9528}}, 29 | color={191,0,0}, 30 | smooth=Smooth.None)); 31 | connect(resEmbExt.heaPor_a, capEmb.heaPor) annotation (Line( 32 | points={{70,40},{60,40},{60,60}}, 33 | color={191,0,0}, 34 | smooth=Smooth.None)); 35 | connect(resEmbInt.heaPor_b, capEmb.heaPor) annotation (Line( 36 | points={{50,40},{60,40},{60,60}}, 37 | color={191,0,0}, 38 | smooth=Smooth.None)); 39 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 40 | {100,100}}), graphics)); 41 | end Partial_SZ_ZonWalEmb; 42 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/Partial_SZ_ZonWalInt.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses.Partials; 2 | partial model Partial_SZ_ZonWalInt "States for zone, wall and internal mass" 3 | extends Partial_SZ_ZonWal; 4 | 5 | parameter SI.HeatCapacity cInt = 1 "Thermal capacity of the zone"; 6 | parameter SI.ThermalResistance rInt = 1 7 | "Total thermal resistance of the walls, in K/W"; 8 | Capacitor capInt( c=cInt) "Capacity of internal mass" 9 | annotation (Placement(transformation(extent={{-50,60},{-30,80}}))); 10 | Resistance resInt(r=rInt) "Resistance from zone to internal mass" 11 | annotation (Placement(transformation(extent={{-20,50},{0,70}}))); 12 | equation 13 | connect(capInt.heaPor,resInt. heaPor_a) annotation (Line( 14 | points={{-40,60},{-20,60}}, 15 | color={191,0,0}, 16 | smooth=Smooth.None)); 17 | connect(resInt.heaPor_b, capZon.heaPor) annotation (Line( 18 | points={{0,60},{20,60}}, 19 | color={191,0,0}, 20 | smooth=Smooth.None)); 21 | end Partial_SZ_ZonWalInt; 22 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/Partial_SZ_ZonWalIntEmb.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses.Partials; 2 | partial model Partial_SZ_ZonWalIntEmb 3 | "States for zone, walls, internal mass and embedded heating" 4 | extends Partial_SZ_ZonWalInt; 5 | 6 | parameter SI.HeatCapacity cEmb = 1 "Thermal capacity of the embedded system"; 7 | parameter SI.ThermalResistance rEmb = 1 8 | "Total thermal resistance of the embedded system, in K/W"; 9 | parameter Real posCapEmb(min=0, max=1) = 0.5 10 | "Position of the capacity in the embedded system. 0=interor, 1=exterior"; 11 | 12 | Capacitor capEmb(c=cEmb) "Thermal capacity of the embedded system" 13 | annotation (Placement(transformation(extent={{50,60},{70,80}}))); 14 | Resistance resEmbExt(r=rEmbExt) 15 | "Thermal resistance of embedded heating, exterior" 16 | annotation (Placement(transformation(extent={{70,30},{90,50}}))); 17 | Resistance resEmbInt(r=rEmbInt) 18 | "Thermal resistance of embedded heating, interior" 19 | annotation (Placement(transformation(extent={{30,30},{50,50}}))); 20 | protected 21 | parameter SI.ThermalResistance rEmbInt = posCapEmb * rEmb 22 | "Thermal resistance of the interior resistance in K/W"; 23 | parameter SI.ThermalResistance rEmbExt = (1-posCapEmb) * rEmb 24 | "Thermal resistance of the exterior resistance in K/W"; 25 | 26 | equation 27 | connect(resEmbExt.heaPor_b, heaPorEmb) annotation (Line( 28 | points={{90,40},{94,40},{94,39.9528},{99.9999,39.9528}}, 29 | color={191,0,0}, 30 | smooth=Smooth.None)); 31 | connect(resEmbExt.heaPor_a, capEmb.heaPor) annotation (Line( 32 | points={{70,40},{60,40},{60,60}}, 33 | color={191,0,0}, 34 | smooth=Smooth.None)); 35 | connect(resEmbInt.heaPor_b, capEmb.heaPor) annotation (Line( 36 | points={{50,40},{60,40},{60,60}}, 37 | color={191,0,0}, 38 | smooth=Smooth.None)); 39 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 40 | {100,100}}), graphics)); 41 | end Partial_SZ_ZonWalIntEmb; 42 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/Partial_SZ_ZonWalInt_fraResInt.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses.Partials; 2 | partial model Partial_SZ_ZonWalInt_fraResInt 3 | "States for zone, wall and internal mass, splitted resInt" 4 | extends Partial_SZ_ZonWal; 5 | 6 | parameter SI.HeatCapacity cInt = 1 "Thermal capacity of the zone"; 7 | parameter SI.ThermalResistance rInt = 1 8 | "Total thermal resistance of the walls, in K/W"; 9 | 10 | parameter Real fraResInt = 0.5 11 | "Fraction of resInt that is attributed to resInt1"; 12 | 13 | Capacitor capInt( c=cInt) "Capacity of internal mass" 14 | annotation (Placement(transformation(extent={{-74,60},{-54,80}}))); 15 | Resistance resInt_b(r=(1 - fraResInt)*rInt) 16 | "Inside resistance from zone to internal mass" 17 | annotation (Placement(transformation(extent={{-48,50},{-28,70}}))); 18 | Resistance resInt_a(r=fraResInt*rInt) 19 | "Outside resistance from zone to internal mass" 20 | annotation (Placement(transformation(extent={{-16,50},{4,70}}))); 21 | equation 22 | connect(capInt.heaPor, resInt_b.heaPor_a) annotation (Line( 23 | points={{-64,60},{-48,60}}, 24 | color={191,0,0}, 25 | smooth=Smooth.None)); 26 | connect(resInt_a.heaPor_b, capZon.heaPor) annotation (Line( 27 | points={{4,60},{20,60}}, 28 | color={191,0,0}, 29 | smooth=Smooth.None)); 30 | connect(resInt_a.heaPor_a, resInt_b.heaPor_b) annotation (Line( 31 | points={{-16,60},{-28,60}}, 32 | color={191,0,0}, 33 | smooth=Smooth.None)); 34 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200, 35 | -100},{100,100}}), graphics)); 36 | end Partial_SZ_ZonWalInt_fraResInt; 37 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/TwoPort.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses.Partials; 2 | partial model TwoPort "Partial for resistances and walls" 3 | 4 | HT.Interfaces.HeatPort_a heaPor_a annotation(Placement(transformation(extent={{-110, 5 | -10},{-90,10}}, rotation = 0), 6 | iconTransformation(extent={{-110,-10},{-90,10}}))); 7 | HT.Interfaces.HeatPort_b heaPor_b annotation(Placement(transformation(extent={{90,-10}, 8 | {110,10}}, rotation = 0), 9 | iconTransformation(extent={{90,-10},{110,10}}))); 10 | parameter SI.ThermalResistance r "Constant thermal resistance" annotation(Evaluate=false); 11 | equation 12 | 13 | end TwoPort; 14 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/package.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses; 2 | package Partials 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}))); 19 | end Partials; 20 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Partials/package.order: -------------------------------------------------------------------------------- 1 | Partial_Ground 2 | Partial_Bound 3 | Partial_BoundCap 4 | Partial_SZ 5 | Partial_SZ_Zon 6 | Partial_SZ_ZonEmb 7 | Partial_SZ_ZonWal 8 | Partial_SZ_ZonInt 9 | Partial_SZ_ZonWalInt 10 | Partial_SZ_ZonWalInt_fraResInt 11 | Partial_SZ_ZonWalEmb 12 | Partial_SZ_ZonWalIntEmb 13 | Partial_SZ_ZonEmbInt 14 | TwoPort 15 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Resistance.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses; 2 | model Resistance "Themal resistance" 3 | 4 | extends FastBuildings.Zones.BaseClasses.Partials.TwoPort; 5 | equation 6 | heaPor_a.Q_flow * r = heaPor_a.T - heaPor_b.T; 7 | heaPor_a.Q_flow + heaPor_b.Q_flow = 0; 8 | annotation(Diagram(coordinateSystem(preserveAspectRatio = true, extent = {{-100,-100},{100,100}}), graphics), Icon( 9 | coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, 10 | 100}}), graphics={ Text(rotation= 0, lineColor= 11 | {95,95,95}, fillColor= 12 | {0,0,0}, pattern= 13 | LinePattern.Solid, 14 | fillPattern=FillPattern.None, 15 | lineThickness=0.25, extent={{ 16 | -99.961,90.903},{100,60}}, 17 | textString="%name"), Line( 18 | points={{-90,0},{-60,0},{-50,-20},{-30,20},{-10,-20},{10,20},{30,-20}, 19 | {50,20},{60,0},{90,0}}, 20 | color={95,95,95}, 21 | thickness=0.5, 22 | smooth=Smooth.None)})); 23 | end Resistance; 24 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/Wall_1C.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.BaseClasses; 2 | model Wall_1C "Single state wall" 3 | 4 | extends FastBuildings.Zones.BaseClasses.Partials.TwoPort; 5 | parameter SI.HeatCapacity c = 1 "Thermal capacity of the wall"; 6 | 7 | Capacitor capWal(c=c) 8 | annotation (Placement(transformation(extent={{-10,0},{10,20}}))); 9 | Resistance resInt(r=r/2) 10 | annotation (Placement(transformation(extent={{-48,-10},{-28,10}}))); 11 | Resistance resExt(r=r/2) 12 | annotation (Placement(transformation(extent={{30,-10},{50,10}}))); 13 | 14 | equation 15 | connect(capWal.heaPor, resInt.heaPor_b) annotation (Line( 16 | points={{5.55112e-16,-5.55112e-16},{-14,-5.55112e-16},{-14,0},{-28,0}}, 17 | color={191,0,0}, 18 | smooth=Smooth.None)); 19 | connect(capWal.heaPor, resExt.heaPor_a) annotation (Line( 20 | points={{5.55112e-16,-5.55112e-16},{16,-5.55112e-16},{16,5.55112e-16},{30, 21 | 5.55112e-16}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | connect(resInt.heaPor_a, heaPor_a) annotation (Line( 25 | points={{-48,0},{-100,0}}, 26 | color={191,0,0}, 27 | smooth=Smooth.None)); 28 | connect(resExt.heaPor_b, heaPor_b) annotation (Line( 29 | points={{50,0},{100,0}}, 30 | color={191,0,0}, 31 | smooth=Smooth.None)); 32 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, 33 | -100},{100,100}}), graphics)); 34 | end Wall_1C; 35 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/package.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | package BaseClasses 3 | 4 | 5 | 6 | 7 | 8 | annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}))); 9 | end BaseClasses; 10 | -------------------------------------------------------------------------------- /FastBuildings/Zones/BaseClasses/package.order: -------------------------------------------------------------------------------- 1 | Partials 2 | Capacitor 3 | Resistance 4 | Wall_1C 5 | -------------------------------------------------------------------------------- /FastBuildings/Zones/Windows/PartialWindow.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.Windows; 2 | partial model PartialWindow "Partial window model" 3 | 4 | Modelica.Blocks.Interfaces.RealInput irr annotation(Placement(visible = true, transformation(origin={-98.824, 5 | -0.34941}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin={-98.824, 6 | -0.34941}, extent = {{-12,-12},{12,12}}, rotation = 0))); 7 | Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b heaPor1 8 | annotation(Placement(visible = true, transformation(origin={100.913, 9 | -0.52412}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin={100.913, 10 | -0.52412}, extent = {{-12,-12},{12,12}}, rotation = 0))); 11 | 12 | annotation(Diagram(graphics), 13 | Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, 14 | -100},{100,100}}), 15 | graphics={ 16 | Rectangle( 17 | extent={{-60,80},{60,-80}}, 18 | lineColor={95,95,95}, 19 | lineThickness=1), 20 | Text( 21 | extent={{-100,120},{100,92}}, 22 | lineColor={95,95,95}, 23 | lineThickness=0.5, 24 | fillColor={95,95,95}, 25 | fillPattern=FillPattern.Solid, 26 | textString="%name"), 27 | Line( 28 | points={{0,80},{0,-80}}, 29 | color={95,95,95}, 30 | smooth=Smooth.None), 31 | Line( 32 | points={{-60,0},{54,0},{60,0}}, 33 | color={95,95,95}, 34 | smooth=Smooth.None)})); 35 | end PartialWindow; 36 | -------------------------------------------------------------------------------- /FastBuildings/Zones/Windows/Window_gA.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.Windows; 2 | model Window_gA "Simple window, thermal gains are Irr * gA" 3 | 4 | extends PartialWindow; 5 | 6 | parameter Real gA=1 "gA value of the window(s)"; 7 | 8 | equation 9 | heaPor1.Q_flow = -irr * gA; 10 | annotation(Diagram(graphics), 11 | Icon(graphics)); 12 | end Window_gA; 13 | -------------------------------------------------------------------------------- /FastBuildings/Zones/Windows/Window_gA_2.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones.Windows; 2 | model Window_gA_2 3 | "Simple window, thermal gains are Irr * gA, 2 heatPorts to split the thermal flux" 4 | 5 | extends PartialWindow; 6 | 7 | parameter Real gA=1 "gA value of the window(s)"; 8 | parameter Real fraHeaPor1(min=0, max=1) = 0.5 9 | "Fraction of heat flux to heaPor1"; 10 | Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b heaPor2 11 | annotation(Placement(visible = true, transformation(origin={98.913, 12 | -40.5241}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin={100.913, 13 | -40.5241}, extent = {{-12,-12},{12,12}}, rotation = 0))); 14 | equation 15 | heaPor1.Q_flow = -irr * gA * fraHeaPor1; 16 | heaPor2.Q_flow = -irr * gA * (1-fraHeaPor1); 17 | 18 | annotation(Diagram(graphics), 19 | Icon(graphics)); 20 | end Window_gA_2; 21 | -------------------------------------------------------------------------------- /FastBuildings/Zones/Windows/package.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | package Windows 3 | 4 | 5 | 6 | end Windows; 7 | -------------------------------------------------------------------------------- /FastBuildings/Zones/Windows/package.order: -------------------------------------------------------------------------------- 1 | Window_gA 2 | Window_gA_2 3 | PartialWindow 4 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonBou_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonBou_A 3 | "Single state, only zone temperature, array of windows, with boundary temperature" 4 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_SZ_Zon; 5 | extends BaseClasses.Partials.Partial_BoundCap; 6 | equation 7 | for i in 1:nIrr loop 8 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 9 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 10 | color={191,0,0}, 11 | smooth=Smooth.None)); 12 | end for; 13 | connect(simFasBui.TAmb, preTAmb.T) annotation (Line( 14 | points={{-179.039,82.0248},{-166,82.0248},{-166,0},{-152,0}}, 15 | color={0,0,127}, 16 | smooth=Smooth.None)); 17 | connect(simFasBui.irr, win.irr) annotation (Line( 18 | points={{-179.039,86.0248},{-140,86.0248},{-140,40},{-120,40},{-120, 19 | 39.9651},{-99.8824,39.9651}}, 20 | color={0,0,127}, 21 | smooth=Smooth.None)); 22 | connect(preTAmb.port, resWal.heaPor_a) annotation (Line( 23 | points={{-130,0},{-100,0}}, 24 | color={191,0,0}, 25 | smooth=Smooth.None)); 26 | 27 | connect(resWal.heaPor_b, capZon.heaPor) annotation (Line( 28 | points={{-80,0},{20,0},{20,60}}, 29 | color={191,0,0}, 30 | smooth=Smooth.None)); 31 | connect(heaPorEmb, capZon.heaPor) annotation (Line( 32 | points={{100,39.9057},{20,39.9057},{20,60}}, 33 | color={191,0,0}, 34 | smooth=Smooth.None)); 35 | connect(heaPorCon, capZon.heaPor) annotation (Line( 36 | points={{100,0},{20,0},{20,60}}, 37 | color={191,0,0}, 38 | smooth=Smooth.None)); 39 | connect(heaPorRad, capZon.heaPor) annotation (Line( 40 | points={{100,-40},{20,-40},{20,60}}, 41 | color={191,0,0}, 42 | smooth=Smooth.None)); 43 | connect(capZon.heaPor, senTZon.port) annotation (Line( 44 | points={{20,60},{20,-80},{50,-80}}, 45 | color={191,0,0}, 46 | smooth=Smooth.None)); 47 | connect(senTZon.T, TZon) annotation (Line( 48 | points={{70,-80},{106,-80}}, 49 | color={0,0,127}, 50 | smooth=Smooth.None)); 51 | connect(simFasBui.TSet, preTBou.T) annotation (Line( 52 | points={{-190.039,79.0248},{-190.039,-40},{-185.2,-40}}, 53 | color={0,0,127}, 54 | smooth=Smooth.None)); 55 | connect(resBouInt.heaPor_b, senTZon.port) annotation (Line( 56 | points={{-88,-40},{20,-40},{20,-80},{50,-80}}, 57 | color={191,0,0}, 58 | smooth=Smooth.None)); 59 | annotation(Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200, 60 | -100},{100,100}}), graphics), Documentation(info = " 61 |this is a simple test
62 |First version, 12/10/2011 - RDC
69 | "), 70 | Icon(coordinateSystem(extent={{-200,-100},{100,100}}))); 71 | end ZonBou_A; 72 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonEmbInt_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonEmbInt_A "heaPorRad connected to capInt, windows to capZon" 3 | extends BaseClasses.Partials.Partial_SZ_ZonEmbInt; 4 | 5 | equation 6 | for i in 1:nIrr loop 7 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 8 | points={{-79.9087,39.9476},{-68,39.9476},{-68,40},{-60,40},{-60,52},{20, 9 | 52},{20,60}}, 10 | color={191,0,0}, 11 | smooth=Smooth.None)); 12 | end for; 13 | connect(heaPorCon, capZon.heaPor) annotation (Line( 14 | points={{100,0},{20,0},{20,60}}, 15 | color={191,0,0}, 16 | smooth=Smooth.None)); 17 | 18 | connect(heaPorRad, capInt.heaPor) annotation (Line( 19 | points={{100,-40},{60,-40},{60,20},{-40,20},{-40,60}}, 20 | color={191,0,0}, 21 | smooth=Smooth.None)); 22 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 23 | {100,100}}), graphics)); 24 | end ZonEmbInt_A; 25 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonEmbInt_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonEmbInt_B "heaPorRad and windows connected to capInt" 3 | extends BaseClasses.Partials.Partial_SZ_ZonEmbInt; 4 | 5 | equation 6 | for i in 1:nIrr loop 7 | connect(win[i].heaPor1, capInt.heaPor) annotation (Line( 8 | points={{-79.9087,39.9476},{-40,39.9476},{-40,60}}, 9 | color={191,0,0}, 10 | smooth=Smooth.None)); 11 | end for; 12 | connect(heaPorCon, capZon.heaPor) annotation (Line( 13 | points={{100,0},{20,0},{20,60}}, 14 | color={191,0,0}, 15 | smooth=Smooth.None)); 16 | 17 | connect(heaPorRad, capInt.heaPor) annotation (Line( 18 | points={{100,-40},{60,-40},{60,20},{-40,20},{-40,60}}, 19 | color={191,0,0}, 20 | smooth=Smooth.None)); 21 | 22 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false,extent={{-200,-100}, 23 | {100,100}}), graphics)); 24 | end ZonEmbInt_B; 25 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonEmb_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonEmb_A "States for zone and embedded heating, heaPorRad to air node" 3 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_SZ_ZonEmb; 4 | equation 5 | for i in 1:nIrr loop 6 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 7 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | end for; 11 | connect(simFasBui.TAmb, preTAmb.T) annotation (Line( 12 | points={{-179.039,82.0248},{-166,82.0248},{-166,0},{-152,0}}, 13 | color={0,0,127}, 14 | smooth=Smooth.None)); 15 | connect(simFasBui.irr, win.irr) annotation (Line( 16 | points={{-179.039,86.0248},{-140,86.0248},{-140,40},{-120,40},{-120, 17 | 39.9651},{-99.8824,39.9651}}, 18 | color={0,0,127}, 19 | smooth=Smooth.None)); 20 | connect(preTAmb.port, resWal.heaPor_a) annotation (Line( 21 | points={{-130,0},{-100,0}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | 25 | connect(resWal.heaPor_b, capZon.heaPor) annotation (Line( 26 | points={{-80,0},{20,0},{20,60}}, 27 | color={191,0,0}, 28 | smooth=Smooth.None)); 29 | connect(heaPorCon, capZon.heaPor) annotation (Line( 30 | points={{100,0},{20,0},{20,60}}, 31 | color={191,0,0}, 32 | smooth=Smooth.None)); 33 | connect(heaPorRad, capZon.heaPor) annotation (Line( 34 | points={{100,-40},{20,-40},{20,60}}, 35 | color={191,0,0}, 36 | smooth=Smooth.None)); 37 | connect(capZon.heaPor, senTZon.port) annotation (Line( 38 | points={{20,60},{20,-80},{50,-80}}, 39 | color={191,0,0}, 40 | smooth=Smooth.None)); 41 | connect(senTZon.T, TZon) annotation (Line( 42 | points={{70,-80},{106,-80}}, 43 | color={0,0,127}, 44 | smooth=Smooth.None)); 45 | connect(resEmbInt.heaPor_a, capZon.heaPor) annotation (Line( 46 | points={{30,40},{20,40},{20,60}}, 47 | color={191,0,0}, 48 | smooth=Smooth.None)); 49 | annotation(Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 50 | -100},{100,100}}), graphics), Documentation(info = " 51 |this is a simple test
52 |First version, 12/10/2011 - RDC
59 | "), 60 | Icon(coordinateSystem(extent={{-200,-100},{100,100}}))); 61 | end ZonEmb_A; 62 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonEmb_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonEmb_B "States for zone and embedded heating, heaPorRad to capEmb" 3 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_SZ_ZonEmb; 4 | equation 5 | for i in 1:nIrr loop 6 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 7 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | end for; 11 | connect(simFasBui.TAmb, preTAmb.T) annotation (Line( 12 | points={{-179.039,82.0248},{-166,82.0248},{-166,0},{-152,0}}, 13 | color={0,0,127}, 14 | smooth=Smooth.None)); 15 | connect(simFasBui.irr, win.irr) annotation (Line( 16 | points={{-179.039,86.0248},{-140,86.0248},{-140,40},{-120,40},{-120, 17 | 39.9651},{-99.8824,39.9651}}, 18 | color={0,0,127}, 19 | smooth=Smooth.None)); 20 | connect(preTAmb.port, resWal.heaPor_a) annotation (Line( 21 | points={{-130,0},{-100,0}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | 25 | connect(resWal.heaPor_b, capZon.heaPor) annotation (Line( 26 | points={{-80,0},{20,0},{20,60}}, 27 | color={191,0,0}, 28 | smooth=Smooth.None)); 29 | connect(heaPorCon, capZon.heaPor) annotation (Line( 30 | points={{100,0},{20,0},{20,60}}, 31 | color={191,0,0}, 32 | smooth=Smooth.None)); 33 | connect(capZon.heaPor, senTZon.port) annotation (Line( 34 | points={{20,60},{20,-80},{50,-80}}, 35 | color={191,0,0}, 36 | smooth=Smooth.None)); 37 | connect(senTZon.T, TZon) annotation (Line( 38 | points={{70,-80},{106,-80}}, 39 | color={0,0,127}, 40 | smooth=Smooth.None)); 41 | connect(resEmbInt.heaPor_a, capZon.heaPor) annotation (Line( 42 | points={{30,40},{20,40},{20,60}}, 43 | color={191,0,0}, 44 | smooth=Smooth.None)); 45 | connect(heaPorRad, capEmb.heaPor) annotation (Line( 46 | points={{100,-40},{60,-40},{60,60}}, 47 | color={191,0,0}, 48 | smooth=Smooth.None)); 49 | annotation(Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 50 | -100},{100,100}}), graphics), Documentation(info = " 51 |this is a simple test
52 |First version, 12/10/2011 - RDC
59 | "), 60 | Icon(coordinateSystem(extent={{-200,-100},{100,100}}))); 61 | end ZonEmb_B; 62 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonIntBou_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonIntBou_A "States for zone, internal mass and boundary" 3 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_SZ_ZonInt; 4 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_BoundCap; 5 | 6 | equation 7 | connect(capInt.heaPor, resInt.heaPor_a) annotation (Line( 8 | points={{-40,60},{-20,60}}, 9 | color={191,0,0}, 10 | smooth=Smooth.None)); 11 | connect(resInt.heaPor_b, capZon.heaPor) annotation (Line( 12 | points={{0,60},{20,60}}, 13 | color={191,0,0}, 14 | smooth=Smooth.None)); 15 | connect(heaPorEmb, capInt.heaPor) annotation (Line( 16 | points={{100,39.9057},{76,39.9057},{76,40},{46,40},{46,50},{-40,50},{-40,60}}, 17 | color={191,0,0}, 18 | smooth=Smooth.None)); 19 | 20 | connect(heaPorCon, capZon.heaPor) annotation (Line( 21 | points={{100,0},{20,0},{20,60}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | connect(heaPorRad, capInt.heaPor) annotation (Line( 25 | points={{100,-40},{46,-40},{46,50},{-40,50},{-40,60}}, 26 | color={191,0,0}, 27 | smooth=Smooth.None)); 28 | for i in 1:nIrr loop 29 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 30 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 31 | color={191,0,0}, 32 | smooth=Smooth.None)); 33 | end for; 34 | connect(simFasBui.TSet, preTBou.T) annotation (Line( 35 | points={{-190.039,79.0248},{-190.039,-40},{-185.2,-40}}, 36 | color={0,0,127}, 37 | smooth=Smooth.None)); 38 | connect(resBouInt.heaPor_b, senTZon.port) annotation (Line( 39 | points={{-88,-40},{20,-40},{20,-80},{50,-80}}, 40 | color={191,0,0}, 41 | smooth=Smooth.None)); 42 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false,extent={{-200, 43 | -100},{100,100}}), 44 | graphics)); 45 | end ZonIntBou_A; 46 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonInt_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonInt_A "States for zone and internal mass" 3 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_SZ_ZonInt; 4 | 5 | equation 6 | connect(capInt.heaPor, resInt.heaPor_a) annotation (Line( 7 | points={{-40,60},{-20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | connect(resInt.heaPor_b, capZon.heaPor) annotation (Line( 11 | points={{0,60},{20,60}}, 12 | color={191,0,0}, 13 | smooth=Smooth.None)); 14 | connect(heaPorEmb, capInt.heaPor) annotation (Line( 15 | points={{100,39.9057},{76,39.9057},{76,40},{46,40},{46,50},{-40,50},{-40,60}}, 16 | color={191,0,0}, 17 | smooth=Smooth.None)); 18 | 19 | connect(heaPorCon, capZon.heaPor) annotation (Line( 20 | points={{100,0},{20,0},{20,60}}, 21 | color={191,0,0}, 22 | smooth=Smooth.None)); 23 | connect(heaPorRad, capInt.heaPor) annotation (Line( 24 | points={{100,-40},{46,-40},{46,50},{-40,50},{-40,60}}, 25 | color={191,0,0}, 26 | smooth=Smooth.None)); 27 | for i in 1:nIrr loop 28 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 29 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 30 | color={191,0,0}, 31 | smooth=Smooth.None)); 32 | end for; 33 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 34 | {100,100}}), graphics)); 35 | end ZonInt_A; 36 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonInt_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonInt_B "States for zone and internal mass, splitted window gains" 3 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_SZ_ZonInt( 4 | redeclare FastBuildings.Zones.Windows.Window_gA_2 win); 5 | 6 | equation 7 | connect(capInt.heaPor, resInt.heaPor_a) annotation (Line( 8 | points={{-40,60},{-20,60}}, 9 | color={191,0,0}, 10 | smooth=Smooth.None)); 11 | connect(resInt.heaPor_b, capZon.heaPor) annotation (Line( 12 | points={{0,60},{20,60}}, 13 | color={191,0,0}, 14 | smooth=Smooth.None)); 15 | connect(heaPorEmb, capInt.heaPor) annotation (Line( 16 | points={{100,39.9057},{76,39.9057},{76,40},{46,40},{46,50},{-40,50},{-40,60}}, 17 | color={191,0,0}, 18 | smooth=Smooth.None)); 19 | 20 | connect(heaPorCon, capZon.heaPor) annotation (Line( 21 | points={{100,0},{20,0},{20,60}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | connect(heaPorRad, capInt.heaPor) annotation (Line( 25 | points={{100,-40},{46,-40},{46,50},{-40,50},{-40,60}}, 26 | color={191,0,0}, 27 | smooth=Smooth.None)); 28 | for i in 1:nIrr loop 29 | connect(win[i].heaPor1, capInt.heaPor) annotation (Line( 30 | points={{-79.9087,39.9476},{-40,39.9476},{-40,60}}, 31 | color={191,0,0}, 32 | smooth=Smooth.None)); 33 | connect(win[i].heaPor2, capZon.heaPor) annotation (Line( 34 | points={{-79.9087,35.9476},{20,35.9476},{20,60}}, 35 | color={191,0,0}, 36 | smooth=Smooth.None)); 37 | end for; 38 | 39 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 40 | {100,100}}), graphics)); 41 | end ZonInt_B; 42 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonInt_C.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonInt_C "States for zone and internal mass, window connected to capInt" 3 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_SZ_ZonInt; 4 | 5 | equation 6 | connect(capInt.heaPor, resInt.heaPor_a) annotation (Line( 7 | points={{-40,60},{-20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | connect(resInt.heaPor_b, capZon.heaPor) annotation (Line( 11 | points={{0,60},{20,60}}, 12 | color={191,0,0}, 13 | smooth=Smooth.None)); 14 | connect(heaPorEmb, capInt.heaPor) annotation (Line( 15 | points={{100,39.9057},{76,39.9057},{76,40},{46,40},{46,50},{-40,50},{-40,60}}, 16 | color={191,0,0}, 17 | smooth=Smooth.None)); 18 | 19 | connect(heaPorCon, capZon.heaPor) annotation (Line( 20 | points={{100,0},{20,0},{20,60}}, 21 | color={191,0,0}, 22 | smooth=Smooth.None)); 23 | connect(heaPorRad, capInt.heaPor) annotation (Line( 24 | points={{100,-40},{46,-40},{46,50},{-40,50},{-40,60}}, 25 | color={191,0,0}, 26 | smooth=Smooth.None)); 27 | for i in 1:nIrr loop 28 | end for; 29 | connect(win[1].heaPor1, capInt.heaPor) annotation (Line( 30 | points={{-79.9087,39.9476},{-40,39.9476},{-40,60}}, 31 | color={191,0,0}, 32 | smooth=Smooth.None)); 33 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false,extent={{-200, 34 | -100},{100,100}}), 35 | graphics)); 36 | end ZonInt_C; 37 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonInt_D.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonInt_D "With heat losses to the ground" 3 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_SZ_ZonInt; 4 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_Ground; 5 | 6 | equation 7 | connect(capInt.heaPor, resInt.heaPor_a) annotation (Line( 8 | points={{-40,60},{-20,60}}, 9 | color={191,0,0}, 10 | smooth=Smooth.None)); 11 | connect(resInt.heaPor_b, capZon.heaPor) annotation (Line( 12 | points={{0,60},{20,60}}, 13 | color={191,0,0}, 14 | smooth=Smooth.None)); 15 | connect(heaPorEmb, capInt.heaPor) annotation (Line( 16 | points={{100,39.9057},{76,39.9057},{76,40},{46,40},{46,50},{-40,50},{-40,60}}, 17 | color={191,0,0}, 18 | smooth=Smooth.None)); 19 | 20 | connect(heaPorCon, capZon.heaPor) annotation (Line( 21 | points={{100,0},{20,0},{20,60}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | connect(heaPorRad, capInt.heaPor) annotation (Line( 25 | points={{100,-40},{46,-40},{46,50},{-40,50},{-40,60}}, 26 | color={191,0,0}, 27 | smooth=Smooth.None)); 28 | for i in 1:nIrr loop 29 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 30 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 31 | color={191,0,0}, 32 | smooth=Smooth.None)); 33 | end for; 34 | connect(resGro.heaPor_a, senTZon.port) annotation (Line( 35 | points={{-40,-46},{-40,-20},{20,-20},{20,-80},{50,-80}}, 36 | color={191,0,0}, 37 | smooth=Smooth.None)); 38 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false,extent={{-200, 39 | -100},{100,100}}), 40 | graphics)); 41 | end ZonInt_D; 42 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonInt_E.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonInt_E "States for zone and internal mass, resistance to boundary" 3 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_SZ_ZonInt; 4 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_Bound; 5 | 6 | equation 7 | connect(capInt.heaPor, resInt.heaPor_a) annotation (Line( 8 | points={{-40,60},{-20,60}}, 9 | color={191,0,0}, 10 | smooth=Smooth.None)); 11 | connect(resInt.heaPor_b, capZon.heaPor) annotation (Line( 12 | points={{0,60},{20,60}}, 13 | color={191,0,0}, 14 | smooth=Smooth.None)); 15 | connect(heaPorEmb, capInt.heaPor) annotation (Line( 16 | points={{100,39.9057},{76,39.9057},{76,40},{46,40},{46,50},{-40,50},{-40,60}}, 17 | color={191,0,0}, 18 | smooth=Smooth.None)); 19 | 20 | connect(heaPorCon, capZon.heaPor) annotation (Line( 21 | points={{100,0},{20,0},{20,60}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | connect(heaPorRad, capInt.heaPor) annotation (Line( 25 | points={{100,-40},{46,-40},{46,50},{-40,50},{-40,60}}, 26 | color={191,0,0}, 27 | smooth=Smooth.None)); 28 | for i in 1:nIrr loop 29 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 30 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 31 | color={191,0,0}, 32 | smooth=Smooth.None)); 33 | end for; 34 | connect(resBou.heaPor_b, senTZon.port) annotation (Line( 35 | points={{-100,-80},{50,-80}}, 36 | color={191,0,0}, 37 | smooth=Smooth.None)); 38 | connect(simFasBui.TSet, preTBou.T) annotation (Line( 39 | points={{-190.039,79.0248},{-190.039,-80},{-149.2,-80}}, 40 | color={0,0,127}, 41 | smooth=Smooth.None)); 42 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false,extent={{-200, 43 | -100},{100,100}}), 44 | graphics)); 45 | end ZonInt_E; 46 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonInt_F.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonInt_F 3 | "States for zone and internal mass, resistance to boundary and ground" 4 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_SZ_ZonInt; 5 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_Bound; 6 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_Ground; 7 | 8 | equation 9 | connect(capInt.heaPor, resInt.heaPor_a) annotation (Line( 10 | points={{-40,60},{-20,60}}, 11 | color={191,0,0}, 12 | smooth=Smooth.None)); 13 | connect(resInt.heaPor_b, capZon.heaPor) annotation (Line( 14 | points={{0,60},{20,60}}, 15 | color={191,0,0}, 16 | smooth=Smooth.None)); 17 | connect(heaPorEmb, capInt.heaPor) annotation (Line( 18 | points={{100,39.9057},{76,39.9057},{76,40},{46,40},{46,50},{-40,50},{-40,60}}, 19 | color={191,0,0}, 20 | smooth=Smooth.None)); 21 | 22 | connect(heaPorCon, capZon.heaPor) annotation (Line( 23 | points={{100,0},{20,0},{20,60}}, 24 | color={191,0,0}, 25 | smooth=Smooth.None)); 26 | connect(heaPorRad, capInt.heaPor) annotation (Line( 27 | points={{100,-40},{46,-40},{46,50},{-40,50},{-40,60}}, 28 | color={191,0,0}, 29 | smooth=Smooth.None)); 30 | for i in 1:nIrr loop 31 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 32 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 33 | color={191,0,0}, 34 | smooth=Smooth.None)); 35 | end for; 36 | connect(resBou.heaPor_b, senTZon.port) annotation (Line( 37 | points={{-100,-80},{50,-80}}, 38 | color={191,0,0}, 39 | smooth=Smooth.None)); 40 | connect(simFasBui.TSet, preTBou.T) annotation (Line( 41 | points={{-190.039,79.0248},{-190.039,-80},{-149.2,-80}}, 42 | color={0,0,127}, 43 | smooth=Smooth.None)); 44 | connect(resGro.heaPor_a, senTZon.port) annotation (Line( 45 | points={{-14,-42},{-14,-42},{20,-42},{20,-80},{50,-80}}, 46 | color={191,0,0}, 47 | smooth=Smooth.None)); 48 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false,extent={{-200, 49 | -100},{100,100}}), 50 | graphics)); 51 | end ZonInt_F; 52 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalEmb_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalEmb_A "heaPorRad connected to capWal" 3 | extends BaseClasses.Partials.Partial_SZ_ZonWalEmb; 4 | equation 5 | for i in 1:nIrr loop 6 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 7 | points={{-79.9087,39.9476},{-30,39.9476},{20,39.9476},{20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | end for; 11 | 12 | connect(heaPorCon, capZon.heaPor) annotation (Line( 13 | points={{100,0},{74,0},{74,0},{20,0},{20,60}}, 14 | color={191,0,0}, 15 | smooth=Smooth.None)); 16 | connect(resEmbInt.heaPor_a, capZon.heaPor) annotation (Line( 17 | points={{30,40},{20,40},{20,60}}, 18 | color={191,0,0}, 19 | smooth=Smooth.None)); 20 | connect(heaPorRad, capWal.heaPor) annotation (Line( 21 | points={{100,-40},{-60,-40},{-60,10}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 25 | -100},{100,100}}), 26 | graphics)); 27 | end ZonWalEmb_A; 28 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalEmb_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalEmb_B "heaPorRad connected to capWal, additional infiltration" 3 | extends ZonWalEmb_A; 4 | 5 | parameter SI.ThermalResistance rInf = 1 6 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 7 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 8 | annotation (Placement(transformation(extent={{-100,-70},{-80,-50}}))); 9 | equation 10 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 11 | points={{-80,-60},{20,-60},{20,60}}, 12 | color={191,0,0}, 13 | smooth=Smooth.None)); 14 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 15 | points={{-100,-60},{-112,-60},{-112,0},{-130,0}}, 16 | color={191,0,0}, 17 | smooth=Smooth.None)); 18 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 19 | {100,100}}), graphics)); 20 | end ZonWalEmb_B; 21 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalEmb_C.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalEmb_C 3 | "incl. ground, heaPorRad connected to capWal, additional infiltration" 4 | extends ZonWalEmb_A; 5 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_Ground; 6 | 7 | parameter SI.ThermalResistance rInf = 1 8 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 9 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 10 | annotation (Placement(transformation(extent={{-100,-70},{-80,-50}}))); 11 | equation 12 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 13 | points={{-80,-60},{20,-60},{20,60}}, 14 | color={191,0,0}, 15 | smooth=Smooth.None)); 16 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 17 | points={{-100,-60},{-112,-60},{-112,0},{-130,0}}, 18 | color={191,0,0}, 19 | smooth=Smooth.None)); 20 | connect(resGro.heaPor_a, capEmb.heaPor) annotation (Line( 21 | points={{-14,-42},{-14,-26},{60,-26},{60,60}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 25 | -100},{100,100}}), 26 | graphics)); 27 | end ZonWalEmb_C; 28 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalEmb_D.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalEmb_D 3 | "incl. ground, heaPorRad connected to capWal, no infiltration" 4 | extends ZonWalEmb_A; 5 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_Ground; 6 | 7 | parameter SI.ThermalResistance rInf = 1 8 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 9 | equation 10 | connect(resGro.heaPor_a, capEmb.heaPor) annotation (Line( 11 | points={{-14,-42},{-14,-26},{60,-26},{60,60}}, 12 | color={191,0,0}, 13 | smooth=Smooth.None)); 14 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 15 | -100},{100,100}}), 16 | graphics)); 17 | end ZonWalEmb_D; 18 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalIntBouCel_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalIntBouCel_A 3 | "with BoundCap, heaPorRad en heaPorEmb connected to capInt, additional infiltration" 4 | extends ZonWalInt_A; 5 | extends BaseClasses.Partials.Partial_BoundCap; 6 | 7 | parameter SI.ThermalResistance rInf = 1 8 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 9 | parameter SI.ThermalResistance rBouCel = 1 "resistance to cellar"; 10 | parameter SI.HeatCapacity cBouCel = 1 11 | "Thermal capacity of the embedded system"; 12 | 13 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 14 | annotation (Placement(transformation(extent={{-70,-30},{-50,-10}}))); 15 | HT.Sources.PrescribedTemperature preTBouCel 16 | "Prescribed boundary temperature to cellar" annotation (Placement( 17 | transformation( 18 | extent={{-6,-6},{6,6}}, 19 | rotation=0, 20 | origin={-178,-72}))); 21 | BaseClasses.Resistance resBouCelExt(r=rBouCel/2) 22 | "Resistance for heat losses to cellar" annotation (Placement(transformation( 23 | extent={{-10,-10},{10,10}}, 24 | rotation=0, 25 | origin={-156,-72}))); 26 | BaseClasses.Resistance resBouCelInt(r=rBouCel/2) 27 | "Resistance for heat losses to cellar" annotation (Placement(transformation( 28 | extent={{-10,-10},{10,10}}, 29 | rotation=0, 30 | origin={-98,-72}))); 31 | BaseClasses.Capacitor capBouCel(c=cBouCel) 32 | annotation (Placement(transformation(extent={{-138,-72},{-118,-52}}))); 33 | equation 34 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 35 | points={{-50,-20},{20,-20},{20,60}}, 36 | color={191,0,0}, 37 | smooth=Smooth.None)); 38 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 39 | points={{-70,-20},{-112,-20},{-112,0},{-130,0}}, 40 | color={191,0,0}, 41 | smooth=Smooth.None)); 42 | connect(simFasBui.TSet, preTBou.T) annotation (Line( 43 | points={{-190.039,79.0248},{-190.039,0},{-190,0},{-190,-40},{-185.2,-40}, 44 | {-185.2,-40}}, 45 | color={0,0,127}, 46 | smooth=Smooth.None)); 47 | connect(resBouInt.heaPor_b, senTZon.port) annotation (Line( 48 | points={{-88,-40},{20,-40},{20,-80},{50,-80}}, 49 | color={191,0,0}, 50 | smooth=Smooth.None)); 51 | connect(preTBouCel.port, resBouCelExt.heaPor_a) annotation (Line( 52 | points={{-172,-72},{-166,-72}}, 53 | color={191,0,0}, 54 | smooth=Smooth.None)); 55 | connect(resBouCelExt.heaPor_b, capBouCel.heaPor) annotation (Line( 56 | points={{-146,-72},{-128,-72}}, 57 | color={191,0,0}, 58 | smooth=Smooth.None)); 59 | connect(resBouCelInt.heaPor_a, capBouCel.heaPor) annotation (Line( 60 | points={{-108,-72},{-128,-72}}, 61 | color={191,0,0}, 62 | smooth=Smooth.None)); 63 | connect(resBouCelInt.heaPor_b, senTZon.port) annotation (Line( 64 | points={{-88,-72},{20,-72},{20,-80},{50,-80}}, 65 | color={191,0,0}, 66 | smooth=Smooth.None)); 67 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false,extent={{-200,-100}, 68 | {100,100}}), graphics)); 69 | end ZonWalIntBouCel_A; 70 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalIntBou_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalIntBou_A 3 | "with BoundCap, heaPorRad en heaPorEmb connected to capInt, additional infiltration" 4 | extends ZonWalInt_A; 5 | extends BaseClasses.Partials.Partial_BoundCap; 6 | 7 | parameter SI.ThermalResistance rInf = 1 8 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 9 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 10 | annotation (Placement(transformation(extent={{-70,-30},{-50,-10}}))); 11 | equation 12 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 13 | points={{-50,-20},{20,-20},{20,60}}, 14 | color={191,0,0}, 15 | smooth=Smooth.None)); 16 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 17 | points={{-70,-20},{-112,-20},{-112,0},{-130,0}}, 18 | color={191,0,0}, 19 | smooth=Smooth.None)); 20 | connect(simFasBui.TSet, preTBou.T) annotation (Line( 21 | points={{-190.039,79.0248},{-190.039,0},{-190,0},{-190,-40},{-185.2,-40}, 22 | {-185.2,-40}}, 23 | color={0,0,127}, 24 | smooth=Smooth.None)); 25 | connect(resBouInt.heaPor_b, senTZon.port) annotation (Line( 26 | points={{-88,-40},{20,-40},{20,-80},{50,-80}}, 27 | color={191,0,0}, 28 | smooth=Smooth.None)); 29 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false,extent={{-200, 30 | -100},{100,100}}), 31 | graphics)); 32 | end ZonWalIntBou_A; 33 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalIntBou_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalIntBou_B 3 | "with BoundCap, heaPorRad en heaPorEmb connected to capInt, additional infiltration" 4 | extends ZonWalInt_A; 5 | extends BaseClasses.Partials.Partial_BoundCap; 6 | 7 | parameter SI.ThermalResistance rInf = 1 8 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 9 | parameter SI.ThermalResistance rBouCel = 1 "resistance to cellar"; 10 | 11 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 12 | annotation (Placement(transformation(extent={{-70,-30},{-50,-10}}))); 13 | HT.Sources.PrescribedTemperature preTBouCel 14 | "Prescribed boundary temperature to cellar" annotation (Placement( 15 | transformation( 16 | extent={{-6,-6},{6,6}}, 17 | rotation=0, 18 | origin={-178,-72}))); 19 | BaseClasses.Resistance resBouCel(r=rBouCel) 20 | "Resistance for heat losses to cellar" annotation (Placement(transformation( 21 | extent={{-10,-10},{10,10}}, 22 | rotation=0, 23 | origin={-156,-72}))); 24 | equation 25 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 26 | points={{-50,-20},{20,-20},{20,60}}, 27 | color={191,0,0}, 28 | smooth=Smooth.None)); 29 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 30 | points={{-70,-20},{-112,-20},{-112,0},{-130,0}}, 31 | color={191,0,0}, 32 | smooth=Smooth.None)); 33 | connect(simFasBui.TSet, preTBou.T) annotation (Line( 34 | points={{-190.039,79.0248},{-190.039,0},{-190,0},{-190,-40},{-185.2,-40}, 35 | {-185.2,-40}}, 36 | color={0,0,127}, 37 | smooth=Smooth.None)); 38 | connect(resBouInt.heaPor_b, senTZon.port) annotation (Line( 39 | points={{-88,-40},{20,-40},{20,-80},{50,-80}}, 40 | color={191,0,0}, 41 | smooth=Smooth.None)); 42 | connect(preTBouCel.port, resBouCel.heaPor_a) annotation (Line( 43 | points={{-172,-72},{-166,-72}}, 44 | color={191,0,0}, 45 | smooth=Smooth.None)); 46 | connect(resBouCel.heaPor_b, senTZon.port) annotation (Line( 47 | points={{-146,-72},{20,-72},{20,-80},{50,-80}}, 48 | color={191,0,0}, 49 | smooth=Smooth.None)); 50 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false,extent={{-200, 51 | -100},{100,100}}), 52 | graphics)); 53 | end ZonWalIntBou_B; 54 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalIntBou_C.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalIntBou_C 3 | "with BoundCap, heaPorRad en heaPorEmb connected to capInt, additional infiltration" 4 | extends ZonWalInt_J; 5 | extends BaseClasses.Partials.Partial_BoundCap; 6 | 7 | parameter SI.ThermalResistance rInf = 1 8 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 9 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 10 | annotation (Placement(transformation(extent={{-70,-30},{-50,-10}}))); 11 | equation 12 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 13 | points={{-50,-20},{20,-20},{20,60}}, 14 | color={191,0,0}, 15 | smooth=Smooth.None)); 16 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 17 | points={{-70,-20},{-112,-20},{-112,0},{-130,0}}, 18 | color={191,0,0}, 19 | smooth=Smooth.None)); 20 | connect(simFasBui.TSet, preTBou.T) annotation (Line( 21 | points={{-190.039,79.0248},{-190.039,0},{-190,0},{-190,-40},{-149.2,-40}, 22 | {-149.2,-80}}, 23 | color={0,0,127}, 24 | smooth=Smooth.None)); 25 | connect(resBouInt.heaPor_b, senTZon.port) annotation (Line( 26 | points={{-88,-40},{20,-40},{20,-80},{50,-80}}, 27 | color={191,0,0}, 28 | smooth=Smooth.None)); 29 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false,extent={{-200, 30 | -100},{100,100}}), 31 | graphics)); 32 | end ZonWalIntBou_C; 33 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalIntEmb_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalIntEmb_A "Embedded connected to capZon, heaPorRad to capInt" 3 | extends BaseClasses.Partials.Partial_SZ_ZonWalIntEmb; 4 | equation 5 | connect(resEmbInt.heaPor_a, capZon.heaPor) annotation (Line( 6 | points={{30,40},{20,40},{20,60}}, 7 | color={191,0,0}, 8 | smooth=Smooth.None)); 9 | connect(heaPorCon, capZon.heaPor) annotation (Line( 10 | points={{100,0},{20,0},{20,60}}, 11 | color={191,0,0}, 12 | smooth=Smooth.None)); 13 | connect(heaPorRad, capInt.heaPor) annotation (Line( 14 | points={{100,-40},{0,-40},{0,48},{-40,48},{-40,60}}, 15 | color={191,0,0}, 16 | smooth=Smooth.None)); 17 | for i in 1:nIrr loop 18 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 19 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 20 | color={191,0,0}, 21 | smooth=Smooth.None)); 22 | end for; 23 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 24 | {100,100}}), graphics)); 25 | end ZonWalIntEmb_A; 26 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalIntEmb_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalIntEmb_B "additional infiltration" 3 | extends ZonWalIntEmb_A; 4 | 5 | parameter SI.ThermalResistance rInf = 1 6 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 7 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 8 | annotation (Placement(transformation(extent={{-70,-30},{-50,-10}}))); 9 | equation 10 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 11 | points={{-50,-20},{20,-20},{20,60}}, 12 | color={191,0,0}, 13 | smooth=Smooth.None)); 14 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 15 | points={{-70,-20},{-112,-20},{-112,0},{-130,0}}, 16 | color={191,0,0}, 17 | smooth=Smooth.None)); 18 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 19 | -100},{100,100}}), 20 | graphics)); 21 | end ZonWalIntEmb_B; 22 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalInt_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalInt_A "heaPorRad and heaPorEmb connected to capInt" 3 | extends BaseClasses.Partials.Partial_SZ_ZonWalInt; 4 | 5 | equation 6 | for i in 1:nIrr loop 7 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 8 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 9 | color={191,0,0}, 10 | smooth=Smooth.None)); 11 | end for; 12 | connect(heaPorCon, capZon.heaPor) annotation (Line( 13 | points={{100,0},{20,0},{20,60}}, 14 | color={191,0,0}, 15 | smooth=Smooth.None)); 16 | 17 | connect(heaPorEmb, capInt.heaPor) annotation (Line( 18 | points={{100,39.9057},{80,40},{80,40},{60,40},{60,50},{-40,50},{-40,60}}, 19 | color={191,0,0}, 20 | smooth=Smooth.None)); 21 | 22 | connect(heaPorRad, capInt.heaPor) annotation (Line( 23 | points={{100,-40},{60,-40},{60,50},{-40,50},{-40,60}}, 24 | color={191,0,0}, 25 | smooth=Smooth.None)); 26 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 27 | {100,100}}), graphics)); 28 | end ZonWalInt_A; 29 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalInt_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalInt_B 3 | "heaPorRad en heaPorEmb connected to capInt, additional infiltration" 4 | extends ZonWalInt_A; 5 | 6 | parameter SI.ThermalResistance rInf = 1 7 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 8 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 9 | annotation (Placement(transformation(extent={{-70,-30},{-50,-10}}))); 10 | equation 11 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 12 | points={{-50,-20},{20,-20},{20,60}}, 13 | color={191,0,0}, 14 | smooth=Smooth.None)); 15 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 16 | points={{-70,-20},{-112,-20},{-112,0},{-130,0}}, 17 | color={191,0,0}, 18 | smooth=Smooth.None)); 19 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 20 | {100,100}}), graphics)); 21 | end ZonWalInt_B; 22 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalInt_C.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalInt_C "Ground heat losses, connected to capZon" 3 | extends ZonWalInt_A; 4 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_Ground; 5 | equation 6 | connect(resGro.heaPor_a, capZon.heaPor) annotation (Line( 7 | points={{-14,-42},{-14,-28},{20,-28},{20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 11 | {100,100}}), graphics)); 12 | end ZonWalInt_C; 13 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalInt_D.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalInt_D "Ground heat losses, connected to capInt" 3 | extends ZonWalInt_A; 4 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_Ground; 5 | equation 6 | connect(resGro.heaPor_a, heaPorRad) annotation (Line( 7 | points={{-14,-42},{-14,-40},{100,-40}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 11 | -100},{100,100}}), 12 | graphics)); 13 | end ZonWalInt_D; 14 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalInt_E.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalInt_E "Infiltration, ground heat losses connected to capZon" 3 | extends ZonWalInt_B; 4 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_Ground; 5 | equation 6 | connect(resGro.heaPor_a, capZon.heaPor) annotation (Line( 7 | points={{-14,-42},{-14,-28},{20,-28},{20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 11 | {100,100}}), graphics)); 12 | end ZonWalInt_E; 13 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalInt_F.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalInt_F "Infiltration, ground heat losses connected to capInt" 3 | extends ZonWalInt_B; 4 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_Ground; 5 | equation 6 | connect(resGro.heaPor_a, heaPorRad) annotation (Line( 7 | points={{-14,-42},{-14,-40},{100,-40}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 11 | -100},{100,100}}), 12 | graphics)); 13 | end ZonWalInt_F; 14 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalInt_G.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalInt_G "Ground heat losses connected to capWal" 3 | extends ZonWalInt_A; 4 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_Ground; 5 | equation 6 | connect(resGro.heaPor_a, capWal.heaPor) annotation (Line( 7 | points={{-14,-42},{-42,-42},{-42,-8},{-60,-8},{-60,10}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 11 | -100},{100,100}}), 12 | graphics)); 13 | end ZonWalInt_G; 14 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalInt_H.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalInt_H 3 | "with preTBou, heaPorRad en heaPorEmb connected to capInt, additional infiltration" 4 | extends ZonWalInt_A; 5 | extends BaseClasses.Partials.Partial_Bound; 6 | 7 | parameter SI.ThermalResistance rInf = 1 8 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 9 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 10 | annotation (Placement(transformation(extent={{-70,-30},{-50,-10}}))); 11 | equation 12 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 13 | points={{-50,-20},{20,-20},{20,60}}, 14 | color={191,0,0}, 15 | smooth=Smooth.None)); 16 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 17 | points={{-70,-20},{-112,-20},{-112,0},{-130,0}}, 18 | color={191,0,0}, 19 | smooth=Smooth.None)); 20 | connect(simFasBui.TSet, preTBou.T) annotation (Line( 21 | points={{-190.039,79.0248},{-190.039,0},{-190,0},{-190,-80},{-149.2,-80}, 22 | {-149.2,-80}}, 23 | color={0,0,127}, 24 | smooth=Smooth.None)); 25 | connect(resBou.heaPor_b, senTZon.port) annotation (Line( 26 | points={{-100,-80},{50,-80}}, 27 | color={191,0,0}, 28 | smooth=Smooth.None)); 29 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false,extent={{-200, 30 | -100},{100,100}}), 31 | graphics)); 32 | end ZonWalInt_H; 33 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalInt_I.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalInt_I 3 | "with preTBou, heaPorRad en heaPorEmb connected to capInt, additional infiltration, and win2" 4 | extends BaseClasses.Partials.Partial_SZ_ZonWalInt; 5 | extends BaseClasses.Partials.Partial_Bound; 6 | 7 | parameter SI.ThermalResistance rInf = 1 8 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 9 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 10 | annotation (Placement(transformation(extent={{-70,-30},{-50,-10}}))); 11 | 12 | equation 13 | for i in 1:nIrr loop 14 | connect(win[i].heaPor1, capInt.heaPor) annotation (Line( 15 | points={{-79.9087,39.9476},{-40,39.9476},{-40,60}}, 16 | color={191,0,0}, 17 | smooth=Smooth.None)); 18 | end for; 19 | connect(heaPorCon, capZon.heaPor) annotation (Line( 20 | points={{100,0},{20,0},{20,60}}, 21 | color={191,0,0}, 22 | smooth=Smooth.None)); 23 | 24 | connect(heaPorEmb, capInt.heaPor) annotation (Line( 25 | points={{100,39.9057},{80,40},{80,40},{60,40},{60,50},{-40,50},{-40,60}}, 26 | color={191,0,0}, 27 | smooth=Smooth.None)); 28 | 29 | connect(heaPorRad, capInt.heaPor) annotation (Line( 30 | points={{100,-40},{60,-40},{60,50},{-40,50},{-40,60}}, 31 | color={191,0,0}, 32 | smooth=Smooth.None)); 33 | 34 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 35 | points={{-50,-20},{20,-20},{20,60}}, 36 | color={191,0,0}, 37 | smooth=Smooth.None)); 38 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 39 | points={{-70,-20},{-112,-20},{-112,0},{-130,0}}, 40 | color={191,0,0}, 41 | smooth=Smooth.None)); 42 | connect(simFasBui.TSet, preTBou.T) annotation (Line( 43 | points={{-190.039,79.0248},{-190.039,0},{-190,0},{-190,-80},{-149.2,-80}, 44 | {-149.2,-80}}, 45 | color={0,0,127}, 46 | smooth=Smooth.None)); 47 | connect(resBou.heaPor_b, senTZon.port) annotation (Line( 48 | points={{-100,-80},{50,-80}}, 49 | color={191,0,0}, 50 | smooth=Smooth.None)); 51 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false,extent={{-200, 52 | -100},{100,100}}), 53 | graphics)); 54 | end ZonWalInt_I; 55 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalInt_J.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalInt_J 3 | "with preTBou, heaPorRad en heaPorEmb connected to capInt, additional infiltration, and win2" 4 | extends ZonWalInt_fraResInt_A; 5 | extends BaseClasses.Partials.Partial_Bound; 6 | 7 | parameter SI.ThermalResistance rInf = 1 8 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 9 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 10 | annotation (Placement(transformation(extent={{-70,-30},{-50,-10}}))); 11 | 12 | equation 13 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 14 | points={{-50,-20},{20,-20},{20,60}}, 15 | color={191,0,0}, 16 | smooth=Smooth.None)); 17 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 18 | points={{-70,-20},{-112,-20},{-112,0},{-130,0}}, 19 | color={191,0,0}, 20 | smooth=Smooth.None)); 21 | connect(simFasBui.TSet, preTBou.T) annotation (Line( 22 | points={{-190.039,79.0248},{-190.039,0},{-190,0},{-190,-80},{-149.2,-80}, 23 | {-149.2,-80}}, 24 | color={0,0,127}, 25 | smooth=Smooth.None)); 26 | connect(resBou.heaPor_b, senTZon.port) annotation (Line( 27 | points={{-100,-80},{50,-80}}, 28 | color={191,0,0}, 29 | smooth=Smooth.None)); 30 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false,extent={{-200, 31 | -100},{100,100}}), 32 | graphics)); 33 | end ZonWalInt_J; 34 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWalInt_fraResInt_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWalInt_fraResInt_A 3 | "heaPorRad and heaPorEmb connected between resInt_a and resInt_b" 4 | extends BaseClasses.Partials.Partial_SZ_ZonWalInt_fraResInt; 5 | 6 | equation 7 | for i in 1:nIrr loop 8 | connect(win[i].heaPor1, resInt_a.heaPor_a) annotation (Line( 9 | points={{-79.9087,39.9476},{-22,39.9476},{-22,60},{-16,60}}, 10 | color={191,0,0}, 11 | smooth=Smooth.None)); 12 | end for; 13 | 14 | connect(heaPorCon, capZon.heaPor) annotation (Line( 15 | points={{100,0},{20,0},{20,60}}, 16 | color={191,0,0}, 17 | smooth=Smooth.None)); 18 | 19 | connect(heaPorEmb, resInt_b.heaPor_b) annotation (Line( 20 | points={{100,39.9057},{-22,39.9057},{-22,60},{-28,60}}, 21 | color={191,0,0}, 22 | smooth=Smooth.None)); 23 | 24 | connect(heaPorRad, resInt_b.heaPor_b) annotation (Line( 25 | points={{100,-40},{32,-40},{32,40},{-22,39.9057},{-22,60},{-28,60}}, 26 | color={191,0,0}, 27 | smooth=Smooth.None)); 28 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false,extent={{-200,-100}, 29 | {100,100}}), graphics)); 30 | end ZonWalInt_fraResInt_A; 31 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWal_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWal_A "heaPorEmb and heaPorRad connected to capWal" 3 | extends BaseClasses.Partials.Partial_SZ_ZonWal; 4 | equation 5 | for i in 1:nIrr loop 6 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 7 | points={{-79.9087,39.9476},{-30,39.9476},{20,39.9476},{20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | end for; 11 | connect(heaPorEmb, capWal.heaPor) annotation (Line( 12 | points={{100,39.9057},{60,39.9057},{60,-20},{-60,-20},{-60,10}}, 13 | color={191,0,0}, 14 | smooth=Smooth.None)); 15 | connect(heaPorRad, capWal.heaPor) annotation (Line( 16 | points={{100,-40},{60,-40},{60,-20},{-60,-20},{-60,10}}, 17 | color={191,0,0}, 18 | smooth=Smooth.None)); 19 | connect(heaPorCon, capZon.heaPor) annotation (Line( 20 | points={{100,0},{74,0},{74,0},{20,0},{20,60}}, 21 | color={191,0,0}, 22 | smooth=Smooth.None)); 23 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 24 | {100,100}}), graphics)); 25 | end ZonWal_A; 26 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWal_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWal_B "All ports connected to capZonl" 3 | extends BaseClasses.Partials.Partial_SZ_ZonWal; 4 | equation 5 | for i in 1:nIrr loop 6 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 7 | points={{-79.9087,39.9476},{-30,40},{20,40},{20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | end for; 11 | connect(heaPorCon, capZon.heaPor) annotation (Line( 12 | points={{100,0},{74,0},{74,0},{20,0},{20,60}}, 13 | color={191,0,0}, 14 | smooth=Smooth.None)); 15 | connect(heaPorEmb, capZon.heaPor) annotation (Line( 16 | points={{100,39.9057},{84,39.9057},{84,40},{20,40},{20,60}}, 17 | color={191,0,0}, 18 | smooth=Smooth.None)); 19 | connect(heaPorRad, capZon.heaPor) annotation (Line( 20 | points={{100,-40},{20,-40},{20,60}}, 21 | color={191,0,0}, 22 | smooth=Smooth.None)); 23 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 24 | -100},{100,100}}), 25 | graphics)); 26 | end ZonWal_B; 27 | -------------------------------------------------------------------------------- /FastBuildings/Zones/ZonWal_C.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model ZonWal_C 3 | "heaPorRad and heaPorEmb connected to capWal, additional infiltration" 4 | extends ZonWal_A; 5 | 6 | parameter SI.ThermalResistance rInf = 1 7 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 8 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 9 | annotation (Placement(transformation(extent={{-70,-50},{-50,-30}}))); 10 | equation 11 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 12 | points={{-50,-40},{20,-40},{20,60}}, 13 | color={191,0,0}, 14 | smooth=Smooth.None)); 15 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 16 | points={{-70,-40},{-112,-40},{-112,0},{-130,0}}, 17 | color={191,0,0}, 18 | smooth=Smooth.None)); 19 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 20 | -100},{100,100}}), graphics)); 21 | end ZonWal_C; 22 | -------------------------------------------------------------------------------- /FastBuildings/Zones/Zon_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model Zon_A "Single state, only zone temperature, array of windows" 3 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_SZ_Zon; 4 | equation 5 | for i in 1:nIrr loop 6 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 7 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | end for; 11 | connect(simFasBui.TAmb, preTAmb.T) annotation (Line( 12 | points={{-179.039,82.0248},{-166,82.0248},{-166,0},{-152,0}}, 13 | color={0,0,127}, 14 | smooth=Smooth.None)); 15 | connect(simFasBui.irr, win.irr) annotation (Line( 16 | points={{-179.039,86.0248},{-140,86.0248},{-140,40},{-120,40},{-120, 17 | 39.9651},{-99.8824,39.9651}}, 18 | color={0,0,127}, 19 | smooth=Smooth.None)); 20 | connect(preTAmb.port, resWal.heaPor_a) annotation (Line( 21 | points={{-130,0},{-100,0}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | 25 | connect(resWal.heaPor_b, capZon.heaPor) annotation (Line( 26 | points={{-80,0},{20,0},{20,60}}, 27 | color={191,0,0}, 28 | smooth=Smooth.None)); 29 | connect(heaPorEmb, capZon.heaPor) annotation (Line( 30 | points={{100,39.9057},{20,39.9057},{20,60}}, 31 | color={191,0,0}, 32 | smooth=Smooth.None)); 33 | connect(heaPorCon, capZon.heaPor) annotation (Line( 34 | points={{100,0},{20,0},{20,60}}, 35 | color={191,0,0}, 36 | smooth=Smooth.None)); 37 | connect(heaPorRad, capZon.heaPor) annotation (Line( 38 | points={{100,-40},{20,-40},{20,60}}, 39 | color={191,0,0}, 40 | smooth=Smooth.None)); 41 | connect(capZon.heaPor, senTZon.port) annotation (Line( 42 | points={{20,60},{20,-80},{50,-80}}, 43 | color={191,0,0}, 44 | smooth=Smooth.None)); 45 | connect(senTZon.T, TZon) annotation (Line( 46 | points={{70,-80},{106,-80}}, 47 | color={0,0,127}, 48 | smooth=Smooth.None)); 49 | annotation(Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 50 | -100},{100,100}}), graphics), Documentation(info = " 51 |this is a simple test
52 |First version, 12/10/2011 - RDC
59 | "), 60 | Icon(coordinateSystem(extent={{-200,-100},{100,100}}))); 61 | end Zon_A; 62 | -------------------------------------------------------------------------------- /FastBuildings/Zones/Zon_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model Zon_B "Single state, ground, only zone temperature, array of windows" 3 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_SZ_Zon; 4 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_Ground; 5 | equation 6 | for i in 1:nIrr loop 7 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 8 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 9 | color={191,0,0}, 10 | smooth=Smooth.None)); 11 | end for; 12 | connect(simFasBui.TAmb, preTAmb.T) annotation (Line( 13 | points={{-179.039,82.0248},{-166,82.0248},{-166,0},{-152,0}}, 14 | color={0,0,127}, 15 | smooth=Smooth.None)); 16 | connect(simFasBui.irr, win.irr) annotation (Line( 17 | points={{-179.039,86.0248},{-140,86.0248},{-140,40},{-120,40},{-120, 18 | 39.9651},{-99.8824,39.9651}}, 19 | color={0,0,127}, 20 | smooth=Smooth.None)); 21 | connect(preTAmb.port, resWal.heaPor_a) annotation (Line( 22 | points={{-130,0},{-100,0}}, 23 | color={191,0,0}, 24 | smooth=Smooth.None)); 25 | 26 | connect(resWal.heaPor_b, capZon.heaPor) annotation (Line( 27 | points={{-80,0},{20,0},{20,60}}, 28 | color={191,0,0}, 29 | smooth=Smooth.None)); 30 | connect(heaPorEmb, capZon.heaPor) annotation (Line( 31 | points={{100,39.9057},{20,39.9057},{20,60}}, 32 | color={191,0,0}, 33 | smooth=Smooth.None)); 34 | connect(heaPorCon, capZon.heaPor) annotation (Line( 35 | points={{100,0},{20,0},{20,60}}, 36 | color={191,0,0}, 37 | smooth=Smooth.None)); 38 | connect(heaPorRad, capZon.heaPor) annotation (Line( 39 | points={{100,-40},{20,-40},{20,60}}, 40 | color={191,0,0}, 41 | smooth=Smooth.None)); 42 | connect(capZon.heaPor, senTZon.port) annotation (Line( 43 | points={{20,60},{20,-80},{50,-80}}, 44 | color={191,0,0}, 45 | smooth=Smooth.None)); 46 | connect(senTZon.T, TZon) annotation (Line( 47 | points={{70,-80},{106,-80}}, 48 | color={0,0,127}, 49 | smooth=Smooth.None)); 50 | connect(resGro.heaPor_a, capZon.heaPor) annotation (Line( 51 | points={{-40,-46},{-40,-20},{20,-20},{20,60}}, 52 | color={191,0,0}, 53 | smooth=Smooth.None)); 54 | annotation(Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 55 | -100},{100,100}}), graphics), Documentation(info = " 56 |this is a simple test
57 |First version, 12/10/2011 - RDC
64 | "), 65 | Icon(coordinateSystem(extent={{-200,-100},{100,100}}))); 66 | end Zon_B; 67 | -------------------------------------------------------------------------------- /FastBuildings/Zones/Zon_C.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones; 2 | model Zon_C 3 | "Single state, only zone temperature, array of windows, with boundary temperature" 4 | extends FastBuildings.Zones.BaseClasses.Partials.Partial_SZ_Zon; 5 | extends BaseClasses.Partials.Partial_Bound; 6 | equation 7 | for i in 1:nIrr loop 8 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 9 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 10 | color={191,0,0}, 11 | smooth=Smooth.None)); 12 | end for; 13 | connect(simFasBui.TAmb, preTAmb.T) annotation (Line( 14 | points={{-179.039,82.0248},{-166,82.0248},{-166,0},{-152,0}}, 15 | color={0,0,127}, 16 | smooth=Smooth.None)); 17 | connect(simFasBui.irr, win.irr) annotation (Line( 18 | points={{-179.039,86.0248},{-140,86.0248},{-140,40},{-120,40},{-120, 19 | 39.9651},{-99.8824,39.9651}}, 20 | color={0,0,127}, 21 | smooth=Smooth.None)); 22 | connect(preTAmb.port, resWal.heaPor_a) annotation (Line( 23 | points={{-130,0},{-100,0}}, 24 | color={191,0,0}, 25 | smooth=Smooth.None)); 26 | 27 | connect(resWal.heaPor_b, capZon.heaPor) annotation (Line( 28 | points={{-80,0},{20,0},{20,60}}, 29 | color={191,0,0}, 30 | smooth=Smooth.None)); 31 | connect(heaPorEmb, capZon.heaPor) annotation (Line( 32 | points={{100,39.9057},{20,39.9057},{20,60}}, 33 | color={191,0,0}, 34 | smooth=Smooth.None)); 35 | connect(heaPorCon, capZon.heaPor) annotation (Line( 36 | points={{100,0},{20,0},{20,60}}, 37 | color={191,0,0}, 38 | smooth=Smooth.None)); 39 | connect(heaPorRad, capZon.heaPor) annotation (Line( 40 | points={{100,-40},{20,-40},{20,60}}, 41 | color={191,0,0}, 42 | smooth=Smooth.None)); 43 | connect(capZon.heaPor, senTZon.port) annotation (Line( 44 | points={{20,60},{20,-80},{50,-80}}, 45 | color={191,0,0}, 46 | smooth=Smooth.None)); 47 | connect(senTZon.T, TZon) annotation (Line( 48 | points={{70,-80},{106,-80}}, 49 | color={0,0,127}, 50 | smooth=Smooth.None)); 51 | connect(resBou.heaPor_b, senTZon.port) annotation (Line( 52 | points={{-100,-80},{50,-80}}, 53 | color={191,0,0}, 54 | smooth=Smooth.None)); 55 | connect(simFasBui.TSet, preTBou.T) annotation (Line( 56 | points={{-190.039,79.0248},{-190.039,-80},{-149.2,-80}}, 57 | color={0,0,127}, 58 | smooth=Smooth.None)); 59 | annotation(Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200, 60 | -100},{100,100}}), graphics), Documentation(info = " 61 |this is a simple test
62 |First version, 12/10/2011 - RDC
69 | "), 70 | Icon(coordinateSystem(extent={{-200,-100},{100,100}}))); 71 | end Zon_C; 72 | -------------------------------------------------------------------------------- /FastBuildings/Zones/package.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings; 2 | package Zones "Package containing (thermal) zone models" 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | end Zones; 45 | -------------------------------------------------------------------------------- /FastBuildings/Zones/package.order: -------------------------------------------------------------------------------- 1 | Zon_A 2 | Zon_B 3 | Zon_C 4 | ZonInt_A 5 | ZonInt_B 6 | ZonInt_C 7 | ZonInt_D 8 | ZonWal_A 9 | ZonWal_B 10 | ZonWal_C 11 | ZonEmb_A 12 | ZonEmb_B 13 | ZonWalInt_A 14 | ZonWalInt_fraResInt_A 15 | ZonWalInt_B 16 | ZonWalInt_C 17 | ZonWalInt_D 18 | ZonWalInt_E 19 | ZonWalInt_F 20 | ZonWalInt_G 21 | ZonWalInt_H 22 | ZonWalInt_I 23 | ZonWalInt_J 24 | ZonWalIntBou_A 25 | ZonWalIntBou_B 26 | ZonWalIntBou_C 27 | ZonWalIntBouCel_A 28 | ZonEmbInt_A 29 | ZonEmbInt_B 30 | ZonWalEmb_A 31 | ZonWalEmb_B 32 | ZonWalEmb_C 33 | ZonWalEmb_D 34 | ZonWalIntEmb_A 35 | ZonWalIntEmb_B 36 | ZonBou_A 37 | ZonInt_E 38 | ZonInt_F 39 | ZonIntBou_A 40 | BaseClasses 41 | Windows 42 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/BaseClasses/Capacitor.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic.BaseClasses; 2 | model Capacitor "Lumped thermal capacity" 3 | 4 | parameter SI.HeatCapacity c "Heat capacity of element (= cp*m)" annotation(Placement(visible = true, transformation(origin = {115.896,-84.5547}, extent = {{-12,-12},{12,12}}, rotation = 0))); 5 | parameter SI.Temperature TSta = 293.15 6 | "Initial temperature for the capacity, fixed=true"; 7 | Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heaPor(T(start = TSta, fixed = true)) annotation(Placement(visible = true, transformation(origin={-0.42165, 8 | -100.28}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin={0,-100}, extent={{-10,-10}, 9 | {10,10}}, rotation = 0))); 10 | input Real der_w; 11 | Modelica.SIunits.TemperatureDifference w(start=0, fixed=true) 12 | "model (process) noise, temperature difference between model and true value"; 13 | equation 14 | der(w) = der_w; 15 | c*der(heaPor.T) = heaPor.Q_flow + c*der_w; 16 | annotation(Diagram, Icon(graphics={ Text(rotation= 0, lineColor= {0,0,255}, fillColor= {0,0,0}, pattern= LinePattern.Solid, 17 | fillPattern= FillPattern.None, 18 | lineThickness= 0.25, extent= {{-130.804,110.853},{129.196,59.8534}}, textString= "%name"), 19 | Line( 20 | points={{0,-98},{0,0}}, 21 | color={95,95,95}, 22 | smooth=Smooth.None, 23 | thickness=0.5), 24 | Line( 25 | points={{-60,0},{60,0}}, 26 | color={95,95,95}, 27 | smooth=Smooth.None, 28 | thickness=1), 29 | Line( 30 | points={{-60,40},{60,40}}, 31 | color={95,95,95}, 32 | smooth=Smooth.None, 33 | thickness=1)})); 34 | end Capacitor; 35 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/BaseClasses/Partials/Partial_Ground.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic.BaseClasses.Partials; 2 | partial model Partial_Ground 3 | "Partial model for heat losses to the ground, with fixed TGro" 4 | 5 | parameter SI.ThermalResistance rGro = 1 6 | "Total thermal resistance to the ground, in K/W"; 7 | HT.Sources.FixedTemperature preTGro(T=285.15) "Fixed ground temperature" 8 | annotation (Placement(transformation( 9 | extent={{-10,-10},{10,10}}, 10 | rotation=90, 11 | origin={-40,-90}))); 12 | Resistance resGro(r=rGro) "Resistance for heat losses to the ground" 13 | annotation (Placement(transformation( 14 | extent={{-10,-10},{10,10}}, 15 | rotation=270, 16 | origin={-40,-56}))); 17 | equation 18 | connect(preTGro.port, resGro.heaPor_b) annotation (Line( 19 | points={{-40,-80},{-40,-66}}, 20 | color={191,0,0}, 21 | smooth=Smooth.None)); 22 | annotation (Diagram(graphics)); 23 | end Partial_Ground; 24 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/BaseClasses/Partials/Partial_SZ.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic.BaseClasses.Partials; 2 | partial model Partial_SZ "Single zone partial model, no air node" 3 | 4 | HT.Interfaces.HeatPort_a heaPorCon "Convective heat transfer" annotation(Placement(visible = true, transformation(extent = {{90,-10},{110,10}}))); 5 | HT.Interfaces.HeatPort_a heaPorRad "Radiative heat transfer" annotation(Placement(transformation(extent = {{90,-50},{110,-30}}))); 6 | //parameter Boolean booEmb = true "if true, add a heatPort for Embedded heat transfer"; 7 | HT.Interfaces.HeatPort_b heaPorEmb 8 | "Heat transfer to embedded systems, like tabs" annotation(Placement(visible = true, transformation(origin = {100,39.9057}, extent = {{-10,-10},{10,10}}, rotation = 0), iconTransformation(origin = {100,39.9057}, extent = {{-10,-10},{10,10}}, rotation = 0))); 9 | Modelica.Blocks.Interfaces.RealOutput TZon 10 | "Zone temperature. Most often this will be air temperature" 11 | annotation (Placement(transformation(extent={{96,-90},{116,-70}}), 12 | iconTransformation(extent={{90,-90},{110,-70}}))); 13 | outer Input.BaseClasses.Partial_SIM simFasBui 14 | "Input data, to be provided by an inner submodel of PartialSIM" 15 | annotation (Placement(transformation(extent={{-200,80},{-180,100}}))); 16 | annotation(Diagram(coordinateSystem(extent={{-200,-100},{100,100}}, preserveAspectRatio=true, initialScale = 0.1, grid = {2,2}), graphics), Icon(coordinateSystem(extent={{-200, 17 | -100},{100,100}}, preserveAspectRatio=true, initialScale = 0.1, grid = {2,2}), graphics={ Polygon(origin= {0.130719,0.130719}, points={{ 18 | -200.131,99.8693},{-200.131,-40.1307},{-60.1307,-40.1307},{ 19 | -60.1307,-100.131},{99.8693,-100.131},{99.8693,99.8693},{-200.131, 20 | 99.8693}})})); 21 | end Partial_SZ; 22 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/BaseClasses/Partials/Partial_SZ_Zon.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic.BaseClasses.Partials; 2 | partial model Partial_SZ_Zon 3 | "Single state, only zone temperature, array of windows" 4 | extends FastBuildings.Zones_stochastic.BaseClasses.Partials.Partial_SZ; 5 | parameter Integer nIrr = 1 "Number of irradiation inputs/windows"; 6 | parameter SI.HeatCapacity cZon = 1 "Thermal capacity of the zone"; 7 | parameter SI.ThermalResistance rWal = 1 8 | "Total thermal resistance of the walls, in K/W"; 9 | BaseClasses.Capacitor capZon(c=cZon) "Thermal capacity of the zone" 10 | annotation (Placement(transformation(extent={{10,60},{30,80}}))); 11 | replaceable Windows.Window_gA[nIrr] win constrainedby Windows.PartialWindow 12 | "Array of window models" 13 | annotation (Placement(transformation(extent={{-100,30},{-80,50}}))); 14 | BaseClasses.Resistance resWal(r=rWal) 15 | "Total thermal resistance of the walls, in K/W" 16 | annotation (Placement(transformation(extent={{-100,-10},{-80,10}}))); 17 | protected 18 | HT.Sources.PrescribedTemperature preTAmb 19 | annotation (Placement(transformation(extent={{-150,-10},{-130,10}}))); 20 | HT.Sensors.TemperatureSensor senTZon 21 | annotation (Placement(transformation(extent={{50,-90},{70,-70}}))); 22 | equation 23 | for i in 1:nIrr loop 24 | end for; 25 | connect(simFasBui.TAmb, preTAmb.T) annotation (Line( 26 | points={{-179.039,82.0248},{-166,82.0248},{-166,0},{-152,0}}, 27 | color={0,0,127}, 28 | smooth=Smooth.None)); 29 | connect(simFasBui.irr, win.irr) annotation (Line( 30 | points={{-179.039,86.0248},{-140,86.0248},{-140,40},{-120,40},{-120, 31 | 39.9651},{-99.8824,39.9651}}, 32 | color={0,0,127}, 33 | smooth=Smooth.None)); 34 | connect(preTAmb.port, resWal.heaPor_a) annotation (Line( 35 | points={{-130,0},{-100,0}}, 36 | color={191,0,0}, 37 | smooth=Smooth.None)); 38 | 39 | connect(resWal.heaPor_b, capZon.heaPor) annotation (Line( 40 | points={{-80,0},{20,0},{20,60}}, 41 | color={191,0,0}, 42 | smooth=Smooth.None)); 43 | connect(capZon.heaPor, senTZon.port) annotation (Line( 44 | points={{20,60},{20,-80},{50,-80}}, 45 | color={191,0,0}, 46 | smooth=Smooth.None)); 47 | connect(senTZon.T, TZon) annotation (Line( 48 | points={{70,-80},{106,-80}}, 49 | color={0,0,127}, 50 | smooth=Smooth.None)); 51 | annotation(Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 52 | -100},{100,100}}), graphics), Documentation(info = " 53 |this is a simple test
54 |First version, 12/10/2011 - RDC
61 | "), 62 | Icon(coordinateSystem(extent={{-200,-100},{100,100}}))); 63 | end Partial_SZ_Zon; 64 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/BaseClasses/Partials/Partial_SZ_ZonEmb.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic.BaseClasses.Partials; 2 | partial model Partial_SZ_ZonEmb "States for zone and embedded heating" 3 | extends Partial_SZ_Zon; 4 | 5 | parameter SI.HeatCapacity cEmb = 1 "Thermal capacity of the embedded system"; 6 | parameter SI.ThermalResistance rEmb = 1 7 | "Total thermal resistance of the embedded system, in K/W"; 8 | parameter Real posCapEmb(min=0, max=1) = 0.5 9 | "Position of the capacity in the embedded system. 0=interor, 1=exterior"; 10 | 11 | Capacitor capEmb(c=cEmb) "Thermal capacity of the embedded system" 12 | annotation (Placement(transformation(extent={{50,60},{70,80}}))); 13 | Resistance resEmbExt(r=rEmbExt) 14 | "Thermal resistance of embedded heating, exterior" 15 | annotation (Placement(transformation(extent={{70,30},{90,50}}))); 16 | Resistance resEmbInt(r=rEmbInt) 17 | "Thermal resistance of embedded heating, interior" 18 | annotation (Placement(transformation(extent={{30,30},{50,50}}))); 19 | protected 20 | parameter SI.ThermalResistance rEmbInt = posCapEmb * rEmb 21 | "Thermal resistance of the interior resistance in K/W"; 22 | parameter SI.ThermalResistance rEmbExt = (1-posCapEmb) * rEmb 23 | "Thermal resistance of the exterior resistance in K/W"; 24 | 25 | equation 26 | connect(resEmbExt.heaPor_b, heaPorEmb) annotation (Line( 27 | points={{90,40},{94,40},{94,39.9057},{100,39.9057}}, 28 | color={191,0,0}, 29 | smooth=Smooth.None)); 30 | connect(resEmbExt.heaPor_a, capEmb.heaPor) annotation (Line( 31 | points={{70,40},{60,40},{60,60}}, 32 | color={191,0,0}, 33 | smooth=Smooth.None)); 34 | connect(resEmbInt.heaPor_b, capEmb.heaPor) annotation (Line( 35 | points={{50,40},{60,40},{60,60}}, 36 | color={191,0,0}, 37 | smooth=Smooth.None)); 38 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 39 | {100,100}}), graphics)); 40 | end Partial_SZ_ZonEmb; 41 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/BaseClasses/Partials/Partial_SZ_ZonInt.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic.BaseClasses.Partials; 2 | partial model Partial_SZ_ZonInt "States for zone and internal mass" 3 | extends Partial_SZ_Zon; 4 | 5 | parameter SI.HeatCapacity cInt = 1 "Thermal capacity of the zone"; 6 | parameter SI.ThermalResistance rInt = 1 7 | "Total thermal resistance of the walls, in K/W"; 8 | Capacitor capInt( c=cInt) "Capacity of internal mass" 9 | annotation (Placement(transformation(extent={{-50,60},{-30,80}}))); 10 | 11 | Resistance resInt(r=rInt) "Resistance from zone to internal mass" 12 | annotation (Placement(transformation(extent={{-20,50},{0,70}}))); 13 | equation 14 | connect(capInt.heaPor, resInt.heaPor_a) annotation (Line( 15 | points={{-40,60},{-20,60}}, 16 | color={191,0,0}, 17 | smooth=Smooth.None)); 18 | connect(resInt.heaPor_b, capZon.heaPor) annotation (Line( 19 | points={{0,60},{20,60}}, 20 | color={191,0,0}, 21 | smooth=Smooth.None)); 22 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 23 | {100,100}}), graphics)); 24 | end Partial_SZ_ZonInt; 25 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/BaseClasses/Partials/Partial_SZ_ZonWal.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic.BaseClasses.Partials; 2 | partial model Partial_SZ_ZonWal "States for zone and wall" 3 | extends FastBuildings.Zones_stochastic.BaseClasses.Partials.Partial_SZ; 4 | parameter Integer nIrr = 1 "Number of irradiation inputs/windows"; 5 | parameter SI.HeatCapacity cZon = 1 "Thermal capacity of the zone"; 6 | parameter SI.HeatCapacity cWal = 1 "Thermal capacity of the wal"; 7 | parameter SI.ThermalResistance rWal = 1 8 | "Total thermal resistance of the walls, in K/W"; 9 | parameter Real posCapWal(min=0, max=1) = 0.5 10 | "Position of the capacity in the wall. 0=interor, 1=exterior"; 11 | BaseClasses.Capacitor capZon(c=cZon) "Thermal capacity of the zone" 12 | annotation (Placement(transformation(extent={{10,60},{30,80}}))); 13 | replaceable Windows.Window_gA[nIrr] win(each gA=1) "Array of window models" 14 | annotation (Placement(transformation(extent={{-100,30},{-80,50}}))); 15 | BaseClasses.Resistance resWalExt(r=rWalExt) 16 | "External thermal resistance of the walls, in K/W" 17 | annotation (Placement(transformation(extent={{-100,-10},{-80,10}}))); 18 | BaseClasses.Resistance resWalInt(r=rWalInt) 19 | "Internal thermal resistance of the walls, in K/W" 20 | annotation (Placement(transformation(extent={{-40,-10},{-20,10}}))); 21 | protected 22 | HT.Sources.PrescribedTemperature preTAmb 23 | annotation (Placement(transformation(extent={{-150,-10},{-130,10}}))); 24 | HT.Sensors.TemperatureSensor senTZon 25 | annotation (Placement(transformation(extent={{50,-90},{70,-70}}))); 26 | parameter SI.ThermalResistance rWalInt = posCapWal * rWal 27 | "Thermal resistance of the interior resistance in K/W"; 28 | parameter SI.ThermalResistance rWalExt = (1-posCapWal) * rWal 29 | "Thermal resistance of the exterior resistance in K/W"; 30 | 31 | public 32 | BaseClasses.Capacitor capWal(c=cWal) 33 | "Position of this capacity is determined by posCapWal" 34 | annotation (Placement(transformation(extent={{-70,10},{-50,30}}))); 35 | equation 36 | for i in 1:nIrr loop 37 | end for; 38 | connect(simFasBui.TAmb, preTAmb.T) annotation (Line( 39 | points={{-179.039,82.0248},{-166,82.0248},{-166,0},{-152,0}}, 40 | color={0,0,127}, 41 | smooth=Smooth.None)); 42 | connect(simFasBui.irr, win.irr) annotation (Line( 43 | points={{-179.039,86.0248},{-140,86.0248},{-140,40},{-120,40},{-120, 44 | 39.9651},{-99.8824,39.9651}}, 45 | color={0,0,127}, 46 | smooth=Smooth.None)); 47 | connect(preTAmb.port, resWalExt.heaPor_a) 48 | annotation (Line( 49 | points={{-130,0},{-100,0}}, 50 | color={191,0,0}, 51 | smooth=Smooth.None)); 52 | 53 | connect(capZon.heaPor, senTZon.port) annotation (Line( 54 | points={{20,60},{20,-80},{50,-80}}, 55 | color={191,0,0}, 56 | smooth=Smooth.None)); 57 | connect(senTZon.T, TZon) annotation (Line( 58 | points={{70,-80},{106,-80}}, 59 | color={0,0,127}, 60 | smooth=Smooth.None)); 61 | connect(resWalExt.heaPor_b, capWal.heaPor) annotation (Line( 62 | points={{-80,0},{-60,0},{-60,10}}, 63 | color={191,0,0}, 64 | smooth=Smooth.None)); 65 | connect(resWalInt.heaPor_a, capWal.heaPor) annotation (Line( 66 | points={{-40,0},{-60,0},{-60,10}}, 67 | color={191,0,0}, 68 | smooth=Smooth.None)); 69 | connect(resWalInt.heaPor_b, capZon.heaPor) annotation (Line( 70 | points={{-20,0},{20,0},{20,60}}, 71 | color={191,0,0}, 72 | smooth=Smooth.None)); 73 | annotation(Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 74 | -100},{100,100}}), graphics), Documentation(info = " 75 |this is a simple test
76 |First version, 12/10/2011 - RDC
83 | "), 84 | Icon(coordinateSystem(extent={{-200,-100},{100,100}}))); 85 | end Partial_SZ_ZonWal; 86 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/BaseClasses/Partials/Partial_SZ_ZonWalEmb.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic.BaseClasses.Partials; 2 | partial model Partial_SZ_ZonWalEmb 3 | "States for zone, walls and embedded heating" 4 | extends Partial_SZ_ZonWal; 5 | 6 | parameter SI.HeatCapacity cEmb = 1 "Thermal capacity of the embedded system"; 7 | parameter SI.ThermalResistance rEmb = 1 8 | "Total thermal resistance of the embedded system, in K/W"; 9 | parameter Real posCapEmb(min=0, max=1) = 0.5 10 | "Position of the capacity in the embedded system. 0=interor, 1=exterior"; 11 | 12 | Capacitor capEmb(c=cEmb) "Thermal capacity of the embedded system" 13 | annotation (Placement(transformation(extent={{50,60},{70,80}}))); 14 | Resistance resEmbExt(r=rEmbExt) 15 | "Thermal resistance of embedded heating, exterior" 16 | annotation (Placement(transformation(extent={{70,30},{90,50}}))); 17 | Resistance resEmbInt(r=rEmbInt) 18 | "Thermal resistance of embedded heating, interior" 19 | annotation (Placement(transformation(extent={{30,30},{50,50}}))); 20 | protected 21 | parameter SI.ThermalResistance rEmbInt = posCapEmb * rEmb 22 | "Thermal resistance of the interior resistance in K/W"; 23 | parameter SI.ThermalResistance rEmbExt = (1-posCapEmb) * rEmb 24 | "Thermal resistance of the exterior resistance in K/W"; 25 | 26 | equation 27 | connect(resEmbExt.heaPor_b, heaPorEmb) annotation (Line( 28 | points={{90,40},{94,40},{94,39.9057},{100,39.9057}}, 29 | color={191,0,0}, 30 | smooth=Smooth.None)); 31 | connect(resEmbExt.heaPor_a, capEmb.heaPor) annotation (Line( 32 | points={{70,40},{60,40},{60,60}}, 33 | color={191,0,0}, 34 | smooth=Smooth.None)); 35 | connect(resEmbInt.heaPor_b, capEmb.heaPor) annotation (Line( 36 | points={{50,40},{60,40},{60,60}}, 37 | color={191,0,0}, 38 | smooth=Smooth.None)); 39 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 40 | {100,100}}), graphics)); 41 | end Partial_SZ_ZonWalEmb; 42 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/BaseClasses/Partials/Partial_SZ_ZonWalInt.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic.BaseClasses.Partials; 2 | partial model Partial_SZ_ZonWalInt "States for zone, wall and internal mass" 3 | extends Partial_SZ_ZonWal; 4 | 5 | parameter SI.HeatCapacity cInt = 1 "Thermal capacity of the zone"; 6 | parameter SI.ThermalResistance rInt = 1 7 | "Total thermal resistance of the walls, in K/W"; 8 | Capacitor capInt( c=cInt) "Capacity of internal mass" 9 | annotation (Placement(transformation(extent={{-50,60},{-30,80}}))); 10 | Resistance resInt(r=rInt) "Resistance from zone to internal mass" 11 | annotation (Placement(transformation(extent={{-20,50},{0,70}}))); 12 | equation 13 | connect(capInt.heaPor,resInt. heaPor_a) annotation (Line( 14 | points={{-40,60},{-20,60}}, 15 | color={191,0,0}, 16 | smooth=Smooth.None)); 17 | connect(resInt.heaPor_b, capZon.heaPor) annotation (Line( 18 | points={{0,60},{20,60}}, 19 | color={191,0,0}, 20 | smooth=Smooth.None)); 21 | end Partial_SZ_ZonWalInt; 22 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/BaseClasses/Partials/Partial_SZ_ZonWalIntEmb.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic.BaseClasses.Partials; 2 | partial model Partial_SZ_ZonWalIntEmb 3 | "States for zone, walls, internal mass and embedded heating" 4 | extends Partial_SZ_ZonWalInt; 5 | 6 | parameter SI.HeatCapacity cEmb = 1 "Thermal capacity of the embedded system"; 7 | parameter SI.ThermalResistance rEmb = 1 8 | "Total thermal resistance of the embedded system, in K/W"; 9 | parameter Real posCapEmb(min=0, max=1) = 0.5 10 | "Position of the capacity in the embedded system. 0=interor, 1=exterior"; 11 | 12 | Capacitor capEmb(c=cEmb) "Thermal capacity of the embedded system" 13 | annotation (Placement(transformation(extent={{50,60},{70,80}}))); 14 | Resistance resEmbExt(r=rEmbExt) 15 | "Thermal resistance of embedded heating, exterior" 16 | annotation (Placement(transformation(extent={{70,30},{90,50}}))); 17 | Resistance resEmbInt(r=rEmbInt) 18 | "Thermal resistance of embedded heating, interior" 19 | annotation (Placement(transformation(extent={{30,30},{50,50}}))); 20 | protected 21 | parameter SI.ThermalResistance rEmbInt = posCapEmb * rEmb 22 | "Thermal resistance of the interior resistance in K/W"; 23 | parameter SI.ThermalResistance rEmbExt = (1-posCapEmb) * rEmb 24 | "Thermal resistance of the exterior resistance in K/W"; 25 | 26 | equation 27 | connect(resEmbExt.heaPor_b, heaPorEmb) annotation (Line( 28 | points={{90,40},{94,40},{94,39.9057},{100,39.9057}}, 29 | color={191,0,0}, 30 | smooth=Smooth.None)); 31 | connect(resEmbExt.heaPor_a, capEmb.heaPor) annotation (Line( 32 | points={{70,40},{60,40},{60,60}}, 33 | color={191,0,0}, 34 | smooth=Smooth.None)); 35 | connect(resEmbInt.heaPor_b, capEmb.heaPor) annotation (Line( 36 | points={{50,40},{60,40},{60,60}}, 37 | color={191,0,0}, 38 | smooth=Smooth.None)); 39 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 40 | {100,100}}), graphics)); 41 | end Partial_SZ_ZonWalIntEmb; 42 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/BaseClasses/Partials/package.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic.BaseClasses; 2 | package Partials 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}))); 14 | end Partials; 15 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/BaseClasses/Partials/package.order: -------------------------------------------------------------------------------- 1 | Partial_Ground 2 | Partial_SZ 3 | Partial_SZ_Zon 4 | Partial_SZ_ZonEmb 5 | Partial_SZ_ZonWal 6 | Partial_SZ_ZonInt 7 | Partial_SZ_ZonWalInt 8 | Partial_SZ_ZonWalEmb 9 | Partial_SZ_ZonWalIntEmb 10 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/BaseClasses/Resistance.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic.BaseClasses; 2 | model Resistance "Themal resistance" 3 | 4 | HT.Interfaces.HeatPort_a heaPor_a annotation(Placement(transformation(extent={{-110, 5 | -10},{-90,10}}, rotation = 0), 6 | iconTransformation(extent={{-110,-10},{-90,10}}))); 7 | HT.Interfaces.HeatPort_b heaPor_b annotation(Placement(transformation(extent={{90,-10}, 8 | {110,10}}, rotation = 0), 9 | iconTransformation(extent={{90,-10},{110,10}}))); 10 | parameter SI.ThermalResistance r "Constant thermal resistance" annotation(Placement(visible = true, transformation(origin = {119.504,-85.2311}, extent = {{-12,-12},{12,12}}, rotation = 0))); 11 | equation 12 | heaPor_a.Q_flow * r = heaPor_a.T - heaPor_b.T; 13 | heaPor_a.Q_flow + heaPor_b.Q_flow = 0; 14 | annotation(Diagram(coordinateSystem(preserveAspectRatio = true, extent = {{-100,-100},{100,100}}), graphics), Icon(graphics={ Text(rotation= 0, lineColor= {0,0,255}, fillColor= {0,0,0}, pattern= LinePattern.Solid, 15 | fillPattern= FillPattern.None, 16 | lineThickness= 0.25, extent= {{-133.961,98.903},{126.039,47.903}}, textString= "%name"), 17 | Line( 18 | points={{-100,0},{100,0}}, 19 | color={95,95,95}, 20 | smooth=Smooth.None), 21 | Rectangle( 22 | extent={{-80,20},{80,-20}}, 23 | lineColor={95,95,95}, 24 | fillColor={95,95,95}, 25 | fillPattern=FillPattern.Solid)})); 26 | end Resistance; 27 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/BaseClasses/package.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | package BaseClasses 3 | 4 | 5 | 6 | 7 | annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}))); 8 | end BaseClasses; 9 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/BaseClasses/package.order: -------------------------------------------------------------------------------- 1 | Partials 2 | Capacitor 3 | Resistance 4 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/Windows/PartialWindow.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic.Windows; 2 | partial model PartialWindow "Partial window model" 3 | 4 | Modelica.Blocks.Interfaces.RealInput irr annotation(Placement(visible = true, transformation(origin={-98.824, 5 | -0.34941}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin={-98.824, 6 | -0.34941}, extent = {{-12,-12},{12,12}}, rotation = 0))); 7 | Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b heaPor1 8 | annotation(Placement(visible = true, transformation(origin={100.913, 9 | -0.52412}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin={100.913, 10 | -0.52412}, extent = {{-12,-12},{12,12}}, rotation = 0))); 11 | 12 | annotation(Diagram(graphics), 13 | Icon(graphics={ 14 | Rectangle( 15 | extent={{-60,80},{60,-80}}, 16 | lineColor={95,95,95}, 17 | lineThickness=0.5), 18 | Line( 19 | points={{-4,80},{-4,-80}}, 20 | color={95,95,95}, 21 | smooth=Smooth.None), 22 | Line( 23 | points={{4,80},{4,-80}}, 24 | color={95,95,95}, 25 | smooth=Smooth.None), 26 | Line( 27 | points={{-60,4},{60,4}}, 28 | color={95,95,95}, 29 | smooth=Smooth.None), 30 | Line( 31 | points={{-60,-4},{60,-4}}, 32 | color={95,95,95}, 33 | smooth=Smooth.None)})); 34 | end PartialWindow; 35 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/Windows/Window_gA.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic.Windows; 2 | model Window_gA "Simple window, thermal gains are Irr * gA" 3 | 4 | extends PartialWindow; 5 | 6 | parameter Real gA=1 "gA value of the window(s)"; 7 | 8 | equation 9 | heaPor1.Q_flow = -irr * gA; 10 | annotation(Diagram(graphics), 11 | Icon(graphics={ 12 | Rectangle( 13 | extent={{-60,80},{60,-80}}, 14 | lineColor={95,95,95}, 15 | lineThickness=0.5), 16 | Line( 17 | points={{-4,80},{-4,-80}}, 18 | color={95,95,95}, 19 | smooth=Smooth.None), 20 | Line( 21 | points={{4,80},{4,-80}}, 22 | color={95,95,95}, 23 | smooth=Smooth.None), 24 | Line( 25 | points={{-60,4},{60,4}}, 26 | color={95,95,95}, 27 | smooth=Smooth.None), 28 | Line( 29 | points={{-60,-4},{60,-4}}, 30 | color={95,95,95}, 31 | smooth=Smooth.None)})); 32 | end Window_gA; 33 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/Windows/Window_gA_2.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic.Windows; 2 | model Window_gA_2 3 | "Simple window, thermal gains are Irr * gA, 2 heatPorts to split the thermal flux" 4 | 5 | extends PartialWindow; 6 | 7 | parameter Real gA=1 "gA value of the window(s)"; 8 | parameter Real fraHeaPor1(min=0, max=1) = 0.5 9 | "Fraction of heat flux to heaPor1"; 10 | Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b heaPor2 11 | annotation(Placement(visible = true, transformation(origin={98.913, 12 | -40.5241}, extent = {{-12,-12},{12,12}}, rotation = 0), iconTransformation(origin={100.913, 13 | -40.5241}, extent = {{-12,-12},{12,12}}, rotation = 0))); 14 | equation 15 | heaPor1.Q_flow = -irr * gA * fraHeaPor1; 16 | heaPor2.Q_flow = -irr * gA * (1-fraHeaPor1); 17 | 18 | annotation(Diagram(graphics), 19 | Icon(graphics={ 20 | Rectangle( 21 | extent={{-60,80},{60,-80}}, 22 | lineColor={95,95,95}, 23 | lineThickness=0.5), 24 | Line( 25 | points={{-4,80},{-4,-80}}, 26 | color={95,95,95}, 27 | smooth=Smooth.None), 28 | Line( 29 | points={{4,80},{4,-80}}, 30 | color={95,95,95}, 31 | smooth=Smooth.None), 32 | Line( 33 | points={{-60,4},{60,4}}, 34 | color={95,95,95}, 35 | smooth=Smooth.None), 36 | Line( 37 | points={{-60,-4},{60,-4}}, 38 | color={95,95,95}, 39 | smooth=Smooth.None)})); 40 | end Window_gA_2; 41 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/Windows/package.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | package Windows 3 | 4 | 5 | 6 | end Windows; 7 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/Windows/package.order: -------------------------------------------------------------------------------- 1 | Window_gA 2 | Window_gA_2 3 | PartialWindow 4 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/ZonEmb_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | model ZonEmb_A "States for zone and embedded heating, heaPorRad to air node" 3 | extends FastBuildings.Zones_stochastic.BaseClasses.Partials.Partial_SZ_ZonEmb; 4 | equation 5 | for i in 1:nIrr loop 6 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 7 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | end for; 11 | connect(simFasBui.TAmb, preTAmb.T) annotation (Line( 12 | points={{-179.039,82.0248},{-166,82.0248},{-166,0},{-152,0}}, 13 | color={0,0,127}, 14 | smooth=Smooth.None)); 15 | connect(simFasBui.irr, win.irr) annotation (Line( 16 | points={{-179.039,86.0248},{-140,86.0248},{-140,40},{-120,40},{-120, 17 | 39.9651},{-99.8824,39.9651}}, 18 | color={0,0,127}, 19 | smooth=Smooth.None)); 20 | connect(preTAmb.port, resWal.heaPor_a) annotation (Line( 21 | points={{-130,0},{-100,0}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | 25 | connect(resWal.heaPor_b, capZon.heaPor) annotation (Line( 26 | points={{-80,0},{20,0},{20,60}}, 27 | color={191,0,0}, 28 | smooth=Smooth.None)); 29 | connect(heaPorCon, capZon.heaPor) annotation (Line( 30 | points={{100,0},{20,0},{20,60}}, 31 | color={191,0,0}, 32 | smooth=Smooth.None)); 33 | connect(heaPorRad, capZon.heaPor) annotation (Line( 34 | points={{100,-40},{20,-40},{20,60}}, 35 | color={191,0,0}, 36 | smooth=Smooth.None)); 37 | connect(capZon.heaPor, senTZon.port) annotation (Line( 38 | points={{20,60},{20,-80},{50,-80}}, 39 | color={191,0,0}, 40 | smooth=Smooth.None)); 41 | connect(senTZon.T, TZon) annotation (Line( 42 | points={{70,-80},{106,-80}}, 43 | color={0,0,127}, 44 | smooth=Smooth.None)); 45 | connect(resEmbInt.heaPor_a, capZon.heaPor) annotation (Line( 46 | points={{30,40},{20,40},{20,60}}, 47 | color={191,0,0}, 48 | smooth=Smooth.None)); 49 | annotation(Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 50 | -100},{100,100}}), graphics), Documentation(info = " 51 |this is a simple test
52 |First version, 12/10/2011 - RDC
59 | "), 60 | Icon(coordinateSystem(extent={{-200,-100},{100,100}}))); 61 | end ZonEmb_A; 62 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/ZonEmb_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | model ZonEmb_B "States for zone and embedded heating, heaPorRad to capEmb" 3 | extends FastBuildings.Zones_stochastic.BaseClasses.Partials.Partial_SZ_ZonEmb; 4 | equation 5 | for i in 1:nIrr loop 6 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 7 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | end for; 11 | connect(simFasBui.TAmb, preTAmb.T) annotation (Line( 12 | points={{-179.039,82.0248},{-166,82.0248},{-166,0},{-152,0}}, 13 | color={0,0,127}, 14 | smooth=Smooth.None)); 15 | connect(simFasBui.irr, win.irr) annotation (Line( 16 | points={{-179.039,86.0248},{-140,86.0248},{-140,40},{-120,40},{-120, 17 | 39.9651},{-99.8824,39.9651}}, 18 | color={0,0,127}, 19 | smooth=Smooth.None)); 20 | connect(preTAmb.port, resWal.heaPor_a) annotation (Line( 21 | points={{-130,0},{-100,0}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | 25 | connect(resWal.heaPor_b, capZon.heaPor) annotation (Line( 26 | points={{-80,0},{20,0},{20,60}}, 27 | color={191,0,0}, 28 | smooth=Smooth.None)); 29 | connect(heaPorCon, capZon.heaPor) annotation (Line( 30 | points={{100,0},{20,0},{20,60}}, 31 | color={191,0,0}, 32 | smooth=Smooth.None)); 33 | connect(capZon.heaPor, senTZon.port) annotation (Line( 34 | points={{20,60},{20,-80},{50,-80}}, 35 | color={191,0,0}, 36 | smooth=Smooth.None)); 37 | connect(senTZon.T, TZon) annotation (Line( 38 | points={{70,-80},{106,-80}}, 39 | color={0,0,127}, 40 | smooth=Smooth.None)); 41 | connect(resEmbInt.heaPor_a, capZon.heaPor) annotation (Line( 42 | points={{30,40},{20,40},{20,60}}, 43 | color={191,0,0}, 44 | smooth=Smooth.None)); 45 | connect(heaPorRad, capEmb.heaPor) annotation (Line( 46 | points={{100,-40},{60,-40},{60,60}}, 47 | color={191,0,0}, 48 | smooth=Smooth.None)); 49 | annotation(Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 50 | -100},{100,100}}), graphics), Documentation(info = " 51 |this is a simple test
52 |First version, 12/10/2011 - RDC
59 | "), 60 | Icon(coordinateSystem(extent={{-200,-100},{100,100}}))); 61 | end ZonEmb_B; 62 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/ZonInt_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | model ZonInt_A "States for zone and internal mass" 3 | extends FastBuildings.Zones_stochastic.BaseClasses.Partials.Partial_SZ_ZonInt; 4 | 5 | equation 6 | connect(capInt.heaPor, resInt.heaPor_a) annotation (Line( 7 | points={{-40,60},{-20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | connect(resInt.heaPor_b, capZon.heaPor) annotation (Line( 11 | points={{0,60},{20,60}}, 12 | color={191,0,0}, 13 | smooth=Smooth.None)); 14 | connect(heaPorEmb, capInt.heaPor) annotation (Line( 15 | points={{100,39.9057},{76,39.9057},{76,40},{46,40},{46,50},{-40,50},{-40,60}}, 16 | color={191,0,0}, 17 | smooth=Smooth.None)); 18 | 19 | connect(heaPorCon, capZon.heaPor) annotation (Line( 20 | points={{100,0},{20,0},{20,60}}, 21 | color={191,0,0}, 22 | smooth=Smooth.None)); 23 | connect(heaPorRad, capInt.heaPor) annotation (Line( 24 | points={{100,-40},{46,-40},{46,50},{-40,50},{-40,60}}, 25 | color={191,0,0}, 26 | smooth=Smooth.None)); 27 | for i in 1:nIrr loop 28 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 29 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 30 | color={191,0,0}, 31 | smooth=Smooth.None)); 32 | end for; 33 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 34 | {100,100}}), graphics)); 35 | end ZonInt_A; 36 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/ZonInt_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | model ZonInt_B "States for zone and internal mass, splitted window gains" 3 | extends FastBuildings.Zones_stochastic.BaseClasses.Partials.Partial_SZ_ZonInt( 4 | redeclare Windows.Window_gA_2 win); 5 | 6 | equation 7 | connect(capInt.heaPor, resInt.heaPor_a) annotation (Line( 8 | points={{-40,60},{-20,60}}, 9 | color={191,0,0}, 10 | smooth=Smooth.None)); 11 | connect(resInt.heaPor_b, capZon.heaPor) annotation (Line( 12 | points={{0,60},{20,60}}, 13 | color={191,0,0}, 14 | smooth=Smooth.None)); 15 | connect(heaPorEmb, capInt.heaPor) annotation (Line( 16 | points={{100,39.9057},{76,39.9057},{76,40},{46,40},{46,50},{-40,50},{-40,60}}, 17 | color={191,0,0}, 18 | smooth=Smooth.None)); 19 | 20 | connect(heaPorCon, capZon.heaPor) annotation (Line( 21 | points={{100,0},{20,0},{20,60}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | connect(heaPorRad, capInt.heaPor) annotation (Line( 25 | points={{100,-40},{46,-40},{46,50},{-40,50},{-40,60}}, 26 | color={191,0,0}, 27 | smooth=Smooth.None)); 28 | for i in 1:nIrr loop 29 | connect(win[i].heaPor1, capInt.heaPor) annotation (Line( 30 | points={{-79.9087,39.9476},{-40,39.9476},{-40,60}}, 31 | color={191,0,0}, 32 | smooth=Smooth.None)); 33 | connect(win[i].heaPor2, capZon.heaPor) annotation (Line( 34 | points={{-79.9087,35.9476},{20,35.9476},{20,60}}, 35 | color={191,0,0}, 36 | smooth=Smooth.None)); 37 | end for; 38 | 39 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 40 | {100,100}}), graphics)); 41 | end ZonInt_B; 42 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/ZonWalEmb_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | model ZonWalEmb_A "heaPorRad connected to capWal" 3 | extends BaseClasses.Partials.Partial_SZ_ZonWalEmb; 4 | equation 5 | for i in 1:nIrr loop 6 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 7 | points={{-79.9087,39.9476},{-30,40},{20,40},{20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | end for; 11 | 12 | connect(heaPorCon, capZon.heaPor) annotation (Line( 13 | points={{100,0},{74,0},{74,0},{20,0},{20,60}}, 14 | color={191,0,0}, 15 | smooth=Smooth.None)); 16 | connect(resEmbInt.heaPor_a, capZon.heaPor) annotation (Line( 17 | points={{30,40},{20,40},{20,60}}, 18 | color={191,0,0}, 19 | smooth=Smooth.None)); 20 | connect(heaPorRad, capWal.heaPor) annotation (Line( 21 | points={{100,-40},{-60,-40},{-60,10}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 25 | -100},{100,100}}), 26 | graphics)); 27 | end ZonWalEmb_A; 28 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/ZonWalEmb_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | model ZonWalEmb_B "heaPorRad connected to capWal, additional infiltration" 3 | extends ZonWalEmb_A; 4 | 5 | parameter SI.ThermalResistance rInf = 1 6 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 7 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 8 | annotation (Placement(transformation(extent={{-100,-70},{-80,-50}}))); 9 | equation 10 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 11 | points={{-80,-60},{20,-60},{20,60}}, 12 | color={191,0,0}, 13 | smooth=Smooth.None)); 14 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 15 | points={{-100,-60},{-112,-60},{-112,0},{-130,0}}, 16 | color={191,0,0}, 17 | smooth=Smooth.None)); 18 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 19 | {100,100}}), graphics)); 20 | end ZonWalEmb_B; 21 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/ZonWalIntEmb_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | model ZonWalIntEmb_A "Embedded connected to capZon, heaPorRad to capInt" 3 | extends BaseClasses.Partials.Partial_SZ_ZonWalIntEmb; 4 | equation 5 | connect(resEmbInt.heaPor_a, capZon.heaPor) annotation (Line( 6 | points={{30,40},{20,40},{20,60}}, 7 | color={191,0,0}, 8 | smooth=Smooth.None)); 9 | connect(heaPorCon, capZon.heaPor) annotation (Line( 10 | points={{100,0},{20,0},{20,60}}, 11 | color={191,0,0}, 12 | smooth=Smooth.None)); 13 | connect(heaPorRad, capInt.heaPor) annotation (Line( 14 | points={{100,-40},{0,-40},{0,48},{-40,48},{-40,60}}, 15 | color={191,0,0}, 16 | smooth=Smooth.None)); 17 | for i in 1:nIrr loop 18 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 19 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 20 | color={191,0,0}, 21 | smooth=Smooth.None)); 22 | end for; 23 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 24 | {100,100}}), graphics)); 25 | end ZonWalIntEmb_A; 26 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/ZonWalIntEmb_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | model ZonWalIntEmb_B "additional infiltration" 3 | extends ZonWalIntEmb_A; 4 | 5 | parameter SI.ThermalResistance rInf = 1 6 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 7 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 8 | annotation (Placement(transformation(extent={{-100,-70},{-80,-50}}))); 9 | equation 10 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 11 | points={{-80,-60},{20,-60},{20,60}}, 12 | color={191,0,0}, 13 | smooth=Smooth.None)); 14 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 15 | points={{-100,-60},{-112,-60},{-112,0},{-130,0}}, 16 | color={191,0,0}, 17 | smooth=Smooth.None)); 18 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 19 | {100,100}}), graphics)); 20 | end ZonWalIntEmb_B; 21 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/ZonWalInt_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | model ZonWalInt_A "heaPorRad and heaPorEmb connected to capInt" 3 | extends BaseClasses.Partials.Partial_SZ_ZonWalInt; 4 | 5 | equation 6 | for i in 1:nIrr loop 7 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 8 | points={{-79.9087,39.9476},{-30,40},{20,40},{20,60}}, 9 | color={191,0,0}, 10 | smooth=Smooth.None)); 11 | end for; 12 | connect(heaPorCon, capZon.heaPor) annotation (Line( 13 | points={{100,0},{20,0},{20,60}}, 14 | color={191,0,0}, 15 | smooth=Smooth.None)); 16 | 17 | connect(heaPorEmb, capInt.heaPor) annotation (Line( 18 | points={{100,39.9057},{80,40},{80,40},{60,40},{60,50},{-40,50},{-40,60}}, 19 | color={191,0,0}, 20 | smooth=Smooth.None)); 21 | 22 | connect(heaPorRad, capInt.heaPor) annotation (Line( 23 | points={{100,-40},{60,-40},{60,50},{-40,50},{-40,60}}, 24 | color={191,0,0}, 25 | smooth=Smooth.None)); 26 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 27 | {100,100}}), graphics)); 28 | end ZonWalInt_A; 29 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/ZonWalInt_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | model ZonWalInt_B 3 | "heaPorRad en heaPorEmb connected to capInt, additional infiltration" 4 | extends ZonWalInt_A; 5 | 6 | parameter SI.ThermalResistance rInf = 1 7 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 8 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 9 | annotation (Placement(transformation(extent={{-70,-50},{-50,-30}}))); 10 | equation 11 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 12 | points={{-50,-40},{20,-40},{20,60}}, 13 | color={191,0,0}, 14 | smooth=Smooth.None)); 15 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 16 | points={{-70,-40},{-112,-40},{-112,0},{-130,0}}, 17 | color={191,0,0}, 18 | smooth=Smooth.None)); 19 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 20 | {100,100}}), graphics)); 21 | end ZonWalInt_B; 22 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/ZonWal_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | model ZonWal_A "heaPorEmb and heaPorRad connected to capWal" 3 | extends BaseClasses.Partials.Partial_SZ_ZonWal; 4 | equation 5 | for i in 1:nIrr loop 6 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 7 | points={{-79.9087,39.9476},{-30,40},{20,40},{20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | end for; 11 | connect(heaPorEmb, capWal.heaPor) annotation (Line( 12 | points={{100,39.9057},{60,39.9057},{60,-20},{-60,-20},{-60,10}}, 13 | color={191,0,0}, 14 | smooth=Smooth.None)); 15 | connect(heaPorRad, capWal.heaPor) annotation (Line( 16 | points={{100,-40},{60,-40},{60,-20},{-60,-20},{-60,10}}, 17 | color={191,0,0}, 18 | smooth=Smooth.None)); 19 | connect(heaPorCon, capZon.heaPor) annotation (Line( 20 | points={{100,0},{74,0},{74,0},{20,0},{20,60}}, 21 | color={191,0,0}, 22 | smooth=Smooth.None)); 23 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200,-100}, 24 | {100,100}}), graphics)); 25 | end ZonWal_A; 26 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/ZonWal_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | model ZonWal_B "All ports connected to capZonl" 3 | extends BaseClasses.Partials.Partial_SZ_ZonWal; 4 | equation 5 | for i in 1:nIrr loop 6 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 7 | points={{-79.9087,39.9476},{-30,40},{20,40},{20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | end for; 11 | connect(heaPorCon, capZon.heaPor) annotation (Line( 12 | points={{100,0},{74,0},{74,0},{20,0},{20,60}}, 13 | color={191,0,0}, 14 | smooth=Smooth.None)); 15 | connect(heaPorEmb, capZon.heaPor) annotation (Line( 16 | points={{100,39.9057},{84,39.9057},{84,40},{20,40},{20,60}}, 17 | color={191,0,0}, 18 | smooth=Smooth.None)); 19 | connect(heaPorRad, capZon.heaPor) annotation (Line( 20 | points={{100,-40},{20,-40},{20,60}}, 21 | color={191,0,0}, 22 | smooth=Smooth.None)); 23 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 24 | -100},{100,100}}), 25 | graphics)); 26 | end ZonWal_B; 27 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/ZonWal_C.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | model ZonWal_C 3 | "heaPorRad and heaPorEmb connected to capWal, additional infiltration" 4 | extends ZonWal_A; 5 | 6 | parameter SI.ThermalResistance rInf = 1 7 | "Total thermal resistance of infiltration and static heat losses, in K/W"; 8 | BaseClasses.Resistance resInf(r=rInf) "Infiltration (and static heat loss)" 9 | annotation (Placement(transformation(extent={{-70,-50},{-50,-30}}))); 10 | equation 11 | connect(resInf.heaPor_b, capZon.heaPor) annotation (Line( 12 | points={{-50,-40},{20,-40},{20,60}}, 13 | color={191,0,0}, 14 | smooth=Smooth.None)); 15 | connect(resInf.heaPor_a, preTAmb.port) annotation (Line( 16 | points={{-70,-40},{-112,-40},{-112,0},{-130,0}}, 17 | color={191,0,0}, 18 | smooth=Smooth.None)); 19 | annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 20 | -100},{100,100}}), graphics)); 21 | end ZonWal_C; 22 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/Zon_A.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | model Zon_A "Single state, only zone temperature, array of windows" 3 | extends FastBuildings.Zones_stochastic.BaseClasses.Partials.Partial_SZ_Zon; 4 | equation 5 | for i in 1:nIrr loop 6 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 7 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 8 | color={191,0,0}, 9 | smooth=Smooth.None)); 10 | end for; 11 | connect(simFasBui.TAmb, preTAmb.T) annotation (Line( 12 | points={{-179.039,82.0248},{-166,82.0248},{-166,0},{-152,0}}, 13 | color={0,0,127}, 14 | smooth=Smooth.None)); 15 | connect(simFasBui.irr, win.irr) annotation (Line( 16 | points={{-179.039,86.0248},{-140,86.0248},{-140,40},{-120,40},{-120, 17 | 39.9651},{-99.8824,39.9651}}, 18 | color={0,0,127}, 19 | smooth=Smooth.None)); 20 | connect(preTAmb.port, resWal.heaPor_a) annotation (Line( 21 | points={{-130,0},{-100,0}}, 22 | color={191,0,0}, 23 | smooth=Smooth.None)); 24 | 25 | connect(resWal.heaPor_b, capZon.heaPor) annotation (Line( 26 | points={{-80,0},{20,0},{20,60}}, 27 | color={191,0,0}, 28 | smooth=Smooth.None)); 29 | connect(heaPorEmb, capZon.heaPor) annotation (Line( 30 | points={{100,39.9057},{20,39.9057},{20,60}}, 31 | color={191,0,0}, 32 | smooth=Smooth.None)); 33 | connect(heaPorCon, capZon.heaPor) annotation (Line( 34 | points={{100,0},{20,0},{20,60}}, 35 | color={191,0,0}, 36 | smooth=Smooth.None)); 37 | connect(heaPorRad, capZon.heaPor) annotation (Line( 38 | points={{100,-40},{20,-40},{20,60}}, 39 | color={191,0,0}, 40 | smooth=Smooth.None)); 41 | connect(capZon.heaPor, senTZon.port) annotation (Line( 42 | points={{20,60},{20,-80},{50,-80}}, 43 | color={191,0,0}, 44 | smooth=Smooth.None)); 45 | connect(senTZon.T, TZon) annotation (Line( 46 | points={{70,-80},{106,-80}}, 47 | color={0,0,127}, 48 | smooth=Smooth.None)); 49 | annotation(Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 50 | -100},{100,100}}), graphics), Documentation(info = " 51 |this is a simple test
52 |First version, 12/10/2011 - RDC
59 | "), 60 | Icon(coordinateSystem(extent={{-200,-100},{100,100}}))); 61 | end Zon_A; 62 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/Zon_B.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings.Zones_stochastic; 2 | model Zon_B "Single state, ground, only zone temperature, array of windows" 3 | extends FastBuildings.Zones_stochastic.BaseClasses.Partials.Partial_SZ_Zon; 4 | extends FastBuildings.Zones_stochastic.BaseClasses.Partials.Partial_Ground; 5 | equation 6 | for i in 1:nIrr loop 7 | connect(win[i].heaPor1, capZon.heaPor) annotation (Line( 8 | points={{-79.9087,39.9476},{20,39.9476},{20,60}}, 9 | color={191,0,0}, 10 | smooth=Smooth.None)); 11 | end for; 12 | connect(simFasBui.TAmb, preTAmb.T) annotation (Line( 13 | points={{-179.039,82.0248},{-166,82.0248},{-166,0},{-152,0}}, 14 | color={0,0,127}, 15 | smooth=Smooth.None)); 16 | connect(simFasBui.irr, win.irr) annotation (Line( 17 | points={{-179.039,86.0248},{-140,86.0248},{-140,40},{-120,40},{-120, 18 | 39.9651},{-99.8824,39.9651}}, 19 | color={0,0,127}, 20 | smooth=Smooth.None)); 21 | connect(preTAmb.port, resWal.heaPor_a) annotation (Line( 22 | points={{-130,0},{-100,0}}, 23 | color={191,0,0}, 24 | smooth=Smooth.None)); 25 | 26 | connect(resWal.heaPor_b, capZon.heaPor) annotation (Line( 27 | points={{-80,0},{20,0},{20,60}}, 28 | color={191,0,0}, 29 | smooth=Smooth.None)); 30 | connect(heaPorEmb, capZon.heaPor) annotation (Line( 31 | points={{100,39.9057},{20,39.9057},{20,60}}, 32 | color={191,0,0}, 33 | smooth=Smooth.None)); 34 | connect(heaPorCon, capZon.heaPor) annotation (Line( 35 | points={{100,0},{20,0},{20,60}}, 36 | color={191,0,0}, 37 | smooth=Smooth.None)); 38 | connect(heaPorRad, capZon.heaPor) annotation (Line( 39 | points={{100,-40},{20,-40},{20,60}}, 40 | color={191,0,0}, 41 | smooth=Smooth.None)); 42 | connect(capZon.heaPor, senTZon.port) annotation (Line( 43 | points={{20,60},{20,-80},{50,-80}}, 44 | color={191,0,0}, 45 | smooth=Smooth.None)); 46 | connect(senTZon.T, TZon) annotation (Line( 47 | points={{70,-80},{106,-80}}, 48 | color={0,0,127}, 49 | smooth=Smooth.None)); 50 | connect(resGro.heaPor_a, capZon.heaPor) annotation (Line( 51 | points={{-40,-46},{-40,-20},{20,-20},{20,60}}, 52 | color={191,0,0}, 53 | smooth=Smooth.None)); 54 | annotation(Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-200, 55 | -100},{100,100}}), graphics), Documentation(info = " 56 |this is a simple test
57 |First version, 12/10/2011 - RDC
64 | "), 65 | Icon(coordinateSystem(extent={{-200,-100},{100,100}}))); 66 | end Zon_B; 67 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/package.mo: -------------------------------------------------------------------------------- 1 | within FastBuildings; 2 | package Zones_stochastic "Package containing (thermal) zone models" 3 | import SI = Modelica.SIunits; 4 | import HT = Modelica.Thermal.HeatTransfer; 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | end Zones_stochastic; 23 | -------------------------------------------------------------------------------- /FastBuildings/Zones_stochastic/package.order: -------------------------------------------------------------------------------- 1 | Zon_A 2 | Zon_B 3 | ZonInt_A 4 | ZonInt_B 5 | ZonWal_A 6 | ZonWal_B 7 | ZonWal_C 8 | ZonEmb_A 9 | ZonEmb_B 10 | ZonWalInt_A 11 | ZonWalInt_B 12 | ZonWalEmb_A 13 | ZonWalEmb_B 14 | ZonWalIntEmb_A 15 | ZonWalIntEmb_B 16 | BaseClasses 17 | Windows 18 | -------------------------------------------------------------------------------- /FastBuildings/package.mo: -------------------------------------------------------------------------------- 1 | within ; 2 | package FastBuildings "Low order building simulation models" 3 | import SI = Modelica.Units.SI; 4 | import HT = Modelica.Thermal.HeatTransfer; 5 | import Commons; 6 | import IDEAS; 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | annotation(uses(Modelica(version = "4.0.0")), Documentation(info = " 16 |This package contains light (few-states) building models.
17 |The conventions for orientations are (in radials):
18 |The convention for inclinations are (in radials):
25 |