Code development platform for open source projects from the European Union institutions

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

Merge pull request #35 in VECTO/vecto-dev from...

Merge pull request #35 in VECTO/vecto-dev from VECTO/mq_vecto-dev:feature/VECTO-1394-refactor-em-model to develop

* commit 'e7b64e90':
  adding em-off time share in sum file
parents 1f678a99 e7b64e90
No related branches found
No related tags found
No related merge requests found
......@@ -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 |
......
......@@ -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)
......
......@@ -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];
}
......
......@@ -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 [%]";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment