Skip to content

Commit 433d0e0

Browse files
committed
model BuildingSystems.Technologies.ElectricalStorages.BatterySimple improved
1 parent aafd2dd commit 433d0e0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

BuildingSystems/Technologies/ElectricalStorages/BatterySimple.mo

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ equation
1818
PLoad_max,
1919
0.001);
2020

21-
PGrid = if PNet > 0.0 then PNet - PChargeEff/etaCharge else PNet + PLoadEff*etaLoad;
22-
21+
PGrid = 0.5*(1.0-Modelica.Math.tanh(100000.0*(PNet)))*(PNet + PLoadEff*etaLoad)+
22+
0.5*(1.0+Modelica.Math.tanh(100000.0*(PNet)))*(PNet - PChargeEff/etaCharge);
23+
2324
annotation (Documentation(info="<html>
2425
<p>
2526
Model for an eletrical battery based on the Kinetic Battery Model (KiBaM) of Manwell and McGowan

0 commit comments

Comments
 (0)