Skip to content

Commit

Permalink
Moved the type definition.
Browse files Browse the repository at this point in the history
This is for #290.
It is done for consistency with other models as type definitions that
are used by the top-level models should not be in the BaseClasses
directory.
  • Loading branch information
mwetter committed Oct 10, 2014
1 parent 3481681 commit fc3eee0
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function AverageResistance
input Modelica.SIunits.ThermalConductivity k
"pipe level construction element thermal conductivity";
input
Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.Types.SystemType
Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType
sysTyp "Type of radiant system";
input Modelica.SIunits.ThermalConductivity kIns
"floor slab insulation thermal conductivity";
Expand All @@ -22,7 +22,7 @@ protected
Real fac "Factor used for systems in wall or ceiling, or for capillary tubes";
algorithm

if sysTyp == Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.Types.SystemType.Floor then
if sysTyp == Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Floor then
alpha := kIns/dIns;
if alpha >= 1.212 then
Modelica.Utilities.Streams.print("Warning: In RadiantAverageResistance, require alpha = kIns/dIns >= 1.212 W/(m2.K).\n" +
Expand All @@ -37,14 +37,14 @@ algorithm
Rx := disPip*(Modelica.Math.log(disPip/Modelica.Constants.pi/dPipOut) + infSum)
/(2*Modelica.Constants.pi*k);
fac := 0; // not needed.
elseif sysTyp == Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.Types.SystemType.Ceiling_Wall_or_Capillary then
elseif sysTyp == Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Ceiling_Wall_or_Capillary then
// Branch for radiant ceilings, radiant walls, and systems with capillary heat exchangers
cri := disPip/dPipOut;
fac := if (cri >= 5.8) then Modelica.Math.log(cri/Modelica.Constants.pi) else (cri/Modelica.Constants.pi/3);
Rx := disPip/2/Modelica.Constants.pi/k * fac;
else
assert(sysTyp == Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.Types.SystemType.Floor or
sysTyp == Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.Types.SystemType.Ceiling_Wall_or_Capillary,
assert(sysTyp == Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Floor or
sysTyp == Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Ceiling_Wall_or_Capillary,
"Invalid value for sysTyp in \"Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.Functions.AverageResistance\"
Check parameters of the radiant slab model.");
cri := 0;
Expand All @@ -62,16 +62,16 @@ Different equations are used for
<ul>
<li>
floor heating systems (if
<code>sysTyp == Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.Types.SystemType.Floor</code>),
<code>sysTyp == Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Floor</code>),
</li>
<li>
radiant heating or cooling systems in ceilings and walls (if
<code>sysTyp == Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.Types.SystemType.Ceiling_Wall_or_Capillary</code>
<code>sysTyp == Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Ceiling_Wall_or_Capillary</code>
and <code>disPip/dPipOut &ge; 5.8</code>), and
</li>
<li>
capillary tube systems (if
<code>sysTyp == Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.Types.SystemType.Ceiling_Wall_or_Capillary</code>
<code>sysTyp == Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Ceiling_Wall_or_Capillary</code>
and <code>disPip/dPipOut &lt; 5.8</code>).
</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
within Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses;
partial model Slab "Base class for radiant slab"
parameter
Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.Types.SystemType
Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType
sysTyp "Radiant system type";

parameter Modelica.SIunits.Distance disPip "Pipe distance";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ model SingleCircuitMultipleCircuitEpsilonNTU
layers=layers,
iLayPip=1,
pipe=pipe,
sysTyp=Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.Types.SystemType.Floor,
sysTyp=Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Floor,
disPip=0.2,
A=A,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
Expand Down Expand Up @@ -71,7 +71,7 @@ model SingleCircuitMultipleCircuitEpsilonNTU
layers=layers,
iLayPip=1,
pipe=pipe,
sysTyp=Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.Types.SystemType.Floor,
sysTyp=Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Floor,
disPip=0.2,
A=A,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
Expand All @@ -89,7 +89,7 @@ model SingleCircuitMultipleCircuitEpsilonNTU
layers=layers,
iLayPip=1,
pipe=pipe,
sysTyp=Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.Types.SystemType.Floor,
sysTyp=Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Floor,
disPip=0.2,
nCir=nCir,
A=nCir*A,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ model StepResponseEpsilonNTU
layers=layers,
iLayPip=1,
pipe=pipe,
sysTyp=Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.Types.SystemType.Floor,
sysTyp=Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Floor,
disPip=0.2,
A=A,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
Expand Down
26 changes: 24 additions & 2 deletions Buildings/Fluid/HeatExchangers/RadiantSlabs/Types.mo
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,34 @@ package Types "Package with type definitions"
type FluidHeatTransfer = enumeration(
EpsilonNTU "Epsilon-NTU",
FiniteDifference "Finite difference")
"Model for the heat transfer along the fluid flow direction";
"Model for the heat transfer along the fluid flow direction" annotation (
Documentation(info="<html>
<p>
This type definition is used to determine
whether the <i>&epsilon;-NTU</i> approach
should be used to compute the heat transfer
between the fluid and the solid.
See the
<a href=\\modelica://Buildings.Fluid.HeatExchangers.RadiantSlabs.UsersGuide\">
user's guide</a>
for more information.
</p>
</html>"));

type SystemType = enumeration(
Ceiling_Wall_or_Capillary
"Radiant heating or cooling system (ceiling or wall)",
Floor "Floor heating system") "System type for radiant slab";
Floor "Floor heating system") "System type for radiant slab" annotation (
Documentation(info="<html>
<p>
This type definition is used to specify
the type of radiant system to be modeled.
See the
<a href=\\modelica://Buildings.Fluid.HeatExchangers.RadiantSlabs.UsersGuide\">
user's guide</a>
for more information.
</p>
</html>"));

annotation (preferredView="info", Documentation(info="<html>
<p>
Expand Down

0 comments on commit fc3eee0

Please sign in to comment.