Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Modelica PR #1378

Merged
merged 68 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
bc5735d
[skip-ci] Add default value for structural parameter 'n'
martinkremer Oct 13, 2022
da443b7
[skip-ci] Redeclare constants as protected
martinkremer Oct 13, 2022
bd61f1c
[skip-ci] Add connection for pumpOn-boolean in pump bus
martinkremer Oct 13, 2022
c3ea513
[skip-ci] Add boolean input for onSet in pump-bus
martinkremer Oct 13, 2022
0d77b24
[skip-ci] Add boolean input for 'onSet' in pump-bus
martinkremer Oct 13, 2022
f3fab0d
Fix compatibility bug with Open Modelica [scip-ci]
larissakuehn Oct 13, 2022
2c18c8a
Add Modelica standard icon to model for open modelica
larissakuehn Oct 13, 2022
71f5915
[skip-ci] Fix bug in not working simulation for ´AixLib.Systems.Hydra…
martinkremer Oct 13, 2022
bf02035
OpenModelica compatibility for ExergyMeter
tosch4 Oct 13, 2022
52b265f
[skip-ci] Add boolean input for pump-bus in ´AixLib.Systems.Hydraulic…
martinkremer Oct 13, 2022
6d0dfa7
Merge pull request #1362 from RWTH-EBC/1361-dpcontrolledmovers-fail-i…
larissakuehn Oct 13, 2022
070fa5b
Merge pull request #1366 from RWTH-EBC/issue1340_OpenModelica_compati…
tosch4 Oct 13, 2022
6ddb4c9
Merge pull request #1357 from RWTH-EBC/issue1351_MembraneBasedEnthalp…
HannahRomberg Oct 13, 2022
6811858
Add each, change Units to Reals for non-physical VDI equations [skip-ci]
hannah-kruetzfeldt Oct 13, 2022
463c3f1
[skip-ci] Change extrapolation in look-up table to 'Hold last point';…
martinkremer Oct 13, 2022
7c59efc
Start smaller fixes #1349
Oct 13, 2022
fa581ae
Merge branch 'development' into openModelicaProject
Oct 13, 2022
5b05860
#1372 heatingRod OpenModelica
tosch4 Oct 13, 2022
0afd613
Merge pull request #1373 from RWTH-EBC/issue1372_heatingrod_fails_in_…
tosch4 Oct 13, 2022
1ecabae
[skip-ci] Delete StateGraphs as they lead to problems with OpenModelica.
martinkremer Oct 13, 2022
7939886
add each and fix units for Window examples in ROM [skip-ci]
hannah-kruetzfeldt Oct 13, 2022
3e4e74b
Fix errors in OM by following the IBPSA changes and removing multipor…
Oct 13, 2022
11262a8
Add each for OM compatibility in ROM [skip-ci]
hannah-kruetzfeldt Oct 13, 2022
b604e6e
Merge remote-tracking branch 'origin/Issue1349_reducedorder_fails_in_…
hannah-kruetzfeldt Oct 13, 2022
3d102ed
add each [skip-ci]
hannah-kruetzfeldt Oct 13, 2022
ef42919
Merge branch 'openModelicaProject' into issue1368_PumpPolynomialBasedOM
KremerMartin Oct 13, 2022
103434f
Merge pull request #1374 from RWTH-EBC/issue1368_PumpPolynomialBasedOM
KremerMartin Oct 13, 2022
b04a4bf
Merge branch 'openModelicaProject' into issue1346_HydraulicModulesOM
KremerMartin Oct 13, 2022
da7782b
Add review changes, increase version number
Oct 13, 2022
279f41d
git commit -m "ci_update_ref
martinkremer Oct 13, 2022
3f4a36b
Merge branch 'openModelicaProject' into issue1352_DHC
DaJansenGit Oct 13, 2022
6f4e241
Merge pull request #1376 from RWTH-EBC/issue1352_DHC
FWuellhorst Oct 13, 2022
4f47965
revert AHU changes [skip-ci]
hannah-kruetzfeldt Oct 13, 2022
9b15d83
Delete Citavi invasion [skip-ci]
hannah-kruetzfeldt Oct 13, 2022
5822534
Merge pull request #1377 from RWTH-EBC/Issue1349_reducedorder_fails_i…
hannah-kruetzfeldt Oct 13, 2022
625ecd8
Merge branch 'development' into openModelicaProject
FWuellhorst Oct 13, 2022
77d3013
Merge branch 'development' into openModelicaProject
LauraMaier Oct 13, 2022
87e32cb
Automatic push of CI with updated or new regression reference files.P…
ebc-aixlib-bot Oct 13, 2022
9eb42ba
pretty-indent and ci_update_ref
Oct 14, 2022
17142b2
Automatic push of CI with updated or new regression reference files.P…
ebc-aixlib-bot Oct 14, 2022
736ec14
really update ref: ci_update_ref
Oct 14, 2022
30ea1a9
Merge branch 'issue1346_HydraulicModulesOM' of https://github.com/RWT…
Oct 14, 2022
aa1d0a1
Merge branch 'openModelicaProject' into issue1346_HydraulicModulesOM
KremerMartin Oct 14, 2022
7167b4d
Merge pull request #1359 from RWTH-EBC/issue1346_HydraulicModulesOM
KremerMartin Oct 14, 2022
bf89f56
Apply review from lma ci_update_ref
Oct 14, 2022
4d0f339
Merge branch 'openModelicaProject' of https://github.com/RWTH-EBC/Aix…
Oct 14, 2022
4d0fa51
Automatic push of CI with new regression reference files.Please pull …
ebc-aixlib-bot Oct 14, 2022
2dd878b
Revert IBPSA changes
Oct 14, 2022
0094380
Merge branch 'openModelicaProject' of https://github.com/RWTH-EBC/Aix…
Oct 14, 2022
1c986a7
[skip-ci] Change Init for mass dynamics to steady state to fit to ene…
martinkremer Oct 14, 2022
33c1dac
[skip-ci] Add ´Tsteam_intern´ interface to avoid warning with usage o…
martinkremer Oct 14, 2022
02869b0
[skip-ci] Change ´gain´-block to ´product´-Block with ´realExpression…
martinkremer Oct 14, 2022
7119209
[skip-ci] Changes initilization of massDynamics to steady-state
martinkremer Oct 14, 2022
8ef7d67
[skip-ci] Add boolean input for ´onSet´ in pump-bus to avoid mismatch…
martinkremer Oct 14, 2022
bbe22c8
Delete unneccessary constant definition, directly using existing cons…
martinkremer Oct 24, 2022
9af25ff
Revert changes causing the regression test to fail. Only apply scalar…
Nov 11, 2022
0514300
only apply scalars for real
Nov 11, 2022
25f0270
Merge branch 'development' into openModelicaProject
FWuellhorst Nov 11, 2022
88a4f83
Merge pull request #1379 from RWTH-EBC/issue1345_ModularAHUOpenModelica
KremerMartin Nov 14, 2022
a311c79
chore: review from lma
Dec 6, 2022
3959215
fix path and annotation
Dec 6, 2022
fe8dbd6
Revert lines, add revisions
Dec 6, 2022
0e13ef6
Merge branch 'development' into openModelicaProject
Dec 6, 2022
d89a2f3
Merge branch 'development' into openModelicaProject
FWuellhorst Jan 16, 2023
34b4e87
Update DeviceDrivers to 2.1.1 to avoid warnings
Jan 16, 2023
2636a2a
Merge branch 'development' into openModelicaProject
FWuellhorst Feb 8, 2023
1f815fc
Add review
Feb 8, 2023
fae8e8d
Adjust revision based on review
Feb 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public
extent={{10,10},{-10,-10}},
rotation=180,
origin={-90,50})));
Modelica.Blocks.Math.Gain gain(k=cp_default)
Modelica.Blocks.Math.Gain gain(k(unit="J/(kg.K)")=cp_default, y(unit="J/(kg.K)"))
annotation (Placement(transformation(extent={{-32,40},{-12,60}})));
Modelica.Blocks.Math.Division hea2MasFlo annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public
extent={{10,10},{-10,-10}},
rotation=180,
origin={-90,46})));
Modelica.Blocks.Math.Gain gain(k=cp_default)
Modelica.Blocks.Math.Gain gain(k(unit="J/(kg.K)")=cp_default, y(unit="J/(kg.K)"))
annotation (Placement(transformation(extent={{-26,54},{-6,74}})));
Modelica.Blocks.Math.Division hea2MasFlo annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public
extent={{10,10},{-10,-10}},
rotation=180,
origin={-90,46})));
Modelica.Blocks.Math.Gain gain(k=cp_default)
Modelica.Blocks.Math.Gain gain(k(unit="J/(kg.K)")=cp_default, y(unit="J/(kg.K)"))
annotation (Placement(transformation(extent={{-26,54},{-6,74}})));
Modelica.Blocks.Math.Division hea2MasFlo annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public
annotation (Placement(transformation(extent={{-10,-10},{10,10}},
rotation=0,
origin={80,0})));
Modelica.Blocks.Math.Gain gain(k=cp_default)
Modelica.Blocks.Math.Gain gain(k(unit="J/(kg.K)")=cp_default, y(unit="J/(kg.K)"))
annotation (Placement(transformation(extent={{-40,104},{-20,124}})));
Modelica.Blocks.Math.Division hea2MasFlo annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
Expand Down
98 changes: 39 additions & 59 deletions AixLib/Fluid/DistrictHeatingCooling/Pipes/DHCPipe.mo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
within AixLib.Fluid.DistrictHeatingCooling.Pipes;
model DHCPipe "Generic pipe model for DHC applications"
extends AixLib.Fluid.Interfaces.PartialTwoPortVector(show_T=true);
extends AixLib.Fluid.Interfaces.PartialTwoPortInterface(show_T=true);

