Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into issue175_media
Browse files Browse the repository at this point in the history
Conflicts:
	Annex60/Experimental/Media/AirPTDecoupled.mo
	Annex60/Fluid/MixingVolumes/Examples/package.order
	Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_MassExchangers_Examples_Humidifier_u.txt
  • Loading branch information
marcusfuchs committed Mar 12, 2015
2 parents 330e975 + 9637964 commit cf606f2
Show file tree
Hide file tree
Showing 43 changed files with 244 additions and 93 deletions.
1 change: 1 addition & 0 deletions Annex60/Controls/Continuous/Examples/OffTimer.mo
Expand Up @@ -36,6 +36,7 @@ Annex60.Controls.Continuous.OffTimer</a>.
The input to the two timers are alternating boolean values.
Whenever the input becomes <code>false(=0)</code>, the timer is reset.
The figures below show the input and output of the blocks.
</p>
<p align=\"center\">
<img src=\"modelica://Annex60/Resources/Images/Controls/Continuous/Examples/OffTimer1.png\" border=\"1\" alt=\"Input and output of the OffTimer offTim1.\"/><br/>
<img src=\"modelica://Annex60/Resources/Images/Controls/Continuous/Examples/OffTimer2.png\" border=\"1\" alt=\"Input and output of the OffTimer offTim1.\"/>
Expand Down
1 change: 1 addition & 0 deletions Annex60/Controls/Continuous/Examples/PIDHysteresisTimer.mo
Expand Up @@ -89,6 +89,7 @@ and the system has little heat capacity.
The figure below shows the control error
<code>con.feeBac.y</code> and the control signal
<code>con.y</code>.
</p>
<p align=\"center\">
<img src=\"modelica://Annex60/Resources/Images/Controls/Continuous/Examples/PIDHysteresisTimerError.png\" border=\"1\" alt=\"Control error.\"/><br/>
<img src=\"modelica://Annex60/Resources/Images/Controls/Continuous/Examples/PIDHysteresisTimerOutput.png\" border=\"1\" alt=\"Control signal.\"/>
Expand Down
3 changes: 2 additions & 1 deletion Annex60/Controls/Continuous/Examples/SignalRanker.mo
Expand Up @@ -27,9 +27,10 @@ Example that demonstrates the use of the signal ranker model.
The figure below shows the input and output signals of the block.
Note that
<code>sigRan.y[1] &ge; sigRan.y[2] &ge; sigRan.y[3]</code>.
</p>
<p align=\"center\">
<img src=\"modelica://Annex60/Resources/Images/Controls/Continuous/Examples/SignalRankerU.png\" border=\"1\" alt=\"Input to signal ranker.\"/><br/>
<img src=\"modelica://Annex60/Resources/Images/Controls/Continuous/Examples/SignalRankerY.png\" border=\"1\" alt=\"Output of signal ranker.\"/>
<img src=\"modelica://Annex60/Resources/Images/Controls/Continuous/Examples/SignalRankerY.png\" border=\"1\" alt=\"Output of signal ranker.\"/>
</p>
</html>", revisions="<html>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion Annex60/Controls/Continuous/NumberOfRequests.mo
Expand Up @@ -44,7 +44,7 @@ Block that outputs the number of inputs that exceed a threshold.
The parameter <code>kind</code> is used to determine the kind of the
inequality. The table below shows the allowed settings.
</p>
<table border=\"1\" cellspacing=0 cellpadding=2 style=\"border-collapse:collapse;\" summary=\"Allowed parameter settings.\">
<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse:collapse;\" summary=\"Allowed parameter settings.\">
<tr>
<th>Value of parameter <code>kind</code></th>
<th>Output signal incremented by 1 for each <i>i &isin; {1, ..., nin}</i> if</th>
Expand Down
1 change: 1 addition & 0 deletions Annex60/Controls/Continuous/PIDHysteresisTimer.mo
Expand Up @@ -240,6 +240,7 @@ Annex60.Controls.Continuous.PIDHysteresis</a> but in addition,
it has a timer that prevents the controller from switching to on
too fast. When the controller switches off, the timer starts and
avoids the controller from switching on until <code>minOffTime</code> seconds elapsed.
</p>
</html>", revisions="<html>
<ul>
<li>
Expand Down
3 changes: 2 additions & 1 deletion Annex60/Controls/Continuous/SignalRanker.mo
Expand Up @@ -19,11 +19,12 @@ defaultComponentName="sigRan",
Documentation(info="<html>
<p>
Block that sorts the input signal <code>u[:]</code> such that the output
signal satisfies <code>y[i] >= y[i+1]</code> for all <code>i=1, ..., nin-1</code>.
signal satisfies <code>y[i] &gt;= y[i+1]</code> for all <code>i=1, ..., nin-1</code>.
</p>
<p>
This block may for example be used in a variable air volume flow
controller to access the position of the dampers that are most open.
</p>
</html>",
revisions="<html>
<ul>
Expand Down
14 changes: 7 additions & 7 deletions Annex60/Fluid/Actuators/BaseClasses/PartialThreeWayValve.mo
Expand Up @@ -45,7 +45,7 @@ partial model PartialThreeWayValve "Partial three way valve"
annotation(Dialog(group="Nominal condition"));

parameter Real fraK(min=0, max=1) = 0.7
"Fraction Kv(port_3->port_2)/Kv(port_1->port_2)";
"Fraction Kv(port_3&rarr;port_2)/Kv(port_1&rarr;port_2)";
parameter Real[2] l(each min=0, each max=1) = {0, 0}
"Valve leakage, l=Kv(y=0)/Kv(y=1)";
parameter Real deltaM = 0.02
Expand Down Expand Up @@ -158,15 +158,15 @@ with different opening characteristics, such as linear, equal percentage
or quick opening. The three way valve model consists of a mixer where
valves are placed in two of the flow legs. The third flow leg
has no friction.
The flow coefficient <code>Kv</code> for flow from <code>port_1 -> port_2</code> is
The flow coefficient <code>Kv</code> for flow from <code>port_1 &rarr; port_2</code> is
a parameter.
The flow coefficient for the bypass flow from <code>port_3 -> port_2</code>
The flow coefficient for the bypass flow from <code>port_3 &rarr; port_2</code>
is computed as
</p>
<pre>
Kv(port_3 -> port_2)
Kv(port_3 &rarr; port_2)
fraK = ----------------------
Kv(port_1 -> port_2)
Kv(port_1 &rarr; port_2)
</pre>
<p>
where <code>0 &lt; fraK &le; 1</code> is a parameter with a default value
Expand All @@ -188,8 +188,8 @@ parameter has the attribute <code>fixed=false</code> for some values
of <code>CvData</code>. In this case, assigning a value is not allowed.
Corrected wrong documentation of parameter <code>fraK(min=0, max=1) = 0.7</code>.
The documenation was
<i>Fraction Kv(port_1->port_2)/Kv(port_3->port_2)</i> instead of
<i>Fraction Kv(port_3->port_2)/Kv(port_1->port_2)</i>.
<i>Fraction Kv(port_1&rarr;port_2)/Kv(port_3&rarr;port_2)</i> instead of
<i>Fraction Kv(port_3&rarr;port_2)/Kv(port_1&rarr;port_2)</i>.
Because the parameter set correctly its attributes <code>min=0</code> and <code>max=1</code>,
instances of this model used the correct value.
</li>
Expand Down
8 changes: 4 additions & 4 deletions Annex60/Fluid/Actuators/BaseClasses/ValveParameters.mo
Expand Up @@ -80,10 +80,10 @@ Modelica.Fluid</a>
to specify the valve flow coefficient in fully open conditions:
</p>
<ul>
<li><code>CvData = Annex60.Fluid.Types.CvTypes.Av</code>: the flow coefficient is given by the metric <code>Av</code> coefficient (m^2).
<li><code>CvData = Annex60.Fluid.Types.CvTypes.Kv</code>: the flow coefficient is given by the metric <code>Kv</code> coefficient (m^3/h).
<li><code>CvData = Annex60.Fluid.Types.CvTypes.Cv</code>: the flow coefficient is given by the US <code>Cv</code> coefficient (USG/min).
<li><code>CvData = Annex60.Fluid.Types.CvTypes.OpPoint</code>: the flow is computed from the nominal operating point specified by <code>dp_nominal</code> and <code>m_flow_nominal</code>.
<li><code>CvData = Annex60.Fluid.Types.CvTypes.Av</code>: the flow coefficient is given by the metric <code>Av</code> coefficient (m^2).</li>
<li><code>CvData = Annex60.Fluid.Types.CvTypes.Kv</code>: the flow coefficient is given by the metric <code>Kv</code> coefficient (m^3/h).</li>
<li><code>CvData = Annex60.Fluid.Types.CvTypes.Cv</code>: the flow coefficient is given by the US <code>Cv</code> coefficient (USG/min).</li>
<li><code>CvData = Annex60.Fluid.Types.CvTypes.OpPoint</code>: the flow is computed from the nominal operating point specified by <code>dp_nominal</code> and <code>m_flow_nominal</code>.</li>
</ul>
<p>
The treatment of parameters <code>Kv</code> and <code>Cv</code> is
Expand Down
4 changes: 3 additions & 1 deletion Annex60/Fluid/Actuators/Dampers/Exponential.mo
Expand Up @@ -45,6 +45,7 @@ differentiable in <i>y</i> and the derivative is continuous.
<p>
The damper characteristics <i>k<sub>d</sub>(y)</i> is then used to
compute the flow coefficient <i>k(y)</i> as
</p>
<p align=\"center\" style=\"font-style:italic;\">
k(y) = (2 &rho; &frasl; k<sub>d</sub>(y))<sup>1/2</sup> A,
</p>
Expand All @@ -61,7 +62,8 @@ with regularization near the origin.
</p>
<p>
ASHRAE 825-RP lists the following parameter values as typical:
<table summary=\"summary\" border=\"1\" cellspacing=0 cellpadding=2 style=\"border-collapse:collapse;\">
</p>
<table summary=\"summary\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse:collapse;\">
<tr>
<td></td><th>opposed blades</th><th>single blades</th>
</tr>
Expand Down
Expand Up @@ -108,7 +108,7 @@ opening characteristics.
The valve has the following opening characteristics, which is taken from a test case
of the IEA EBC Annex 60 project.
</p>
<table summary=\"summary\" border=\"1\" cellspacing=0 cellpadding=2 style=\"border-collapse:collapse;\">
<table summary=\"summary\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse:collapse;\">
<tr><td><i>y</i></td>
<td>0</td> <td>0.1667</td> <td>0.3333</td> <td>0.5</td> <td>0.6667</td> <td>1</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion Annex60/Fluid/Actuators/Valves/TwoWayTable.mo
Expand Up @@ -57,7 +57,7 @@ scaled by the values of the parameter
<code>flowCharacteristics</code>.
The parameter <code>flowCharacteristics</code> declares a table of the form
</p>
<table summary=\"summary\" border=\"1\" cellspacing=0 cellpadding=2 style=\"border-collapse:collapse;\">
<table summary=\"summary\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse:collapse;\">
<tr>
<td><i>y</i></td> <td>0</td> <td>...</td> <td>1</td>
</tr>
Expand Down
1 change: 1 addition & 0 deletions Annex60/Fluid/BaseClasses/PartialThreeWayResistance.mo
Expand Up @@ -122,6 +122,7 @@ If <code>dynamicBalance=true</code>, then at the junction of the three flows,
a mixing volume will be present. This will introduce a dynamic energy and momentum
balance, which often breaks algebraic loops.
The time constant of the mixing volume is determined by the parameter <code>tau</code>.
</p>
</html>", revisions="<html>
<ul>
<li>
Expand Down
1 change: 1 addition & 0 deletions Annex60/Fluid/HeatExchangers/Examples/Heater_T.mo
Expand Up @@ -47,6 +47,7 @@ See
<a href=\"modelica://Annex60.Fluid.HeatExchangers.Examples.Heater_u\">
Annex60.Fluid.HeatExchangers.Examples.Heater_u</a>
for a model that takes the heating power as an input.
</p>
</html>", revisions="<html>
<ul>
<li>
Expand Down
1 change: 1 addition & 0 deletions Annex60/Fluid/HeatExchangers/Examples/Heater_u.mo
Expand Up @@ -39,6 +39,7 @@ See
<a href=\"modelica://Annex60.Fluid.HeatExchangers.Examples.Heater_T\">
Annex60.Fluid.HeatExchangers.Examples.Heater_T</a>
for a model that takes the leaving air temperature as an input.
</p>
</html>", revisions="<html>
<ul>
<li>
Expand Down
1 change: 1 addition & 0 deletions Annex60/Fluid/Interfaces/Examples/PrescribedOutletState.mo
Expand Up @@ -136,6 +136,7 @@ Model that demonstrates the use of an ideal heater and an ideal cooler.
<p>
The heater model has an almost unlimited positive capacity (<code>Q_flow_nominal = 1.0e10</code> Watts),
and hence its outlet temperature always reaches the set point temperatures.
</p>
<p>
The cooler model has a limited negative capacitiy (<code>Q_flow_nominal = 1000</code> Watts), and hence
its outlet temperature reaches only a limited value corresponding to its
Expand Down
1 change: 1 addition & 0 deletions Annex60/Fluid/Interfaces/PartialFourPortInterface.mo
Expand Up @@ -72,6 +72,7 @@ It is similar to
<a href=\"modelica://Annex60.Fluid.Interfaces.PartialTwoPortInterface\">
Annex60.Fluid.Interfaces.PartialTwoPortInterface</a>,
but it has four ports instead of two.
</p>
<p>
The model is used by other models in this package that add heat transfer,
mass transfer and pressure drop equations.
Expand Down
2 changes: 1 addition & 1 deletion Annex60/Fluid/Interfaces/PrescribedOutletState.mo
Expand Up @@ -165,7 +165,7 @@ equation
extent={{48,102},{92,74}},
lineColor={0,0,127},
textString="Q_flow")}),
Documentation(info="<HTML>
Documentation(info="<html>
<p>
This model sets the temperature of the medium that leaves <code>port_a</code>
to the value given by the input <code>TSet</code>, subject to optional
Expand Down
2 changes: 1 addition & 1 deletion Annex60/Fluid/Interfaces/package.mo
Expand Up @@ -33,7 +33,7 @@ These define parameters that are needed by many fluid flow components.
Next, we describe the basic classes. For a more detailed description,
see the <i>info</i> section of the class.
</p>
<table summary=\"summary\" border=\"1\" cellspacing=0 cellpadding=2 style=\"border-collapse:collapse;\">
<table summary=\"summary\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse:collapse;\">
<tr>
<!-- ============================================== -->
<td><a href=\"modelica://Annex60.Fluid.Interfaces.ConservationEquation\">
Expand Down
@@ -0,0 +1,84 @@
within Annex60.Fluid.MixingVolumes.Examples;
model MixingVolumeSteadyStateMass "Test model for steady state mass dynamics"
extends Modelica.Icons.Example;
package Medium = Annex60.Experimental.Media.AirPTDecoupled;
Sources.MassFlowSource_T sou(
redeclare package Medium = Medium,
use_m_flow_in=true,
nPorts=1) "Flow source and sink"
annotation (Placement(transformation(extent={{-20,-20},{0,0}})));
Sources.Boundary_pT bou(
redeclare package Medium = Medium,
nPorts=1) "Boundary condition"
annotation (
Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=180,
origin={92,-10})));
Annex60.Fluid.MixingVolumes.MixingVolume vol(
V=1,
redeclare package Medium = Medium,
m_flow_nominal=0.01,
massDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
allowFlowReversal=true,
prescribedHeatFlowRate=false,
nPorts=2,
mSenFac=2,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
"Mixing volume with steady state mass dynamics"
annotation (Placement(transformation(extent={{30,20},{50,40}})));
Modelica.Blocks.Sources.Ramp ramp(
duration=1,
offset=1,
height=-2) "Ramp input"
annotation (Placement(transformation(extent={{-90,-20},{-70,0}})));

Modelica.Blocks.Math.Gain gain(k=0.01) "Gain for nominal mass flow rate"
annotation (Placement(transformation(extent={{-60,-20},{-40,0}})));
FixedResistances.FixedResistanceDpM res(
redeclare package Medium = Medium,
m_flow_nominal=0.01,
dp_nominal=1000) "Pressure drop"
annotation (Placement(transformation(extent={{50,-20},{70,0}})));
equation
connect(ramp.y, gain.u) annotation (Line(
points={{-69,-10},{-62,-10}},
color={0,0,127},
smooth=Smooth.None));
connect(gain.y, sou.m_flow_in) annotation (Line(
points={{-39,-10},{-31.5,-10},{-31.5,-2},{-20,-2}},
color={0,0,127},
smooth=Smooth.None));
connect(sou.ports[1], vol.ports[1]) annotation (Line(
points={{0,-10},{38,-10},{38,20}},
color={0,127,255},
smooth=Smooth.None));
connect(vol.ports[2], res.port_a) annotation (Line(
points={{42,20},{42,-10},{50,-10}},
color={0,127,255},
smooth=Smooth.None));
connect(res.port_b, bou.ports[1]) annotation (Line(
points={{70,-10},{82,-10}},
color={0,127,255},
smooth=Smooth.None));
annotation (Documentation(
info="<html>
<p>
This model shows that steady state mass dynamics are correctly simulated.
A change in pressure does not lead to an exchange and/or creation of mass.
The mixing volume temperature is also unaffected by a pressure change.
</p>
</html>", revisions="<html>
<ul>
<li>
March 9, 2015 by Filip Jorissen:<br/>
First implementation.
</li>
</ul>
</html>"),
experiment(StopTime=1.0),
__Dymola_Commands(file=
"modelica://Annex60/Resources/Scripts/Dymola/Fluid/MixingVolumes/Examples/MixingVolumeSteadyStateMass.mos"
"Simulate and plot"),
Diagram(graphics));
end MixingVolumeSteadyStateMass;
4 changes: 1 addition & 3 deletions Annex60/Fluid/Movers/Data/FlowControlled.mo
Expand Up @@ -65,9 +65,7 @@ Annex60.Fluid.Movers.SpeedControlled_Nrpm</a>,
use the record
<a href=\"modelica://Annex60.Fluid.Movers.Data.Generic_Nrpm\">
Annex60.Fluid.Movers.Data.Generic_Nrpm</a>



</p>
</html>",
revisions="<html>
<ul>
Expand Down
10 changes: 8 additions & 2 deletions Annex60/Fluid/Movers/SpeedControlled_Nrpm.mo
Expand Up @@ -11,9 +11,10 @@ model SpeedControlled_Nrpm
motorCooledByFluid=per.motorCooledByFluid,
use_powerCharacteristic=per.use_powerCharacteristic));

