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
Verified Commit 8c8c21dc authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

adding new modal result fields for losses of cables and juction box, total terminal power demand

parent d766fc87
Branches
Tags
No related merge requests found
......@@ -296,7 +296,9 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
ModalResultField.P_reess_int,
ModalResultField.P_reess_loss,
ModalResultField.P_reess_charge_max,
ModalResultField.P_reess_discharge_max
ModalResultField.P_reess_discharge_max,
ModalResultField.P_terminal_ES,
ModalResultField.P_ES_Conn_loss
};
// ------------------------------------------------------------------------------------
......@@ -352,6 +354,9 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
{
foreach (var value in columns) {
var colName = nameFunc != null ? nameFunc(value) : value.GetName();
if (Columns.Contains(colName)) {
continue;
}
var col = new DataColumn(colName, value.GetAttribute().DataType)
{ Caption = captionFunc != null ? captionFunc(value) : value.GetCaption() };
col.ExtendedProperties[ExtendedPropertyNames.Decimals] = value.GetAttribute().Decimals;
......
......@@ -466,7 +466,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
[ModalResultField(typeof(SI), caption: "U_0_REESS [V]")] U0_reess,
[ModalResultField(typeof(SI), caption: "I_REESS [A]")] I_reess,
[ModalResultField(typeof(SI), caption: "P_REESS_JB_Cables [kW]", outputFactor: 1e-3)] P_ES_Conn,
[ModalResultField(typeof(SI), caption: "P_REESS_ES_T [kW]", outputFactor: 1e-3)] P_terminal_ES,
[ModalResultField(typeof(SI), caption: "P_REESS_JB_Cables_loss [kW]", outputFactor: 1e-3)] P_ES_Conn_loss,
[ModalResultField(typeof(SI), caption: "T_max_propulsion [Nm]")] MaxPropulsionTorqe,
......
......@@ -76,6 +76,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent
protected override void DoWriteModalResults(Second absTime, Second dt, IModalDataContainer container)
{
container[ModalResultField.P_Aux_el_HV] = CurrentState.AuxPower;
container[ModalResultField.P_ES_Conn_loss] = CurrentState.ConnectorLoss;
container[ModalResultField.P_terminal_ES] = CurrentState.TotalPowerDemand;
}
protected override void DoCommitSimulationStep(Second time, Second simulationInterval)
......@@ -153,6 +155,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent
ConnectorLoss = connectorLoss;
}
public Watt TotalPowerDemand => ConsumerPower + ChargePower - AuxPower + ConnectorLoss;
public State Clone() => (State)MemberwiseClone();
}
......
......@@ -636,9 +636,11 @@ namespace TUGraz.VectoCore.OutputData
ModalResultField.P_ice_inertia,
ModalResultField.P_ice_out,
// REESS
ModalResultField.P_terminal_ES,
ModalResultField.P_reess_terminal,
ModalResultField.P_reess_int,
ModalResultField.P_reess_loss,
ModalResultField.P_ES_Conn_loss,
ModalResultField.P_reess_charge_max,
ModalResultField.P_reess_discharge_max,
ModalResultField.REESSStateOfCharge,
......
......@@ -240,6 +240,16 @@ namespace TUGraz.VectoCore.OutputData
return -data.TimeIntegral<WattSecond>(ModalResultField.P_reess_terminal, x => x.IsSmaller(0));
}
public static WattSecond WorkREESSChargeTerminal_ES(this IModalDataContainer data)
{
return data.TimeIntegral<WattSecond>(ModalResultField.P_terminal_ES, x => x.IsGreater(0));
}
public static WattSecond WorkREESSDischargeTerminal_ES(this IModalDataContainer data)
{
return -data.TimeIntegral<WattSecond>(ModalResultField.P_terminal_ES, x => x.IsSmaller(0));
}
public static WattSecond WorkREESSChargeInternal(this IModalDataContainer data)
{
return data.TimeIntegral<WattSecond>(ModalResultField.P_reess_int, x => x.IsGreater(0));
......@@ -543,6 +553,12 @@ namespace TUGraz.VectoCore.OutputData
return data.TimeIntegral<WattSecond>(ModalResultField.P_reess_loss);
}
public static WattSecond ESConnectorLoss(this IModalDataContainer data)
{
return data.TimeIntegral<WattSecond>(ModalResultField.P_ES_Conn_loss);
}
public static double REESSDeltaSoc(this IModalDataContainer data)
{
return data.REESSEndSoC() - data.REESSStartSoC();
......
......@@ -536,7 +536,7 @@ namespace TUGraz.VectoCore.OutputData
{ E_BusAux_HVAC_El, SumFunc((r, m) => m.TimeIntegral<WattSecond>(ModalResultField.P_busAux_ES_HVAC).ConvertToKiloWattHour(), ModalResultField.P_busAux_ES_HVAC)},
// REESS
{ E_REESS_LOSS, SumFunc((r, m) => m.REESSLoss().ConvertToKiloWattHour(), ModalResultField.P_reess_loss)},
{ E_REESS_LOSS, SumFunc((r, m) => (m.REESSLoss() + m.ESConnectorLoss()).ConvertToKiloWattHour(), ModalResultField.P_reess_loss)},
{ E_REESS_T_chg, SumFunc((r, m) => m.WorkREESSChargeTerminal().ConvertToKiloWattHour(), ModalResultField.P_reess_terminal)},
{ E_REESS_T_dischg, SumFunc((r, m) => m.WorkREESSDischargeTerminal().ConvertToKiloWattHour(), ModalResultField.P_reess_terminal)},
{ E_REESS_int_chg, SumFunc((r, m) => m.WorkREESSChargeInternal().ConvertToKiloWattHour(), ModalResultField.P_reess_int)},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment