Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Using moisture balance in HOM leads to an overdetermination #1460

Open
BenaniZ opened this issue Aug 31, 2023 · 0 comments
Open

Using moisture balance in HOM leads to an overdetermination #1460

BenaniZ opened this issue Aug 31, 2023 · 0 comments
Assignees

Comments

@BenaniZ
Copy link
Contributor

BenaniZ commented Aug 31, 2023

Describe the bug
The High-Order Room model should support the calculation of moisture balances for each room, but enabling the parameter "use_moisture_balance" leads to an overdetermination of the model. The error is located in the PartialRoom model (ThermalZones.HighOrder.Rooms.BaseClasses.PartialRoom):

  • There are two place holders (Line 126 - 129), which are connected to the airload and the NaturalVentilation model:
Modelica.Blocks.Interfaces.RealOutput hum_internal
    "internal humidity (used for case with no moisture balance";
  Modelica.Blocks.Interfaces.RealOutput mWat_flow_internal
    "internal mass flow rate of water vapor (used for case with no moisture balance)";
  • Enabling the moisture balance activates the RealInputs "ventHum" and "QLat_flow", which are also connected to the airload and the NaturalVentilation model. This leads to an overdetermination.

To Reproduce

  1. Create a new model and insert any room from ThermalZones.HighOrder.Rooms.OFD
  2. Copy wallTypes from HighOrder.House.OFD_MiddleInnerLoadWall.BuildingEnvelope.WholeHouseBuilding and insert it in the model
  3. Copy groundTemp and sun with constSun from HighOrder.Examples.OFDHeatLoad
  4. Connect outer heatports of room with groundTemp, SolarRadiationPort with sun and remaining RealInputs with constSun
  5. Double click on room and type in "wallTypes" for wallTypes. Set WindowModel, Type_Win and CorrSolarGainWin in Outer walls tab
  6. Check model: Should be fine.
  7. Now activate "use_moisture_balance" for the room and connect ventHum and QLatflow with constSun
  8. Check model: Now you should see the error including mWat_flow etc.

Expected behavior
I fixed the bug on my local version, as I need the model for my thesis:

  1. Modify the code from above like this:
Modelica.Blocks.Interfaces.RealOutput hum_internal = 0  if not use_moisture_balance
    "internal humidity (used for case with no moisture balance";
  Modelica.Blocks.Interfaces.RealOutput mWat_flow_internal = 0 if not use_moisture_balance
    "internal mass flow rate of water vapor (used for case with no moisture balance)";
  1. In the equation section, embed the respective connect statements within an if-condition:
if use_moisture_balance then
    connect(NaturalVentilation.HumIn, ventHum) annotation (Line(
      points={{-33.4,-21},{-62,-21},{-62,-22},{-74,-22},{-74,-37},{-111,-37}},
      color={0,0,127},
      pattern=LinePattern.Dash));
      connect(mWat_flow.y, airload.mWat_flow) annotation (Line(
      points={{47.6,-28},{36,-28},{36,-10},{26,-10},{26,-4},{20,-4}},
      color={0,0,127},
      pattern=LinePattern.Dash));
  else
    connect(NaturalVentilation.HumIn, hum_internal);
    connect(airload.mWat_flow, mWat_flow_internal);
  end if;
  1. Check model from before: Should work now.

Desktop (please complete the following information):

  • Dymola 2022 with Modelica 4.0.0, AixLib v1.3.2
@BenaniZ BenaniZ self-assigned this Nov 15, 2023
BenaniZ added a commit that referenced this issue Nov 15, 2023
Connections were overdetermined when activating the moisture balance in the HOM. This fix establishes connections conditionally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant