diff --git a/Documentation/User Manual/5-input-and-output-files/VSUM.md b/Documentation/User Manual/5-input-and-output-files/VSUM.md index bb5ceeccc23376c9a193ae6edc98e019622376fe..2e5fa9092d8980385394acc33afa4e7a294b4435 100644 --- a/Documentation/User Manual/5-input-and-output-files/VSUM.md +++ b/Documentation/User Manual/5-input-and-output-files/VSUM.md @@ -92,6 +92,7 @@ The .vsum file includes total / average results for each calculation run in one | E_EM_<POS>\_transm_loss | [kWh] | Losses of the transmission stage in the electric motor component. | | E_EM_<POS>-em_loss | [kWh] | Total losses of the electric motor component. Calculated from P_<POS>-em_loss | | E_EM_<POS>\_loss | [kWh] | Losses of the electric machine. Calculated from P_<POS>_loss | +| EM <POS> off time share | [%] | Time share the electric motor is not energized during the cycle. | Battery Start SoC | [%] | Battery state of charge at the beginning of the simulation run | | Battery End SoC | [%] | Battery state of charge at the end of the simulation run | | Battery Delta SoC | [kWh] | Difference of the energy stored in the battery between the beginning and end of the simulation run | diff --git a/VectoCore/VectoCore/OutputData/IModalDataContainer.cs b/VectoCore/VectoCore/OutputData/IModalDataContainer.cs index dfcad88578af4225fbfe6e6510f1a4d5150b8ff0..10cffcb2517a175cb1099ce1449177d999104b9b 100644 --- a/VectoCore/VectoCore/OutputData/IModalDataContainer.cs +++ b/VectoCore/VectoCore/OutputData/IModalDataContainer.cs @@ -559,6 +559,16 @@ namespace TUGraz.VectoCore.OutputData return 100 * (1 - iceOn / data.Duration); } + public static Scalar ElectricMotorOffTimeShare(this IModalDataContainer data, PowertrainPosition pos) + { + var emOff = data.GetValues(x => new { + dt = x[string.Format(ModalResultField.EM_Off_.GetCaption(), pos.GetName())] is DBNull + ? 0.SI<Second>() + : x.Field<Second>(ModalResultField.simulationInterval.GetName()) + }).Sum(x => x.dt) ?? 0.SI<Second>(); + return 100 * emOff / data.Duration; + } + /// <summary> /// The following logic applies: /// - shifting from gear A to gear B counts as gearshift (with or without traction interruption) diff --git a/VectoCore/VectoCore/OutputData/ModalDataContainer.cs b/VectoCore/VectoCore/OutputData/ModalDataContainer.cs index 8288dae00fd355e5786325498b7c6fcb5b2f4f46..0d1e64d24f9268139aa5675d9009125fbac5e65e 100644 --- a/VectoCore/VectoCore/OutputData/ModalDataContainer.cs +++ b/VectoCore/VectoCore/OutputData/ModalDataContainer.cs @@ -104,6 +104,8 @@ namespace TUGraz.VectoCore.OutputData private List<PowertrainPosition> ElectricMotors = new List<PowertrainPosition>(); private Dictionary<PowertrainPosition, WattSecond> _eEmDrive = new Dictionary<PowertrainPosition, WattSecond>(); private Dictionary<PowertrainPosition, WattSecond> _eEmRecuperate = new Dictionary<PowertrainPosition, WattSecond>(); + private Dictionary<PowertrainPosition, WattSecond> _eEmDriveMot = new Dictionary<PowertrainPosition, WattSecond>(); + private Dictionary<PowertrainPosition, WattSecond> _eEmRecuperateMot = new Dictionary<PowertrainPosition, WattSecond>(); protected VectoRunData _runData; @@ -288,12 +290,12 @@ namespace TUGraz.VectoCore.OutputData return null; } - if (!_eEmDrive.ContainsKey(emPos)) { - _eEmDrive[emPos] = TimeIntegral<WattSecond>( + if (!_eEmDriveMot.ContainsKey(emPos)) { + _eEmDriveMot[emPos] = TimeIntegral<WattSecond>( string.Format(ModalResultField.P_EM_electricMotor_em_mech_.GetCaption(), emPos.GetName()), x => x < 0); } - return -_eEmDrive[emPos]; + return -_eEmDriveMot[emPos]; } public WattSecond TotalElectricMotorWorkRecuperate(PowertrainPosition emPos) @@ -316,13 +318,13 @@ namespace TUGraz.VectoCore.OutputData return null; } - if (!_eEmRecuperate.ContainsKey(emPos)) { - _eEmRecuperate[emPos] = TimeIntegral<WattSecond>( + if (!_eEmRecuperateMot.ContainsKey(emPos)) { + _eEmRecuperateMot[emPos] = TimeIntegral<WattSecond>( string.Format(ModalResultField.P_EM_electricMotor_em_mech_.GetCaption(), emPos.GetName()), x => x > 0); ; } - return _eEmRecuperate[emPos]; + return _eEmRecuperateMot[emPos]; } diff --git a/VectoCore/VectoCore/OutputData/SummaryDataContainer.cs b/VectoCore/VectoCore/OutputData/SummaryDataContainer.cs index e5f8add557861975e1bece57d1fbb0f807bee965..52289f5ba87797344c7d6f4e854d2f96b3828140 100644 --- a/VectoCore/VectoCore/OutputData/SummaryDataContainer.cs +++ b/VectoCore/VectoCore/OutputData/SummaryDataContainer.cs @@ -741,8 +741,10 @@ namespace TUGraz.VectoCore.OutputData Tuple.Create(Fields.E_EM_OFF_Loss_Format, modData.ElectricMotorOffLosses(em.Item1).ConvertToKiloWattHour()), Tuple.Create(Fields.E_EM_LOSS_TRANSM_FORMAT, modData.ElectricMotorTransmissionLosses(em.Item1).ConvertToKiloWattHour()), - Tuple.Create(Fields.E_EM_Mot_LOSS_FORMAT, modData.ElectricMotorLosses(em.Item1).ConvertToKiloWattHour()), - Tuple.Create(Fields.E_EM_LOSS_FORMAT, modData.ElectricMotorMotLosses(em.Item1).ConvertToKiloWattHour()), + Tuple.Create(Fields.E_EM_Mot_LOSS_FORMAT, modData.ElectricMotorMotLosses(em.Item1).ConvertToKiloWattHour()), + Tuple.Create(Fields.E_EM_LOSS_FORMAT, modData.ElectricMotorLosses(em.Item1).ConvertToKiloWattHour()), + + Tuple.Create(Fields.E_EM_OFF_TIME_SHARE, (ConvertedSI)modData.ElectricMotorOffTimeShare(em.Item1)) }; emColumns.Reverse(); foreach (var entry in emColumns) { @@ -1326,7 +1328,7 @@ namespace TUGraz.VectoCore.OutputData public const string E_EM_LOSS_TRANSM_FORMAT = "E_EM_{0}_transm_loss [kWh]"; public const string E_EM_Mot_LOSS_FORMAT = "E_EM_{0}-em_loss [kWh]"; public const string E_EM_LOSS_FORMAT = "E_EM_{0}_loss [kWh]"; - + public const string E_EM_OFF_TIME_SHARE = "EM {0} off time share [%]"; public const string REESS_CAPACITY = "REESS Capacity"; public const string REESS_StartSoC = "REESS Start SoC [%]";