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

Issue1297 fluid ports hom #1334

Merged
merged 9 commits into from
Sep 13, 2022
17 changes: 10 additions & 7 deletions AixLib/ThermalZones/HighOrder/Examples/OFDHeatLoad.mo
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ model OFDHeatLoad "Test environment to determine OFD's nominal heat load"
choice=4 "WSchV_1984",
radioButtons=true));

replaceable package MediumAir = AixLib.Media.Air "Medium within the room";

FWuellhorst marked this conversation as resolved.
Show resolved Hide resolved

Modelica.Blocks.Sources.Constant constRooms[nHeatedRooms](k={293.15,293.15,288.15,293.15,293.15,293.15,293.15,288.15,297.15,293.15}) "1: LivingRoom_GF, 2: Hobby_GF, 3: Corridor_GF, 4: WC_Storage_GF, 5: Kitchen_GF, 6: Bedroom_UF, 7: Child1_UF, 8: Corridor_UF, 9: Bath_UF, 10: Child2_UF, 11: Attic" annotation (Placement(transformation(extent={{-70,-62},{-50,-42}})));
Modelica.Blocks.Sources.Constant constAirEx[nRooms](k={0.5,0.5,0,0.5,0.5,0.5,0.5,0,0.5,0.5,0}) "1: LivingRoom_GF, 2: Hobby_GF, 3: Corridor_GF, 4: WC_Storage_GF, 5: Kitchen_GF, 6: Bedroom_UF, 7: Child1_UF, 8: Corridor_UF, 9: Bath_UF, 10: Child2_UF, 11: Attic" annotation (Placement(transformation(extent={{-70,6},{-50,26}})));
Expand Down Expand Up @@ -56,6 +58,7 @@ model OFDHeatLoad "Test environment to determine OFD's nominal heat load"
Components.WindowsDoors.BaseClasses.CorrectionSolarGain.CorGSimple,
use_infiltEN12831=true,
n50=if TIR == 1 or TIR == 2 then 3 else if TIR == 3 then 4 else 6,
redeclare package Medium = MediumAir,
UValOutDoors=if TIR == 1 then 1.8 else 2.9,
upperFloor_Building(Corridor(T0_air=288.15), Bath(T0_air=297.15)),
groundFloor_Building(Corridor(T0_air=288.15)))
Expand Down Expand Up @@ -109,23 +112,23 @@ equation
connect(groundTemp.port, wholeHouseBuildingEnvelope.groundTemp)
annotation (Line(points={{-42,-90},{14,-90},{14,-10}}, color={191,0,0}));
connect(varRad.solarRad_out[1], wholeHouseBuildingEnvelope.North) annotation (
Line(points={{51,69.5833},{48,69.5833},{48,26.4},{43.68,26.4}}, color={
Line(points={{51,69.1667},{48,69.1667},{48,28.64},{43.68,28.64}},color={
255,128,0}));
connect(varRad.solarRad_out[2], wholeHouseBuildingEnvelope.East) annotation (
Line(points={{51,69.75},{48,69.75},{48,18},{43.68,18}}, color={255,128,
Line(points={{51,69.5},{48,69.5},{48,21.36},{43.68,21.36}},color={255,128,
0}));
connect(varRad.solarRad_out[3], wholeHouseBuildingEnvelope.South) annotation (
Line(points={{51,69.9167},{48,69.9167},{48,9.6},{43.68,9.6}}, color={255,
Line(points={{51,69.8333},{48,69.8333},{48,14.08},{43.68,14.08}},
color={255,
128,0}));
connect(varRad.solarRad_out[4], wholeHouseBuildingEnvelope.West) annotation (
Line(points={{51,70.0833},{48,70.0833},{48,1.2},{43.68,1.2}}, color={255,
Line(points={{51,70.1667},{48,70.1667},{48,7.36},{43.68,7.36}},color={255,
128,0}));
connect(varRad.solarRad_out[5], wholeHouseBuildingEnvelope.SolarRadiationPort_RoofN)
annotation (Line(points={{51,70.25},{48,70.25},{48,43.2},{43.68,43.2}},
color=
annotation (Line(points={{51,70.5},{48,70.5},{48,43.2},{43.68,43.2}},color=
{255,128,0}));
connect(varRad.solarRad_out[6], wholeHouseBuildingEnvelope.SolarRadiationPort_RoofS)
annotation (Line(points={{51,70.4167},{48,70.4167},{48,34.8},{43.68,34.8}},
annotation (Line(points={{51,70.8333},{48,70.8333},{48,35.92},{43.68,35.92}},
color={255,128,0}));
connect(heatStarToComb.portConvRadComb, wholeHouseBuildingEnvelope.heatingToRooms) annotation (Line(points={{-28,-20},{-26,-20},{-26,10},{-14,10},{-14,10.16}}, color={191,0,0}));
connect(constAirEx.y, wholeHouseBuildingEnvelope.AirExchangePort) annotation (
Expand Down
3 changes: 3 additions & 0 deletions AixLib/ThermalZones/HighOrder/Examples/OFD_1Jan.mo
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ model OFD_1Jan "OFD with TMC, TIR and TRY"
choice=4 "WSchV_1984",
radioButtons=true));

replaceable package MediumAir = AixLib.Media.Air "Medium within the room";

parameter AixLib.DataBase.Weather.TRYWeatherBaseDataDefinition weatherDataDay = AixLib.DataBase.Weather.TRYWinterDay();
parameter AixLib.DataBase.Profiles.ProfileBaseDataDefinition VentilationProfile = AixLib.DataBase.Profiles.Ventilation2perDayMean05perH();
parameter AixLib.DataBase.Profiles.ProfileBaseDataDefinition TSetProfile = AixLib.DataBase.Profiles.SetTemperaturesVentilation2perDay();
Expand Down Expand Up @@ -52,6 +54,7 @@ model OFD_1Jan "OFD with TMC, TIR and TRY"
use_infiltEN12831=true,
n50=if TIR == 1 or TIR == 2 then 3 else if TIR == 3 then 4 else 6,
withDynamicVentilation=true,
redeclare package Medium = MediumAir,
UValOutDoors=if TIR == 1 then 1.8 else 2.9) annotation (Placement(transformation(extent={{-35,-49},{60,46}})));
Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature tempOutside
annotation (Placement(transformation(extent={{-4,53},{-16.5,66}})));
Expand Down
15 changes: 10 additions & 5 deletions AixLib/ThermalZones/HighOrder/Examples/RoomGFOw2_DayNightMode.mo
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ model RoomGFOw2_DayNightMode

parameter AixLib.DataBase.Weather.TRYWeatherBaseDataDefinition weatherDataDay = AixLib.DataBase.Weather.TRYWinterDay();

replaceable package MediumAir = AixLib.Media.Air "Medium within the room";
replaceable package Medium =
AixLib.Media.Water "Medium in the component"
annotation (choices(
Expand All @@ -19,6 +20,7 @@ model RoomGFOw2_DayNightMode

Rooms.OFD.Ow2IwL1IwS1Gr1Uf1 room_GF_2OW(redeclare DataBase.Walls.Collections.OFD.EnEV2009Heavy wallTypes,
energyDynamicsWalls=Modelica.Fluid.Types.Dynamics.SteadyStateInitial,
redeclare package Medium = MediumAir,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
TWalls_start=290.15,
redeclare model WindowModel = Components.WindowsDoors.WindowSimple,
Expand Down Expand Up @@ -136,8 +138,8 @@ equation
color={0,127,255}));
connect(nightMode.SwitchToNightMode,Pump. IsNight) annotation(Line(points={{-67.15,10.3},{-64,10.3},{-64,-15.8}}, color = {255, 0, 255}));
connect(temperatureSensor.port, room_GF_2OW.thermRoom) annotation(Line(points={{23,8},{23,25},{31.48,25},{31.48,26}}, color = {191, 0, 0}));
connect(temperatureSensor.T, TRoom) annotation(Line(points={{23,-2},{40,-2},{40,0},{56,0},{56,30},{110,30}},
color = {0, 0, 127}));
connect(temperatureSensor.T, TRoom) annotation(Line(points={{23,-2.5},{40,-2.5},
{40,0},{56,0},{56,30},{110,30}}, color = {0, 0, 127}));
connect(tank.ports[1],Pump. port_a) annotation (Line(
larissakuehn marked this conversation as resolved.
Show resolved Hide resolved
points={{-84,-26},{-74,-26}},
color={0,127,255}));
Expand All @@ -158,12 +160,15 @@ equation
connect(heatFlowSenConv.port_b, room_GF_2OW.thermRoom) annotation (Line(points={{58,-4},{58,20},{32,20},{32,26},{31.48,26}}, color={191,0,0}));
connect(radiator_ML_delta.RadiativeHeat, heatFlowSenRad.port_a) annotation (Line(points={{68,-24},{68,-8}}, color={0,0,0}));
connect(heatFlowSenRad.port_b, room_GF_2OW.starRoom) annotation (Line(points={{68,4},{68,26},{36.88,26}}, color={191,0,0}));
connect(heatFlowSenConv.Q_flow,Q_flowToRoomConv) annotation (Line(points={{64,-10},{86,-10},{86,-10},{110,-10}}, color={0,0,127}));
connect(heatFlowSenRad.Q_flow, Q_flowToRoomRad) annotation (Line(points={{74,-2},{90,-2},{90,10},{110,10}}, color={0,0,127}));
connect(heatFlowSenConv.Q_flow,Q_flowToRoomConv) annotation (Line(points={{64.6,
-10},{86,-10},{86,-10},{110,-10}}, color={0,0,127}));
connect(heatFlowSenRad.Q_flow, Q_flowToRoomRad) annotation (Line(points={{74.6,-2},
{90,-2},{90,10},{110,10}}, color={0,0,127}));
connect(controlPIThermostat.y, heatValve_new.y) annotation (Line(points={{10.5,-13},{20,-13},{20,-10},{32,-10},{32,-14}}, color={0,0,127}));
connect(Tset.y, controlPIThermostat.u_s) annotation (Line(points={{-7.5,-1},{-4,-1},{-4,-13},{-1,-13}},color={0,0,127}));
connect(temperatureSensor.T, firstOrder.u)
annotation (Line(points={{23,-2},{16.8,-2}}, color={0,0,127}));
annotation (Line(points={{23,-2.5},{20,-2.5},{20,-2},{16.8,-2}},
color={0,0,127}));
connect(firstOrder.y, controlPIThermostat.u_m)
annotation (Line(points={{7.6,-2},{5,-2},{5,-7}}, color={0,0,127}));
annotation(experiment(StopTime = 86400, Interval = 60, Tolerance=1e-6, Algorithm = "Dassl"),
Expand Down