From 11d3ea0245fb578b66911cbf44322a0c4dadac8c Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Tue, 12 Feb 2019 17:59:19 +0100 Subject: [PATCH] TC: output speed may already be too high so that no drag operating point is found (during acceleration) - use high constant value --- .../SimulationComponent/Impl/TorqueConverter.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/TorqueConverter.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/TorqueConverter.cs index 002507a292..b88d3b7e23 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/TorqueConverter.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/TorqueConverter.cs @@ -183,8 +183,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl var dryOperatingPointMin = GetDragPowerOperatingPoint( absTime, dt, outAngularVelocity, engineResponse, PreviousState.InTorque * PreviousState.InAngularVelocity); - var avgOutSpeedMin = (PreviousState.OutAngularVelocity + dryOperatingPointMin.OutAngularVelocity) / 2.0; - var deltaMin = (outTorque - dryOperatingPointMin.OutTorque) * avgOutSpeedMin; + var deltaMin = -double.MaxValue.SI<Watt>() / 20; + if (dryOperatingPointMin != null) { + var avgOutSpeedMin = (PreviousState.OutAngularVelocity + dryOperatingPointMin.OutAngularVelocity) / 2.0; + deltaMin = (outTorque - dryOperatingPointMin.OutTorque) * avgOutSpeedMin; + } return new ResponseDryRun { Source = this, @@ -230,7 +233,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl absTime, dt, outAngularVelocity, engineSpeed, x => x.DeltaDragLoad.IsGreater(0), x => VectoMath.Abs(DataBus.EngineSpeed - x.EngineSpeed).Value()); - + if (retVal != null) retVal.Creeping = true; return retVal; } @@ -248,6 +251,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl DataBus.EngineSpeed, outAngularVelocity, _engineInertia, dt, previousPower); var maxInputSpeed = VectoMath.Min(ModelData.TorqueConverterSpeedLimit, DataBus.EngineN95hSpeed); if (operatingPoint.InAngularVelocity.IsGreater(maxInputSpeed)) { + //operatingPoint = ModelData.FindOperatingPoint(maxInputSpeed, outAngularVelocity); operatingPoint = FindValidTorqueConverterOperatingPoint( absTime, dt, outAngularVelocity, maxInputSpeed, x => x.DeltaFullLoad.IsSmaller(0), @@ -297,6 +301,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl search.Add(res); } + if (search.Count == 0) { + return null; + } var selected = search.Where(selector).OrderBy(orderFunc).First(); retVal = ModelData.FindOperatingPoint(selected.EngineSpeed, outAngularVelocity); -- GitLab