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

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

bugfix: use correct shiftloss energy in second simulation interval when shift...

bugfix: use correct shiftloss energy in second simulation interval when shift losses are split among two intervals
parent 12648fed
No related branches found
No related tags found
No related merge requests found
......@@ -299,7 +299,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
if (_powershiftLossEnergy != null) {
var remainingShiftLossLime = ModelData.PowershiftShiftTime - (absTime - LastShift);
if (remainingShiftLossLime.IsGreater(0)) {
aliquotEnergyLoss = _powershiftLossEnergy * VectoMath.Min(1.0, dt / remainingShiftLossLime);
aliquotEnergyLoss = _powershiftLossEnergy * VectoMath.Min(1.0, VectoMath.Min(dt, remainingShiftLossLime) / ModelData.PowershiftShiftTime);
var avgEngineSpeed = (DataBus.EngineSpeed + outAngularVelocity * effectiveRatio) / 2;
powershiftLoss = aliquotEnergyLoss / dt / avgEngineSpeed;
inTorque += powershiftLoss;
......@@ -317,7 +317,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
CurrentState.Gear = Gear;
CurrentState.TransmissionTorqueLoss = inTorque * effectiveRatio - outTorque;
CurrentState.PowershiftLoss = powershiftLoss;
CurrentState.PowershiftLossEnergy = _powershiftLossEnergy ?? 0.SI<WattSecond>() - aliquotEnergyLoss;
CurrentState.PowershiftLossEnergy = _powershiftLossEnergy;
TorqueConverter.Locked(CurrentState.InTorque, CurrentState.InAngularVelocity, CurrentState.InTorque,
CurrentState.InAngularVelocity);
}
......
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