open-ideas / IDEAS

Modelica library allowing simultaneous transient simulation of thermal and electrical systems at both building and feeder level.
132 stars 58 forks source link

[Add] mixed air in the building #27

Closed damienpicard closed 10 years ago

rubenbaetens commented 10 years ago

@damienpicard which Medium do i need to pick for this: The "Incompressible moist air model with constant specific heat capacities" ?

damienpicard commented 10 years ago

I would indeed try with the Annex60 air. Within Annex60, Micheal also investigates the advantages of Buildings.Media.GasesPTDecoupled.MoistAir which might be numerically more efficient.

rubenbaetens commented 10 years ago

Continued in #34.

damienpicard commented 10 years ago

So far, the fluid ports of the ventilation always exist. It would be convenient to remove these equations conditionally to speed up calculations without ventilation.

rubenbaetens commented 10 years ago

@damienpicard i would not make the ports conditional, but their connection to boundary conditions conditional, e.g. by making a IDEAS.Interfaces.HeatingSystm 'none' which connects the mto fixed boundary conditions. Or would this slow the code down too much ?

Mathadon commented 10 years ago

This would introduce more equations but I think the overhead would be limited since the solution does not change. It may be worth trying this? I would add an option for conditional removal.

rubenbaetens commented 10 years ago

@damienpicard @Mathadon i made an issue27_MixedAir branch without conitional ports, but with a "None" ventilation system as is so far generally done in IDEAS. Could both of you review this ? The FixedAirFlowRecup ventilationsystem needs review then though.

damienpicard commented 10 years ago

@rubenbaetens I just reviewed the ventilation system. Important note: for a reason that is not clear to me, using a single source with sizeable ports to connect to the flowports cause an error. You can avoid this by making 1 source for each flowports.

I also renamed the model "none" as I added a parameter to set up a volume change rate (with default value = 0 ).

Finally, I fixed the ventilation with constant efficiency.

damienpicard commented 10 years ago

@rubenbaetens @Mathadon for one of my model, I made a ventilation system which does not use the air medium and could reduce the CPU by 20!

We need to investigate why there are non-linear systems even in the ventilation with zero mass flow rate!

rubenbaetens commented 10 years ago

@damienpicard @Mathadon

damienpicard commented 10 years ago

Ok, I will make an extension.

What I mean with "which does not use the air medium" is that I consider the ventilation only thermally. I do not use any Media then...

If in the future you can show that including a Media slows down the simulation, it might them be interesting to make the mixing volume conditional so that we can also handle the ventilation only thermal.

rubenbaetens commented 10 years ago
damienpicard commented 10 years ago

I analyzed further the non-linear systems appearing with the ventilation system.

Here is a plot comparing: 1) None: zero ventilation using the IDEAS ventilation interface (so with electricity) 2) RecupZeroFlow: zero ventilation but with a model with a heat exchanger for recuperation (zero flow) 3) NoneNoElectricity: zero ventilation and no electricity calculations 4) Recup: non-zero ventilation with recuperation 5) NoneNoElectricitySimpleAir: same as NoneNoElectricity but Modelica.Media.Air.SimpleAir is used instead of IDEAS.Media.Air.

image

From this and from the statistics I conclude the following: 1) the electricity introduce numerical Jacobians (as we already knew) 2) Using ventilation with recuperator and zero mass flow rate is not very efficient. So the ventilation None should no be an extension of the general case with recuparator 3) Using the simplified dry-air medium of modelica is more efficient that the complex IDEAS.Media.Air (if no moist air is needed) 4) Even the use of Modelica.Media.Air.SimpleAir(T_min = 273.15-50) introduces non linear equations:

der(structure.gF.vol.dynBal.medium.d) := -287.0512249529787_( structure.gF.vol.dynBal.medium.p_der(structure.gF.vol.dynBal.medium.T))/( 287.0512249529787*structure.gF.vol.dynBal.medium.T)^2;

rubenbaetens commented 10 years ago

@damienpicard what's on the y-axis ? If it is CPU-time, it only indicates an initialisation problem (of half a second) as the gradients of all 5 plots is rather equal.

damienpicard commented 10 years ago

Indeed, CPU time. But the gradients are not the same...

rubenbaetens commented 10 years ago

@damienpicard then i suggest to run an entire year as example ...

damienpicard commented 10 years ago

To illustrate it beter, I runned an on-off ventilation (period = 36000s) for the case of a recuperator, without recup and media from IDEAS, without recup and with Modelica SimpleAir:

image

damienpicard commented 10 years ago

@rubenbaetens I added some examples for the ventilation systems and made a None and a ConstantAirFlowRecup. For the example I updated the buiding structure example.

I think we can merge that to the A60 branch and continue the discussion on CPU in this issue or a new issue.

rubenbaetens commented 10 years ago

@damienpicard i suggest we don't merge it to Annex 60, but that i'll merge it to issue51_BESTEST and once that is solved, i push my branch to Annex60.

Mathadon commented 10 years ago

The temperature-dependend density is probably an important cause. It may be worth to make a model with constant density for this..

Mathadon commented 10 years ago

Actually using Buildings.Media.GasesConstantDensity.SimpleAir does not give any significant improvement.

damienpicard commented 10 years ago

@rubenbaetens see branch issue27_MixedAir for last update.

rubenbaetens commented 10 years ago

OK, looks ok now and which solves this issue. I moved the remaining CPU-efficient implementation of a MixedAir medium to #108 ...

Mathadon commented 10 years ago

@damienpicard did you check my emails?