You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Buildings.HeatTransfer.WindowsBeta.BaseClasses.AbsorbedRadiation and TransmittedRadiation trigger many state events:
The events are caused by the "if" statement and the "integer(x)". This causes about 10 event iterations for each day of simulation, which limits the integration step size (and is expensive).
As a work-around, the "integer(x)" may be avoided if another interpolation is used than the cubicHermite function, or if the whole section between integer(x) and cubicHermite(...)" is put into a function and the smooth annotation is used.
As a test case, enable event logging during simulation and run Buildings.RoomsBeta.Examples.MixedAirFreeResponse
The problematic section is:
{{{
if incAng < 0.5_Modelica.Constants.pi then
x := 2_(NDIR - 1)_abs(incAng)/Modelica.Constants.pi
"x=(index-1)_incAng/(0.5pi), 0<=x<=NDIR";
x := x + 2;
k1 := integer(x) "2<=k<=NDIR+2=HEM+1";
k2 := k1 + 1 "3<=k2<=NDIR+3=HEM+2";
for i in 1:N loop
// Glass without shading: Add absorbed direct radiation
y1d := (coeAbsEx[NoShade, i, k1 + 1] - coeAbsEx[NoShade, i, k1 - 1])/2;
y2d := (coeAbsEx[NoShade, i, k2 + 1] - coeAbsEx[NoShade, i, k2 - 1])/2;
tmpNoSha := Modelica.Fluid.Utilities.cubicHermite(...
}}}
The text was updated successfully, but these errors were encountered:
Buildings.HeatTransfer.WindowsBeta.BaseClasses.AbsorbedRadiation and TransmittedRadiation trigger many state events:
The events are caused by the "if" statement and the "integer(x)". This causes about 10 event iterations for each day of simulation, which limits the integration step size (and is expensive).
As a work-around, the "integer(x)" may be avoided if another interpolation is used than the cubicHermite function, or if the whole section between integer(x) and cubicHermite(...)" is put into a function and the smooth annotation is used.
As a test case, enable event logging during simulation and run Buildings.RoomsBeta.Examples.MixedAirFreeResponse
The problematic section is:
{{{
if incAng < 0.5_Modelica.Constants.pi then
x := 2_(NDIR - 1)_abs(incAng)/Modelica.Constants.pi
"x=(index-1)_incAng/(0.5pi), 0<=x<=NDIR";
x := x + 2;
k1 := integer(x) "2<=k<=NDIR+2=HEM+1";
k2 := k1 + 1 "3<=k2<=NDIR+3=HEM+2";
}}}
The text was updated successfully, but these errors were encountered: