Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit a315babb authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Merge branch...

Merge branch 'feature/CodeEU-48_Consider-JunctionBox-ConnectorsSubsystemsIncluded' into 'amdm2/develop'

Bugfix: sign connector losses

See merge request vecto!22
parents fe88e757 e357a6c7
No related branches found
No related tags found
No related merge requests found
Pipeline #183626 failed
...@@ -89,7 +89,7 @@ namespace TUGraz.VectoCore.Models.Connector.Ports.Impl ...@@ -89,7 +89,7 @@ namespace TUGraz.VectoCore.Models.Connector.Ports.Impl
// see ElectricSystem implementation... // see ElectricSystem implementation...
// I_est = P_EM / U_Int // I_est = P_EM / U_Int
// P_Conn = I_est ^ 2 * R_Conn = (P_EM / U_Int) ^ 2 * R_Conn // P_Conn = I_est ^ 2 * R_Conn = (P_EM / U_Int) ^ 2 * R_Conn
// P_EM_max = P_Bat_max - P_Chg + P_aux + P_Conn(P_EM) // P_EM_max = P_Bat_max - P_Chg + P_aux - P_Conn(P_EM)
// P_EM_max + P_Conn = P_Bat_max - P_Chg + P_aux // P_EM_max + P_Conn = P_Bat_max - P_Chg + P_aux
// P_EM_max + ((P_EM_max + P_Chg - P_aux) / U_Int) ^ 2 * R_Conn = P_Bat_max - P_Chg + P_aux // P_EM_max + ((P_EM_max + P_Chg - P_aux) / U_Int) ^ 2 * R_Conn = P_Bat_max - P_Chg + P_aux
// P_EM_max^2 * R_Conn / U_Int^2 + P_EM_max - (P_Bat_max - P_Chg + P_aux) = 0 // P_EM_max^2 * R_Conn / U_Int^2 + P_EM_max - (P_Bat_max - P_Chg + P_aux) = 0
......
...@@ -36,7 +36,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent ...@@ -36,7 +36,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent
var chargePower = Charger.Count == 0 ? 0.SI<Watt>() : Charger.Sum(x => x.PowerDemand(absTime, dt, powerDemand, auxDemand, dryRun)); var chargePower = Charger.Count == 0 ? 0.SI<Watt>() : Charger.Sum(x => x.PowerDemand(absTime, dt, powerDemand, auxDemand, dryRun));
var currentEst = powerDemand / Battery.InternalVoltage; var currentEst = powerDemand / Battery.InternalVoltage;
var connectorLoss = currentEst * (ModelData?.ConnectionSystemResistance ?? 0.SI<Ohm>() ) * currentEst; var connectorLoss = currentEst * (ModelData?.ConnectionSystemResistance ?? 0.SI<Ohm>() ) * currentEst;
var totalPowerDemand = powerDemand + chargePower - auxDemand + connectorLoss; var totalPowerDemand = powerDemand + chargePower - auxDemand - connectorLoss;
var batResponse = Battery.MainBatteryPort.Request(absTime, dt, totalPowerDemand, dryRun); var batResponse = Battery.MainBatteryPort.Request(absTime, dt, totalPowerDemand, dryRun);
...@@ -156,7 +156,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent ...@@ -156,7 +156,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent
ConnectorLoss = connectorLoss; ConnectorLoss = connectorLoss;
} }
public Watt TotalPowerDemand => ConsumerPower + ChargePower - AuxPower + ConnectorLoss; public Watt TotalPowerDemand => ConsumerPower + ChargePower - AuxPower;
public State Clone() => (State)MemberwiseClone(); public State Clone() => (State)MemberwiseClone();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment