lbl-srg / modelica-buildings

Modelica Buildings library
255 stars 158 forks source link

Bug in WindowRadiation. Shade does not absorb radiaton. #6

Closed mwetter closed 11 years ago

mwetter commented 11 years ago

The test model bie/branches/mwetter/work/bie/modelica/Buildings/HeatTransfer/Windows/BaseClasses/Examples/WindowRadiation.mo, revision 1791 has an interior shade.

When running !WindowRadiation.mos, the solar radiation that is absorbed by the shade is zero. The same is true if the shade is set to an exterior shade. However, the transmitted solar radiation into the room is lower if the shade is deployed.

Running a diff on !RadiationData.mo and !WindowRadiation.mo on the branches mwetter and wzuo does not seem to give any differences in the model other than renaming of variables and parameters. However, in the test model in Wangda's branch, the shade does absorb radiation.

Any idea what can cause this? Please revise on bie/branches/mwetter/work/bie/modelica as there was quite some change in comments and in variable names to be consistent with the other models of the room model.

mwetter commented 11 years ago

[mwetter] The current implementation of the model !WindowRadiation.mo leads to a nonlinear algebraic loop that is not necessary. The reason is that the model needs to be called twice by the solver, first to compute the transmitted solar radiation, and then to compute the absorbed solar radiation (which depends on the transmitted solar radiation due to the room reflectance). The symbolic processor cannot solve this explicitly because the computation of the transmitted and absorbed radiation is in the same 'algorithm' section.

To fix this, the model should be separated as follows:

The latest version of these models is on the branch mwetter.

mwetter commented 11 years ago

[wzuo] The problem has been found. It is because that Shading device data in mwetter is incorrect. It has tau=0.5, rho=0.5, which means that alpha=0. The correct answer have been achieved by correcting the shading record in mwetter's branch.

Replying to [ticket:6 mwetter]:

The test model bie/branches/mwetter/work/bie/modelica/Buildings/HeatTransfer/Windows/BaseClasses/Examples/WindowRadiation.mo, revision 1791 has an interior shade.

When running !WindowRadiation.mos, the solar radiation that is absorbed by the shade is zero. The same is true if the shade is set to an exterior shade. However, the transmitted solar radiation into the room is lower if the shade is deployed.

Running a diff on !RadiationData.mo and !WindowRadiation.mo on the branches mwetter and wzuo does not seem to give any differences in the model other than renaming of variables and parameters. However, in the test model in Wangda's branch, the shade does absorb radiation.

Any idea what can cause this? Please revise on bie/branches/mwetter/work/bie/modelica as there was quite some change in comments and in variable names to be consistent with the other models of the room model.

mwetter commented 11 years ago

[wzuo] Two new models (WindowTransmittedRadation, WindowAbsorbedRadiation) have been created. The WindowRadiation model has been revised as suggested. The new models haven been uploaded to wzuo's branch.