FWuellhorst marked this conversation as resolved.
Show resolved Hide resolved
parameter Boolean use_zeta=false
"= true HydraulicResistance is implemented, zeta value has to be given next"
Expand Down Expand Up @@ -124,12 +124,15 @@ model DHCPipe "Generic pipe model for DHC applications"
"Heat transfer to or from surroundings (heat loss from pipe results in a positive heat flow)"
annotation (Placement(transformation(extent={{-10,90},{10,110}})));

replaceable AixLib.Fluid.FixedResistances.BaseClasses.PlugFlowCore pipCor(
replaceable AixLib.Fluid.FixedResistances.PlugFlowPipe floPip(
redeclare final package Medium = Medium,
final dh=dh,
final v_nominal=v_nominal,
final length=length,
final C=C,
final dIns=dIns,
final kIns=kIns,
final cPip=cPip,
final rhoPip=rhoPip,
final R=R,
final m_flow_small=m_flow_small,
final m_flow_nominal=m_flow_nominal,
Expand All @@ -144,27 +147,7 @@ model DHCPipe "Generic pipe model for DHC applications"
final roughness=roughness,
final allowFlowReversal=allowFlowReversal,
final homotopyInitialization=homotopyInitialization,
final linearized=linearized) constrainedby Interfaces.PartialTwoPort(
redeclare package Medium = Medium,
dh=dh,
v_nominal=v_nominal,
length=length,
C=C,
R=R,
m_flow_small=m_flow_small,
m_flow_nominal=m_flow_nominal,
T_start_in=T_start_in,
T_start_out=T_start_out,
m_flow_start=m_flow_start,
initDelay=initDelay,
from_dp=from_dp,
fac=if not use_zeta then fac else 1.0,
ReC=ReC,
thickness=thickness,
roughness=roughness,
allowFlowReversal=allowFlowReversal,
homotopyInitialization=homotopyInitialization,
linearized=linearized) "Describing the pipe behavior" annotation (choices(
final linearized=linearized) constrainedby Interfaces.PartialTwoPort "Describing the pipe behavior" annotation (choices(
choice(redeclare
AixLib.Fluid.DistrictHeatingCooling.Pipes.BaseClassesStatic.StaticCore
pipCor "Static core"), choice(redeclare
Expand All @@ -181,7 +164,7 @@ model DHCPipe "Generic pipe model for DHC applications"
redeclare final package Medium = Medium,
final m_flow_nominal=m_flow_nominal,
FWuellhorst marked this conversation as resolved.
Show resolved Hide resolved
final V=if rho_default > 500 then VEqu else VEqu/1000,
final nPorts=nPorts + 1,
final nPorts=2,
final T_start=T_start_out,
final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
final mSenFac = if rho_default > 500 then 1 else 10)
Expand Down Expand Up @@ -220,7 +203,26 @@ model DHCPipe "Generic pipe model for DHC applications"
T0=283.15) if use_soil
annotation (Placement(transformation(extent={{-10,72},{10,92}})));


FixedResistances.HydraulicResistance hydRes(
diameter=dh,
m_flow_nominal=m_flow_nominal,
redeclare package Medium = Medium,
zeta=sum_zetas,
allowFlowReversal=allowFlowReversal,
from_dp=from_dp,
homotopyInitialization=homotopyInitialization,
linearized=linearized,
m_flow_start=m_flow_start) if use_zeta
annotation (Placement(transformation(extent={{-60,10},{-40,30}})));
Modelica.Thermal.HeatTransfer.Components.ThermalCollector thePasThr(final m=1)
if not use_soil "Thermal pass through if there is no soil activated"
annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=180,
origin={-16,54})));
Interfaces.PassThroughMedium pasThrMed(redeclare package Medium = Medium)
if not use_zeta
annotation (Placement(transformation(extent={{-60,-30},{-40,-10}})));
protected
parameter Modelica.Units.SI.HeatCapacity CPip=length*((dh + 2*thickness)^2 -
dh^2)*Modelica.Constants.pi/4*cPip*rhoPip "Heat capacity of pipe wall";
Expand Down Expand Up @@ -255,44 +257,22 @@ protected
Modelica.Units.SI.Heat Q_gai(start=0.0, fixed=true)
"Integrated heat gain of the pipe";

