Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

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

correcting computation in torque converter (correct SI units)

parent 488307ee
Branches
Tags
No related merge requests found
...@@ -216,7 +216,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox ...@@ -216,7 +216,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox
foreach (var edge in TorqueConverterEntries.Pairwise((p1, p2) => Edge.Create(new Point(p1.SpeedRatio, p1.TorqueRatio), new Point(p2.SpeedRatio, p2.TorqueRatio)))) { foreach (var edge in TorqueConverterEntries.Pairwise((p1, p2) => Edge.Create(new Point(p1.SpeedRatio, p1.TorqueRatio), new Point(p2.SpeedRatio, p2.TorqueRatio)))) {
if (nu >= edge.P1.X && nu < edge.P2.X) { if (nu >= edge.P1.X && nu < edge.P2.X) {
var my = VectoMath.Interpolate(edge, nu); var my = VectoMath.Interpolate(edge, nu);
return new TorqueConverterOperatingPoint() { return new TorqueConverterOperatingPoint {
InAngularVelocity = inAngularVelocity, InAngularVelocity = inAngularVelocity,
OutAngularVelocity = outAngularVelocity, OutAngularVelocity = outAngularVelocity,
OutTorque = outTorque, OutTorque = outTorque,
...@@ -231,6 +231,27 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox ...@@ -231,6 +231,27 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox
outAngularVelocity, inAngularVelocity, outTorque); outAngularVelocity, inAngularVelocity, outTorque);
} }
public TorqueConverterOperatingPoint LookupOperatingPointOut(PerSecond outAngularVelocity, PerSecond inAngularVelocity, NewtonMeter inTorque)
{
var nu = outAngularVelocity / inAngularVelocity;
foreach (var edge in TorqueConverterEntries.Pairwise((p1, p2) => Edge.Create(new Point(p1.SpeedRatio, p1.TorqueRatio), new Point(p2.SpeedRatio, p2.TorqueRatio)))) {
if (nu >= edge.P1.X && nu < edge.P2.X) {
var my = VectoMath.Interpolate(edge, nu);
return new TorqueConverterOperatingPoint {
InAngularVelocity = inAngularVelocity,
OutAngularVelocity = outAngularVelocity,
OutTorque = inTorque * my,
InTorque = inTorque,
SpeedRatio = nu,
TorqueRatio = my,
};
}
}
throw new VectoSimulationException(
"Torque Converter: Failed to find operating point for outputSpeed/outputTorque/inputSpeed! n_out: {0}, n_in: {1}, tq_in: {2}",
outAngularVelocity, inAngularVelocity, inTorque);
}
public TorqueConverterOperatingPoint FindOperatingPointForPowerDemand(Watt enginePower, PerSecond prevInputSpeed, public TorqueConverterOperatingPoint FindOperatingPointForPowerDemand(Watt enginePower, PerSecond prevInputSpeed,
PerSecond nextOutputSpeed, KilogramSquareMeter inertia, Second dt, Watt previousPowerTC) PerSecond nextOutputSpeed, KilogramSquareMeter inertia, Second dt, Watt previousPowerTC)
{ {
...@@ -249,8 +270,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox ...@@ -249,8 +270,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox
// P_TC_in_avg = (T_in_1 * n_in_1 + T_in_2 * n_in_2) / 2 // P_TC_in_avg = (T_in_1 * n_in_1 + T_in_2 * n_in_2) / 2
// => solve for n_in // => solve for n_in
var a = mpEdge.OffsetXY / (2 * mpNorm * mpNorm); var a = mpEdge.OffsetXY.SI<NewtonMeter>() / (2 * mpNorm * mpNorm);
var b = inertia / (2 * dt) + mpEdge.SlopeXY * nextOutputSpeed.Value() / (2 * mpNorm * mpNorm); var b = inertia / (2 * dt) + mpEdge.SlopeXY.SI<NewtonMeter>() * nextOutputSpeed / (2 * mpNorm * mpNorm);
var c = 0; var c = 0;
var d = -inertia * prevInputSpeed * prevInputSpeed / (2 * dt) - enginePower + var d = -inertia * prevInputSpeed * prevInputSpeed / (2 * dt) - enginePower +
previousPowerTC / 2; previousPowerTC / 2;
...@@ -322,6 +343,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox ...@@ -322,6 +343,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox
return ValidationResult.Success; return ValidationResult.Success;
} }
} }
public class TorqueConverterOperatingPoint public class TorqueConverterOperatingPoint
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment