From d0d5371df65c6d9e9eab4bbc37ecbf509ce567aa Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Fri, 13 Apr 2018 13:08:59 +0200 Subject: [PATCH] testcase showing wrong FLD computaion in case the torque is constant --- .../FullLoadCurveTest.cs | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/VectoCore/VectoCoreTest/Models/SimulationComponentData/FullLoadCurveTest.cs b/VectoCore/VectoCoreTest/Models/SimulationComponentData/FullLoadCurveTest.cs index 7733a6eb9f..9946351106 100644 --- a/VectoCore/VectoCoreTest/Models/SimulationComponentData/FullLoadCurveTest.cs +++ b/VectoCore/VectoCoreTest/Models/SimulationComponentData/FullLoadCurveTest.cs @@ -188,6 +188,43 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponentData //AssertHelper.AreRelativeEqual(130.691151551712.SI<PerSecond>(), fldCurve.PreferredSpeed); } + /// <summary> + /// [VECTO-679] + /// </summary> + [TestCase] + public void TestN95hComputation() + { + var fldData = new[] { + "590,486,-44,0.60 ", + "600,486,-44,0.60 ", + "800,755,-54,0.60 ", + "1000,883,-62,0.60 ", + "1200,899,-74,0.60 ", + "1300,899,-80,0.60 ", + "1400,899,-87,0.60 ", + "1500,899,-92,0.60 ", + "1600,899,-97,0.60 ", + "1700,890,-100,0.60 ", + "1800,881,-103,0.60 ", + "1900,867,-107,0.60 ", + "2000,853,-111,0.43 ", + "2150,811,-118,0.29 ", + "2200,802,-125,0.25 ", + "2300,755,-130,0.25 ", + "2400,705,-135,0.25 ", + "2500,644,-140,0.25 ", + "2600,479,-145,0.25 ", + "2700,0,-149,0.25 ", + }; + var fldEntries = InputDataHelper.InputDataAsStream("n [U/min],Mfull [Nm],Mdrag [Nm],<PT1> [s] ", fldData); + var fldCurve = FullLoadCurveReader.Create(VectoCSVFile.ReadStream(fldEntries)); + fldCurve.EngineData = new CombustionEngineData { IdleSpeed = 560.RPMtoRad() }; + + Assert.AreEqual(2420.5, fldCurve.N95hSpeed.AsRPM, 1); + + + } + /// <summary> /// [VECTO-78] /// </summary> -- GitLab