Skip to content

Commit

Permalink
Merge pull request #323 from RWTH-EBC/development
Browse files Browse the repository at this point in the history
Release v0.4.0
  • Loading branch information
mlauster authored Dec 20, 2016
2 parents f8e38f0 + 99a6db1 commit 1a8d51d
Show file tree
Hide file tree
Showing 1,293 changed files with 52,953 additions and 14,968 deletions.
439 changes: 413 additions & 26 deletions AixLib/.copiedFiles.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion AixLib/Airflow/AirHandlingUnit/NoAHU.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within AixLib.Airflow.AirHandlingUnit;
model NoAHU "If no AHU should exist at all"
model NoAHU "No AHU"
extends AixLib.Airflow.AirHandlingUnit.BaseClasses.PartialAHU;
Modelica.Blocks.Sources.Constant dummyPhi_supply(k=0.5)
annotation (Placement(transformation(extent={{38,0},{56,18}})));
Expand Down
12 changes: 10 additions & 2 deletions AixLib/Airflow/Multizone/BaseClasses/TwoWayFlowElement.mo
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ partial model TwoWayFlowElement "Flow resistance that uses the power law"
Modelica.SIunits.Velocity vAB(nominal=0.01) "Average velocity from A to B";
Modelica.SIunits.Velocity vBA(nominal=0.01) "Average velocity from B to A";

Modelica.SIunits.Density rho_a1_inflow(start=1.2)
Modelica.SIunits.Density rho_a1_inflow
"Density of air flowing in from port_a1";
Modelica.SIunits.Density rho_a2_inflow(start=1.2)
Modelica.SIunits.Density rho_a2_inflow
"Density of air flowing in from port_a2";

Modelica.SIunits.Area A "Face area";
Expand Down Expand Up @@ -131,6 +131,14 @@ for doors that can be open or closed as a function of an input signal.
revisions="<html>
<ul>
<li>
November 3, 2016, by Michael Wetter:<br/>
Removed start values for inflowing density
to simplify the parameter window, and because this can usually
be computed from the state variables.<br/>
This is for
<a href=\"https://github.com/iea-annex60/modelica-annex60/issues/552\">#552</a>.
</li>
<li>
February 24, 2015 by Michael Wetter:<br/>
Changed model to use
<a href=\"modelica://AixLib.Utilities.Psychrometrics.Functions.density_pTX\">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ this model, and <i>y</i> is the length of the adjacent wall as shown
in the figure below.
</p>
<p align=\"center\">
<img src=\"modelica://AixLib/Resources/Resources/Images/Airflow/Multizone/BaseClasses/windPressureLowRise.png\" border=\"1\" alt=\"Definition of the aspect ratio.\"/>
<img src=\"modelica://AixLib/Resources/Images/Airflow/Multizone/BaseClasses/windPressureLowRise.png\" border=\"1\" alt=\"Definition of the aspect ratio.\"/>
</p>
<p>
Based on the wind incidence angle <i>&alpha;</i> and the side ratio
Expand Down
24 changes: 10 additions & 14 deletions AixLib/Airflow/Multizone/MediumColumn.mo
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ model MediumColumn
parameter AixLib.Airflow.Multizone.Types.densitySelection densitySelection
"Select how to pick density" annotation (Evaluate=true);
parameter Boolean allowFlowReversal=true
"= true to allow flow reversal, false restricts to design direction (port_a -> port_b)"
"= false to simplify equations, assuming, but not enforcing, no flow reversal"
annotation (Dialog(tab="Assumptions"),Evaluate=true);

