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

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

torque converter: introduce creeping flag; dry-run: return delta drag-load and...

torque converter: introduce creeping flag; dry-run: return delta drag-load and delta full-load (don't guess what's required); set creeping flag accordingly
parent fcec098b
No related branches found
No related tags found
No related merge requests found
......@@ -275,6 +275,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox
public double SpeedRatio;
public double TorqueRatio;
public bool Creeping;
public override string ToString()
{
......
......@@ -118,6 +118,21 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
// : GetDragPowerOperatingPoint(dt, outAngularVelocity, engineResponse,
// PreviousState.InTorque * PreviousState.InAngularVelocity);
//}
var condition1 = (DataBus.DriverBehavior != DrivingBehavior.Braking && DataBus.BrakePower.IsEqual(0));
var condition2 = (outTorque.IsGreater(0) && DataBus.BrakePower.IsEqual(0));
var engineOK = engineResponse.DeltaDragLoad.IsGreaterOrEqual(0) && engineResponse.DeltaFullLoad.IsSmallerOrEqual(0);
if (DataBus.DriverBehavior != DrivingBehavior.Braking && engineOK && operatingPoint.Creeping) {
var delta = (outTorque - operatingPoint.OutTorque) *
(PreviousState.OutAngularVelocity + operatingPoint.OutAngularVelocity) / 2.0;
return new ResponseDryRun() {
Source = this,
DeltaFullLoad = delta,
DeltaDragLoad = delta,
TorqueConverterOperatingPoint = operatingPoint
};
}
var dryOperatingPointMax = GetMaxPowerOperatingPoint(dt, outAngularVelocity, engineResponse,
PreviousState.InTorque * PreviousState.InAngularVelocity);
var avgOutSpeedMax = (PreviousState.OutAngularVelocity + dryOperatingPointMax.OutAngularVelocity) / 2.0;
......@@ -183,7 +198,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return operatingPoint;
} catch (VectoException ve) {
Log.Error(ve, "TorqueConverter: Failed to find operating point for DragPower {0}", engineResponse.DragPower);
return ModelData.FindOperatingPoint(engineResponse.EngineSpeed, outAngularVelocity);
var retVal = ModelData.FindOperatingPoint(engineResponse.EngineSpeed, outAngularVelocity);
retVal.Creeping = true;
return retVal;
}
}
......@@ -202,7 +219,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
} catch (VectoException ve) {
Log.Error(ve, "TorqueConverter: Failed to find operating point for MaxPower {0}",
engineResponse.DynamicFullLoadPower);
throw;
var tqOperatingPoint = ModelData.FindOperatingPoint(DataBus.EngineIdleSpeed, outAngularVelocity);
tqOperatingPoint.Creeping = true;
return tqOperatingPoint;
}
}
......@@ -213,6 +232,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
if (operatingPointList.Count == 0) {
Log.Debug("TorqueConverter: Failed to find torque converter operating point, fallback: creeping");
var tqOperatingPoint = ModelData.FindOperatingPoint(DataBus.EngineIdleSpeed, outAngularVelocity);
tqOperatingPoint.Creeping = true;
return tqOperatingPoint;
}
......
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