parameter Data.SpeedControlled_Nrpm per "Record with performance data"
replaceable parameter Data.SpeedControlled_Nrpm per
"Record with performance data"
annotation (choicesAllMatching=true,
Placement(transformation(extent={{60,-80},{80,-60}})));
Placement(transformation(extent={{20,-80},{40,-60}})));

Modelica.Blocks.Interfaces.RealInput Nrpm(unit="1/min")
"Prescribed rotational speed"
Expand Down Expand Up @@ -84,6 +85,11 @@ User's Guide</a> for more information.
revisions="<html>
<ul>
<li>
March 6, 2015, by Michael Wetter<br/>
Made performance record <code>per</code> replaceable
as for the other models.
</li>
<li>
January 6, 2015, by Michael Wetter:<br/>
Revised model for OpenModelica.
</li>
Expand Down
6 changes: 3 additions & 3 deletions Annex60/Fluid/Movers/UsersGuide.mo
Expand Up @@ -22,7 +22,7 @@ electrical power draw and efficiency as a function
of the volume flow rate and the speed.
The following performance curves are implemented:
</p>
<table summary=\"summary\" border=\"1\" cellspacing=0 cellpadding=2 style=\"border-collapse:collapse;\">
<table summary=\"summary\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse:collapse;\">
<tr>
<th>Independent variable</th>
<th>Dependent variable</th>
Expand Down Expand Up @@ -70,7 +70,7 @@ Note that not all records can be used with all models, as
the records only declare the minimum set of required data.
</p>
<!-- Table for performance data -->
<table summary=\"Performance data\" border=\"1\" cellspacing=0 cellpadding=2 style=\"border-collapse:collapse;\">
<table summary=\"Performance data\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse:collapse;\">
<tr>
<th></th>
<th style=\"text-align:left\">
Expand Down Expand Up @@ -149,7 +149,7 @@ Annex60.Fluid.Movers.BaseClasses.Characteristics.pressure</a>.
For example, suppose a pump needs to be modeled whose pressure versus flow relation crosses, at
full speed, the points shown in the table below.
</p>
<table summary=\"summary\" border=\"1\" cellspacing=0 cellpadding=2 style=\"border-collapse:collapse;\">
<table summary=\"summary\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse:collapse;\">
<tr>
<th>Volume flow rate [m<sup>3</sup>&frasl;h] </th>
<th>Head [Pa]</th>
Expand Down
4 changes: 2 additions & 2 deletions Annex60/Fluid/Sensors/UsersGuide.mo
Expand Up @@ -32,7 +32,7 @@ For an explanation, see
Modelica.Fluid.Examples.Explanatory.MeasuringTemperature</a>.
</p>

<table summary=\"summary\" border=\"1\" cellspacing=0 cellpadding=2>
<table summary=\"summary\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\">
<tr><th valign=\"top\" align=\"left\">Correct use</th>
<td valign=\"top\">
<img alt=\"image\" src=\"modelica://Annex60/Resources/Images/Fluid/Sensors/twoPortHex.png\" />
Expand Down Expand Up @@ -76,7 +76,7 @@ ports can be used for all connection topologies.
<p>
The table below summarizes the recommendations for the use of sensors.
</p>
<table summary=\"summary\" border=\"1\" cellspacing=0 cellpadding=2>
<table summary=\"summary\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\">
<tr><th rowspan=\"2\" valign=\"top\">Measured quantity</th>
<th rowspan=\"2\" valign=\"top\">One port sensor</th>
<th colspan=\"2\" valign=\"top\">Two port sensor</th>
Expand Down
1 change: 1 addition & 0 deletions Annex60/Fluid/Sources/TraceSubstancesFlowSource.mo
Expand Up @@ -58,6 +58,7 @@ carbon dioxide concentration is typically so small that it need not be
added to the room mass balance, and since the mass flow rate can be
made small compared to the room volume if the medium that leaves this
component has a carbon dioxide concentration of <i>1</i>.
</p>
</html>", revisions="<html>
<ul>
<li>
Expand Down

0 comments on commit cf606f2

Please sign in to comment.