Skip to content

Commit

Permalink
Merge pull request #1365 from RWTH-EBC/1343-model-for-humans-fails-in…
Browse files Browse the repository at this point in the history
…-openmodelica

1343 model for humans fails in openmodelica
  • Loading branch information
HannahRomberg committed Oct 13, 2022
2 parents 0579e83 + c684541 commit ae719c0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
within AixLib.BoundaryConditions.InternalGains.Examples.InternalGains.BaseClasses;
partial model Humans "Base class with bounday conditions for humans' examples"
extends Modelica.Icons.Example;
partial model PartialHumansExample "Base class with bounday conditions for humans' examples"
Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature varTempRoom annotation(Placement(transformation(extent={{-84,42},{-64,62}})));
Modelica.Blocks.Sources.CombiTimeTable combiTimeTable(table=[0,0; 28740,0; 28800,1; 43200,1; 43260,0; 46800,0; 46860,1; 64800,1; 64860,0; 86400,0]) annotation(Placement(transformation(extent = {{-82, -26}, {-62, -6}})));
Modelica.Blocks.Sources.Sine sine(
Expand All @@ -13,9 +12,9 @@ partial model Humans "Base class with bounday conditions for humans' examples"
Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemp(T=293.15) annotation(Placement(transformation(extent={{80,4},{60,24}})));
Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heatFlowSensorRad annotation (Placement(transformation(extent={{18,-16},{34,0}})));
Modelica.Blocks.Math.MultiSum sumQ_flows(nu=2) annotation (Placement(transformation(extent={{34,-70},{46,-58}})));
Modelica.Blocks.Interfaces.RealOutput HeatOut(final quantity="Power", final unit="W")
annotation(Placement(transformation(extent={{90,-74},{110,-54}}), iconTransformation(extent={{80,-80},{100,-60}})));
replaceable AixLib.BoundaryConditions.InternalGains.Humans.BaseClasses.PartialHuman humanIntGains(roomArea=20) constrainedby AixLib.BoundaryConditions.InternalGains.Humans.BaseClasses.PartialHuman(roomArea=20) annotation (__Dymola_choicesAllMatching=true, Placement(transformation(extent={{-16,-12},{10,14}})));
Modelica.Blocks.Interfaces.RealOutput HeatOut(quantity = "Power", unit = "W") annotation(
Placement(visible = true, iconTransformation(extent = {{80, -80}, {100, -60}}, rotation = 0)));
equation
connect(sine.y,varTempRoom. T) annotation(Line(points={{-82.6,24},{-92,24},{-92,52},{-86,52}}, color = {0, 0, 127}));
connect(heatFlowSensorConv.port_b,fixedTemp. port) annotation (Line(points={{52,19},{56,19},{56,14},{60,14}}, color={191,0,0}));
Expand All @@ -28,13 +27,14 @@ equation
connect(combiTimeTable.y[1], humanIntGains.uRel) annotation (Line(points={{-61,-16},{-40,-16},{-40,1},{-16,1}}, color={0,0,127}));
connect(heatFlowSensorConv.port_a, humanIntGains.convHeat) annotation (Line(points={{38,19},{24,19},{24,8.8},{8.7,8.8}}, color={191,0,0}));
connect(heatFlowSensorRad.port_a, humanIntGains.radHeat) annotation (Line(points={{18,-8},{18,-6.8},{8.7,-6.8}}, color={191,0,0}));
annotation (Documentation(revisions="<html><ul>
annotation (Documentation(revisions = "<html><ul>
<li>
<i>March 30, 2020</i> by Philipp Mehrfeld:<br/>
<a href=\"https://github.com/RWTH-EBC/AixLib/issues/886\">#886</a>:
Summarize models to partial model. Make all models dependant from a
relative input 0..1. Many refactorings.
</li>
</ul>
</html>"));
end Humans;
</html>"),
Icon);
end PartialHumansExample;
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Humans
PartialHumansExample
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
within AixLib.BoundaryConditions.InternalGains.Examples.InternalGains;
model HumansSenTDep "Simulation to check the human models"
extends AixLib.BoundaryConditions.InternalGains.Examples.InternalGains.BaseClasses.Humans(redeclare Humans.HumanSensibleHeatTemperatureDependent humanIntGains);
extends Modelica.Icons.Example;
extends AixLib.BoundaryConditions.InternalGains.Examples.InternalGains.BaseClasses.PartialHumansExample(redeclare Humans.HumanSensibleHeatTemperatureDependent humanIntGains);
equation

annotation (experiment(StartTime = 0, StopTime = 86400, Tolerance=1e-6, Algorithm="dassl"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
within AixLib.BoundaryConditions.InternalGains.Examples.InternalGains;
model HumansSenTIndep "Simulation to check the human models"
extends AixLib.BoundaryConditions.InternalGains.Examples.InternalGains.BaseClasses.Humans(redeclare Humans.HumanSensibleHeatTemperatureIndependent humanIntGains);
extends Modelica.Icons.Example;
extends AixLib.BoundaryConditions.InternalGains.Examples.InternalGains.BaseClasses.PartialHumansExample(redeclare Humans.HumanSensibleHeatTemperatureIndependent humanIntGains);
equation

annotation (experiment(StartTime = 0, StopTime = 86400, Tolerance=1e-6, Algorithm="dassl"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
within AixLib.BoundaryConditions.InternalGains.Examples.InternalGains;
model HumansTotTDep "Simulation to check the human models"
extends AixLib.BoundaryConditions.InternalGains.Examples.InternalGains.BaseClasses.Humans(redeclare Humans.HumanTotalHeatTemperatureDependent humanIntGains, sumQ_flows(nu=3));
extends Modelica.Icons.Example;
extends AixLib.BoundaryConditions.InternalGains.Examples.InternalGains.BaseClasses.PartialHumansExample(redeclare Humans.HumanTotalHeatTemperatureDependent humanIntGains, sumQ_flows(nu=3));
equation

connect(humanIntGains.QLat_flow, sumQ_flows.u[3]) annotation (Line(points={{9.48,11.4},{14,11.4},{14,-64},{34,-64}}, color={0,0,127}));
Expand Down

0 comments on commit ae719c0

Please sign in to comment.