Skip to content

Commit

Permalink
fixed bug modelica#4386
Browse files Browse the repository at this point in the history
  • Loading branch information
haa39214 committed Apr 16, 2024
1 parent a877f52 commit c6c5e4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Modelica/Electrical/Analog/Interfaces/IdealSemiconductor.mo
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ protected
constant SI.Voltage unitVoltage=1 annotation (HideResult=true);
constant SI.Current unitCurrent=1 annotation (HideResult=true);
equation
v = (s*unitCurrent)*(if off then 1 else Ron) + Vknee;
i = (s*unitVoltage)*(if off then Goff else 1) + Goff*Vknee;
v = s*(if off then unitVoltage else Ron*unitCurrent) + Vknee;
i = s*(if off then Goff*unitVoltage else unitCurrent) + Goff*Vknee;
LossPower = v*i;
annotation (
Documentation(info="<html>
Expand Down
4 changes: 2 additions & 2 deletions Modelica/Electrical/Analog/Interfaces/IdealSwitch.mo
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ protected
constant SI.Voltage unitVoltage=1 annotation (HideResult=true);
constant SI.Current unitCurrent=1 annotation (HideResult=true);
equation
v = (s*unitCurrent)*(if off then 1 else Ron);
i = (s*unitVoltage)*(if off then Goff else 1);
v = s*(if off then unitVoltage else Ron*unitCurrent);
i = s*(if off then Goff*unitVoltage else unitCurrent);
LossPower = v*i;
annotation (
Documentation(info="<html>
Expand Down

0 comments on commit c6c5e4b

Please sign in to comment.