Skip to content

Commit

Permalink
Change initialization of electrical load (#4049)
Browse files Browse the repository at this point in the history
This closes #4048. It also merges minor changes from IBPSA.
  • Loading branch information
mwetter authored Nov 18, 2024
1 parent a8b0409 commit 07dfbd5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions Buildings/Airflow/Multizone/BaseClasses/DoorDiscretized.mo
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ using the model for a door that can be open or closed.
revisions="<html>
<ul>
<li>
October 29, 2024, by Klaas De Jonge:<br/>
Unprotected <code>dh</code> and changed prefixes of <code>dh</code>,<code>hAg</code> and <code>hBg</code> to <code>input</code>.<br/>
This is for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1935\">#1935</a>.
</li>
<li>
January 8, 2019, by Michael Wetter:<br/>
Moved parameter <code>CD</code> from
<a href=\"modelica://Buildings.Airflow.Multizone.BaseClasses.DoorDiscretized\">
Expand Down
2 changes: 1 addition & 1 deletion Buildings/Electrical/DC/Loads/Resistor.mo
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The temperature <i>T</i> is the temperature of the heat port if <code>useHeatPor
<li>November 2, 2024, by Michael Wetter:<br/>
Changed guarding against division by zero.<br/>
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/4032\">Buildings, #4032</a>.
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/4032\">Buildings #4032</a>.
</li>
<li>November 3, 2015, by Michael Wetter:<br/>
Set default value for <code>P_nominal</code> to avoid an error when translating
Expand Down
9 changes: 8 additions & 1 deletion Buildings/Electrical/Interfaces/Load.mo
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ model Load "Partial model for a generic load"
or linearized)));
parameter Buildings.Electrical.Types.InitMode initMode(
min=Buildings.Electrical.Types.InitMode.zero_current,
max=Buildings.Electrical.Types.InitMode.linearized) = Buildings.Electrical.Types.InitMode.zero_current
max=Buildings.Electrical.Types.InitMode.linearized) = Buildings.Electrical.Types.InitMode.linearized
"Initialization mode for homotopy operator" annotation(Dialog(tab = "Initialization"));

Modelica.Units.SI.Voltage v[:](start=PhaseSystem.phaseVoltages(V_nominal)) =
Expand Down Expand Up @@ -113,6 +113,13 @@ equation
annotation ( Documentation(revisions="<html>
<ul>
<li>
November 14, 2024, by Michael Wetter:<br/>
Changed default initialization method to using linearized model rather than zero current, as
the latter causes a division by zero in OpenModelica during the homotopy initialization.<br/>
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/4048\">Buildings, #4048</a>.
</li>
<li>
January 30, 2019, by Michael Wetter:<br/>
Set start value for <code>P</code>.
</li>
Expand Down
4 changes: 0 additions & 4 deletions Buildings/Resources/Scripts/BuildingsPy/conf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@
openmodelica:
comment: simulation terminated by an assertion at initialization.
simulate: false
- model_name: Buildings.Electrical.DC.Loads.Examples.LinearizedLoad
openmodelica:
comment: '''omc'' caused ''simulation terminated by an assertion at initialization''.'
simulate: false
- model_name: Buildings.Examples.DualFanDualDuct.ClosedLoop
optimica:
comment: CVode and Radau5ODE hang since https://github.com/lbl-srg/modelica-buildings/pull/3109, likely because Xi rather than mXi is a state
Expand Down

0 comments on commit 07dfbd5

Please sign in to comment.