Modelica.Fluid.Interfaces.FluidPort_a port_a(
Expand All @@ -29,9 +29,9 @@ model MediumColumn

Modelica.SIunits.VolumeFlowRate V_flow
"Volume flow rate at inflowing port (positive when flow from port_a to port_b)";
Modelica.SIunits.MassFlowRate m_flow(start=0)
Modelica.SIunits.MassFlowRate m_flow
"Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction)";
Modelica.SIunits.PressureDifference dp(start=0, displayUnit="Pa")
Modelica.SIunits.PressureDifference dp(displayUnit="Pa")
"Pressure difference between port_a and port_b";
Modelica.SIunits.Density rho "Density in medium column";
protected
Expand All @@ -41,17 +41,6 @@ protected
actualStream(port_a.Xi_outflow)) "Medium properties in port_a";
Medium.MassFraction Xi[Medium.nXi] "Mass fraction used to compute density";
initial equation
/*
assert(abs(Medium.density(Medium.setState_pTX(
Medium.p_default,
Medium.T_default,
Medium.X_default)) - Medium.density(Medium.setState_pTX(
Medium.p_default,
Medium.T_default + 5,
Medium.X_default))) > 1E-10,
"Error: The density of the medium that is used to compute buoyancy force is independent of temperature."
+ "\n You need to select a different medium model.");
*/
// The next assert tests for all allowed values of the enumeration.
// Testing against densitySelection > 0 gives an error in OpenModelica as enumerations start with 1.
assert(densitySelection == AixLib.Airflow.Multizone.Types.densitySelection.fromTop
Expand Down Expand Up @@ -216,6 +205,13 @@ AixLib.Airflow.Multizone.MediumColumnDynamic</a> instead of this model.
revisions="<html>
<ul>
<li>
November 3, 2016, by Michael Wetter:<br/>
Removed start values for mass flow rate and pressure difference
to simplify the parameter window.<br/>
This is for
<a href=\"https://github.com/iea-annex60/modelica-annex60/issues/552\">#552</a>.
</li>
<li>
January 22, 2016, by Michael Wetter:<br/>
Corrected type declaration of pressure difference.
This is
Expand Down
2 changes: 1 addition & 1 deletion AixLib/Airflow/Multizone/MediumColumnDynamic.mo
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ model MediumColumnDynamic

parameter Modelica.SIunits.Length h(min=0) = 3 "Height of shaft";
parameter Boolean allowFlowReversal=true
"= true to allow flow reversal, false restricts to design direction (port_a -> port_b)"
"= false to simplify equations, assuming, but not enforcing, no flow reversal"
annotation (Dialog(tab="Assumptions"),Evaluate=true);

parameter Modelica.SIunits.MassFlowRate m_flow_nominal(min=0)
Expand Down
2 changes: 1 addition & 1 deletion AixLib/Airflow/Multizone/UsersGuide.mo
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Gaithersburg, MD.
</p>
<p>
Michael Wetter.
<a href=\"modelica://AixLib/Resources/Resources/Images/Airflow/Multizone/Wetter-airflow-2006.pdf\">
<a href=\"modelica://AixLib/Resources/Images/Airflow/Multizone/Wetter-airflow-2006.pdf\">
Multizone Airflow Model in Modelica.</a>
Proc. of the 5th International Modelica Conference, p. 431-440. Vienna, Austria, September 2006.
</p>
Expand Down
4 changes: 2 additions & 2 deletions AixLib/Airflow/Multizone/Validation/ThreeRoomsContam.mo
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ This is a model of three rooms that exchange air among each based
on density difference between the air in the rooms and the outside.
The model implements the configuration shown below.</p>
<p align=\"center\">
<img src=\"modelica://AixLib/Resources/Resources/Images/Airflow/Multizone/Examples/3roomValidation.png\" border=\"1\" alt=\"Configuration of the three rooms.\"/>
<img src=\"modelica://AixLib/Resources/Images/Airflow/Multizone/Examples/3roomValidation.png\" border=\"1\" alt=\"Configuration of the three rooms.\"/>
</p>
<p>
This model has been used for a comparative model validation between CONTAM and
Expand All @@ -249,7 +249,7 @@ See Wetter (2006) for details of the validation.
<h4>References</h4>
<p>
Michael Wetter.
<a href=\"modelica://AixLib/Resources/Resources/Images/Airflow/Multizone/Wetter-airflow-2006.pdf\">
<a href=\"modelica://AixLib/Resources/Images/Airflow/Multizone/Wetter-airflow-2006.pdf\">
Multizone Airflow Model in Modelica.</a>
Proc. of the 5th International Modelica Conference, p. 431-440. Vienna, Austria, September 2006.
</p>
Expand Down
2 changes: 1 addition & 1 deletion AixLib/Airflow/package.order
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Multizone
AirHandlingUnit
Multizone
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ annotation (Placement(transformation(extent={{100,-10},{120,10}})));
equation
alt = (Modelica.Constants.pi/2) - zen;
annotation (Icon(graphics={Bitmap(extent={{-92,92},{92,-92}}, fileName=
"modelica://AixLib/Resources/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/AltitudeAngle.png")}),
"modelica://AixLib/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/AltitudeAngle.png")}),
defaultComponentName="altAng", Documentation(info="<html>
<p>
This block computes the altitude angle of the sun with respect to a horizontal surface.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ First implementation.
extent={{-150,110},{150,150}},
textString="%name",
lineColor={0,0,255}), Bitmap(extent={{-92,92},{92,-92}}, fileName=
"modelica://AixLib/Resources/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/Declination.png")}));
"modelica://AixLib/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/Declination.png")}));
end Declination;
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ First implementation.
lineColor={0,0,127},
textString="solHouAng"),
Bitmap(extent={{-90,92},{90,-94}}, fileName=
"modelica://AixLib/Resources/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/IncidenceAngle.png")}));
"modelica://AixLib/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/IncidenceAngle.png")}));
end IncidenceAngle;
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ First implementation.
lineColor={0,0,127},
textString="decAng"),
Bitmap(extent={{-90,90},{90,-92}}, fileName=
"modelica://AixLib/Resources/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/SolarAzimuth.png")}));
"modelica://AixLib/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/SolarAzimuth.png")}));
end SolarAzimuth;
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ First implementation.
extent={{-150,110},{150,150}},
textString="%name",
lineColor={0,0,255}), Bitmap(extent={{-92,90},{90,-90}}, fileName=
"modelica://AixLib/Resources/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/SolarHourAngle.png")}));
"modelica://AixLib/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/SolarHourAngle.png")}));
end SolarHourAngle;
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ equation
AixLib.Utilities.Math.Functions.smoothLimit(x=rat, l=-1+deltaX, u=1-deltaX, deltaX=deltaX/10));

annotation (Icon(graphics={Bitmap(extent={{-92,92},{92,-92}}, fileName=
"modelica://AixLib/Resources/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/WallSolarAzimuth.png")}),
"modelica://AixLib/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/WallSolarAzimuth.png")}),
defaultComponentName="wallSolAzi",
Documentation(info="<html>
<p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ First implementation.
lineColor={0,0,127},
textString="solHouAng"),
Bitmap(extent={{-90,90},{90,-94}}, fileName=
"modelica://AixLib/Resources/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/ZenithAngle.png")}));
"modelica://AixLib/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/ZenithAngle.png")}));
end ZenithAngle;
2 changes: 1 addition & 1 deletion AixLib/BoundaryConditions/SolarGeometry/IncidenceAngle.mo
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ First implementation.
extent={{-150,110},{150,150}},
textString="%name",
lineColor={0,0,255}), Bitmap(extent={{-90,90},{90,-92}}, fileName=
"modelica://AixLib/Resources/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/IncidenceAngle.png")}));
"modelica://AixLib/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/IncidenceAngle.png")}));
end IncidenceAngle;
2 changes: 1 addition & 1 deletion AixLib/BoundaryConditions/SolarGeometry/ZenithAngle.mo
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ First implementation.
extent={{-150,110},{150,150}},
textString="%name",
lineColor={0,0,255}), Bitmap(extent={{-90,90},{90,-92}}, fileName=
"modelica://AixLib/Resources/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/ZenithAngle.png")}));
"modelica://AixLib/Resources/Images/BoundaryConditions/SolarGeometry/BaseClasses/ZenithAngle.png")}));
end ZenithAngle;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
within AixLib.BoundaryConditions.SolarIrradiation.BaseClasses.Examples;
model BrighteningCoefficient "Test model for brightening coeffcients"
extends Modelica.Icons.Example;
AixLib.BoundaryConditions.SolarGeometry.ZenithAngle zen(lat=
0.6457718232379)
annotation (Placement(transformation(extent={{-40,-20},{-20,0}})));
AixLib.BoundaryConditions.SolarIrradiation.BaseClasses.SkyClearness skyCle
annotation (Placement(transformation(extent={{40,20},{60,40}})));
AixLib.BoundaryConditions.SolarIrradiation.BaseClasses.BrighteningCoefficient
briCoe annotation (Placement(transformation(extent={{80,-20},{100,0}})));
AixLib.BoundaryConditions.SolarIrradiation.BaseClasses.RelativeAirMass
relAirMas annotation (Placement(transformation(extent={{-10,-20},{10,0}})));
AixLib.BoundaryConditions.SolarIrradiation.BaseClasses.SkyBrightness
skyBri annotation (Placement(transformation(extent={{40,-40},{60,-20}})));
AixLib.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam=
"modelica://AixLib/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos")
annotation (Placement(transformation(extent={{-90,60},{-70,80}})));
AixLib.BoundaryConditions.WeatherData.Bus weaBus annotation (Placement(
transformation(extent={{-60,60},{-40,80}}),
iconTransformation(extent={{-20,
60},{-20,60}})));
equation
connect(zen.y, skyCle.zen) annotation (Line(
points={{-19,-10},{-16,-10},{-16,24},{38,24}},
color={0,0,127}));
connect(relAirMas.relAirMas, skyBri.relAirMas) annotation (Line(
points={{11,-10},{30,-10},{30,-26},{38,-26}},
color={0,0,127}));
connect(zen.y, relAirMas.zen) annotation (Line(
points={{-19,-10},{-12,-10}},
color={0,0,127}));
connect(skyBri.skyBri, briCoe.skyBri) annotation (Line(
points={{61,-30},{68,-30},{68,-10},{78,-10}},
color={0,0,127}));
connect(skyCle.skyCle, briCoe.skyCle) annotation (Line(
points={{61,30},{68,30},{68,-4},{78,-4}},
color={0,0,127}));
connect(zen.y, briCoe.zen) annotation (Line(
points={{-19,-10},{-16,-10},{-16,-60},{72,-60},{72,-16},{78,-16}},
color={0,0,127}));
connect(weaDat.weaBus, weaBus) annotation (Line(
points={{-70,70},{-50,70}},
color={255,204,51},
thickness=0.5), Text(
string="%second",
index=1,
extent={{6,3},{6,3}}));
connect(weaBus.HGloHor, skyCle.HGloHor) annotation (Line(
points={{-50,70},{20,70},{20,36},{38,36}},
color={255,204,51},
thickness=0.5), Text(
string="%first",
index=-1,
extent={{-6,3},{-6,3}}));
connect(weaBus.HDifHor, skyCle.HDifHor) annotation (Line(
points={{-50,70},{20,70},{20,30},{38,30}},
color={255,204,51},
thickness=0.5), Text(
string="%first",
index=-1,
extent={{-6,3},{-6,3}}));
connect(weaBus.HDifHor, skyBri.HDifHor) annotation (Line(
points={{-50,70},{20,70},{20,-34},{38,-34}},
color={255,204,51},
thickness=0.5), Text(
string="%first",
index=-1,
extent={{-6,3},{-6,3}}));
connect(weaBus, zen.weaBus) annotation (Line(
points={{-50,70},{-50,70},{-50,28},{-50,28},{-50,-10},{-40,-10}},
color={255,204,51},
thickness=0.5), Text(
string="%first",
index=-1,
extent={{-6,3},{-6,3}}));
annotation (
Documentation(info="<html>
<p>
This example computes the circumsolar and horizon brightening coefficients.
</p>
</html>", revisions="<html>
<ul>
<li>
May 25, 2010, by Wangda Zuo:<br/>
First implementation.
</li>
</ul>
</html>"),
experiment(StopTime=8640000),
__Dymola_Commands(file="modelica://AixLib/Resources/Scripts/Dymola/BoundaryConditions/SolarIrradiation/BaseClasses/Examples/BrighteningCoefficient.mos" "run"));
end BrighteningCoefficient;
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ First implementation.
</li>
</ul>
</html>"),
experiment(StartTime=100000, StopTime=300000),
experiment(StartTime=100000, StopTime=3000000),
__Dymola_Commands(file="modelica://AixLib/Resources/Scripts/Dymola/BoundaryConditions/SolarIrradiation/BaseClasses/Examples/SkyClearness.mos"
"Simulate and plot"));
end SkyClearness;
Loading

0 comments on commit 1a8d51d

Please sign in to comment.