diff --git a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_BAUSimStudy_Case1Standard.txt b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_BAUSimStudy_Case1Standard.txt index caff91e5..ac27c4da 100644 --- a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_BAUSimStudy_Case1Standard.txt +++ b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_BAUSimStudy_Case1Standard.txt @@ -9,7 +9,7 @@ statistics-simulation= { "linear": "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", "nonlinear": "1, 1, 6, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1", - "number of continuous time states": "104", + "number of continuous time states": "105", "numerical Jacobians": "0" } time=[0e+00, 1.728e+05] diff --git a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_DesignOptimization_BES.txt b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_DesignOptimization_BES.txt index fbde3eed..4945390b 100644 --- a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_DesignOptimization_BES.txt +++ b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_DesignOptimization_BES.txt @@ -9,7 +9,7 @@ statistics-simulation= { "linear": "0, 0, 0, 0, 0, 0, 0, 0", "nonlinear": "2, 6, 1, 0, 1, 0, 1, 0, 1, 1, 1", - "number of continuous time states": "71", + "number of continuous time states": "72", "numerical Jacobians": "0" } time=[0e+00, 1.728e+05] diff --git a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_DesignOptimization_BESNoDHW.txt b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_DesignOptimization_BESNoDHW.txt index 6d100414..ce75483a 100644 --- a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_DesignOptimization_BESNoDHW.txt +++ b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_DesignOptimization_BESNoDHW.txt @@ -9,7 +9,7 @@ statistics-simulation= { "linear": "0, 0, 0, 0, 0, 0, 0, 0", "nonlinear": "6, 1, 0, 1, 0, 1, 0, 1, 1, 1", - "number of continuous time states": "52", + "number of continuous time states": "53", "numerical Jacobians": "0" } time=[0e+00, 1.728e+05] diff --git a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_GasBoilerBuildingOnly.txt b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_GasBoilerBuildingOnly.txt index 0ed713cb..7b501c22 100644 --- a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_GasBoilerBuildingOnly.txt +++ b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_GasBoilerBuildingOnly.txt @@ -8,7 +8,7 @@ statistics-simulation= { "linear": "0, 0, 0, 0, 0, 0, 0, 0", "nonlinear": "1, 6, 1, 0, 1, 0, 1, 0, 1, 1", - "number of continuous time states": "41", + "number of continuous time states": "42", "numerical Jacobians": "0" } time=[0e+00, 1.728e+05] diff --git a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_AfterBufferWithDHW.txt b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_AfterBufferWithDHW.txt index add7bbbf..95d24309 100644 --- a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_AfterBufferWithDHW.txt +++ b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_AfterBufferWithDHW.txt @@ -9,7 +9,7 @@ statistics-simulation= { "linear": "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", "nonlinear": "1, 6, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1", - "number of continuous time states": "144", + "number of continuous time states": "145", "numerical Jacobians": "0" } time=[0e+00, 1.728e+05] diff --git a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_AfterBufferWithoutDHW.txt b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_AfterBufferWithoutDHW.txt index bb507c2d..a6a89a51 100644 --- a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_AfterBufferWithoutDHW.txt +++ b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_AfterBufferWithoutDHW.txt @@ -9,7 +9,7 @@ statistics-simulation= { "linear": "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", "nonlinear": "1, 6, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1", - "number of continuous time states": "110", + "number of continuous time states": "111", "numerical Jacobians": "0" } time=[0e+00, 1.728e+05] diff --git a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_Parallel.txt b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_Parallel.txt index d5848e9b..5dad5195 100644 --- a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_Parallel.txt +++ b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_Parallel.txt @@ -1,4 +1,4 @@ -last-generated=2024-07-16 +last-generated=2024-09-23 statistics-initialization= { "linear": "0", @@ -9,12 +9,12 @@ statistics-simulation= { "linear": "0, 0, 0, 0, 0, 0, 0, 0, 0", "nonlinear": "3, 6, 1, 0, 1, 0, 1, 0, 1, 1, 1", - "number of continuous time states": "78", + "number of continuous time states": "79", "numerical Jacobians": "0" } time=[0e+00, 1.728e+05] weaDat.weaBus.TDryBul=[2.711499938964844e+02, 2.711964111328125e+02, 2.711585388183594e+02, 2.710329895019531e+02, 2.708773498535156e+02, 2.706598205566406e+02, 2.704615478515625e+02, 2.704500122070312e+02, 2.704500122070312e+02, 2.704500122070312e+02, 2.704500122070312e+02, 2.704904479980469e+02, 2.706648559570312e+02, 2.708219909667969e+02, 2.709660034179688e+02, 2.710835876464844e+02, 2.710487060546875e+02, 2.710967712402344e+02, 2.713839721679688e+02, 2.715577392578125e+02, 2.713986511230469e+02, 2.713771667480469e+02, 2.716394348144531e+02, 2.718602600097656e+02, 2.719464111328125e+02, 2.720499877929688e+02, 2.722364196777344e+02, 2.724353637695312e+02, 2.725456237792969e+02, 2.726259155273438e+02, 2.730393371582031e+02, 2.736041564941406e+02, 2.736746826171875e+02, 2.736636657714844e+02, 2.736180114746094e+02, 2.735700073242188e+02, 2.735389404296875e+02, 2.735155944824219e+02, 2.7335400390625e+02, 2.731619873046875e+02, 2.729700012207031e+02, 2.727780151367188e+02, 2.72593994140625e+02, 2.724955749511719e+02, 2.724342651367188e+02, 2.723796081542969e+02, 2.723463134765625e+02, 2.723376770019531e+02, 2.723522033691406e+02, 2.724003295898438e+02, 2.724500122070312e+02, 2.724666442871094e+02, 2.724525451660156e+02, 2.724020690917969e+02, 2.722803344726562e+02, 2.720899963378906e+02, 2.718980102539062e+02, 2.717059936523438e+02, 2.715140075683594e+02, 2.713631591796875e+02, 2.713411865234375e+02, 2.713729858398438e+02, 2.714293518066406e+02, 2.714556884765625e+02, 2.714446716308594e+02, 2.714856872558594e+02, 2.716668701171875e+02, 2.717514038085938e+02, 2.716672058105469e+02, 2.716678771972656e+02, 2.71758056640625e+02, 2.718697814941406e+02, 2.7200390625e+02, 2.721656494140625e+02, 2.724968872070312e+02, 2.728500061035156e+02, 2.729950561523438e+02, 2.729598999023438e+02, 2.725846862792969e+02, 2.721623229980469e+02, 2.721732788085938e+02, 2.722332153320312e+02, 2.723517456054688e+02, 2.724693908691406e+02, 2.722129516601562e+02, 2.715361633300781e+02, 2.708384399414062e+02, 2.701152648925781e+02, 2.6966552734375e+02, 2.693913269042969e+02, 2.691483459472656e+02, 2.68912841796875e+02, 2.686530456542969e+02, 2.682867126464844e+02, 2.680051879882812e+02, 2.680009765625e+02, 2.679133911132812e+02, 2.676651611328125e+02, 2.674332275390625e+02, 2.672374267578125e+02, 2.670499877929688e+02] -hydraulic.generation.sigBusGen.TGenOutMea=[2.931499938964844e+02, 3.090269470214844e+02, 3.168741455078125e+02, 3.217583923339844e+02, 3.2261767578125e+02, 3.226524963378906e+02, 3.227782287597656e+02, 3.227994995117188e+02, 3.227950744628906e+02, 3.227938537597656e+02, 3.227938537597656e+02, 3.22764892578125e+02, 3.226029663085938e+02, 3.224291076660156e+02, 3.222832641601562e+02, 3.221522521972656e+02, 3.221632690429688e+02, 3.221394348144531e+02, 3.218694458007812e+02, 3.271341857910156e+02, 3.219284362792969e+02, 3.22027099609375e+02, 3.216502685546875e+02, 3.213487243652344e+02, 3.212286682128906e+02, 3.211282348632812e+02, 3.209454650878906e+02, 3.207318725585938e+02, 3.206005249023438e+02, 3.205215454101562e+02, 3.201493835449219e+02, 3.195390930175781e+02, 3.193984069824219e+02, 3.194100341796875e+02, 3.194603576660156e+02, 3.195122680664062e+02, 3.195492553710938e+02, 3.19569580078125e+02, 3.197196655273438e+02, 3.199217224121094e+02, 3.200033874511719e+02, 3.205206298828125e+02, 3.205908508300781e+02, 3.206534729003906e+02, 3.207067260742188e+02, 3.203206176757812e+02, 3.207854309082031e+02, 3.210530090332031e+02, 3.208777465820312e+02, 3.207674560546875e+02, 3.206996459960938e+02, 3.206758728027344e+02, 3.206872253417969e+02, 3.207353210449219e+02, 3.208519287109375e+02, 3.210462341308594e+02, 3.212506103515625e+02, 3.214533996582031e+02, 3.216552124023438e+02, 3.218248901367188e+02, 3.218658447265625e+02, 3.218356018066406e+02, 3.217757568359375e+02, 3.217409973144531e+02, 3.217548828125e+02, 3.1937548828125e+02, 3.216398620605469e+02, 3.2161767578125e+02, 3.215545654296875e+02, 3.215345458984375e+02, 3.21441650390625e+02, 3.21328857421875e+02, 3.211919860839844e+02, 3.210220031738281e+02, 3.206989135742188e+02, 3.203132629394531e+02, 3.201253356933594e+02, 3.201403198242188e+02, 3.204861145019531e+02, 3.209623718261719e+02, 3.210075378417969e+02, 3.20942138671875e+02, 3.208234252929688e+02, 3.205458984375e+02, 3.2109619140625e+02, 3.216353149414062e+02, 3.2232275390625e+02, 3.230798950195312e+02, 3.235970153808594e+02, 3.23881103515625e+02, 3.241188354492188e+02, 3.243662719726562e+02, 3.246323547363281e+02, 3.249967956542969e+02, 3.2532080078125e+02, 3.279820251464844e+02, 3.234057922363281e+02, 3.251300354003906e+02, 3.258261413574219e+02, 3.261359252929688e+02, 3.281603088378906e+02] -outputs.building.TZone[1]=[2.931499938964844e+02, 2.882925720214844e+02, 2.889140625e+02, 2.893377380371094e+02, 2.894808044433594e+02, 2.894178771972656e+02, 2.893406372070312e+02, 2.892867736816406e+02, 2.892840270996094e+02, 2.892986145019531e+02, 2.893158569335938e+02, 2.893384704589844e+02, 2.8937255859375e+02, 2.895002746582031e+02, 2.898052368164062e+02, 2.900909118652344e+02, 2.902852478027344e+02, 2.904846801757812e+02, 2.906521301269531e+02, 2.907607116699219e+02, 2.908177795410156e+02, 2.909945678710938e+02, 2.910893859863281e+02, 2.911650390625e+02, 2.911640014648438e+02, 2.911664428710938e+02, 2.911454467773438e+02, 2.911070861816406e+02, 2.912079162597656e+02, 2.913372802734375e+02, 2.914877014160156e+02, 2.916161499023438e+02, 2.916690063476562e+02, 2.91697509765625e+02, 2.916896667480469e+02, 2.916580505371094e+02, 2.916180725097656e+02, 2.915624389648438e+02, 2.91483154296875e+02, 2.913641357421875e+02, 2.911656188964844e+02, 2.9130126953125e+02, 2.913143920898438e+02, 2.913010559082031e+02, 2.912815246582031e+02, 2.91219970703125e+02, 2.910363159179688e+02, 2.911883544921875e+02, 2.911993103027344e+02, 2.911863403320312e+02, 2.911755981445312e+02, 2.911855163574219e+02, 2.912003784179688e+02, 2.912164611816406e+02, 2.912332153320312e+02, 2.912528686523438e+02, 2.912756958007812e+02, 2.912992248535156e+02, 2.913233337402344e+02, 2.913491821289062e+02, 2.913746948242188e+02, 2.913956909179688e+02, 2.914147644042969e+02, 2.915138549804688e+02, 2.917645263671875e+02, 2.919907836914062e+02, 2.920345764160156e+02, 2.922256469726562e+02, 2.922777099609375e+02, 2.923522644042969e+02, 2.924324340820312e+02, 2.926934814453125e+02, 2.929622192382812e+02, 2.931340942382812e+02, 2.932172546386719e+02, 2.932418823242188e+02, 2.932037048339844e+02, 2.931593322753906e+02, 2.931402893066406e+02, 2.931679992675781e+02, 2.932147827148438e+02, 2.932492065429688e+02, 2.932603454589844e+02, 2.931556396484375e+02, 2.932702026367188e+02, 2.932925720214844e+02, 2.93310546875e+02, 2.933189697265625e+02, 2.932745666503906e+02, 2.931462707519531e+02, 2.930601196289062e+02, 2.930699462890625e+02, 2.930755004882812e+02, 2.930638427734375e+02, 2.930580444335938e+02, 2.930455932617188e+02, 2.928291015625e+02, 2.929667358398438e+02, 2.930530395507812e+02, 2.930663146972656e+02, 2.930515747070312e+02] +hydraulic.generation.sigBusGen.TGenOutMea=[2.931499938964844e+02, 3.090269470214844e+02, 3.168741455078125e+02, 3.217583923339844e+02, 3.226177062988281e+02, 3.226524963378906e+02, 3.227782287597656e+02, 3.227994995117188e+02, 3.227950744628906e+02, 3.227938537597656e+02, 3.227938537597656e+02, 3.22764892578125e+02, 3.226029663085938e+02, 3.224291076660156e+02, 3.222832641601562e+02, 3.221522521972656e+02, 3.221632690429688e+02, 3.221394348144531e+02, 3.218694763183594e+02, 3.271341857910156e+02, 3.219284362792969e+02, 3.220270690917969e+02, 3.216502685546875e+02, 3.213487243652344e+02, 3.212286682128906e+02, 3.211282348632812e+02, 3.209454650878906e+02, 3.207318725585938e+02, 3.206005249023438e+02, 3.205215454101562e+02, 3.201493835449219e+02, 3.195390930175781e+02, 3.193984069824219e+02, 3.194100341796875e+02, 3.194603576660156e+02, 3.195122680664062e+02, 3.195492553710938e+02, 3.19569580078125e+02, 3.197196350097656e+02, 3.199217224121094e+02, 3.200033874511719e+02, 3.205206298828125e+02, 3.205908508300781e+02, 3.206534729003906e+02, 3.207067260742188e+02, 3.203204345703125e+02, 3.207854309082031e+02, 3.210530090332031e+02, 3.208777465820312e+02, 3.207674560546875e+02, 3.206996459960938e+02, 3.206758728027344e+02, 3.206871948242188e+02, 3.207353210449219e+02, 3.208519287109375e+02, 3.210462341308594e+02, 3.212506103515625e+02, 3.214533996582031e+02, 3.216552124023438e+02, 3.218248596191406e+02, 3.218658447265625e+02, 3.218356018066406e+02, 3.217757568359375e+02, 3.217409973144531e+02, 3.217548828125e+02, 3.1937548828125e+02, 3.216398620605469e+02, 3.2161767578125e+02, 3.215545654296875e+02, 3.215345458984375e+02, 3.21441650390625e+02, 3.21328857421875e+02, 3.211919860839844e+02, 3.210220031738281e+02, 3.206989135742188e+02, 3.203132629394531e+02, 3.201253356933594e+02, 3.201403198242188e+02, 3.204861145019531e+02, 3.209623718261719e+02, 3.210075378417969e+02, 3.20942138671875e+02, 3.208234252929688e+02, 3.205458984375e+02, 3.2109619140625e+02, 3.216353149414062e+02, 3.2232275390625e+02, 3.230798950195312e+02, 3.235969848632812e+02, 3.23881103515625e+02, 3.241188354492188e+02, 3.243662719726562e+02, 3.246323547363281e+02, 3.249967956542969e+02, 3.2532080078125e+02, 3.279819641113281e+02, 3.234057922363281e+02, 3.251307678222656e+02, 3.258261413574219e+02, 3.261359252929688e+02, 3.264699096679688e+02] +outputs.building.TZone[1]=[2.931499938964844e+02, 2.882925720214844e+02, 2.889140625e+02, 2.893377380371094e+02, 2.894808044433594e+02, 2.894178771972656e+02, 2.893406372070312e+02, 2.892867736816406e+02, 2.892840270996094e+02, 2.892986145019531e+02, 2.893158569335938e+02, 2.893384704589844e+02, 2.8937255859375e+02, 2.895002746582031e+02, 2.898052368164062e+02, 2.900909423828125e+02, 2.902852478027344e+02, 2.904846801757812e+02, 2.906521301269531e+02, 2.907607116699219e+02, 2.908177795410156e+02, 2.909945678710938e+02, 2.910893859863281e+02, 2.911650390625e+02, 2.911640014648438e+02, 2.911664428710938e+02, 2.911454772949219e+02, 2.911070861816406e+02, 2.912079467773438e+02, 2.913372802734375e+02, 2.914877014160156e+02, 2.916161499023438e+02, 2.916690063476562e+02, 2.91697509765625e+02, 2.91689697265625e+02, 2.916580505371094e+02, 2.916180725097656e+02, 2.915624389648438e+02, 2.91483154296875e+02, 2.913641357421875e+02, 2.911656188964844e+02, 2.9130126953125e+02, 2.913143920898438e+02, 2.913010559082031e+02, 2.912815551757812e+02, 2.91219970703125e+02, 2.910363159179688e+02, 2.911883544921875e+02, 2.911993408203125e+02, 2.911863403320312e+02, 2.911755981445312e+02, 2.911855163574219e+02, 2.912003784179688e+02, 2.912164611816406e+02, 2.912332153320312e+02, 2.912528686523438e+02, 2.912756958007812e+02, 2.912992248535156e+02, 2.913233337402344e+02, 2.913491821289062e+02, 2.913746948242188e+02, 2.913956909179688e+02, 2.914147644042969e+02, 2.915138854980469e+02, 2.917645263671875e+02, 2.919907836914062e+02, 2.920345764160156e+02, 2.922256469726562e+02, 2.922777099609375e+02, 2.923522644042969e+02, 2.924324340820312e+02, 2.926934509277344e+02, 2.929622192382812e+02, 2.931340942382812e+02, 2.932172546386719e+02, 2.932418823242188e+02, 2.932037048339844e+02, 2.931593322753906e+02, 2.931402893066406e+02, 2.931679992675781e+02, 2.932147827148438e+02, 2.932492065429688e+02, 2.932603454589844e+02, 2.931556396484375e+02, 2.932702026367188e+02, 2.932925720214844e+02, 2.93310546875e+02, 2.933189697265625e+02, 2.932745361328125e+02, 2.931462707519531e+02, 2.930601196289062e+02, 2.930699462890625e+02, 2.930755004882812e+02, 2.930638427734375e+02, 2.930580444335938e+02, 2.930455932617188e+02, 2.928291015625e+02, 2.929667358398438e+02, 2.930530395507812e+02, 2.930663146972656e+02, 2.930515747070312e+02] electricalGrid.PElecGen=[0e+00, 0e+00] -electricalGrid.PElecLoa=[4.20362353515625e+03, 4.471041015625e+03, 4.86562841796875e+03, 5.1317470703125e+03, 3.667279296875e+03, 3.554658447265625e+03, 3.632924072265625e+03, 3.6127666015625e+03, 3.613468017578125e+03, 3.615587646484375e+03, 3.616844970703125e+03, 3.58901171875e+03, 3.492972412109375e+03, 3.436895751953125e+03, 3.36457861328125e+03, 3.305791748046875e+03, 3.32874951171875e+03, 3.27432861328125e+03, 3.12395068359375e+03, 5.4373369140625e+03, 3.805538818359375e+03, 3.182048583984375e+03, 2.993998779296875e+03, 2.94567822265625e+03, 2.953678955078125e+03, 2.923690673828125e+03, 2.855977783203125e+03, 2.805833251953125e+03, 2.79747314453125e+03, 2.774239013671875e+03, 2.604396240234375e+03, 2.461748291015625e+03, 2.52597412109375e+03, 2.5478330078125e+03, 2.56235595703125e+03, 2.573872802734375e+03, 2.57721630859375e+03, 2.586061279296875e+03, 2.649521240234375e+03, 2.703458740234375e+03, 3.604539306640625e+03, 2.86026318359375e+03, 2.81474072265625e+03, 2.82616064453125e+03, 2.840591552734375e+03, 5.049435546875e+03, 3.841983642578125e+03, 2.932056884765625e+03, 2.83252197265625e+03, 2.8241318359375e+03, 2.820719482421875e+03, 2.82558740234375e+03, 2.8360517578125e+03, 2.856962158203125e+03, 2.904754638671875e+03, 2.968353515625e+03, 3.0190986328125e+03, 3.068036376953125e+03, 3.117348876953125e+03, 3.143349853515625e+03, 3.117110595703125e+03, 3.091552734375e+03, 3.068456298828125e+03, 3.06474609375e+03, 3.054982421875e+03, 5.028126953125e+03, 3.54568212890625e+03, 2.932972412109375e+03, 2.932362548828125e+03, 2.915700439453125e+03, 2.867859619140625e+03, 2.812515869140625e+03, 2.748689453125e+03, 2.68734375e+03, 2.561978515625e+03, 2.474649169921875e+03, 2.481083984375e+03, 2.5291884765625e+03, 2.684477294921875e+03, 2.76701611328125e+03, 2.67824658203125e+03, 2.63465771484375e+03, 2.581457763671875e+03, 3.45539599609375e+03, 2.739420654296875e+03, 2.867494384765625e+03, 3.035377685546875e+03, 3.197257568359375e+03, 3.21815087890625e+03, 3.26798291015625e+03, 3.372122802734375e+03, 3.468582763671875e+03, 3.5788359375e+03, 3.756390380859375e+03, 3.853046875e+03, 4.9795185546875e+03, 3.89054052734375e+03, 4.4003681640625e+03, 4.41379443359375e+03, 4.4021318359375e+03, 1.6460078125e+03] +electricalGrid.PElecLoa=[4.20362353515625e+03, 4.471041015625e+03, 4.8656279296875e+03, 5.1317470703125e+03, 3.66726953125e+03, 3.554647216796875e+03, 3.63292529296875e+03, 3.612768798828125e+03, 3.613466796875e+03, 3.615587158203125e+03, 3.6168447265625e+03, 3.589029052734375e+03, 3.492984619140625e+03, 3.4368955078125e+03, 3.364574951171875e+03, 3.305790771484375e+03, 3.32875341796875e+03, 3.274327880859375e+03, 3.123950439453125e+03, 5.43733740234375e+03, 3.805542724609375e+03, 3.1820458984375e+03, 2.9939990234375e+03, 2.945677978515625e+03, 2.953679931640625e+03, 2.9236904296875e+03, 2.855977783203125e+03, 2.805833251953125e+03, 2.79747314453125e+03, 2.774238037109375e+03, 2.604395751953125e+03, 2.461748046875e+03, 2.525973876953125e+03, 2.5478330078125e+03, 2.56235595703125e+03, 2.57387255859375e+03, 2.577216064453125e+03, 2.5860615234375e+03, 2.649521240234375e+03, 2.703458740234375e+03, 3.60453125e+03, 2.860260986328125e+03, 2.814742919921875e+03, 2.826160888671875e+03, 2.840588623046875e+03, 5.04941796875e+03, 3.841994873046875e+03, 2.932055908203125e+03, 2.832521484375e+03, 2.824131591796875e+03, 2.82071923828125e+03, 2.825587158203125e+03, 2.8360830078125e+03, 2.856966796875e+03, 2.90475537109375e+03, 2.968353515625e+03, 3.019098388671875e+03, 3.068036376953125e+03, 3.117348876953125e+03, 3.14335546875e+03, 3.11711376953125e+03, 3.09155078125e+03, 3.068454833984375e+03, 3.06474609375e+03, 3.054982421875e+03, 5.0281259765625e+03, 3.545681884765625e+03, 2.93297216796875e+03, 2.9323623046875e+03, 2.915700439453125e+03, 2.867859619140625e+03, 2.81252001953125e+03, 2.748688232421875e+03, 2.68734326171875e+03, 2.561978271484375e+03, 2.4746474609375e+03, 2.481087890625e+03, 2.52918896484375e+03, 2.684466064453125e+03, 2.7670146484375e+03, 2.67824658203125e+03, 2.63465771484375e+03, 2.581458251953125e+03, 3.455398681640625e+03, 2.73942041015625e+03, 2.86749462890625e+03, 3.035372314453125e+03, 3.197258056640625e+03, 3.218165771484375e+03, 3.267986328125e+03, 3.372123046875e+03, 3.46858349609375e+03, 3.578837158203125e+03, 3.75639208984375e+03, 3.85304833984375e+03, 4.97951513671875e+03, 3.890537353515625e+03, 4.39893115234375e+03, 4.41379638671875e+03, 4.4021328125e+03, 4.1694306640625e+03] diff --git a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_Serial.txt b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_Serial.txt index e8532771..eb0d6fb5 100644 --- a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_Serial.txt +++ b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_HeatPumpAndBoiler_Serial.txt @@ -9,7 +9,7 @@ statistics-simulation= { "linear": "0, 0, 0, 0, 0, 0, 0, 0, 0", "nonlinear": "2, 6, 1, 0, 1, 0, 1, 0, 1, 1, 1", - "number of continuous time states": "77", + "number of continuous time states": "78", "numerical Jacobians": "0" } time=[0e+00, 1.728e+05] diff --git a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_ModelicaConferencePaper_TEASERBuilding.txt b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_ModelicaConferencePaper_TEASERBuilding.txt index 1dda3512..aab87949 100644 --- a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_ModelicaConferencePaper_TEASERBuilding.txt +++ b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_ModelicaConferencePaper_TEASERBuilding.txt @@ -9,7 +9,7 @@ statistics-simulation= { "linear": "0, 0, 0, 0, 0, 0, 0, 0", "nonlinear": "2, 1, 1, 6, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1", - "number of continuous time states": "84", + "number of continuous time states": "85", "numerical Jacobians": "0" } time=[0e+00, 8.64e+05] diff --git a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_Retrofit_Case1NoRetrofit.txt b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_Retrofit_Case1NoRetrofit.txt index 93267ee9..ae73e950 100644 --- a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_Retrofit_Case1NoRetrofit.txt +++ b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_Retrofit_Case1NoRetrofit.txt @@ -9,7 +9,7 @@ statistics-simulation= { "linear": "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", "nonlinear": "1, 1, 6, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1", - "number of continuous time states": "104", + "number of continuous time states": "105", "numerical Jacobians": "0" } time=[0e+00, 8.64e+04] diff --git a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_Retrofit_Case1PartialRetrofit.txt b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_Retrofit_Case1PartialRetrofit.txt index d41a82bf..d81a87d4 100644 --- a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_Retrofit_Case1PartialRetrofit.txt +++ b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_Retrofit_Case1PartialRetrofit.txt @@ -9,7 +9,7 @@ statistics-simulation= { "linear": "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", "nonlinear": "1, 1, 6, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1", - "number of continuous time states": "104", + "number of continuous time states": "105", "numerical Jacobians": "0" } time=[0e+00, 8.64e+04] diff --git a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_Retrofit_Case1TotalRetrofit.txt b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_Retrofit_Case1TotalRetrofit.txt index 2ab0fddd..d55be8b9 100644 --- a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_Retrofit_Case1TotalRetrofit.txt +++ b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_Retrofit_Case1TotalRetrofit.txt @@ -9,7 +9,7 @@ statistics-simulation= { "linear": "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", "nonlinear": "1, 1, 6, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1", - "number of continuous time states": "104", + "number of continuous time states": "105", "numerical Jacobians": "0" } time=[0e+00, 8.64e+04] diff --git a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_SolarThermalSystem_SolarThermalAixLib.txt b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_SolarThermalSystem_SolarThermalAixLib.txt index 655da0bf..ad9ccf84 100644 --- a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_SolarThermalSystem_SolarThermalAixLib.txt +++ b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_SolarThermalSystem_SolarThermalAixLib.txt @@ -9,7 +9,7 @@ statistics-simulation= { "linear": "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", "nonlinear": "1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1", - "number of continuous time states": "237", + "number of continuous time states": "238", "numerical Jacobians": "0" } time=[0e+00, 1.728e+05] diff --git a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_SolarThermalSystem_SolarThermalBuildings.txt b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_SolarThermalSystem_SolarThermalBuildings.txt index a2e0e178..a789bfb0 100644 --- a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_SolarThermalSystem_SolarThermalBuildings.txt +++ b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_SolarThermalSystem_SolarThermalBuildings.txt @@ -9,7 +9,7 @@ statistics-simulation= { "linear": "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", "nonlinear": "1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1", - "number of continuous time states": "239", + "number of continuous time states": "240", "numerical Jacobians": "0" } time=[0e+00, 1.728e+05] diff --git a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_TEASERHeatLoadCalculation_Example.txt b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_TEASERHeatLoadCalculation_Example.txt index 843b03f3..06f2460c 100644 --- a/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_TEASERHeatLoadCalculation_Example.txt +++ b/BESMod/Resources/ReferenceResults/Dymola/BESMod_Examples_TEASERHeatLoadCalculation_Example.txt @@ -7,7 +7,7 @@ statistics-simulation= { "linear": "10, 0, 0", "nonlinear": "1, 0, 1, 0, 1, 0, 1", - "number of continuous time states": "20", + "number of continuous time states": "21", "numerical Jacobians": "0" } time=[0e+00, 1.728e+05] diff --git a/BESMod/Systems/BaseClasses/PartialBuildingEnergySystem.mo b/BESMod/Systems/BaseClasses/PartialBuildingEnergySystem.mo index 873f9823..dff0cc20 100644 --- a/BESMod/Systems/BaseClasses/PartialBuildingEnergySystem.mo +++ b/BESMod/Systems/BaseClasses/PartialBuildingEnergySystem.mo @@ -349,6 +349,15 @@ equation -41.0824,118.857}}, color={0,0,0}, thickness=1)); + connect(control.useProBus, userProfiles.useProBus) annotation (Line( + points={{16.82,198.37},{16.82,206},{-214,206},{-214,150.775},{-225.167, + 150.775}}, + color={0,127,0}, + thickness=0.5)); + connect(control.buiMeaBus, building.buiMeaBus) annotation (Line( + points={{62.04,198.37},{62.04,206},{-16,206},{-16,88},{39,88},{39,77.62}}, + color={255,128,0}, + thickness=0.5)); annotation (Icon(graphics, coordinateSystem(preserveAspectRatio=false, extent={{-280, -140},{280,200}})), diff --git a/BESMod/Systems/Control/BaseClasses/PartialControl.mo b/BESMod/Systems/Control/BaseClasses/PartialControl.mo index 2622e89c..22dd5687 100644 --- a/BESMod/Systems/Control/BaseClasses/PartialControl.mo +++ b/BESMod/Systems/Control/BaseClasses/PartialControl.mo @@ -4,19 +4,25 @@ partial model PartialControl "Model for a partial HEMS control" parameter Boolean use_openModelica=false "=true to disable features which are not available in open modelica" annotation(Dialog(tab="Advanced")); - Hydraulical.Interfaces.SystemControlBus sigBusHyd annotation (Placement( + BESMod.Systems.Hydraulical.Interfaces.SystemControlBus sigBusHyd annotation (Placement( transformation(extent={{-94,-114},{-64,-88}}), iconTransformation( extent={{-94,-114},{-64,-88}}))); - Ventilation.Interfaces.SystemControlBus sigBusVen annotation (Placement( + BESMod.Systems.Ventilation.Interfaces.SystemControlBus sigBusVen annotation (Placement( transformation(extent={{64,-114},{96,-86}}), iconTransformation(extent= {{64,-114},{96,-86}}))); - Interfaces.ControlOutputs outBusCtrl if not use_openModelica + BESMod.Systems.Interfaces.ControlOutputs outBusCtrl if not use_openModelica annotation (Placement(transformation( extent={{84,-16},{118,16}}), iconTransformation(extent={{84,-16},{118, 16}}))); - Electrical.Interfaces.SystemControlBus sigBusEle annotation (Placement( + BESMod.Systems.Electrical.Interfaces.SystemControlBus sigBusEle annotation (Placement( transformation(extent={{-116,-14},{-84,14}}), iconTransformation(extent= {{-116,-14},{-84,14}}))); + BESMod.Systems.Interfaces.UseProBus useProBus annotation ( + Placement(transformation(extent={{-80,78},{-38,124}}), + iconTransformation(extent={{-74,88},{-48,114}}))); + BESMod.Systems.Interfaces.BuiMeaBus buiMeaBus annotation ( + Placement(transformation(extent={{36,82},{82,120}}), iconTransformation( + extent={{44,88},{72,114}}))); annotation (Icon(graphics, coordinateSystem(preserveAspectRatio=false)), Diagram(graphics, coordinateSystem(preserveAspectRatio=false))); diff --git a/BESMod/Systems/Demand/Building/TEASERThermalZone.mo b/BESMod/Systems/Demand/Building/TEASERThermalZone.mo index 42617a44..c1ee34b6 100644 --- a/BESMod/Systems/Demand/Building/TEASERThermalZone.mo +++ b/BESMod/Systems/Demand/Building/TEASERThermalZone.mo @@ -17,7 +17,8 @@ model TEASERThermalZone parameter Boolean use_verboseEnergyBalance=true "=false to disable the integration of the verbose energy balance"; parameter Modelica.Units.SI.TemperatureDifference dTComfort=2 "Temperature difference to room set temperature at which the comfort is still acceptable. In DIN EN 15251, all temperatures below 22 °C - 2 K count as discomfort. Hence the default value. If your room set temperature is lower, consider using smaller values."; - + parameter Boolean incElePro = false + "=false to not include electrical energy consumption in the electrical connectors"; parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial "Type of energy balance: dynamic (3 initialization options) or steady state" annotation (Dialog(tab="Dynamics")); @@ -76,7 +77,7 @@ model TEASERThermalZone transformation( extent={{-10,-10},{10,10}}, rotation=180, - origin={30,-110}))); + origin={30,-150}))); BESMod.Utilities.KPIs.EnergyKPICalculator intKPICalVentGain[nZones](each final use_inpCon=true) if use_ventilation and use_verboseEnergyBalance annotation (Placement(transformation( @@ -154,13 +155,8 @@ model TEASERThermalZone Modelica.Blocks.Math.MultiSum multiSum[nZones](each final nu=3) if use_verboseEnergyBalance annotation (Placement(transformation(extent={{-9,-9}, {9,9}}, rotation=180, - origin={69,-129}))); + origin={69,-149}))); - BESMod.Utilities.Electrical.ZeroLoad zeroLoad annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - rotation=180, - origin={94,-96}))); Modelica.Blocks.Routing.RealPassThrough realPassThroughIntGains[nZones,3] annotation (Placement(transformation(extent={{-100,0},{-80,20}}))); Modelica.Blocks.Routing.RealPassThrough realPassThroughTDry[nZones] @@ -185,6 +181,27 @@ model TEASERThermalZone TSetZone_nominal .+ dTComfort, each for_heating=true) "Comfort calculator operative room temperature for cooling" annotation (Placement(transformation(extent={{20,-70},{40,-50}}))); + BESMod.Utilities.Electrical.RealToElecCon realToElecCon(use_souGen=false) + annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={98,-120}))); + Modelica.Blocks.Math.Gain gain(final k=if incElePro then 1 else 0) + annotation ( + Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={62,-120}))); + Modelica.Blocks.Math.MultiSum multiSumEle(final k=fill(1, multiSumEle.nu), + final nu=2*nZones) annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={30,-120}))); + BESMod.Utilities.KPIs.RoomControlCalculator roomControlCalculator[nZones](each + final for_heating=true, each final dTComBou=0) + annotation (Placement(transformation(extent={{50,-40},{70,-20}}))); equation for i in 1:nZones loop @@ -204,6 +221,13 @@ equation index=-1, extent={{-3,-6},{-3,-6}}, horizontalAlignment=TextAlignment.Right)); + connect(thermalZone[i].QIntGains_flow[2], multiSumEle.u[2*i-1]) annotation (Line( + points={{-42.7,33.6},{-42.7,0},{-28,0},{-28,-68},{-6,-68},{-6,-134},{12, + -134},{12,-120},{20,-120}}, color={0,0,127})); + connect(thermalZone[i].QIntGains_flow[3], multiSumEle.u[2*i]) annotation (Line( + points={{-42.7,34.8},{-42.7,0},{-28,0},{-28,-68},{-6,-68},{-6,-134},{12, + -134},{12,-120},{20,-120}}, + color={0,0,127})); if use_ventilation then connect(portVent_in[i], thermalZone[i].ports[1]) annotation (Line(points={{100,38}, {82,38},{82,10},{-2,10},{-2,22.08}}, color={0,127, @@ -256,7 +280,7 @@ equation {-41.8,-130}}, color={0,0,127})); end if; connect(intKPICal.KPI, outBusDem.QIntGain) annotation (Line( - points={{17.8,-110},{8,-110},{8,-2},{98,-2}}, + points={{17.8,-150},{8,-150},{8,-2},{98,-2}}, color={135,135,135}, thickness=0.5), Text( string="%second", @@ -372,17 +396,12 @@ equation extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); connect(multiSum.y, intKPICal.u) - annotation (Line(points={{58.47,-129},{54,-129},{54,-110},{41.8,-110}}, + annotation (Line(points={{58.47,-149},{58.47,-150},{41.8,-150}}, color={0,0,127})); - connect(multiSum.u, thermalZone.QIntGains_flow) annotation (Line(points={{78,-129}, - {86,-129},{86,-110},{56,-110},{56,4},{-28,4},{-28,10},{-32,10},{-32,8}, - {-42.7,8},{-42.7,33.6}}, + connect(multiSum.u, thermalZone.QIntGains_flow) annotation (Line(points={{78,-149}, + {78,-152},{86,-152},{86,-134},{-6,-134},{-6,-68},{-28,-68},{-28,0},{-42.7, + 0},{-42.7,33.6}}, color={0,0,127})); - connect(zeroLoad.internalElectricalPin, internalElectricalPin) annotation ( - Line( - points={{84,-96},{70,-96}}, - color={0,0,0}, - thickness=1)); connect(realPassThroughIntGains.y, thermalZone.intGains) annotation (Line( points={{-79,10},{-50,10},{-50,4},{-31.6,4},{-31.6,17.76}}, color={0,0, 127})); @@ -400,7 +419,8 @@ equation extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(comCalHeaOpe.TZone, calTOpe.y) annotation (Line(points={{18,-20},{-32, - -20},{-32,-16},{-81,-16},{-81,30}}, color={0,0,127})); + -20},{-32,-10},{-86,-10},{-86,30},{-81,30}}, + color={0,0,127})); connect(comCalCooOpe.TZone, calTOpe.y) annotation (Line(points={{18,-60},{10, -60},{10,0},{2,0},{2,2},{0,2},{0,6},{-46,6},{-46,28},{-52,28},{-52,44}, {-88,44},{-88,30},{-81,30}}, color={0,0,127})); @@ -424,6 +444,33 @@ equation index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); + connect(gain.y,realToElecCon. PEleLoa) annotation (Line(points={{73,-120},{73, + -116},{86,-116}}, color={0,0,127})); + connect(multiSumEle.y, gain.u) + annotation (Line(points={{41.7,-120},{50,-120}}, color={0,0,127})); + connect(realToElecCon.internalElectricalPin, internalElectricalPin) + annotation (Line( + points={{108.2,-119.8},{114,-119.8},{114,-96},{70,-96}}, + color={0,0,0}, + thickness=1)); + + connect(roomControlCalculator.dTComSec, outBusDem.dTControlHea) annotation ( + Line(points={{71,-30},{86,-30},{86,-16},{98,-16},{98,-2}}, color={0,0,127}), + Text( + string="%second", + index=1, + extent={{6,3},{6,3}}, + horizontalAlignment=TextAlignment.Left)); + connect(roomControlCalculator.TZone, thermalZone.TAir) annotation (Line( + points={{48,-30},{2,-30},{2,-20},{-32,-20},{-32,-10},{-54,-10},{-54, + 76.8},{-42.7,76.8}}, color={0,0,127})); + connect(roomControlCalculator.TZoneSet, useProBus.TZoneSet) annotation (Line( + points={{48,-36},{42,-36},{42,102},{52,102},{52,101},{51,101}}, color={ + 0,0,127}), Text( + string="%second", + index=1, + extent={{-6,3},{-6,3}}, + horizontalAlignment=TextAlignment.Right)); annotation (Diagram(coordinateSystem(extent={{-100,-220},{100,100}})), Documentation(info="
This model uses the reduced-order approach with the common TEASER output to model the building envelope. Relevant KPIs are calculated.
diff --git a/BESMod/Systems/Hydraulical/Components/UFH/PanelHeating.mo b/BESMod/Systems/Hydraulical/Components/UFH/PanelHeating.mo index 6d04645e..d37cb990 100644 --- a/BESMod/Systems/Hydraulical/Components/UFH/PanelHeating.mo +++ b/BESMod/Systems/Hydraulical/Components/UFH/PanelHeating.mo @@ -28,18 +28,14 @@ model PanelHeating parameter Modelica.Units.SI.Temperature T0= Modelica.Units.Conversions.from_degC(20) "Initial temperature, in degrees Celsius"; - parameter Integer calcMethod=2 "Calculation method for convective heat transfer coefficient at surface" annotation (Dialog(group="Heat convection", - descriptionLabel=true), choices( - choice=1 "EN ISO 6946 Appendix A >>Flat Surfaces<<", - choice=2 "By Bernd Glueck", - choice=3 "Custom hCon (constant)", - radioButtons=true)); - + parameter AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface calcMethod=AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface.Bernd_Glueck "Calculation method for convective heat transfer coefficient" annotation ( + Dialog(descriptionLabel=true), + Evaluate=true); parameter Modelica.Units.SI.CoefficientOfHeatTransfer hCon_const=2.5 "Custom convective heat transfer coefficient" annotation (Dialog( group="Heat convection", descriptionLabel=true, - enable=if calcMethod == 3 then true else false)); + enable=if calcMethod == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface.Custom_hCon then true else false)); final parameter Modelica.Units.SI.Emissivity eps=floorHeatingType.eps "Emissivity"; diff --git a/BESMod/Systems/Hydraulical/Components/UFH/PanelHeatingSegment.mo b/BESMod/Systems/Hydraulical/Components/UFH/PanelHeatingSegment.mo index 1762521a..fead5a8a 100644 --- a/BESMod/Systems/Hydraulical/Components/UFH/PanelHeatingSegment.mo +++ b/BESMod/Systems/Hydraulical/Components/UFH/PanelHeatingSegment.mo @@ -23,19 +23,15 @@ parameter parameter AixLib.Fluid.HeatExchangers.ActiveWalls.BaseClasses.HeatCapacityPerArea cDown; - parameter Integer calcMethod=2 "Calculation method for convective heat transfer coefficient at surface" - annotation (Dialog(group="Heat convection", - descriptionLabel=true), choices( - choice=1 "EN ISO 6946 Appendix A >>Flat Surfaces<<", - choice=2 "By Bernd Glueck", - choice=3 "Custom hCon (constant)", - radioButtons=true)); + parameter AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface calcMethod=AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface.Bernd_Glueck "Calculation method for convective heat transfer coefficient" annotation ( + Dialog(descriptionLabel=true), + Evaluate=true); parameter Modelica.Units.SI.CoefficientOfHeatTransfer hCon_const=2.5 "Constant heat transfer coefficient" annotation (Dialog( group="Heat convection", descriptionLabel=true, - enable=if calcMethod == 3 then true else false)); + enable=if calcMethod == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface.Custom_hCon then true else false)); Modelica.Fluid.Vessels.ClosedVolume vol( redeclare package Medium = Medium, @@ -65,7 +61,7 @@ parameter final A=A_floor, final calcMethod=calcMethod, final hCon_const=hCon_const, - surfaceOrientation=if isFloor then 2 else 1) annotation (Placement( + surfaceOrientation=if isFloor then AixLib.ThermalZones.HighOrder.Components.Types.InsideSurfaceOrientation.floor else AixLib.ThermalZones.HighOrder.Components.Types.InsideSurfaceOrientation.vertical_wall) annotation (Placement( transformation( extent={{-10,-10},{10,10}}, rotation=270, diff --git a/BESMod/Systems/Hydraulical/Control/BaseClasses/PartialHeatPumpSystemController.mo b/BESMod/Systems/Hydraulical/Control/BaseClasses/PartialHeatPumpSystemController.mo index 16bf50a8..26333094 100644 --- a/BESMod/Systems/Hydraulical/Control/BaseClasses/PartialHeatPumpSystemController.mo +++ b/BESMod/Systems/Hydraulical/Control/BaseClasses/PartialHeatPumpSystemController.mo @@ -6,6 +6,10 @@ partial model PartialHeatPumpSystemController parameter Components.BaseClasses.MeasuredValue meaValPriGen=BESMod.Systems.Hydraulical.Control.Components.BaseClasses.MeasuredValue.GenerationSupplyTemperature "Control measurement value for primary device" annotation (Dialog(group="Heat Pump")); + parameter Utilities.SupervisoryControl.Types.SupervisoryControlType + supCtrlNSetTyp=BESMod.Utilities.SupervisoryControl.Types.SupervisoryControlType.Local + "Type of supervisory control for compressor speed" + annotation (Dialog(group="Heat Pump")); parameter Components.BaseClasses.MeasuredValue meaValSecGen "Control measurement value for secondary device" annotation (Dialog(group="Backup heater")); @@ -22,7 +26,10 @@ partial model PartialHeatPumpSystemController supCtrDHWTyp=BESMod.Utilities.SupervisoryControl.Types.SupervisoryControlType.Local "Supervisory control approach for DHW supply temperature " annotation(Dialog(group="DHW control")); - + parameter Utilities.SupervisoryControl.Types.SupervisoryControlType + supCtrlThrWayValTyp=BESMod.Utilities.SupervisoryControl.Types.SupervisoryControlType.Local + "Type of supervisory control for three way valve" + annotation (Dialog(tab="DHW control")); replaceable model BuildingHysteresis = BESMod.Systems.Hydraulical.Control.Components.BivalentOnOffControllers.BaseClasses.PartialOnOffController @@ -87,7 +94,7 @@ partial model PartialHeatPumpSystemController "PID parameters of heat pump" annotation (choicesAllMatching=true, Dialog(group="Heat Pump"), - Placement(transformation(extent={{100,40},{120,60}}))); + Placement(transformation(extent={{80,40},{100,60}}))); replaceable BESMod.Systems.Hydraulical.Control.RecordsCollection.HeatPumpSafetyControl safetyControl "Parameters for safety control of heat pump" @@ -109,7 +116,7 @@ partial model PartialHeatPumpSystemController "Control of heat pump" annotation ( Dialog(group="Heat Pump", tab="Advanced"), choicesAllMatching=true, - Placement(transformation(extent={{102,82},{118,98}}))); + Placement(transformation(extent={{82,82},{98,98}}))); AixLib.Controls.HeatPump.SafetyControls.SafetyControl safCtr( final minRunTime=safetyControl.minRunTime, @@ -167,6 +174,7 @@ partial model PartialHeatPumpSystemController final nHeaTra=parTra.nHeaTra, final supCtrHeaCurTyp=supCtrHeaCurTyp, final supCtrDHWTyp=supCtrDHWTyp, + final supCtrlThrWayValTyp=supCtrlThrWayValTyp, redeclare final model SummerMode = SummerMode, redeclare final model DHWHysteresis = DHWHysteresis, redeclare final model BuildingHysteresis = BuildingHysteresis, @@ -202,6 +210,10 @@ partial model PartialHeatPumpSystemController "Selection of set and measured value for secondary generation device" annotation (Placement(transformation(extent={{40,0},{60,20}}))); + BESMod.Utilities.SupervisoryControl.SupervisoryControl supCtrNSet(final ctrlType= + supCtrlNSetTyp) "Supervisory control of compressor speed" + annotation (Placement(transformation(extent={{110,80},{130,100}}))); + equation connect(safCtr.modeSet, heaPumHea.y) annotation (Line(points={{198.667,68},{ @@ -214,13 +226,10 @@ equation index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); - connect(priGenPIDCtrl.ySet, safCtr.nSet) annotation (Line(points={{118.8,90}, - {154,90},{154,76},{190,76},{190,72},{198.667,72}}, - color={0,0,127})); - connect(priGenPIDCtrl.isOn, sigBusGen.heaPumIsOn) annotation (Line(points={{105.2, - 80.4},{105.2,78},{106,78},{106,48},{260,48},{260,-114},{-152,-114},{-152, - -99}}, color={255,0,255}), Text( + connect(priGenPIDCtrl.isOn, sigBusGen.heaPumIsOn) annotation (Line(points={{85.2, + 80.4},{85.2,62},{66,62},{66,-99},{-152,-99}}, + color={255,0,255}), Text( string="%second", index=1, extent={{-3,-6},{-3,-6}}, @@ -246,21 +255,22 @@ equation points={{180.2,64.2},{190,64.2},{190,63.1},{198.75,63.1}}, color={255,204,51}, thickness=0.5)); - connect(buiAndDHWCtr.TZoneSet, useProBus.TZoneSet) annotation (Line(points={{ - -204,35},{-238,35},{-238,103},{-119,103}}, color={0,0,127}), Text( + connect(buiAndDHWCtr.TZoneSet, useProBus.TZoneSet) annotation (Line(points={{-204, + 32.3333},{-238,32.3333},{-238,103},{-119,103}}, + color={0,0,127}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); - connect(buiAndDHWCtr.TZoneMea, buiMeaBus.TZoneMea) annotation (Line(points={{ - -204,45},{-250,45},{-250,118},{64,118},{64,103},{65,103}}, color={0,0, + connect(buiAndDHWCtr.TZoneMea, buiMeaBus.TZoneMea) annotation (Line(points={{-204,39}, + {-250,39},{-250,118},{64,118},{64,103},{65,103}}, color={0,0, 127}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); connect(sigBusDistr, buiAndDHWCtr.sigBusDistr) annotation (Line( - points={{1,-100},{1,-116},{-250,-116},{-250,72.5},{-200,72.5}}, + points={{1,-100},{1,-116},{-250,-116},{-250,57.3333},{-200,57.3333}}, color={255,204,51}, thickness=0.5), Text( string="%first", @@ -268,34 +278,34 @@ equation extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); connect(buiAndDHWCtr.sigBusHyd, sigBusHyd) annotation (Line( - points={{-185.6,80.25},{-185.6,112},{-186,112},{-186,118},{-28,118},{-28, - 101}}, + points={{-159.6,79.5},{-159.6,112},{-186,112},{-186,118},{-28,118},{-28,101}}, color={255,204,51}, thickness=0.5), Text( string="%second", index=1, extent={{-3,6},{-3,6}}, horizontalAlignment=TextAlignment.Right)); - connect(buiAndDHWCtr.TOda, weaBus.TDryBul) annotation (Line(points={{-204,55},{ - -244,55},{-244,2.11},{-236.895,2.11}}, + connect(buiAndDHWCtr.TOda, weaBus.TDryBul) annotation (Line(points={{-204, + 45.6667},{-244,45.6667},{-244,2.11},{-236.895,2.11}}, color={0,0,127}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); - connect(buiAndDHWCtr.secGen, anyGenDevIsOn.u[1]) annotation (Line(points={{-118, - 37.5},{-118,36},{-112,36},{-112,6},{-151.75,6},{-151.75,0}}, + connect(buiAndDHWCtr.secGen, anyGenDevIsOn.u[1]) annotation (Line(points={{-118,34}, + {-118,36},{-112,36},{-112,6},{-151.75,6},{-151.75,0}}, color={255,0,255})); connect(setAndMeaSelPri.DHW, buiAndDHWCtr.DHW) annotation (Line(points={{39,76}, - {28,76},{28,74},{-106,74},{-106,68},{-118,68}}, color={0,0,127})); - connect(buiAndDHWCtr.TDHWSet, setAndMeaSelPri.TDHWSet) annotation (Line(points={ - {-118,75},{-118,74},{28,74},{28,78.8},{39,78.8}}, color={0,0,127})); - connect(setAndMeaSelPri.TBuiSet, buiAndDHWCtr.TBuiSet) annotation (Line(points={ - {39,72.8},{38,72.8},{38,74},{-106,74},{-106,60},{-118,60}}, color={0,0,127})); + {28,76},{28,74},{-106,74},{-106,54.3333},{-118,54.3333}}, + color={0,0,127})); + connect(buiAndDHWCtr.TDHWSet, setAndMeaSelPri.TDHWSet) annotation (Line(points={{-118,59}, + {-118,74},{28,74},{28,78.8},{39,78.8}}, color={0,0,127})); + connect(setAndMeaSelPri.TBuiSet, buiAndDHWCtr.TBuiSet) annotation (Line(points={{39,72.8}, + {38,72.8},{38,74},{-106,74},{-106,49},{-118,49}}, color={0,0,127})); connect(setAndMeaSelPri.TSet, priGenPIDCtrl.TSet) annotation (Line(points={{61,76}, - {94,76},{94,94.8},{100.4,94.8}}, color={0,0,127})); + {80.4,76},{80.4,94.8}}, color={0,0,127})); connect(setAndMeaSelPri.TMea, priGenPIDCtrl.TMea) - annotation (Line(points={{61,66},{110,66},{110,80.4}}, color={0,0,127})); + annotation (Line(points={{61,66},{90,66},{90,80.4}}, color={0,0,127})); connect(setAndMeaSelPri.sigBusGen, sigBusGen) annotation (Line( points={{40,61.8},{20,61.8},{20,62},{0,62},{0,-99},{-152,-99}}, color={255,204,51}, @@ -312,14 +322,15 @@ equation index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); - connect(setAndMeaSelSec.TDHWSet, buiAndDHWCtr.TDHWSet) annotation (Line(points={ - {39,18.8},{34,18.8},{34,16},{-28,16},{-28,74},{-120,74},{-120,75},{-118, - 75}}, color={0,0,127})); - connect(setAndMeaSelSec.TBuiSet, buiAndDHWCtr.TBuiSet) annotation (Line(points={ - {39,12.8},{4,12.8},{4,16},{-28,16},{-28,74},{-106,74},{-106,60},{-118,60}}, + connect(setAndMeaSelSec.TDHWSet, buiAndDHWCtr.TDHWSet) annotation (Line(points={{39,18.8}, + {34,18.8},{34,16},{-28,16},{-28,74},{-120,74},{-120,59},{-118,59}}, + color={0,0,127})); + connect(setAndMeaSelSec.TBuiSet, buiAndDHWCtr.TBuiSet) annotation (Line(points={{39,12.8}, + {4,12.8},{4,16},{-28,16},{-28,74},{-106,74},{-106,49},{-118,49}}, color={0,0,127})); connect(setAndMeaSelSec.DHW, buiAndDHWCtr.DHW) annotation (Line(points={{39,16}, - {-28,16},{-28,74},{-106,74},{-106,68},{-118,68}}, color={255,0,255})); + {-28,16},{-28,74},{-106,74},{-106,54.3333},{-118,54.3333}}, + color={255,0,255})); connect(setAndMeaSelSec.sigBusDistr, sigBusDistr) annotation (Line( points={{40,7.9},{40,6},{1,6},{1,-100}}, color={255,204,51}, @@ -344,6 +355,10 @@ equation index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); + connect(supCtrNSet.y, safCtr.nSet) annotation (Line(points={{132,90},{132,110}, + {196,110},{196,86},{194,86},{194,72},{198.667,72}}, color={0,0,127})); + connect(supCtrNSet.uLoc, priGenPIDCtrl.ySet) annotation (Line(points={{108,82}, + {104,82},{104,90},{98.8,90}}, color={0,0,127})); annotation (Diagram(graphics={ Rectangle( extent={{4,100},{136,36}}, diff --git a/BESMod/Systems/Hydraulical/Control/BaseClasses/PartialThermostaticValveControl.mo b/BESMod/Systems/Hydraulical/Control/BaseClasses/PartialThermostaticValveControl.mo index e06841a8..589762c4 100644 --- a/BESMod/Systems/Hydraulical/Control/BaseClasses/PartialThermostaticValveControl.mo +++ b/BESMod/Systems/Hydraulical/Control/BaseClasses/PartialThermostaticValveControl.mo @@ -5,7 +5,10 @@ partial model PartialThermostaticValveControl parameter Boolean useOpeTemCtrl=false "=true to control the operative room temperature" annotation (Dialog(group="Building control")); - + parameter Utilities.SupervisoryControl.Types.SupervisoryControlType + supCtrlTypTheVal=BESMod.Utilities.SupervisoryControl.Types.SupervisoryControlType.Local + "Type of supervisory valve control" + annotation (Dialog(group="Building control")); replaceable BESMod.Systems.Hydraulical.Control.Components.ThermostaticValveController.BaseClasses.PartialThermostaticValveController valCtrl constrainedby @@ -13,38 +16,46 @@ partial model PartialThermostaticValveControl final nZones=parTra.nParallelDem) "Thermostatic valve controller" annotation ( Dialog(group="Building control"), choicesAllMatching=true, - Placement(transformation(extent={{122,-78},{138,-62}}))); + Placement(transformation(extent={{82,-78},{98,-62}}))); + Utilities.SupervisoryControl.SupervisoryControl supCtrlTheVal[parTra.nParallelDem]( + each final ctrlType=supCtrlTypTheVal) + "Supervisory control to possibly override local control" + annotation (Placement(transformation(extent={{120,-80},{140,-60}}))); equation - connect(valCtrl.opening, sigBusTra.opening) annotation (Line(points={{139.6,-70}, - {174,-70},{174,-100}}, color={0,0,127}), Text( - string="%second", - index=1, - extent={{6,3},{6,3}}, - horizontalAlignment=TextAlignment.Left)); if useOpeTemCtrl then - connect(valCtrl.TZoneMea, buiMeaBus.TZoneOpeMea) annotation (Line(points={{120.4,-65.2}, - {120.4,-66},{76,-66},{76,-116},{-250,-116},{-250,118},{65,118},{65,103}}, + connect(valCtrl.TZoneMea, buiMeaBus.TZoneOpeMea) annotation (Line(points={{80.4, + -65.2},{80.4,-66},{76,-66},{76,-116},{-250,-116},{-250,118},{65,118}, + {65,103}}, color={0,0,127}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); else - connect(valCtrl.TZoneMea, buiMeaBus.TZoneMea) annotation (Line(points={{120.4,-65.2}, - {120.4,-66},{76,-66},{76,-116},{-250,-116},{-250,118},{65,118},{65,103}}, + connect(valCtrl.TZoneMea, buiMeaBus.TZoneMea) annotation (Line(points={{80.4, + -65.2},{80.4,-66},{76,-66},{76,-116},{-250,-116},{-250,118},{65,118}, + {65,103}}, color={0,0,127}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); end if; - connect(valCtrl.TZoneSet, useProBus.TZoneSet) annotation (Line(points={{120.4,-74.8}, + connect(valCtrl.TZoneSet, useProBus.TZoneSet) annotation (Line(points={{80.4,-74.8}, {76,-74.8},{76,-116},{-250,-116},{-250,102},{-119,102},{-119,103}}, color={0,0,127}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); + connect(supCtrlTheVal.y, sigBusTra.opening) annotation (Line(points={{142,-70}, + {174,-70},{174,-100}}, color={0,0,127}), Text( + string="%second", + index=1, + extent={{6,3},{6,3}}, + horizontalAlignment=TextAlignment.Left)); + connect(valCtrl.opening, supCtrlTheVal.uLoc) annotation (Line(points={{99.6,-70}, + {110,-70},{110,-78},{118,-78}}, color={0,0,127})); annotation (Diagram(graphics={ Rectangle( extent={{74,-58},{206,-100}}, diff --git a/BESMod/Systems/Hydraulical/Control/Components/BuildingAndDHWControl.mo b/BESMod/Systems/Hydraulical/Control/Components/BuildingAndDHWControl.mo index 72159e23..018afeca 100644 --- a/BESMod/Systems/Hydraulical/Control/Components/BuildingAndDHWControl.mo +++ b/BESMod/Systems/Hydraulical/Control/Components/BuildingAndDHWControl.mo @@ -18,7 +18,9 @@ model BuildingAndDHWControl parameter Utilities.SupervisoryControl.Types.SupervisoryControlType supCtrDHWTyp=BESMod.Utilities.SupervisoryControl.Types.SupervisoryControlType.Local "Supervisory control approach for DHW supply temperature "; - + parameter Utilities.SupervisoryControl.Types.SupervisoryControlType + supCtrlThrWayValTyp=BESMod.Utilities.SupervisoryControl.Types.SupervisoryControlType.Local + "Type of supervisory control for three way valve"; replaceable model BuildingHysteresis = BESMod.Systems.Hydraulical.Control.Components.BivalentOnOffControllers.TimeBasedElectricHeater (dTHys=10) @@ -73,20 +75,20 @@ model BuildingAndDHWControl "Name of SG Ready scenario input file" annotation (Dialog(group="SG Ready", enable=not useExtSGSig and useSGReady)); SummerMode sumMod "Summer mode instance" - annotation (Placement(transformation(extent={{42,-18},{62,2}}))); + annotation (Placement(transformation(extent={{-58,-44},{-38,-24}}))); BuildingHysteresis hysBui "Hysteresis for building" annotation (Placement( - transformation(extent={{40,-80},{60,-60}}))); + transformation(extent={{-60,-106},{-40,-86}}))); BuildingSupplySetTemperature TSetBuiSup "Building supply set temperature module" annotation ( - Placement(transformation(extent={{-70,-80},{-50,-60}}))); + Placement(transformation(extent={{-170,-106},{-150,-86}}))); DHWHysteresis hysDHW if use_dhw "Hysteresis for DHW system" annotation (Placement( - transformation(extent={{60,60},{80,80}}))); + transformation(extent={{-40,34},{-20,54}}))); DHWSetTemperature TSetDHW if use_dhw "DHW set temperature module" annotation ( - Placement(transformation(extent={{-80,80},{-60,100}}))); + Placement(transformation(extent={{-180,54},{-160,74}}))); Modelica.Blocks.Logical.Or priGenOn if use_dhw @@ -94,122 +96,122 @@ model BuildingAndDHWControl annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0, - origin={232,-90}))); + origin={132,-116}))); Modelica.Blocks.MathBoolean.Or orDHW(nu=3) if use_dhw "If any is true, dhw is activated" annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0, - origin={110,70}))); + origin={10,44}))); BESMod.Utilities.SupervisoryControl.SupervisoryControl supCtrDHW(ctrlType=supCtrDHWTyp) - if use_dhw "Supervisory control of DHW" - annotation (Placement(transformation(extent={{0,60},{20,80}}))); + if use_dhw "Supervisory control of DHW" + annotation (Placement(transformation(extent={{-100,34},{-80,54}}))); Modelica.Blocks.Interfaces.RealInput TOda(unit="K", displayUnit="degC") "Outdoor air temperature" - annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); + annotation (Placement(transformation(extent={{-240,-46},{-200,-6}}))); Modelica.Blocks.Interfaces.RealOutput TDHWSet(unit="K", displayUnit="degC") if use_dhw "DHW supply set temperature" - annotation (Placement(transformation(extent={{300,70},{320,90}}))); + annotation (Placement(transformation(extent={{200,44},{220,64}}))); Modelica.Blocks.Math.MinMax maxSecHeaGen(nu=if use_dhw then 3 else 1) "Maximal value suggested for secondary heat generator" annotation (Placement( transformation( extent={{10,-10},{-10,10}}, rotation=180, - origin={210,-50}))); + origin={110,-76}))); Interfaces.DistributionControlBus sigBusDistr "Necessary to control DHW temperatures" - annotation (Placement(transformation(extent={{-110,60},{-90,80}}))); + annotation (Placement(transformation(extent={{-210,34},{-190,54}}))); Interfaces.SystemControlBus sigBusHyd annotation (Placement(transformation( - extent={{80,86},{120,120}}), iconTransformation(extent={{-48,84},{-8, - 118}}))); + extent={{-20,60},{20,94}}), iconTransformation(extent={{-18,160},{22, + 194}}))); Modelica.Blocks.Interfaces.BooleanOutput priGren "=true to activate primary generation device" - annotation (Placement(transformation(extent={{300,-120},{320,-100}}))); + annotation (Placement(transformation(extent={{200,-146},{220,-126}}))); Modelica.Blocks.MathBoolean.Or secGenOn(nu=3) if use_dhw "If any is true, secondary heater is activated" annotation (Placement( transformation( extent={{-10,-10},{10,10}}, rotation=0, - origin={192,-112}))); + origin={92,-138}))); Modelica.Blocks.Interfaces.BooleanOutput secGen "=true to activate secondary generator" - annotation (Placement(transformation(extent={{300,-80},{320,-60}}))); + annotation (Placement(transformation(extent={{200,-106},{220,-86}}))); Modelica.Blocks.Logical.Switch swiAntLeg if use_dhw "Switch to full load for anti legionella" annotation (Placement( transformation( extent={{-10,-10},{10,10}}, rotation=0, - origin={-30,50}))); + origin={-130,24}))); Modelica.Blocks.Interfaces.RealOutput ySecGenSet "Suggested relative power of secondary heat generator" - annotation (Placement(transformation(extent={{300,-50},{320,-30}}))); + annotation (Placement(transformation(extent={{200,-76},{220,-56}}))); Modelica.Blocks.Interfaces.RealInput TZoneMea[nZones](each final unit="K", each final displayUnit="degC") "Zones temperatures measurements" - annotation (Placement(transformation(extent={{-140,-60},{-100,-20}}))); + annotation (Placement(transformation(extent={{-240,-86},{-200,-46}}))); Modelica.Blocks.Interfaces.RealInput TZoneSet[nZones](each final unit="K", each final displayUnit="degC") "Zones set temperatures" - annotation (Placement(transformation(extent={{-140,-100},{-100,-60}}))); + annotation (Placement(transformation(extent={{-240,-126},{-200,-86}}))); Utilities.SupervisoryControl.SupervisoryControl supCtrHeaCur(ctrlType= supCtrHeaCurTyp) "Supervisory control of heating curve" - annotation (Placement(transformation(extent={{10,-100},{30,-80}}))); + annotation (Placement(transformation(extent={{-90,-126},{-70,-106}}))); Modelica.Blocks.Sources.Constant constAntLeg(final k=1) if use_dhw "For anti legionella, run secondary device at full load" - annotation (Placement(transformation(extent={{-80,50},{-60,70}}))); + annotation (Placement(transformation(extent={{-180,24},{-160,44}}))); Modelica.Blocks.Sources.Constant constAntLegOff(final k=0) if use_dhw "Disable secondary device if no anti legionella" - annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); + annotation (Placement(transformation(extent={{-180,-6},{-160,14}}))); Modelica.Blocks.Logical.Not bufOn "buffer is charged" annotation (Placement( transformation( extent={{-10,-10},{10,10}}, - rotation=90, - origin={260,62}))); + rotation=180, + origin={170,130}))); Modelica.Blocks.Math.BooleanToReal booToReal(final realTrue=1, final realFalse= 0) "Convert singal to real" annotation (Placement(transformation( extent={{-10,-10},{10,10}}, - rotation=90, - origin={260,92}))); + rotation=180, + origin={130,130}))); Modelica.Blocks.Interfaces.BooleanOutput DHW if use_dhw "=true for DHW loading" - annotation (Placement(transformation(extent={{300,42},{320,62}}))); + annotation (Placement(transformation(extent={{200,16},{220,36}}))); Modelica.Blocks.Interfaces.RealOutput TBuiSet(unit="K", displayUnit="degC") "Building supply set temperature" - annotation (Placement(transformation(extent={{300,10},{320,30}}))); + annotation (Placement(transformation(extent={{200,-16},{220,4}}))); Modelica.Blocks.Logical.LogicalSwitch logSwiDHW if use_dhw "Logical switch" - annotation (Placement(transformation(extent={{160,80},{180,60}}))); + annotation (Placement(transformation(extent={{60,54},{80,34}}))); Modelica.Blocks.Sources.BooleanConstant conSumMod(final k=true) if use_dhw "Constant DHW true in summer mode" - annotation (Placement(transformation(extent={{130,80},{150,100}}))); + annotation (Placement(transformation(extent={{30,54},{50,74}}))); Modelica.Blocks.Logical.LogicalSwitch logSwiSumModSecGen "Logical switch for second heat generator" - annotation (Placement(transformation(extent={{120,-120},{140,-100}}))); + annotation (Placement(transformation(extent={{20,-146},{40,-126}}))); Modelica.Blocks.Logical.LogicalSwitch logSwiSumModPriGen "Logical switch for primary heat generator" - annotation (Placement(transformation(extent={{120,-80},{140,-60}}))); + annotation (Placement(transformation(extent={{20,-106},{40,-86}}))); Modelica.Blocks.Sources.BooleanConstant conSumModGen(final k=false) "Constant summer mode, generators off" - annotation (Placement(transformation(extent={{20,-140},{40,-120}}))); + annotation (Placement(transformation(extent={{-80,-166},{-60,-146}}))); Modelica.Blocks.Logical.Not winMod "=true for winter mode" annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0, - origin={90,-10}))); + origin={-10,-36}))); Modelica.Blocks.Routing.RealPassThrough realPassThrough if use_dhw "Disable secondary device if no anti legionella" - annotation (Placement(transformation(extent={{0,120},{20,140}}))); + annotation (Placement(transformation(extent={{-100,94},{-80,114}}))); Modelica.Blocks.Logical.And priGenOffSGRead "Turn off due to SG Ready" annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0, - origin={270,-78}))); + origin={170,-104}))); Modelica.Blocks.Logical.And secGenOffSGRead "Turn off due to SG Ready" annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0, - origin={276,-126}))); + origin={176,-152}))); SetTemperatureSGReady TSetBuiSupSGReady( final useSGReady=useSGReady, final filNam=filNamSGReady, @@ -217,7 +219,7 @@ model BuildingAndDHWControl final TAddSta4=TAddSta4Bui, final useExtSGSig=useExtSGSig) "Supply set temperature after SG Ready signal" - annotation (Placement(transformation(extent={{-40,-100},{-20,-80}}))); + annotation (Placement(transformation(extent={{-140,-126},{-120,-106}}))); SetTemperatureSGReady TSetDHWSGReady( final useSGReady=useSGReady, @@ -227,271 +229,307 @@ model BuildingAndDHWControl final useExtSGSig=useExtSGSig) if use_dhw "DHW set temperature after SG Ready signal" - annotation (Placement(transformation(extent={{-40,68},{-20,88}}))); + annotation (Placement(transformation(extent={{-140,42},{-120,62}}))); Modelica.Blocks.Sources.BooleanConstant conDHWOff(final k=false) if not use_dhw "Constant DHW true in summer mode" - annotation (Placement(transformation(extent={{180,20},{200,40}}))); + annotation (Placement(transformation(extent={{80,-6},{100,14}}))); + BESMod.Utilities.SupervisoryControl.SupervisoryControl supCtrThrWayVal(final + ctrlType=supCtrlThrWayValTyp) "Supervisory control of DHW" annotation ( + Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={70,130}))); + equation - connect(hysDHW.priGenOn, priGenOn.u1) annotation (Line(points={{81.4,77},{81.4, - 76},{90,76},{90,32},{176,32},{176,-60},{194,-60},{194,-90},{220,-90}}, - color={255,0,255})); - connect(TSetDHW.y, orDHW.u[1]) annotation (Line(points={{-59,84.2},{-54,84.2}, - {-54,34},{94,34},{94,64},{100,64},{100,67.6667}}, + connect(hysDHW.priGenOn, priGenOn.u1) annotation (Line(points={{-18.6,51},{-8, + 51},{-8,-20},{90,-20},{90,-116},{120,-116}}, color={255,0,255})); + connect(TSetDHW.y, orDHW.u[1]) annotation (Line(points={{-159,58.2},{-150, + 58.2},{-150,70},{-46,70},{-46,28},{-10,28},{-10,41.6667},{0,41.6667}}, color={255,0,255})); - connect(hysDHW.secGenOn, orDHW.u[2]) annotation (Line(points={{81.4,65},{81.4, - 70},{100,70}}, color={255,0,255})); - connect(supCtrDHW.y, hysDHW.TSupSet) annotation (Line(points={{22,70},{22,56}, - {70,56},{70,59}}, + connect(hysDHW.secGenOn, orDHW.u[2]) annotation (Line(points={{-18.6,39},{-8,39}, + {-8,44},{0,44}}, color={255,0,255})); + connect(supCtrDHW.y, hysDHW.TSupSet) annotation (Line(points={{-78,44},{-46,44}, + {-46,28},{-30,28},{-30,33}}, color={0,0,127})); - connect(TSetBuiSup.TOda, TOda) annotation (Line(points={{-72,-70},{-90,-70},{-90, - -38},{-54,-38},{-54,0},{-120,0}}, + connect(TSetBuiSup.TOda, TOda) annotation (Line(points={{-172,-96},{-194,-96}, + {-194,-26},{-220,-26}}, color={0,0,127})); - connect(hysBui.TOda, TOda) annotation (Line(points={{50,-58.8},{50,-54},{-54,-54}, - {-54,0},{-120,0}}, color={0,0,127})); - connect(supCtrDHW.uSup, sigBusHyd.TSetDHWOve) annotation (Line(points={{-2,78}, - {-8,78},{-8,88},{78,88},{78,84},{100,84},{100,103}}, color={0,0,127}), + connect(hysBui.TOda, TOda) annotation (Line(points={{-50,-84.8},{-50,-50},{-194, + -50},{-194,-26},{-220,-26}}, + color={0,0,127})); + connect(supCtrDHW.uSup, sigBusHyd.TSetDHWOve) annotation (Line(points={{-102,52}, + {-106,52},{-106,77},{0,77}}, color={0,0,127}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); - connect(supCtrDHW.actInt, sigBusHyd.oveTSetDHW) annotation (Line(points={{-2,70}, - {-8,70},{-8,88},{78,88},{78,84},{100,84},{100,103}}, + connect(supCtrDHW.actInt, sigBusHyd.oveTSetDHW) annotation (Line(points={{-102,44}, + {-106,44},{-106,77},{0,77}}, color={255,0,255}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); - connect(hysDHW.secGenOn, secGenOn.u[1]) annotation (Line(points={{81.4,65},{ - 88,65},{88,34},{176,34},{176,-114.333},{182,-114.333}}, + connect(hysDHW.secGenOn, secGenOn.u[1]) annotation (Line(points={{-18.6,39},{ + -8,39},{-8,-20},{72,-20},{72,-140.333},{82,-140.333}}, color={255,0,255})); - connect(TSetDHW.y, secGenOn.u[2]) annotation (Line(points={{-59,84.2},{-54,84.2}, - {-54,34},{176,34},{176,-112},{182,-112}}, + connect(TSetDHW.y, secGenOn.u[2]) annotation (Line(points={{-159,58.2},{-152,58.2}, + {-152,-80},{72,-80},{72,-138},{82,-138}}, color={255,0,255})); - connect(maxSecHeaGen.u[2], hysDHW.ySecGenSet) annotation (Line(points={{200,-50}, - {180,-50},{180,-48},{164,-48},{164,42},{84,42},{84,58},{81.4,58},{81.4, - 61.4}}, color={0, + connect(maxSecHeaGen.u[2], hysDHW.ySecGenSet) annotation (Line(points={{100,-76}, + {8,-76},{8,28},{-14,28},{-14,35.4},{-18.6,35.4}}, color={0, 0,127})); - connect(maxSecHeaGen.u[1], hysBui.ySecGenSet) annotation (Line(points={{200,-50}, - {200,-44},{72,-44},{72,-78.6},{61.4,-78.6}}, + connect(maxSecHeaGen.u[1], hysBui.ySecGenSet) annotation (Line(points={{100,-76}, + {-32,-76},{-32,-104.6},{-38.6,-104.6}}, color={0,0,127})); - connect(swiAntLeg.y, maxSecHeaGen.u[3]) annotation (Line(points={{-19,50},{164, - 50},{164,-50},{200,-50}}, color={0,0,127})); - connect(TSetDHW.y, swiAntLeg.u2) annotation (Line(points={{-59,84.2},{-54,84.2}, - {-54,50},{-42,50}}, color={255,0,255})); - connect(hysDHW.TStoTop, sigBusDistr.TStoDHWTopMea) annotation (Line(points={{59,77}, - {48,77},{48,102},{-90,102},{-90,70},{-100,70}}, color={0,0,127}), + connect(swiAntLeg.y, maxSecHeaGen.u[3]) annotation (Line(points={{-119,24},{74, + 24},{74,-76},{100,-76}}, color={0,0,127})); + connect(TSetDHW.y, swiAntLeg.u2) annotation (Line(points={{-159,58.2},{-152,58.2}, + {-152,24},{-142,24}}, + color={255,0,255})); + connect(hysDHW.TStoTop, sigBusDistr.TStoDHWTopMea) annotation (Line(points={{-41,51}, + {-74,51},{-74,68},{-154,68},{-154,44},{-200,44}}, color={0,0,127}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); - connect(hysDHW.TStoBot, sigBusDistr.TStoDHWBotMea) annotation (Line(points={{59,65}, - {48,65},{48,102},{-90,102},{-90,70},{-100,70}}, color={0,0,127}), + connect(hysDHW.TStoBot, sigBusDistr.TStoDHWBotMea) annotation (Line(points={{-41,39}, + {-68,39},{-68,68},{-154,68},{-154,44},{-200,44}}, color={0,0,127}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); connect(maxSecHeaGen.yMax, ySecGenSet) - annotation (Line(points={{221,-56},{286,-56},{286,-40},{310,-40}}, + annotation (Line(points={{121,-82},{194,-82},{194,-66},{210,-66}}, color={0,0,127})); - connect(TOda, hysDHW.TOda) annotation (Line(points={{-120,0},{-94,0},{-94,102}, - {70,102},{70,81.2}}, color={0,0,127})); - connect(hysBui.TStoTop, sigBusDistr.TStoBufTopMea) annotation (Line(points={{39,-63}, - {38,-63},{38,-64},{34,-64},{34,6},{-100,6},{-100,70}}, color={0, + connect(TOda, hysDHW.TOda) annotation (Line(points={{-220,-26},{-64,-26},{-64, + 62},{-30,62},{-30,55.2}}, + color={0,0,127})); + connect(hysBui.TStoTop, sigBusDistr.TStoBufTopMea) annotation (Line(points={{-61,-89}, + {-144,-89},{-144,8},{-152,8},{-152,44},{-200,44}}, color={0, 0,127}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); - connect(hysBui.TStoBot, sigBusDistr.TStoBufBotMea) annotation (Line(points={{39,-75}, - {34,-75},{34,6},{-100,6},{-100,70}}, color={0,0,127}), Text( + connect(hysBui.TStoBot, sigBusDistr.TStoBufBotMea) annotation (Line(points={{-61, + -101},{-62,-101},{-62,-50},{-154,-50},{-154,44},{-200,44}}, + color={0,0,127}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); connect(supCtrHeaCur.y, hysBui.TSupSet) - annotation (Line(points={{32,-90},{50,-90},{50,-81}}, color={0,0,127})); - connect(constAntLegOff.y, swiAntLeg.u3) annotation (Line(points={{-59,30},{-50, - 30},{-50,42},{-42,42}}, color={0,0,127})); + annotation (Line(points={{-68,-116},{-50,-116},{-50,-107}}, + color={0,0,127})); + connect(constAntLegOff.y, swiAntLeg.u3) annotation (Line(points={{-159,4},{-150, + 4},{-150,16},{-142,16}},color={0,0,127})); connect(constAntLeg.y, swiAntLeg.u1) - annotation (Line(points={{-59,60},{-59,58},{-42,58}}, color={0,0,127})); - connect(booToReal.y, sigBusDistr.uThrWayVal) annotation (Line(points={{260,103}, - {260,112},{-118,112},{-118,70},{-100,70}},color={0,0,127}), Text( - string="%second", - index=1, - extent={{-3,-6},{-3,-6}}, - horizontalAlignment=TextAlignment.Right)); + annotation (Line(points={{-159,34},{-159,32},{-142,32}}, + color={0,0,127})); connect(booToReal.u, bufOn.y) - annotation (Line(points={{260,80},{260,73}}, color={255,0,255})); - connect(supCtrHeaCur.uSup, sigBusHyd.TBuiSupOve) annotation (Line(points={{8,-82}, - {4,-82},{4,12},{-106,12},{-106,102},{100,102},{100,103}}, color={0,0, + annotation (Line(points={{142,130},{159,130}}, + color={255,0,255})); + connect(supCtrHeaCur.uSup, sigBusHyd.TBuiSupOve) annotation (Line(points={{-92, + -108},{-96,-108},{-96,28},{0,28},{0,77}}, color={0,0, 127}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); - connect(supCtrHeaCur.actInt, sigBusHyd.oveTBuiSup) annotation (Line(points={{8,-90}, - {4,-90},{4,12},{-106,12},{-106,102},{100,102},{100,103}}, + connect(supCtrHeaCur.actInt, sigBusHyd.oveTBuiSup) annotation (Line(points={{-92, + -116},{-96,-116},{-96,28},{0,28},{0,77}}, color={255,0,255}), Text( string="%second", index=1, extent={{-3,6},{-3,6}}, horizontalAlignment=TextAlignment.Right)); - connect(supCtrHeaCur.y, TBuiSet) annotation (Line(points={{32,-90},{90,-90},{90, - -30},{292,-30},{292,20},{310,20}}, color={0,0,127})); - connect(supCtrDHW.y, TDHWSet) annotation (Line(points={{22,70},{22,42},{274,42}, - {274,80},{310,80}}, color={0,0,127})); - connect(logSwiSumModPriGen.y, priGenOn.u2) annotation (Line(points={{141,-70}, - {188,-70},{188,-98},{220,-98}}, color={255,0,255})); - connect(logSwiSumModSecGen.y, secGenOn.u[3]) annotation (Line(points={{141, - -110},{141,-109.667},{182,-109.667}}, color={255,0,255})); - connect(logSwiDHW.y, DHW) annotation (Line(points={{181,70},{212,70},{212,44}, - {294,44},{294,52},{310,52}}, + connect(supCtrHeaCur.y, TBuiSet) annotation (Line(points={{-68,-116},{90,-116}, + {90,-28},{182,-28},{182,-6},{210,-6}}, + color={0,0,127})); + connect(supCtrDHW.y, TDHWSet) annotation (Line(points={{-78,44},{-46,44},{-46, + 20},{152,20},{152,16},{194,16},{194,54},{210,54}}, + color={0,0,127})); + connect(logSwiSumModPriGen.y, priGenOn.u2) annotation (Line(points={{41,-96},{ + 112,-96},{112,-124},{120,-124}},color={255,0,255})); + connect(logSwiSumModSecGen.y, secGenOn.u[3]) annotation (Line(points={{41,-136}, + {74,-136},{74,-135.667},{82,-135.667}}, color={255,0,255})); + connect(logSwiDHW.y, DHW) annotation (Line(points={{81,44},{144,44},{144,16},{ + 194,16},{194,26},{210,26}}, color={255,0,255})); - connect(logSwiSumModSecGen.u3, conSumModGen.y) annotation (Line(points={{118, - -118},{102,-118},{102,-130},{41,-130}}, color={255,0,255})); - connect(hysBui.secGenOn, logSwiSumModSecGen.u1) annotation (Line(points={{61.4, - -75},{104,-75},{104,-102},{118,-102}}, color={255,0,255})); - connect(logSwiSumModPriGen.u3, conSumModGen.y) annotation (Line(points={{118, - -78},{64,-78},{64,-130},{41,-130}}, color={255,0,255})); - connect(hysBui.priGenOn, logSwiSumModPriGen.u1) annotation (Line(points={{61.4, - -63},{61.4,-62},{118,-62}}, color={255,0,255})); - connect(conSumMod.y, logSwiDHW.u3) annotation (Line(points={{151,90},{151,84}, - {158,84},{158,78}}, color={255,0,255})); - connect(logSwiDHW.u1, orDHW.y) annotation (Line(points={{158,62},{126,62},{126, - 70},{121.5,70}}, color={255,0,255})); - connect(sumMod.TOda, TOda) annotation (Line(points={{40,-8},{-54,-8},{-54,0},{-120, - 0}}, color={0,0,127})); - connect(winMod.y, logSwiSumModPriGen.u2) annotation (Line(points={{101,-10},{104, - -10},{104,-70},{118,-70}}, color={255,0,255})); - connect(winMod.y, logSwiSumModSecGen.u2) annotation (Line(points={{101,-10},{104, - -10},{104,-110},{118,-110}}, color={255,0,255})); - connect(winMod.u, sumMod.sumMod) annotation (Line(points={{78,-10},{66,-10},{66, - -8},{63,-8}}, color={255,0,255})); - connect(winMod.y, logSwiDHW.u2) annotation (Line(points={{101,-10},{108,-10},{ - 108,54},{132,54},{132,70},{158,70}}, - color={255,0,255})); - connect(logSwiDHW.y, bufOn.u) annotation (Line(points={{181,70},{212,70},{212, - 44},{260,44},{260,50}}, color={255,0,255})); - connect(TSetBuiSup.TSet, sigBusHyd.TBuiLoc) annotation (Line(points={{-49,-70}, - {4,-70},{4,12},{-106,12},{-106,102},{100,102},{100,103}}, - color={0,0,127}), + connect(logSwiSumModSecGen.u3, conSumModGen.y) annotation (Line(points={{18,-144}, + {-54,-144},{-54,-156},{-59,-156}}, color={255,0,255})); + connect(hysBui.secGenOn, logSwiSumModSecGen.u1) annotation (Line(points={{-38.6, + -101},{-38.6,-102},{8,-102},{8,-128},{18,-128}}, + color={255,0,255})); + connect(logSwiSumModPriGen.u3, conSumModGen.y) annotation (Line(points={{18,-104}, + {-34,-104},{-34,-156},{-59,-156}}, color={255,0,255})); + connect(hysBui.priGenOn, logSwiSumModPriGen.u1) annotation (Line(points={{-38.6, + -89},{-10.3,-89},{-10.3,-88},{18,-88}}, + color={255,0,255})); + connect(conSumMod.y, logSwiDHW.u3) annotation (Line(points={{51,64},{51,58},{58, + 58},{58,52}}, color={255,0,255})); + connect(logSwiDHW.u1, orDHW.y) annotation (Line(points={{58,36},{26,36},{26,44}, + {21.5,44}}, color={255,0,255})); + connect(sumMod.TOda, TOda) annotation (Line(points={{-60,-34},{-194,-34},{-194, + -26},{-220,-26}}, + color={0,0,127})); + connect(winMod.y, logSwiSumModPriGen.u2) annotation (Line(points={{1,-36},{8,-36}, + {8,-96},{18,-96}}, color={255,0,255})); + connect(winMod.y, logSwiSumModSecGen.u2) annotation (Line(points={{1,-36},{8,-36}, + {8,-136},{18,-136}}, color={255,0,255})); + connect(winMod.u, sumMod.sumMod) annotation (Line(points={{-22,-36},{-22,-34}, + {-37,-34}}, color={255,0,255})); + connect(winMod.y, logSwiDHW.u2) annotation (Line(points={{1,-36},{48,-36},{48, + 44},{58,44}}, color={255,0,255})); + connect(logSwiDHW.y, bufOn.u) annotation (Line(points={{81,44},{188,44},{188, + 130},{182,130}}, color={255,0,255})); + connect(TSetBuiSup.TSet, sigBusHyd.TBuiLoc) annotation (Line(points={{-149,-96}, + {-70,-96},{-70,77},{0,77}}, color={0,0,127}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); - connect(realPassThrough.y, sigBusHyd.TStoDHWTop) annotation (Line(points={{21,130}, - {100,130},{100,103}}, color={0,0,127}), + connect(realPassThrough.y, sigBusHyd.TStoDHWTop) annotation (Line(points={{-79,104}, + {0,104},{0,77}}, color={0,0,127}), Text( string="%second", index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); - connect(realPassThrough.u, sigBusDistr.TStoDHWTopMea) annotation (Line(points= - {{-2,130},{-100,130},{-100,70}}, color={0,0,127}), Text( + connect(realPassThrough.u, sigBusDistr.TStoDHWTopMea) annotation (Line(points={{-102, + 104},{-200,104},{-200,44}}, color={0,0,127}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); - connect(TSetBuiSup.TZoneMea, TZoneMea) annotation (Line(points={{-72,-62},{-92, - -62},{-92,-40},{-120,-40}}, + connect(TSetBuiSup.TZoneMea, TZoneMea) annotation (Line(points={{-172,-88},{-194, + -88},{-194,-66},{-220,-66}}, color={0,0,127})); - connect(TSetBuiSup.TZoneSet, TZoneSet) annotation (Line(points={{-72,-78},{-94, - -78},{-94,-80},{-120,-80}}, + connect(TSetBuiSup.TZoneSet, TZoneSet) annotation (Line(points={{-172,-104},{-194, + -104},{-194,-106},{-220,-106}}, color={0,0,127})); - connect(TSetDHW.TSetDHW, sigBusHyd.TSetDHW) annotation (Line(points={{-59,90}, - {78,90},{78,84},{100,84},{100,103}}, color={0,0,127}), Text( + connect(TSetDHW.TSetDHW, sigBusHyd.TSetDHW) annotation (Line(points={{-159,64}, + {-150,64},{-150,77},{0,77}}, color={0,0,127}), Text( string="%second", index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); - connect(priGenOffSGRead.y, priGren) annotation (Line(points={{281,-78},{294, - -78},{294,-110},{310,-110}}, color={255,0,255})); - connect(secGenOffSGRead.y, secGen) annotation (Line(points={{287,-126},{290, - -126},{290,-70},{310,-70}}, color={255,0,255})); - connect(TSetBuiSupSGReady.TSet, supCtrHeaCur.uLoc) annotation (Line(points={{-18, - -85},{-8,-85},{-8,-98},{8,-98}}, color={0,0,127})); + connect(priGenOffSGRead.y, priGren) annotation (Line(points={{181,-104},{194,-104}, + {194,-136},{210,-136}}, color={255,0,255})); + connect(secGenOffSGRead.y, secGen) annotation (Line(points={{187,-152},{194,-152}, + {194,-96},{210,-96}}, color={255,0,255})); + connect(TSetBuiSupSGReady.TSet, supCtrHeaCur.uLoc) annotation (Line(points={{-118, + -111},{-118,-112},{-100,-112},{-100,-124},{-92,-124}}, + color={0,0,127})); connect(TSetBuiSup.TSet, TSetBuiSupSGReady.TSetLocCtrl) - annotation (Line(points={{-49,-70},{-49,-85},{-42,-85}}, color={0,0,127})); - connect(TSetBuiSupSGReady.signal, sigBusHyd.SGReady) annotation (Line(points={{-42,-97}, - {-44,-97},{-44,-98},{-46,-98},{-46,12},{-106,12},{-106,103},{100,103}}, + annotation (Line(points={{-149,-96},{-149,-111},{-142,-111}}, + color={0,0,127})); + connect(TSetBuiSupSGReady.signal, sigBusHyd.SGReady) annotation (Line(points={{-142, + -123},{-142,-124},{-146,-124},{-146,-132},{-110,-132},{-110,77},{0,77}}, color={255,127,0}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); - connect(supCtrDHW.uLoc, TSetDHWSGReady.TSet) annotation (Line(points={{-2,62}, - {-12,62},{-12,83},{-18,83}}, color={0,0,127})); - connect(TSetDHWSGReady.TSetLocCtrl, TSetDHW.TSetDHW) annotation (Line(points={ - {-42,83},{-42,82},{-52,82},{-52,90},{-59,90}}, color={0,0,127})); - connect(TSetDHWSGReady.signal, sigBusHyd.SGReady) annotation (Line(points={{-42, - 71},{-48,71},{-48,103},{100,103}}, color={255,127,0}), Text( + connect(supCtrDHW.uLoc, TSetDHWSGReady.TSet) annotation (Line(points={{-102,36}, + {-110,36},{-110,57},{-118,57}}, + color={0,0,127})); + connect(TSetDHWSGReady.TSetLocCtrl, TSetDHW.TSetDHW) annotation (Line(points={{-142,57}, + {-154,57},{-154,64},{-159,64}}, color={0,0,127})); + connect(TSetDHWSGReady.signal, sigBusHyd.SGReady) annotation (Line(points={{-142,45}, + {-150,45},{-150,77},{0,77}}, color={255,127,0}), Text( string="%second", index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); - connect(secGenOffSGRead.u1, secGenOn.y) annotation (Line(points={{264,-126},{208, - -126},{208,-112},{203.5,-112}}, color={255,0,255})); - connect(secGenOffSGRead.u2, TSetBuiSupSGReady.canRun) annotation (Line(points= - {{264,-134},{92,-134},{92,-110},{-12,-110},{-12,-97},{-18,-97}}, color= + connect(secGenOffSGRead.u1, secGenOn.y) annotation (Line(points={{164,-152},{108, + -152},{108,-138},{103.5,-138}}, color={255,0,255})); + connect(secGenOffSGRead.u2, TSetBuiSupSGReady.canRun) annotation (Line(points={{164, + -160},{-54,-160},{-54,-132},{-118,-132},{-118,-123}}, color= {255,0,255})); - connect(TSetBuiSupSGReady.canRun, priGenOffSGRead.u2) annotation (Line(points= - {{-18,-97},{-16,-97},{-16,-100},{-12,-100},{-12,-110},{92,-110},{92,-134}, - {250,-134},{250,-86},{258,-86}}, color={255,0,255})); - connect(priGenOn.y, priGenOffSGRead.u1) annotation (Line(points={{243,-90},{246, - -90},{246,-78},{258,-78}}, color={255,0,255})); - connect(hysDHW.priGenOn, orDHW.u[3]) annotation (Line(points={{81.4,77},{81.4, - 76},{96,76},{96,72.3333},{100,72.3333}}, color={255,0,255})); + connect(TSetBuiSupSGReady.canRun, priGenOffSGRead.u2) annotation (Line(points={{-118, + -123},{-118,-124},{-100,-124},{-100,-132},{8,-132},{8,-120},{112,-120}, + {112,-132},{158,-132},{158,-112}}, + color={255,0,255})); + connect(priGenOn.y, priGenOffSGRead.u1) annotation (Line(points={{143,-116},{148, + -116},{148,-104},{158,-104}}, + color={255,0,255})); + connect(hysDHW.priGenOn, orDHW.u[3]) annotation (Line(points={{-18.6,51},{-8, + 51},{-8,46.3333},{0,46.3333}}, color={255,0,255})); connect(conDHWOff.y, bufOn.u) - annotation (Line(points={{201,30},{260,30},{260,50}}, color={255,0,255})); + annotation (Line(points={{101,4},{106,4},{106,44},{188,44},{188,130},{182, + 130}}, color={255,0,255})); if use_dhw then connect(TSetDHW.sigBusDistr, sigBusDistr) annotation (Line( - points={{-80,89.9},{-80,90},{-86,90},{-86,70},{-100,70}}, + points={{-180,63.9},{-200,63.9},{-200,44}}, color={255,204,51}, thickness=0.5)); else connect(secGenOffSGRead.u1, logSwiSumModSecGen.y) annotation (Line( - points={{264,-126},{148,-126},{148,-110},{141,-110}}, + points={{164,-152},{108,-152},{108,-154},{46,-154},{46,-136},{41,-136}}, color={255,0,255}, pattern=LinePattern.Dash)); connect(logSwiSumModPriGen.y, priGenOffSGRead.u1) annotation (Line( - points={{141,-70},{250,-70},{250,-78},{258,-78}}, + points={{41,-96},{148,-96},{148,-104},{158,-104}}, color={255,0,255}, pattern=LinePattern.Dash)); end if; - annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-140}, - {300,100}})), Diagram(coordinateSystem(preserveAspectRatio=false, - extent={{-100,-140},{300,100}}), graphics={ + connect(supCtrThrWayVal.uLoc, booToReal.y) annotation (Line(points={{82,138}, + {114,138},{114,130},{119,130}}, color={0,0,127})); + connect(supCtrThrWayVal.y, sigBusDistr.uThrWayVal) annotation (Line(points={{58,130}, + {-200,130},{-200,44}}, color={0,0,127}), + Text( + string="%second", + index=1, + extent={{-6,3},{-6,3}}, + horizontalAlignment=TextAlignment.Right)); + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-200,-180}, + {200,180}})), Diagram(coordinateSystem(extent={{-200,-180},{200,180}}), + graphics={ Rectangle( - extent={{-98,102},{222,22}}, + extent={{-198,76},{122,-4}}, lineColor={238,46,47}, lineThickness=1), Text( - extent={{-94,92},{0,126}}, + extent={{-194,66},{-100,100}}, lineColor={238,46,47}, lineThickness=1, textString="DHW Control"), Rectangle( - extent={{-100,-48},{80,-140}}, + extent={{-200,-74},{-20,-166}}, lineColor={0,140,72}, lineThickness=1), Text( - extent={{-100,-146},{-6,-112}}, + extent={{-200,-172},{-106,-138}}, lineColor={0,140,72}, lineThickness=1, textString="Building Control"), Rectangle( - extent={{-40,16},{120,-40}}, + extent={{-140,-10},{20,-66}}, lineColor={162,29,33}, lineThickness=1), Text( - extent={{-44,-30},{24,-42}}, + extent={{-144,-56},{-76,-68}}, lineColor={162,29,33}, lineThickness=1, fontSize=12, - textString="Summer mode")})); + textString="Summer mode"), + Rectangle( + extent={{200,100},{42,160}}, + lineColor={0,140,72}, + lineThickness=1), + Text( + extent={{58,166},{190,176}}, + textColor={0,140,72}, + textString="Three Way Valve Control"), + Text( + extent={{42,146},{100,154}}, + textColor={0,140,72}, + textString="External Control")})); end BuildingAndDHWControl; diff --git a/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/BaseClasses/PartialThermostaticValveController.mo b/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/BaseClasses/PartialThermostaticValveController.mo index 45ad2f0a..e6a7d3dc 100644 --- a/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/BaseClasses/PartialThermostaticValveController.mo +++ b/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/BaseClasses/PartialThermostaticValveController.mo @@ -10,12 +10,13 @@ partial model PartialThermostaticValveController annotation (Placement(transformation(extent={{100,-20},{140,20}}))); Modelica.Blocks.Interfaces.RealInput TZoneSet[nZones] annotation (Placement(transformation(extent={{-140,-80},{-100,-40}}))); + annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={ Rectangle( extent={{-100,100},{100,-100}}, lineColor={0,0,0}, fillColor={215,215,215}, fillPattern=FillPattern.Solid, - lineThickness=0.5)}), Diagram(graphics, + lineThickness=0.5)}), Diagram( coordinateSystem(preserveAspectRatio=false))); end PartialThermostaticValveController; diff --git a/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/ConstantOpening.mo b/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/ConstantOpening.mo index 58d18765..7f45b87e 100644 --- a/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/ConstantOpening.mo +++ b/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/ConstantOpening.mo @@ -8,5 +8,5 @@ public parameter Real conOpe=1 "Constant opening"; equation connect(const.y, opening) - annotation (Line(points={{13,0},{120,0}}, color={0,0,127})); + annotation (Line(points={{13,0},{120,0},{120,0}}, color={0,0,127})); end ConstantOpening; diff --git a/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/ThermostaticValvePControlled.mo b/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/ThermostaticValvePControlled.mo index 17707568..1f63601c 100644 --- a/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/ThermostaticValvePControlled.mo +++ b/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/ThermostaticValvePControlled.mo @@ -7,12 +7,19 @@ model ThermostaticValvePControlled "Kv value when set temperature = measured temperature"; parameter Real P[nZones] = fill(2, nZones) "Deviation of P-controller when valve is closed"; +protected + Real yVal_internal[nZones] "Internally calculated opening"; + Modelica.Blocks.Sources.RealExpression opening_internal[nZones](final y= + yVal_internal) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); equation for i in 1:nZones loop //Calculating the valve opening depending on the temperature deviation - opening[i] =min(1, max(leakageOpening, (P[i] -TZoneMea [i] -TZoneSet + yVal_internal[i] =min(1, max(leakageOpening, (P[i] -TZoneMea [i] -TZoneSet [i])*(Kv_setT[i]/Kvs[i])/P[i])); end for; + connect(opening_internal.y, opening) + annotation (Line(points={{11,0},{120,0}}, color={0,0,127})); annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={ Line(points={{-82,-82},{-82,-22},{-82,0},{74,0}}, color={0,0,127}), Polygon( @@ -26,6 +33,6 @@ equation points={{-82,88},{-90,66},{-74,66},{-82,88}}, lineColor={192,192,192}, fillColor={192,192,192}, - fillPattern=FillPattern.Solid)}), Diagram(graphics, + fillPattern=FillPattern.Solid)}), Diagram( coordinateSystem(preserveAspectRatio=false))); end ThermostaticValvePControlled; diff --git a/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/ThermostaticValvePIControlled.mo b/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/ThermostaticValvePIControlled.mo index cd5e2ed8..1ba573a9 100644 --- a/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/ThermostaticValvePIControlled.mo +++ b/BESMod/Systems/Hydraulical/Control/Components/ThermostaticValveController/ThermostaticValvePIControlled.mo @@ -17,10 +17,10 @@ model ThermostaticValvePIControlled equation connect(TZoneMea, PI.u_m) annotation (Line(points={{-120,60},{-54,60},{-54, -26},{0,-26},{0,-12}}, color={0,0,127})); - connect(PI.y, opening) - annotation (Line(points={{11,0},{120,0}}, color={0,0,127})); connect(TZoneSet, PI.u_s) annotation (Line(points={{-120,-60},{-40,-60},{-40, 0},{-12,0}}, color={0,0,127})); + connect(PI.y, opening) + annotation (Line(points={{11,0},{120,0}}, color={0,0,127})); annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={ Polygon( points={{-80,90},{-88,68},{-72,68},{-80,90}}, @@ -36,6 +36,6 @@ equation fillPattern=FillPattern.Solid), Line(points={{-80,-80},{-80,-20},{-80,-20},{52,80}}, color={0,0,127})}), - Diagram(graphics, + Diagram( coordinateSystem(preserveAspectRatio=false))); end ThermostaticValvePIControlled; diff --git a/BESMod/Systems/Hydraulical/Transfer/RecordsCollection/UnderfloorHeatingTransferData.mo b/BESMod/Systems/Hydraulical/Transfer/RecordsCollection/UnderfloorHeatingTransferData.mo new file mode 100644 index 00000000..375c65bc --- /dev/null +++ b/BESMod/Systems/Hydraulical/Transfer/RecordsCollection/UnderfloorHeatingTransferData.mo @@ -0,0 +1,11 @@ +within BESMod.Systems.Hydraulical.Transfer.RecordsCollection; +record UnderfloorHeatingTransferData + "Underfloor heating volume and 100 Pa/m pressure loss" + extends TransferDataBaseDefinition( + valveAutho=fill(0.5, nZones), + perPreLosRad=0.05, + pressureDropPerLen=100, + typeOfHydRes=BESMod.Systems.Hydraulical.Transfer.Types.HydraulicResistanceType.FittingAndThermostatAndCheckValve, + traType=BESMod.Systems.Hydraulical.Transfer.Types.HeatTransferSystemType.FloorHeating); + +end UnderfloorHeatingTransferData; diff --git a/BESMod/Systems/Hydraulical/Transfer/RecordsCollection/package.order b/BESMod/Systems/Hydraulical/Transfer/RecordsCollection/package.order index 351271a5..3f9d7d7d 100644 --- a/BESMod/Systems/Hydraulical/Transfer/RecordsCollection/package.order +++ b/BESMod/Systems/Hydraulical/Transfer/RecordsCollection/package.order @@ -4,3 +4,4 @@ SteelRadiatorStandardPressureLossData TransferControlBaseDataDefinition TransferDataBaseDefinition UFHData +UnderfloorHeatingTransferData diff --git a/BESMod/Systems/Hydraulical/Transfer/UFHTransferSystem.mo b/BESMod/Systems/Hydraulical/Transfer/UFHTransferSystem.mo index 55d2616d..4689d9a1 100644 --- a/BESMod/Systems/Hydraulical/Transfer/UFHTransferSystem.mo +++ b/BESMod/Systems/Hydraulical/Transfer/UFHTransferSystem.mo @@ -25,7 +25,7 @@ model UFHTransferSystem each final dis=5, final A=UFHParameters.area, each final T0=T_start, - each calcMethod=1) "Underfloor heating" annotation (Placement( + each calcMethod=AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface.ASHRAE140_2017) "Underfloor heating" annotation (Placement( transformation( extent={{-29.5,-10.5},{29.5,10.5}}, rotation=270, diff --git a/BESMod/Utilities/Electrical/ElecConToReal.mo b/BESMod/Utilities/Electrical/ElecConToReal.mo index 0901d80c..8b4fad40 100644 --- a/BESMod/Utilities/Electrical/ElecConToReal.mo +++ b/BESMod/Utilities/Electrical/ElecConToReal.mo @@ -20,6 +20,9 @@ equation lineColor={0,0,0}, lineThickness=1, fillColor={255,255,255}, - fillPattern=FillPattern.Solid)}), Diagram(graphics, + fillPattern=FillPattern.Solid), Text( + extent={{-100,-100},{98,-160}}, + lineColor={0,0,0}, + textString="%name")}), Diagram(graphics, coordinateSystem(preserveAspectRatio=false))); end ElecConToReal; diff --git a/BESMod/Utilities/Electrical/MultiSumElec.mo b/BESMod/Utilities/Electrical/MultiSumElec.mo index 625bb5cc..b69956e6 100644 --- a/BESMod/Utilities/Electrical/MultiSumElec.mo +++ b/BESMod/Utilities/Electrical/MultiSumElec.mo @@ -21,6 +21,9 @@ equation fillPattern=FillPattern.Solid), Line( points={{52,82},{-76,82},{28,6},{-66,-76},{52,-76}}, color={0,0,0}, - thickness=0.5)}), Diagram(graphics, + thickness=0.5), Text( + extent={{-100,-100},{98,-160}}, + lineColor={0,0,0}, + textString="%name")}), Diagram(graphics, coordinateSystem(preserveAspectRatio=false))); end MultiSumElec; diff --git a/BESMod/Utilities/Electrical/RealToElecCon.mo b/BESMod/Utilities/Electrical/RealToElecCon.mo index 40b9de96..48e3fca1 100644 --- a/BESMod/Utilities/Electrical/RealToElecCon.mo +++ b/BESMod/Utilities/Electrical/RealToElecCon.mo @@ -35,7 +35,13 @@ equation {-76,-80},{-76,-40},{-70,-40}}, color={0,0,127})); annotation (Line(points={{-120,40},{-74,40}}, color={0,0,127}), Line(points={{-120,-40},{-74,-40}}, color={0,0,127}), - Icon(coordinateSystem(preserveAspectRatio=false), graphics={Line( + Icon(coordinateSystem(preserveAspectRatio=false), graphics={ + Rectangle( + extent={{100,100},{-100,-100}}, + lineColor={0,0,0}, + lineThickness=0.5, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Line( points={{-86,0},{-1,0},{84,0}}, color={0,140,72}, thickness=1, @@ -45,6 +51,9 @@ equation lineColor={0,0,0}, lineThickness=1, fillColor={0,140,72}, - fillPattern=FillPattern.Solid)}), Diagram(graphics, + fillPattern=FillPattern.Solid), Text( + extent={{-98,-100},{100,-160}}, + lineColor={0,0,0}, + textString="%name")}), Diagram(graphics, coordinateSystem(preserveAspectRatio=false))); end RealToElecCon; diff --git a/BESMod/Utilities/Electrical/RealToElecConSplit.mo b/BESMod/Utilities/Electrical/RealToElecConSplit.mo index a4389b96..7471b62b 100644 --- a/BESMod/Utilities/Electrical/RealToElecConSplit.mo +++ b/BESMod/Utilities/Electrical/RealToElecConSplit.mo @@ -25,7 +25,13 @@ equation -30}}, color={0,0,127})); annotation (Line(points={{-120,40},{-74,40}}, color={0,0,127}), Line(points={{-120,-40},{-74,-40}}, color={0,0,127}), - Icon(coordinateSystem(preserveAspectRatio=false), graphics={Line( + Icon(coordinateSystem(preserveAspectRatio=false), graphics={ + Rectangle( + extent={{100,100},{-100,-100}}, + lineColor={0,0,0}, + lineThickness=0.5, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Line( points={{-86,0},{-1,0},{84,0}}, color={0,140,72}, thickness=1, @@ -35,6 +41,9 @@ equation lineColor={0,0,0}, lineThickness=1, fillColor={0,140,72}, - fillPattern=FillPattern.Solid)}), Diagram( + fillPattern=FillPattern.Solid), Text( + extent={{-100,-100},{98,-160}}, + lineColor={0,0,0}, + textString="%name")}), Diagram( coordinateSystem(preserveAspectRatio=false))); end RealToElecConSplit; diff --git a/BESMod/Utilities/KPIs/RoomControlCalculator.mo b/BESMod/Utilities/KPIs/RoomControlCalculator.mo new file mode 100644 index 00000000..74cbbd19 --- /dev/null +++ b/BESMod/Utilities/KPIs/RoomControlCalculator.mo @@ -0,0 +1,56 @@ +within BESMod.Utilities.KPIs; +model RoomControlCalculator "Cacluate the room control quality in K*s" + + extends BESMod.Utilities.KPIs.BaseClasses.KPIIcon; + parameter Boolean for_heating = true "=false to calculate comfort during cooling period (summer). = true for heating"; + + Modelica.Blocks.Nonlinear.Limiter lim(final uMax=Modelica.Constants.inf, + final uMin=0) + annotation (Placement(transformation(extent={{8,-10},{28,10}}))); + Modelica.Blocks.Continuous.Integrator intDisCom( + final k=1, + final use_reset=false, + final initType=Modelica.Blocks.Types.Init.InitialOutput, + final y_start=0) + annotation (Placement(transformation(extent={{42,-10},{62,10}}))); + Modelica.Blocks.Math.Add add(final k1=if for_heating then -1 else 1, + final k2=if for_heating then 1 else -1) + annotation (Placement(transformation(extent={{-26,-10},{-6,10}}))); + Modelica.Blocks.Sources.Constant const(k=dTComBou) + annotation (Placement(transformation(extent={{-80,-40},{-60,-20}}))); + Modelica.Blocks.Interfaces.RealOutput dTComSec(unit="K.s") + "K*s discomfort" + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); + Modelica.Blocks.Interfaces.RealInput TZone(unit="K") + "Connector of Real input signal 1" + annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); + + Modelica.Blocks.Interfaces.RealInput TZoneSet + "Connector of Real input signal 2" + annotation (Placement(transformation(extent={{-140,-80},{-100,-40}}))); + Modelica.Blocks.Math.Add add1 + annotation (Placement(transformation(extent={{-40,-60},{-20,-40}}))); + parameter Real dTComBou=0; +equation + connect(intDisCom.y, dTComSec) annotation (Line(points={{63,0},{110,0}}, + color={0,0,127})); + connect(lim.y, intDisCom.u) + annotation (Line(points={{29,0},{40,0}}, color={0,0,127})); + connect(add.u1, TZone) + annotation (Line(points={{-28,6},{-74,6},{-74,0},{-120,0}}, + color={0,0,127})); + connect(add.y, lim.u) + annotation (Line(points={{-5,0},{6,0}}, color={0,0,127})); + connect(add1.u2, TZoneSet) annotation (Line(points={{-42,-56},{-94,-56},{-94, + -60},{-120,-60}}, color={0,0,127})); + connect(const.y, add1.u1) annotation (Line(points={{-59,-30},{-50,-30},{-50, + -44},{-42,-44}}, + color={0,0,127})); + connect(add1.y, add.u2) annotation (Line(points={{-19,-50},{-16,-50},{-16,-24}, + {-38,-24},{-38,-6},{-28,-6}}, + color={0,0,127})); + annotation ( + Documentation(info=" +Calculate the comfort during either heating or cooling period. Based on EN 15251, which defines a 2 K bandwith around a set temperature of 22 °C.
+")); +end RoomControlCalculator; diff --git a/BESMod/Utilities/KPIs/package.order b/BESMod/Utilities/KPIs/package.order index 785aacf8..08c2049b 100644 --- a/BESMod/Utilities/KPIs/package.order +++ b/BESMod/Utilities/KPIs/package.order @@ -2,4 +2,5 @@ ComfortCalculator CountTimeDiscomfort DeviceKPICalculator EnergyKPICalculator +RoomControlCalculator BaseClasses diff --git a/BESMod/unitTests-dymola.log b/BESMod/unitTests-dymola.log deleted file mode 100644 index 10562e19..00000000 --- a/BESMod/unitTests-dymola.log +++ /dev/null @@ -1,10 +0,0 @@ -Regression tests are only run for the following package: - BESMod.Examples.ModelicaConferencePaper -Regression tests are only run for the following package: - BESMod.Examples.BAUSimStudy -Regression tests are only run for the following package: - BESMod.Examples.TEASERHeatLoadCalculation -Regression tests are only run for the following package: - BESMod.Examples.HeatPumpAndBoiler -Regression tests are only run for the following package: - BESMod.Examples