Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BuildingMpc/Case900.mo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ model Case900
extends Modelica.Icons.Example;
IDEAS.Buildings.Components.RectangularZoneTemplate rectangularZoneTemplate(
h=2.7,
redeclare package Medium = Solarwind.Media.DryAir,
redeclare package Medium = BuildingMpc.Media.DryAir,
redeclare IDEAS.Buildings.Components.ZoneAirModels.WellMixedAir
airModel(massDynamics=
Modelica.Fluid.Types.Dynamics.SteadyState),
Expand Down Expand Up @@ -47,7 +47,7 @@ model Case900
"Simulation information manager for climate data"
annotation (Placement(transformation(extent={{-100,60},{-80,80}})));
IBPSA.Fluid.Sources.Boundary_pT bou(nPorts=1, redeclare package Medium =
Solarwind.Media.DryAir)
BuildingMpc.Media.DryAir)
annotation (Placement(transformation(extent={{-46,30},{-26,50}})));
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHeaFlo(final
alpha=0) annotation (Placement(transformation(extent={{40,-22},{20,-2}})));
Expand Down
11 changes: 11 additions & 0 deletions BuildingMpc/Media/DryAir/enthalpyOfCondensingGas.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
within BuildingMpc.Media.DryAir;
function enthalpyOfCondensingGas
"Enthalpy of steam per unit mass of steam"
extends Modelica.Icons.Function;
input Temperature T "temperature";
output SpecificEnthalpy h "steam enthalpy";
algorithm
h := 0;
annotation(smoothOrder=5,
Inline=true);
end enthalpyOfCondensingGas;
73 changes: 73 additions & 0 deletions BuildingMpc/Media/DryAir/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
within BuildingMpc.Media;
package DryAir "Package with dry air model"
extends BuildingMpc.Media.PartialSimpleMedium(
mediumName="Air",
cp_const=1005,
cv_const=cp_const/1.4,
d_const=1.2,
eta_const=1.82e-5,
lambda_const=0.026,
a_const=331,
T_min=240,
T_max=400,
T0=reference_T,
MM_const=0.0289651159,
reference_X={1},
reference_T=273.15,
reference_p=101325,
AbsolutePressure(start=p_default),
Temperature(start=T_default),
extraPropertiesNames=fill("CO2", if useCO2 then 1 else 0));
constant Boolean useCO2 = false;

extends Modelica.Icons.Package;

annotation(preferredView="info", Documentation(info="<html>
<p>
Very simple air medium that does not cause linear algebraic loops in JModelica.
</p>
</html>", revisions="<html>
<ul>
<li>
2017, by Filip Jorissen:<br/>
First implementation.
</li>
</ul>
</html>"),
Icon(graphics={
Ellipse(
extent={{-78,78},{-34,34}},
lineColor={0,0,0},
fillPattern=FillPattern.Sphere,
fillColor={120,120,120}),
Ellipse(
extent={{-18,86},{26,42}},
lineColor={0,0,0},
fillPattern=FillPattern.Sphere,
fillColor={120,120,120}),
Ellipse(
extent={{48,58},{92,14}},
lineColor={0,0,0},
fillPattern=FillPattern.Sphere,
fillColor={120,120,120}),
Ellipse(
extent={{-22,32},{22,-12}},
lineColor={0,0,0},
fillPattern=FillPattern.Sphere,
fillColor={120,120,120}),
Ellipse(
extent={{36,-32},{80,-76}},
lineColor={0,0,0},
fillPattern=FillPattern.Sphere,
fillColor={120,120,120}),
Ellipse(
extent={{-36,-30},{8,-74}},
lineColor={0,0,0},
fillPattern=FillPattern.Sphere,
fillColor={120,120,120}),
Ellipse(
extent={{-90,-6},{-46,-50}},
lineColor={0,0,0},
fillPattern=FillPattern.Sphere,
fillColor={120,120,120})}));
end DryAir;
2 changes: 2 additions & 0 deletions BuildingMpc/Media/DryAir/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
useCO2
enthalpyOfCondensingGas
Loading