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

initial implementation of BoilerGeneric and Example #1443

Open
wants to merge 51 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
02a7843
initial implementation of BoilerGeneric and Example (by Moritz Zuschlag)
DaJansenGit Jun 6, 2023
0fee6f0
add first implementation of ModularBoiler and ModularConsumer
DaJansenGit Jun 6, 2023
27ca717
Update description of BoilerGeneric
mz2101 Jun 6, 2023
94b43d9
Merge remote-tracking branch 'origin/issue1147_GenericBoiler' into is…
mz2101 Jun 6, 2023
3012e81
Update with new SDF
mz2101 Jun 9, 2023
c5ad040
Merge branch 'development' into issue1147_GenericBoiler
DaJansenGit Jan 23, 2024
19cf460
update genericBoiler model
DaJansenGit Jan 23, 2024
703662b
update generic boiler and examples
DaJansenGit Jan 23, 2024
7c9d7f2
update controls for boilder module
DaJansenGit Jan 23, 2024
d9683ef
remove obsolete models
DaJansenGit Jan 23, 2024
9e50313
model -> sub dirs for modules package
DaJansenGit Jan 23, 2024
418a62c
cleanup modular models
DaJansenGit Jul 29, 2024
f7828da
update modular energy systems package and examples, add some docs
DaJansenGit Jul 29, 2024
d7b9b00
merge main into branch
DaJansenGit Jul 29, 2024
9fec9b4
update package order and add mos script for ref results
DaJansenGit Jul 29, 2024
2b15b8e
update simulate_and_plot script
DaJansenGit Jul 29, 2024
7d58a88
add tolerance for boilerGeneric
DaJansenGit Jul 29, 2024
eddc6a7
CI message from ebc-aixlib-bot. Automatic push of CI with new regress…
DaJansenGit Jul 29, 2024
8fa1284
update sensor names, add conversion script and bump aixlib version
DaJansenGit Jul 29, 2024
3a5e0b5
add simulate and plot scripts for modularenergysystem examples
DaJansenGit Jul 29, 2024
16d0600
add tolerances
DaJansenGit Jul 29, 2024
937f8f4
CI message from ebc-aixlib-bot. Automatic push of CI with new regress…
DaJansenGit Jul 29, 2024
b727361
reset GenericAHU to main branch status
DaJansenGit Jul 29, 2024
fc1728a
Merge branch 'issue1147_GenericBoiler' of https://github.com/RWTH-EBC…
DaJansenGit Jul 29, 2024
4684156
reset GenericAHU to main branch status
DaJansenGit Jul 29, 2024
476dace
reset CTRAHUBasic to main branch status
DaJansenGit Jul 29, 2024
bc101de
rm old package structure
DaJansenGit Jul 29, 2024
a653aa5
rm dymolalic file and obsolete Interfaces package
DaJansenGit Jul 29, 2024
4b4224e
rm obsolete example package
DaJansenGit Jul 29, 2024
f1b82a3
fix initial conditions and update sensor name in regression scripts
DaJansenGit Jul 29, 2024
0e8cd19
delete outdated ref results and update sensor names in existing
DaJansenGit Jul 30, 2024
516b3f6
CI message from ebc-aixlib-bot. Automatic push of CI with new regress…
DaJansenGit Jul 30, 2024
43d000b
delete outdated ref results and update sensor names in existing
DaJansenGit Jul 30, 2024
a93e9d4
CI message from ebc-aixlib-bot. Automatic push of CI with new regress…
DaJansenGit Jul 30, 2024
81531f9
update docs and naming
DaJansenGit Jul 30, 2024
7e60a40
update docs and naming
DaJansenGit Jul 30, 2024
21d1785
Merge branch 'issue1147_GenericBoiler' of https://github.com/RWTH-EBC…
DaJansenGit Jul 30, 2024
100b1a5
remove obsolete sdf file for generic boiler #1443
DaJansenGit Dec 16, 2024
f02726f
adjust short docs for design and off-design operation #1443
DaJansenGit Dec 16, 2024
07db990
adjust fonts and docs #1443
DaJansenGit Dec 16, 2024
1f3b095
add full names for components #1443
DaJansenGit Dec 16, 2024
6c5efc5
fix path for simulate and plot script #1433
DaJansenGit Dec 16, 2024
ebcd83b
use old ref result (new was the same, but diff in format) #1443
DaJansenGit Dec 16, 2024
52b7e9d
rm oboslete heatingCurve model container and adjust warnings #1443
DaJansenGit Dec 16, 2024
479ad5a
clean package order and fix paths #1443
DaJansenGit Dec 16, 2024
8fb8bc0
fix name
DaJansenGit Dec 16, 2024
70b9fe0
Merge branch 'refs/heads/main' into issue1147_GenericBoiler
DaJansenGit Dec 16, 2024
1dc9550
rename ModularEnergySystems to ScalableGenerationModules #1443
DaJansenGit Dec 16, 2024
dbe0265
rename folder ScalableGenerationModules #1443
DaJansenGit Dec 16, 2024
500141d
update docs for ScalableGenerationModules #1443
DaJansenGit Dec 16, 2024
735e530
add html corrections #1443
DaJansenGit Dec 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,4 @@ HTML_correct_log.txt
HTML_error_log.txt
#Ignore Dymola License log
Log_NO_DYM_STANDARD_LIC_AVAILABLE.txt
dymolatemp.lic
9 changes: 4 additions & 5 deletions AixLib/Controls/Interfaces/BoilerControlBus.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ expandable connector BoilerControlBus
"Standard data bus with boiler information"
extends Modelica.Icons.SignalBus;

Boolean isOn "Switches Controller on and off";
Modelica.Units.SI.Temperature TAmbient "Ambient air temperature";
Boolean switchToNightMode "Switches the boiler to night mode";
Modelica.Units.SI.Power chemicalEnergyFlowRate
"Flow of primary (chemical) energy into boiler";


annotation (
Icon(coordinateSystem(preserveAspectRatio=false)),
Expand All @@ -17,6 +13,9 @@ Boolean switchToNightMode "Switches the boiler to night mode";
points that appear in every boiler.
</p>
<ul>
<li>June 06, 2023, by David Jansen:<br/>
Remove variables from expandable connector.
</li>
<li>March 31, 2017, by Marc Baranski:<br/>
First implementation (see <a href=
\"https://github.com/RWTH-EBC/AixLib/issues/371\">issue 371</a>).
Expand Down
180 changes: 180 additions & 0 deletions AixLib/Fluid/BoilerCHP/BaseClasses/DesignOperation.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
within AixLib.Fluid.BoilerCHP.BaseClasses;
model DesignOperation "Calculation of operation for nominal/design conditions"

parameter Modelica.Units.SI.HeatFlowRate Q_flow_nominal=50000
"Design thermal capacity";

parameter Modelica.Units.SI.Temperature TSup_nominal=273.15 + 80
"Design supply temperature" annotation (Dialog(group="Design"),Evaluate=false);

parameter Modelica.Units.SI.Temperature TRet_nominal=273.15 + 60
"Design return temperature" annotation (Dialog(group="Design"),Evaluate=false);



Modelica.Blocks.Sources.RealExpression ReturnTemp(y=TRet_nominal)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retTem?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wont check further naming convention, please adhere to the errors in the .txt

"Nominal return temperature"
annotation (Placement(transformation(extent={{-100,6},{-54,30}})));

Modelica.Blocks.Sources.RealExpression y_fullLoad(y=1) "realtive power"
annotation (Placement(transformation(extent={{-100,-52},{-54,-28}})));

Modelica.Blocks.Sources.RealExpression conductance(y=0.0465*Q_flow_nominal/
1000 + 4.9891) "Thermal conductance"
annotation (Placement(transformation(extent={{-98,54},{-52,78}})));
Modelica.Blocks.Sources.RealExpression NomCap(y=Q_flow_nominal)
"Nominal thermal capacity"
annotation (Placement(transformation(extent={{-100,28},{-54,52}})));
Modelica.Blocks.Math.Division division
annotation (Placement(transformation(extent={{58,48},{78,68}})));
Modelica.Blocks.Interfaces.RealOutput NomFueDem(quantity="Power", final unit=
"W") "Nominal fuel demand" annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=-90,
origin={0,-110}), iconTransformation(
extent={{-10,-10},{10,10}},
rotation=270,
origin={0,-110})));
Modelica.Blocks.Routing.Multiplex4 multiplex4
annotation (Placement(transformation(extent={{18,-16},{38,4}})));
SDF.NDTable boilerEffciency(
nin=4,
readFromFile=true,
filename=ModelicaServices.ExternalReferences.loadResource(
"modelica://AixLib/Resources/Data/Fluid/BoilerCHP/BaseClasses/GenericBoiler/Boiler_Generic_Characteristic_Chart.sdf"),
dataset="/Characteristic chart",
dataUnit="-",
scaleUnits={"K","K","-","-"},
interpMethod=SDF.Types.InterpolationMethod.Linear,
extrapMethod=SDF.Types.ExtrapolationMethod.Hold)
"Characteristic chart of adiabatic boiler efficiency"
annotation (Placement(transformation(extent={{54,-16},{74,4}})));

Modelica.Blocks.Math.Add add
annotation (Placement(transformation(extent={{20,54},{40,74}})));

Modelica.Blocks.Math.Add add1(k1=-1)
annotation (Placement(transformation(extent={{-36,-14},{-16,6}})));
Modelica.Blocks.Sources.RealExpression SupplyTemp(y=TSup_nominal)
"Nominal supply temperature"
annotation (Placement(transformation(extent={{-100,-22},{-54,2}})));
Modelica.Blocks.Sources.RealExpression DeltaT_amb(y=TSup_nominal - 293.15)
"temperature difference supply-ambient"
annotation (Placement(transformation(extent={{-100,80},{-54,104}})));
Modelica.Blocks.Math.Product losses "Nominal boiler losses"
annotation (Placement(transformation(extent={{-32,76},{-12,96}})));
equation

connect(multiplex4.y, boilerEffciency.u)
annotation (Line(points={{39,-6},{52,-6}}, color={0,0,127}));
connect(boilerEffciency.y, division.u2) annotation (Line(points={{75,-6},{80,-6},
{80,22},{50,22},{50,52},{56,52}}, color={0,0,127}));
connect(y_fullLoad.y, multiplex4.u3[1]) annotation (Line(points={{-51.7,-40},
{-8,-40},{-8,-9},{16,-9}}, color={0,0,127}));
connect(NomCap.y, add.u2) annotation (Line(points={{-51.7,40},{-40,40},{-40,
58},{18,58}},
color={0,0,127}));
connect(add.y, division.u1) annotation (Line(points={{41,64},{56,64}},
color={0,0,127}));
connect(division.y, NomFueDem) annotation (Line(points={{79,58},{92,58},{92,
-80},{0,-80},{0,-110}}, color={0,0,127}));
connect(ReturnTemp.y, multiplex4.u1[1]) annotation (Line(points={{-51.7,18},{
-10,18},{-10,3},{16,3}}, color={0,0,127}));
connect(SupplyTemp.y, add1.u2) annotation (Line(points={{-51.7,-10},{-38,-10}},
color={0,0,127}));
connect(conductance.y, losses.u2) annotation (Line(points={{-49.7,66},{-40,66},
{-40,80},{-34,80}}, color={0,0,127}));
connect(DeltaT_amb.y, losses.u1)
annotation (Line(points={{-51.7,92},{-34,92}}, color={0,0,127}));
connect(losses.y, add.u1) annotation (Line(points={{-11,86},{0,86},{0,70},{18,
70}}, color={0,0,127}));
connect(y_fullLoad.y, multiplex4.u4[1]) annotation (Line(points={{-51.7,-40},
{-8,-40},{-8,-15},{16,-15}}, color={0,0,127}));
connect(add1.y, multiplex4.u2[1])
annotation (Line(points={{-15,-4},{16,-4},{16,-3}}, color={0,0,127}));
connect(ReturnTemp.y, add1.u1) annotation (Line(points={{-51.7,18},{-46,18},{
-46,2},{-38,2}}, color={0,0,127}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
Rectangle(
extent={{-100,100},{100,-100}},
lineColor={0,0,0},
fillPattern=FillPattern.Solid,
fillColor={255,255,255}),
Rectangle(
extent={{-82,84},{82,-88}},
lineColor={0,0,0},
lineThickness=1,
fillColor={199,199,199},
fillPattern=FillPattern.Solid),
Line(
points={{-72,-72},{58,-72}},
color={0,0,0},
thickness=1),
Line(
points={{-72,-72},{-72,58}},
color={0,0,0},
thickness=1),
Line(
points={{-72,-72},{20,-12}},
color={0,0,0},
thickness=1),
Polygon(
points={{58,-68},{64,-72},{58,-76},{58,-68}},
lineColor={0,0,0},
lineThickness=1,
fillColor={0,0,0},
fillPattern=FillPattern.Solid),
Polygon(
points={{-5,4},{3,4},{-1,-2},{-5,4}},
lineColor={0,0,0},
lineThickness=1,
fillColor={0,0,0},
fillPattern=FillPattern.Solid,
origin={-73,60},
rotation=180),
Polygon(
points={{16,-10},{22,-10},{20,-16},{16,-10}},
lineColor={0,0,0},
lineThickness=1,
fillColor={0,0,0},
fillPattern=FillPattern.Solid),
Text(
extent={{-42,74},{44,28}},
textColor={0,0,0},
fontName="Arial Black",
textString="Design
")}), Diagram(
coordinateSystem(preserveAspectRatio=false)),
Documentation(info="<html><p>
This model calculates the nominal fuel power (W) for nominal
conditions.
</p>
<p>
The nominal adiabatic efficiency (reference is the higher heating
value (includes vaporization enthalpy)) comes from the SDF and
depends on:
</p>
<ul>
<li>Nominal return temperature (TRet_nominal)
</li>
<li>Nominale temperature difference (TSup_nominal-TRet_nominal)
</li>
<li>Nominal relative temperature difference (1)
</li>
<li>Nominal relative water mass flow (1)
</li>
</ul>
<p>
<br/>
Further assumptions are taken into account for nominal losses:
Thermal conductance is described by a fit <span style=
\"font-family: Calibri; color: #595959;\">0.0465 * QNom/1000 +
4.9891</span> based on manufacturere data at a temperature difference
of 50 K to ambient
</p>
</html>", revisions="<html><ul>
<li>June, 2023 by Moritz Zuschlag & David Jansen
</li>
</ul>
</html>"));
end DesignOperation;
177 changes: 177 additions & 0 deletions AixLib/Fluid/BoilerCHP/BaseClasses/OffDesignOperation.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
within AixLib.Fluid.BoilerCHP.BaseClasses;
model OffDesignOperation "Calculation of operation for non-nominal/off-design conditions"

parameter Modelica.Units.SI.HeatFlowRate Q_flow_nominal=50000
"Design thermal capacity";

parameter Modelica.Units.SI.Temperature TSup_nominal=273.15 + 80
"Design supply temperature" annotation (Dialog(group="Design"),Evaluate=false);

parameter Modelica.Units.SI.Temperature TRet_nominal=273.15 + 60
"Design return temperature" annotation (Dialog(group="Design"),Evaluate=false);


replaceable package Medium=AixLib.Media.Water;

Controls.Interfaces.BoilerControlBus boilerControlBus
annotation (Placement(transformation(extent={{-8,90},{12,110}})));
Modelica.Blocks.Math.Add add2(k2=-1)
annotation (Placement(transformation(extent={{-68,-26},{-50,-8}})));
Modelica.Blocks.Math.Division devision1
annotation (Placement(transformation(extent={{-50,-64},{-30,-44}})));
Modelica.Blocks.Sources.RealExpression m_flow_nominalExp(y=m_flow_nom)
"Nominal mass flow rate"
annotation (Placement(transformation(extent={{-100,-80},{-60,-52}})));
Modelica.Blocks.Routing.Multiplex4 multiplex4
annotation (Placement(transformation(extent={{24,10},{46,32}})));
SDF.NDTable boilerEffciency(
nin=4,
readFromFile=true,
filename=ModelicaServices.ExternalReferences.loadResource(
"modelica://AixLib/Resources/Data/Fluid/BoilerCHP/BaseClasses/GenericBoiler/Boiler_Generic_Characteristic_Chart.sdf"),
dataset="/Characteristic chart",
dataUnit="-",
scaleUnits={"K","K","-","-"},
interpMethod=SDF.Types.InterpolationMethod.Linear,
extrapMethod=SDF.Types.ExtrapolationMethod.Hold)
"Characteristic chart of adiabatic efficiency"
annotation (Placement(transformation(extent={{60,12},{80,32}})));

Modelica.Blocks.Math.Division devision
annotation (Placement(transformation(extent={{-30,-30},{-12,-12}})));
Modelica.Blocks.Sources.RealExpression TRetNomExp(y=TRet_nominal)
"Nominal return temperature"
annotation (Placement(transformation(extent={{-92,18},{-46,42}})));
Modelica.Blocks.Sources.RealExpression TSupNomExp(y=TSup_nominal)
"Nominal supply temperature"
annotation (Placement(transformation(extent={{-92,-4},{-46,20}})));
Modelica.Blocks.Math.Add add1(k1=-1)
annotation (Placement(transformation(extent={{-32,14},{-12,34}})));
protected
parameter Modelica.Units.SI.MassFlowRate m_flow_nom=Q_flow_nominal/(Medium.cp_const
*(TSup_nominal - TRet_nominal));
equation

connect(boilerControlBus.m_flowMea, devision1.u1) annotation (Line(
points={{2,100},{-100,100},{-100,-48},{-52,-48}},
color={255,204,51},
thickness=0.5), Text(
string="%first",
index=-1,
extent={{-6,3},{-6,3}},
horizontalAlignment=TextAlignment.Right));
connect(m_flow_nominalExp.y, devision1.u2) annotation (Line(points={{-58,-66},
{-56,-66},{-56,-60},{-52,-60}}, color={0,0,127}));
connect(multiplex4.y, boilerEffciency.u)
annotation (Line(points={{47.1,21},{52,21},{52,22},{58,22}},
color={0,0,127}));
connect(boilerEffciency.y, boilerControlBus.Efficiency) annotation (Line(
points={{81,22},{96,22},{96,68},{2,68},{2,100}}, color={0,0,127}), Text(
string="%second",
index=1,
extent={{6,3},{6,3}},
horizontalAlignment=TextAlignment.Left));
connect(add2.y, devision.u1) annotation (Line(points={{-49.1,-17},{-36.45,-17},
{-36.45,-15.6},{-31.8,-15.6}},
color={0,0,127}));
connect(TRetNomExp.y, add1.u1)
annotation (Line(points={{-43.7,30},{-34,30}}, color={0,0,127}));
connect(TSupNomExp.y, add1.u2) annotation (Line(points={{-43.7,8},{-42,8},{
-42,18},{-34,18}}, color={0,0,127}));
connect(add1.y, devision.u2) annotation (Line(points={{-11,24},{2,24},{2,4},{
-38,4},{-38,-26.4},{-31.8,-26.4}},color={0,0,127}));
connect(add1.y, multiplex4.u2[1]) annotation (Line(points={{-11,24},{2,24},{2,
24.3},{21.8,24.3}}, color={0,0,127}));
connect(devision1.y, multiplex4.u4[1]) annotation (Line(points={{-29,-54},{14,
-54},{14,11.1},{21.8,11.1}}, color={0,0,127}));
connect(devision.y, multiplex4.u3[1]) annotation (Line(points={{-11.1,-21},{8,
-21},{8,17.7},{21.8,17.7}}, color={0,0,127}));
connect(boilerControlBus.TRetMea, add2.u2) annotation (Line(
points={{2,100},{-100,100},{-100,-22.4},{-69.8,-22.4}},
color={255,204,51},
thickness=0.5), Text(
string="%first",
index=-1,
extent={{-6,3},{-6,3}},
horizontalAlignment=TextAlignment.Right));
connect(boilerControlBus.TRetMea, multiplex4.u1[1]) annotation (Line(
points={{2,100},{2,30.9},{21.8,30.9}},
color={255,204,51},
thickness=0.5), Text(
string="%first",
index=-1,
extent={{-6,3},{-6,3}},
horizontalAlignment=TextAlignment.Right));
connect(boilerControlBus.TSupMea, add2.u1) annotation (Line(
points={{2,100},{-100,100},{-100,-11.6},{-69.8,-11.6}},
color={255,204,51},
thickness=0.5), Text(
string="%first",
index=-1,
extent={{-6,3},{-6,3}},
horizontalAlignment=TextAlignment.Right));
annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
Rectangle(
extent={{-100,100},{100,-100}},
lineColor={0,0,0},
fillPattern=FillPattern.Solid,
fillColor={255,255,255}),
Rectangle(
extent={{-78,88},{86,-84}},
lineColor={0,0,0},
lineThickness=1,
fillColor={199,199,199},
fillPattern=FillPattern.Solid),
Line(
points={{-68,-68},{62,-68}},
color={0,0,0},
thickness=1),
Line(
points={{-68,-68},{-68,62}},
color={0,0,0},
thickness=1),
Line(
points={{-68,-68},{24,-8}},
color={0,0,0},
thickness=1),
Polygon(
points={{62,-64},{68,-68},{62,-72},{62,-64}},
lineColor={0,0,0},
lineThickness=1,
fillColor={0,0,0},
fillPattern=FillPattern.Solid),
Polygon(
points={{-5,4},{3,4},{-1,-2},{-5,4}},
lineColor={0,0,0},
lineThickness=1,
fillColor={0,0,0},
fillPattern=FillPattern.Solid,
origin={-69,64},
rotation=180),
Polygon(
points={{20,-6},{26,-6},{24,-12},{20,-6}},
lineColor={0,0,0},
lineThickness=1,
fillColor={0,0,0},
fillPattern=FillPattern.Solid),
Text(
extent={{-32,76},{52,22}},
textColor={0,0,0},
fontName="Arial Black",
textString="OffDesign
")}), Diagram(
coordinateSystem(preserveAspectRatio=false)),
Documentation(info="<html>
<p><span style=\"font-family: Arial;\">This model calculates the adiabatic efficiency (reference is the higher heating value (includes vaporization enthalpy)) for an operating point from a characteristic chart in dependency on:</span></p>
<ul>
<li><span style=\"font-family: Arial;\">Nominal return temperature (TColdNom)</span></li>
<li><span style=\"font-family: Arial;\">Nominale temperature difference (TColdNom-THotNom)</span></li>
<li><span style=\"font-family: Arial;\">Nominal relative temperature difference </span></li>
<li><span style=\"font-family: Arial;\">Nominal relative water mass flow </span></li>
</ul>
</html>", revisions="<html>
<ul>
<li>June, 2023 by Moritz Zuschlag &amp; David Jansen</li>
</ul>
</html>"));
end OffDesignOperation;
Loading