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

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

loss-map extension: in case of negative slope for regression line exten...

loss-map extension: in case of negative slope for regression line exten loss-map with torque loss of last entry in loss-map
parent 1c76c247
No related branches found
No related tags found
No related merge requests found
...@@ -130,8 +130,14 @@ namespace TUGraz.VectoCore.InputData.Reader.ComponentData ...@@ -130,8 +130,14 @@ namespace TUGraz.VectoCore.InputData.Reader.ComponentData
out r); out r);
var inTq = DeclarationData.LossMapExtrapolationFactor * maxTorque; var inTq = DeclarationData.LossMapExtrapolationFactor * maxTorque;
entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, inTq, k * inTq + d.SI<NewtonMeter>())); if (k > 0) {
entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, -inTq, k * inTq + d.SI<NewtonMeter>())); entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, inTq, k * inTq + d.SI<NewtonMeter>()));
entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, -inTq, k * inTq + d.SI<NewtonMeter>()));
} else {
var torqueLossLastEntry = speedBucket.Value.OrderBy(x => x.InputSpeed).Last().TorqueLoss;
entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, inTq, torqueLossLastEntry));
entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, -inTq, torqueLossLastEntry));
}
} }
return entries; return entries;
......
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