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

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

update torque converter lookup

parent 31c0916c
No related branches found
No related tags found
No related merge requests found
......@@ -104,14 +104,25 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox
return retVal;
}
private double MuLookup(double nu)
private double MuLookup(double speedRatio)
{
int index;
TorqueConverterEntries.GetSection(x => x.SpeedRatio < nu, out index);
var muEdge =
Edge.Create(new Point(TorqueConverterEntries[index].SpeedRatio, TorqueConverterEntries[index].TorqueRatio),
new Point(TorqueConverterEntries[index + 1].SpeedRatio, TorqueConverterEntries[index + 1].TorqueRatio));
return muEdge.SlopeXY * nu + muEdge.OffsetXY;
TorqueConverterEntries.GetSection(x => x.SpeedRatio < speedRatio, out index);
var retVal = VectoMath.Interpolate(TorqueConverterEntries[index].SpeedRatio,
TorqueConverterEntries[index + 1].SpeedRatio, TorqueConverterEntries[index].TorqueRatio,
TorqueConverterEntries[index + 1].TorqueRatio, speedRatio);
return retVal;
}
private NewtonMeter ReferenceTorqueLookup(double speedRatio)
{
int index;
TorqueConverterEntries.GetSection(x => x.SpeedRatio < speedRatio, out index);
var retVal = VectoMath.Interpolate(TorqueConverterEntries[index].SpeedRatio,
TorqueConverterEntries[index + 1].SpeedRatio, TorqueConverterEntries[index].Torque,
TorqueConverterEntries[index + 1].Torque, speedRatio);
return retVal;
}
public TorqueConverterOperatingPoint GetOutTorque(PerSecond inAngularVelocity, PerSecond outAngularVelocity)
......@@ -137,13 +148,16 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox
inAngularVelocity);
}
public TorqueConverterOperatingPoint GetOutTorqueAndSpeed(NewtonMeter inTorque, PerSecond inAngularVelocity)
public TorqueConverterOperatingPoint GetOutTorqueAndSpeed(NewtonMeter inTorque, PerSecond inAngularVelocity,
PerSecond outAngularSpeedEstimated)
{
var referenceTorque = inTorque.Value() / inAngularVelocity.Value() / inAngularVelocity.Value() *
ReferenceSpeed.Value() * ReferenceSpeed.Value();
var maxTorque = TorqueConverterEntries.Max(x => x.Torque.Value());
if (referenceTorque.IsGreaterOrEqual(maxTorque)) {
referenceTorque = 0.9 * maxTorque;
referenceTorque = outAngularSpeedEstimated != null
? ReferenceTorqueLookup(outAngularSpeedEstimated / inAngularVelocity).Value()
: 0.9 * maxTorque;
}
var solutions = new List<double>();
......
......@@ -75,7 +75,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
dryOperatingPoint =
ModelData.GetOutTorqueAndSpeed(
outTorque > 0 ? engineResponse.EngineMaxTorqueOut : engineResponse.EngineDragTorque,
dryOperatingPoint.InAngularVelocity);
dryOperatingPoint.InAngularVelocity, null);
}
......
......@@ -85,7 +85,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponentData
tqInput), 1000.RPMtoRad(), tqLimit.RPMtoRad());
var operatingPoint = tqData.GetOutTorqueAndSpeed(tqIn.SI<NewtonMeter>(), nIn.RPMtoRad());
var operatingPoint = tqData.GetOutTorqueAndSpeed(tqIn.SI<NewtonMeter>(), nIn.RPMtoRad(), null);
Assert.AreEqual(operatingPoint.InTorque.Value(), tqIn, 1e-6);
Assert.AreEqual(operatingPoint.InAngularVelocity.Value(), nIn.RPMtoRad().Value(), 1e-6);
......
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