Skip to content

Commit

Permalink
Set nSeg.min=1
Browse files Browse the repository at this point in the history
This is needed for #290 to use the slab with epsilon-NTU
  • Loading branch information
mwetter committed Oct 10, 2014
1 parent a58a191 commit 6f7088e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Buildings/Fluid/FixedResistances/BaseClasses/Pipe.mo
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ model Pipe
extends Buildings.Fluid.Interfaces.TwoPortFlowResistanceParameters(
final computeFlowResistance=(abs(dp_nominal) > Modelica.Constants.eps));

parameter Integer nSeg(min=2) = 10 "Number of volume segments";
parameter Integer nSeg(min=1) = 10 "Number of volume segments";
parameter Modelica.SIunits.Length thicknessIns "Thickness of insulation";
parameter Modelica.SIunits.ThermalConductivity lambdaIns
"Heat conductivity of insulation";
Expand Down Expand Up @@ -75,9 +75,11 @@ equation
points={{-10,6.10623e-16},{7,6.10623e-16},{7,-18}},
color={0,127,255},
smooth=Smooth.None));
for i in 1:(nSeg - 1) loop
connect(vol[i].ports[2], vol[i + 1].ports[1]);
end for;
if nSeg > 1 then
for i in 1:(nSeg - 1) loop
connect(vol[i].ports[2], vol[i + 1].ports[1]);
end for;
end if;
connect(vol[nSeg].ports[2], port_b) annotation (Line(
points={{11,-18},{12,-18},{12,5.55112e-16},{100,5.55112e-16}},
color={0,127,255},
Expand Down Expand Up @@ -112,6 +114,11 @@ Buildings.Fluid.MixingVolumes.MixingVolume</a>.
</html>", revisions="<html>
<ul>
<li>
October 10, 2014, by Michael Wetter:<br/>
Changed minimum attribute for <code>nSeg</code> from 2 to 1.
This is required for the radiant slab model.
</li>
<li>
October 8, 2013, by Michael Wetter:<br/>
Removed parameter <code>show_V_flow</code>.
</li>
Expand Down

0 comments on commit 6f7088e

Please sign in to comment.