diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/Gearbox/TorqueConverterData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/Gearbox/TorqueConverterData.cs index bb567b91a02ec793b24e7ef168a898020c9f9dfa..6e55a4fdf29a78cfaed934b4f74e0c6c435e23b7 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/Gearbox/TorqueConverterData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/Gearbox/TorqueConverterData.cs @@ -275,6 +275,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox public double SpeedRatio; public double TorqueRatio; + public bool Creeping; public override string ToString() { diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/TorqueConverter.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/TorqueConverter.cs index bb86d15a89c3606fe630f5ee54047659f8f9971d..cbdd2f497450c9ee7bc41cc849c95fa973e5faa2 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/TorqueConverter.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/TorqueConverter.cs @@ -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; }