public
FixedResistances.HydraulicResistance hydRes(
diameter=dh,
m_flow_nominal=m_flow_nominal,
redeclare package Medium = Medium,
zeta=sum_zetas,
allowFlowReversal=allowFlowReversal,
from_dp=from_dp,
homotopyInitialization=homotopyInitialization,
linearized=linearized,
m_flow_start=m_flow_start) if use_zeta
annotation (Placement(transformation(extent={{-60,10},{-40,30}})));
Modelica.Thermal.HeatTransfer.Components.ThermalCollector thePasThr(final m=1)
if not use_soil "Thermal pass through if there is no soil activated"
annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=180,
origin={-16,54})));
Interfaces.PassThroughMedium pasThrMed(redeclare package Medium = Medium)
if not use_zeta
annotation (Placement(transformation(extent={{-60,-30},{-40,-10}})));

equation
//calculation of the flow velocity of water in the pipes
v_med = (4 * port_a.m_flow) / (Modelica.Constants.pi * rho_default * dh * dh);

//calculation of heat losses and heat gains of pipe
der(Q_los) = min(0, pipCor.heatPort.Q_flow);
der(Q_gai) = max(0, pipCor.heatPort.Q_flow);
der(Q_los) = min(0,floPip.heatPort.Q_flow);
der(Q_gai) = max(0,floPip.heatPort.Q_flow);

