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

Stack effect airflow #1246

Merged
merged 272 commits into from
Aug 30, 2022
Merged

Conversation

kldjonge
Copy link
Contributor

Development of the two-port infiltration/interzonal airflow implementation introducing density-columns.

Got rid of the unnecessary initial equations
@kldjonge
Copy link
Contributor Author

kldjonge commented Jan 10, 2022

#1244
@Mathadon

The error occurs in this model when used in a full building model: IDEAS.Buildings.Components.Interfaces.PartialSurface.PowerLaw_q50_stack.

The error:
Current version of the Modelica translator can only handle
conditional components with fixed condition.
But component struct.W1.res1.col_a_pos had non-fixed condition if ColApos

But I don't know which of the conditions it assumes as non-fixed. All conditions are fixed parameters.

image

The point of this model to either have:

  • No density column
  • A positive column (port_a connecting to the bottom port)
  • or a negative column (port_a connecting to the top port)


/*ERROR: Current version of the Modelica translator can only handle
*/
final parameter Boolean ColApos=StackEff and h_a>0;
Copy link
Member

Choose a reason for hiding this comment

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

@kldjonge can you try to add annotation(Evaluate=true) to the definition of these variables to try to fix your issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried but it doesn't seem to solve the error.

New implementation for the density columns to avoid error due to conditional statements in the column heights
Changed error in input of door component.
@kldjonge
Copy link
Contributor Author

kldjonge commented Jan 19, 2022

I changed the implementation entirely to avoid the conditional statements altogether. First results for the holzkirchen case show a slight underestimation of temperatures but it seems like the dynamics match better.

image

… and flow element(s)

Assign height difference between meteorological pressure measurements and flow element(s). Also, by default corrects for the windspeed using this height when the TwoPort implementation is used.
cosmetic change
@kldjonge
Copy link
Contributor Author

@Mathadon, everything seems to work except for the models using the IDEAS.Buildings.Components.Examples.BaseClasses.SimpleZone (Rectangular zone). They error because of a singularity without further clarification. As most examples use this implementation, I guess it is used often (?)

E.g. in IDEAS.Buildings.Components.Examples.LightingControl when I change the settings to twoPort in the sim.

image

option added to get better default for roofs. This needs to be fine-tuned based on available data.
Table introduced from Energy efficient guide to ventilation, Appendix 2 Table 2.1
… examples

Examples not connected to case 900 for the rectangular zone template including "simulate and plot" scripts. Error for TwoPort still needs to be fixed.
@kldjonge kldjonge marked this pull request as ready for review January 24, 2022 17:50
@kldjonge
Copy link
Contributor Author

At this point, a review of the implementation would be nice. If no major changes are necessary I will start to work on the CONTAM model for reference results.

@Mathadon
Copy link
Member

Mathadon commented Aug 26, 2022

This is a new parameter and it should probably have a default indeed!

Todo FJ:

  • Add epsSW_shading default

When an opening is horizontal, no different flows are expected due to the lack of stack effect, thus simplifying to less compartments is logical.

Can this be 1?
@kldjonge
Copy link
Contributor Author

This is a new parameter and it should probably have a default indeed!

Todo FJ:

  • Add epsSW_shading default

Great that you would have a look at it so I can test it. In the meantime I updated the CONTAM model (and did some minor changes to the default modelica implementation along the way).

In the CONTAM model, the stack-effect airflow trough the staircase openings is +- 50m³/h. So it will be a good case to verify the model implementation with.

@Mathadon
Copy link
Member

Mathadon commented Aug 27, 2022

done in a681abf !

@Mathadon
Copy link
Member

50 m3/h is substantial but not that big, for what ∆T is that?

kldjonge and others added 11 commits August 29, 2022 09:00
commit 121cb9c
Merge: 06aa135 a681abf
Author: kldjonge <46526840+kldjonge@users.noreply.github.com>
Date:   Mon Aug 29 09:00:13 2022 +0200

    Merge branch 'open-ideas:master' into master

commit a681abf
Author: Filip Jorissen <filip.jorissen@gmail.com>
Date:   Sat Aug 27 16:04:04 2022 +0200

    default value for epsSw_shading in IDEAS//Buildings/Components/Shading/Interfaces/PartialShading.mo
@kldjonge
Copy link
Contributor Author

kldjonge commented Aug 29, 2022

Annoying news, the 2-port implementation has become singular. I've been trying to pin-point the problem but can't seem to find it as the error-message isn't particularly helpful.

image

The CONTAM simulation is with a fixed indoor temperature of 20°C in all spaces.

image

@Mathadon
Copy link
Member

Yikes.. I tried using OpenModelica but I'm not getting a clear error message there either.

@Mathadon Mathadon merged commit 678ef99 into open-ideas:StackEffectAirflow Aug 30, 2022
@kldjonge
Copy link
Contributor Author

kldjonge commented Aug 31, 2022

When I put the Holzkirchen model to two ports, it only fails at initialization. Maybe you know what to do with this?

Warning: Failed to solve nonlinear system using Newton solver.
  During initialization at time: 15000000
  Tag: initialization.nonlinear[8]
  For debugging information enable
  Simulation/Setup/Debug/Nonlinear solver diagnostics/Detailed logging of failed nonlinear solutions.
Trying to solve non-linear system using global homotopy-method.

Warning: Failed to solve nonlinear system using Newton solver.
  During initialization at time: 15000000
  Tag: initialization.nonlinear[8]
Error: Integrator failed to start model.

ERROR: The simulation of IDEAS.Examples.TwinHouses.BuildingO5_Exp1_1Port FAILED

And warnings in the translation log:

image

So it seems that the singularity error might only be related to the rectangular zone model.

@kldjonge
Copy link
Contributor Author

How can I couple my forked branch to this PR again? New commits don't show up here anymore because you merged it into open-ideas:StackEffectAirflow (for which I don't have write acces).

Simple models with two-port airflow do seem to work just fine.

@Mathadon
Copy link
Member

You can just make a new PR, I think?

@kldjonge
Copy link
Contributor Author

Getting closer! IDEAS.Examples.Example5 works with the two-port implementation on but fails after a while when also a cavity is added in the internal wall.

@Mathadon
Copy link
Member

Alright! What error message is thrown?

@kldjonge
Copy link
Contributor Author

kldjonge commented Aug 31, 2022

Warning: Failed to solve nonlinear system using Newton solver.
  Time: 10160091.04919381
  Tag: simulation.nonlinear[1]
  For debugging information enable
  Simulation/Setup/Debug/Nonlinear solver diagnostics/Detailed logging of failed nonlinear solutions.

Integration terminated before reaching "StopTime" at T = 1.02e+07

But, so it turns out, it also happens when in the 1 port version, a cavity is added.

In general I am thinking that maybe the number of available ports is the issue? Particularly the fact that when the infiltration models need 2 ports and the door model needs another 2, double connections are made at the moment (Same thing for the trickle vent model). I'm not sure what happens in these fluid-connectors when each time, a density column is used.

@Mathadon
Copy link
Member

Mathadon commented Aug 31, 2022

The problem is that an algebraic loops is not converging. This probably either means that the system is ill-conditioned or it has no solution. I'm guessing it's the former because the cavity causes relatively large mass flow rates for small pressure drops, which can cause ill-conditioning.

Can you try setting in IDEAS.Airflow.Multizone.BaseClasses.DoorDiscretized

  parameter Modelica.Units.SI.PressureDifference dp_turbulent(
    min=0,
    displayUnit="Pa") = 0.1;

(instead of 0.01) and see whether that helps?

@kldjonge
Copy link
Contributor Author

kldjonge commented Sep 1, 2022

No that doesn't solve it.

On the hunch that it might cause errors to make double use of the fluid-ports I tried to make the amount of fluid ports in the zone connector variable with the goal to then 'count' the amount of ports in the zone. I didn't manage for now because it wants to know the amount of connection beforehand. (https://github.com/kldjonge/IDEAS/tree/More-ports)

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

Successfully merging this pull request may close these issues.

5 participants