for i in 1:nPorts loop
connect(vol.ports[i + 1], ports_b[i])
annotation (Line(points={{70,20},{72,20},{72,6},{72,0},{100,0}},
connect(vol.ports[2], port_b)
annotation (Line(points={{71,20},{72,20},{72,6},{72,0},{100,0}},
color={0,127,255}));
end for;

connect(pipCor.port_b, vol.ports[1])
annotation (Line(points={{10,0},{70,0},{70,20}}, color={0,127,255}));
connect(pipCor.heatPort, cylHeaTra1.port_a)
connect(floPip.port_b, vol.ports[1])
annotation (Line(points={{10,0},{69,0},{69,20}}, color={0,127,255}));
connect(floPip.heatPort, cylHeaTra1.port_a)
annotation (Line(points={{0,10},{0,30}}, color={191,0,0},
pattern=LinePattern.Dash));
connect(cylHeaTra1.port_b, cylHeaTra2.port_a)
Expand All @@ -304,7 +284,7 @@ equation
connect(cylHeaTra3.port_b, heatPort)
annotation (Line(points={{0,90.8},{0,90.8},{0,100}}, color={191,0,0},
pattern=LinePattern.Dash));
connect(pipCor.heatPort, thePasThr.port_a[1]) annotation (Line(points={{0,10},
connect(floPip.heatPort, thePasThr.port_a[1]) annotation (Line(points={{0,10},
{0,20},{-16,20},{-16,44}}, color={191,0,0},
pattern=LinePattern.Dash));
connect(thePasThr.port_b, heatPort) annotation (Line(points={{-16,64},{-16,94},
Expand All @@ -314,7 +294,7 @@ equation
points={{-100,0},{-80,0},{-80,20},{-60,20}},
color={0,127,255},
pattern=LinePattern.Dash));
connect(hydRes.port_b, pipCor.port_a) annotation (Line(
connect(hydRes.port_b,floPip. port_a) annotation (Line(
points={{-40,20},{-20,20},{-20,0},{-10,0}},
color={0,127,255},
pattern=LinePattern.Dash));
Expand All @@ -324,7 +304,7 @@ equation
points={{-100,0},{-80,0},{-80,-20},{-60,-20}},
color={0,127,255},
pattern=LinePattern.Dash));
connect(pasThrMed.port_b, pipCor.port_a) annotation (Line(
connect(pasThrMed.port_b,floPip. port_a) annotation (Line(
points={{-40,-20},{-20,-20},{-20,0},{-10,0}},
color={0,127,255},
pattern=LinePattern.Dash));
Expand Down
18 changes: 5 additions & 13 deletions AixLib/Fluid/DistrictHeatingCooling/Pipes/Examples/DHCPipe.mo
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ model DHCPipe "Simple example of DHCPipe and its four different modes"
nPorts=1,
p(displayUnit="Pa") = 101325) "Pressure boundary condition"
annotation (Placement(transformation(extent={{72,40},{52,60}})));
AixLib.Fluid.DistrictHeatingCooling.Pipes.DHCPipe pip(
AixLib.Fluid.DistrictHeatingCooling.Pipes.DHCPipe pip(
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
redeclare BaseClassesStatic.StaticCore pipCor "Static core",
nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
Expand Down Expand Up @@ -69,8 +67,6 @@ model DHCPipe "Simple example of DHCPipe and its four different modes"
AixLib.Fluid.DistrictHeatingCooling.Pipes.DHCPipe pip1(
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
redeclare FixedResistances.BaseClasses.PlugFlowCore pipCor "PlugFlow core",
nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
Expand Down Expand Up @@ -117,8 +113,6 @@ model DHCPipe "Simple example of DHCPipe and its four different modes"
redeclare package Medium = Medium,
use_soil=true,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
redeclare FixedResistances.BaseClasses.PlugFlowCore pipCor "PlugFlow core",
nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
Expand Down Expand Up @@ -165,8 +159,6 @@ model DHCPipe "Simple example of DHCPipe and its four different modes"
redeclare package Medium = Medium,
sum_zetas=2.5,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
redeclare FixedResistances.BaseClasses.PlugFlowCore pipCor "PlugFlow core",
nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
Expand Down Expand Up @@ -203,7 +195,7 @@ equation
connect(Tin.y, sou.T_in)
annotation (Line(points={{-79,54},{-72,54}},
color={0,0,127}));
connect(pip.ports_b[1], senTemOut.port_a)
connect(pip.port_b, senTemOut.port_a)
annotation (Line(points={{10,50},{20,50}},
color={0,127,255}));
connect(senTemOut.port_b, sin.ports[1])
Expand All @@ -219,7 +211,7 @@ equation
annotation (Line(points={{-80,90},{0,90},{0,20}}, color={191,0,0}));
connect(Tin1.y, sou1.T_in)
annotation (Line(points={{-79,14},{-72,14}}, color={0,0,127}));
connect(pip1.ports_b[1], senTemOut1.port_a)
connect(pip1.port_b, senTemOut1.port_a)
annotation (Line(points={{10,10},{20,10}}, color={0,127,255}));
connect(senTemOut1.port_b, sin1.ports[1])
annotation (Line(points={{40,10},{52,10}}, color={0,127,255}));
Expand All @@ -231,7 +223,7 @@ equation
annotation (Line(points={{-80,90},{0,90},{0,-22}}, color={191,0,0}));
connect(Tin2.y, sou2.T_in)
annotation (Line(points={{-79,-28},{-72,-28}}, color={0,0,127}));
connect(pip2.ports_b[1], senTemOut2.port_a)
connect(pip2.port_b, senTemOut2.port_a)
annotation (Line(points={{10,-32},{20,-32}}, color={0,127,255}));
connect(senTemOut2.port_b, sin2.ports[1])
annotation (Line(points={{40,-32},{52,-32}}, color={0,127,255}));
Expand All @@ -243,7 +235,7 @@ equation
annotation (Line(points={{-80,90},{0,90},{0,-60}}, color={191,0,0}));
connect(Tin3.y, sou3.T_in)
annotation (Line(points={{-79,-66},{-72,-66}}, color={0,0,127}));
connect(pip3.ports_b[1], senTemOut3.port_a)
connect(pip3.port_b, senTemOut3.port_a)
annotation (Line(points={{10,-70},{20,-70}}, color={0,127,255}));
connect(senTemOut3.port_b, sin3.ports[1])
annotation (Line(points={{40,-70},{52,-70}}, color={0,127,255}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ model PlugFlowPipeEmbedded "Simple example of PlugFlowPipeEmbedded"
pip(
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyStateInitial,
nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
Expand Down Expand Up @@ -60,7 +59,7 @@ equation
color={191,0,0}));
connect(Tin.y, sou.T_in)
annotation (Line(points={{-71,4},{-62,4}}, color={0,0,127}));
connect(pip.ports_b[1], senTemOut.port_a)
connect(pip.port_b, senTemOut.port_a)
annotation (Line(points={{20,0},{30,0}}, color={0,127,255}));
connect(senTemOut.port_b, sin.ports[1])
annotation (Line(points={{50,0},{62,0}}, color={0,127,255}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ model PlugFlowPipeZeta "Simple example of PlugFlowPipe"
annotation (Placement(transformation(extent={{82,-10},{62,10}})));
AixLib.Fluid.DistrictHeatingCooling.Pipes.PlugFlowPipeZeta pip(
redeclare package Medium = Medium,
nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
Expand Down Expand Up @@ -57,7 +56,7 @@ equation
annotation (Line(points={{-20,70},{10,70},{10,10}}, color={191,0,0}));
connect(Tin.y, sou.T_in)
annotation (Line(points={{-71,4},{-62,4}}, color={0,0,127}));
connect(pip.ports_b[1], senTemOut.port_a)
connect(pip.port_b, senTemOut.port_a)
annotation (Line(points={{20,0},{30,0}}, color={0,127,255}));
connect(senTemOut.port_b, sin.ports[1])
annotation (Line(points={{50,0},{62,0}}, color={0,127,255}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ model StaticPipe "Simple example of StaticPipe"
annotation (Placement(transformation(extent={{82,-10},{62,10}})));
AixLib.Fluid.DistrictHeatingCooling.Pipes.StaticPipe pip(
redeclare package Medium = Medium,
nPorts=1,
dh=0.1,
length=100,
dIns=0.05,
Expand Down Expand Up @@ -57,7 +56,7 @@ equation
annotation (Line(points={{-20,70},{10,70},{10,10}}, color={191,0,0}));
connect(Tin.y, sou.T_in)
annotation (Line(points={{-71,4},{-62,4}}, color={0,0,127}));
connect(pip.ports_b[1], senTemOut.port_a)
connect(pip.port_b, senTemOut.port_a)
annotation (Line(points={{20,0},{30,0}}, color={0,127,255}));
connect(senTemOut.port_b, sin.ports[1])
annotation (Line(points={{50,0},{62,0}}, color={0,127,255}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
model PlugFlowPipeEmbedded
"Embedded pipe model using spatialDistribution for temperature delay"

extends AixLib.Fluid.Interfaces.PartialTwoPortVector(show_T=true);
extends AixLib.Fluid.Interfaces.PartialTwoPortInterface(show_T=true);

parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial
"Type of energy balance: dynamic (3 initialization options) or steady state"
Expand Down Expand Up @@ -61,11 +61,11 @@ model PlugFlowPipeEmbedded
parameter Modelica.Units.SI.Length thickness=0.0035 "Pipe wall thickness"
annotation (Dialog(group="Material"));

parameter Modelica.Units.SI.Temperature T_start_in(start=Medium.T_default) =
parameter Modelica.Units.SI.Temperature T_start_in(start=Medium.T_default)=
Medium.T_default "Initialization temperature at pipe inlet"
annotation (Dialog(tab="Initialization"));
parameter Modelica.Units.SI.Temperature T_start_out(start=Medium.T_default)
= T_start_in "Initialization temperature at pipe outlet"
parameter Modelica.Units.SI.Temperature T_start_out(start=Medium.T_default)=
T_start_in "Initialization temperature at pipe outlet"
annotation (Dialog(tab="Initialization"));
FWuellhorst marked this conversation as resolved.
Show resolved Hide resolved
parameter Boolean initDelay(start=false) = false
"Initialize delay for a constant mass flow rate if true, otherwise start from 0"
Expand Down Expand Up @@ -135,7 +135,6 @@ model PlugFlowPipeEmbedded
final R=R,
final fac=fac,
final sum_zetas=sum_zetas,
nPorts=nPorts,
final use_zeta=true)
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));

Expand Down Expand Up @@ -215,7 +214,7 @@ equation
annotation (Line(points={{0,90.8},{0,104}}, color={191,0,0}));
connect(port_a, plugFlowPipeZeta.port_a)
annotation (Line(points={{-100,0},{-10,0}}, color={0,127,255}));
connect(plugFlowPipeZeta.ports_b, ports_b) annotation (Line(points={{10,0},{56,
connect(plugFlowPipeZeta.port_b, port_b) annotation (Line(points={{10,0},{56,
0},{56,0},{100,0}}, color={0,127,255}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
Rectangle(
Expand Down