From 678a546b87ff3078f279c2d709d197538243f698 Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Fri, 21 Jul 2017 08:54:09 +0200 Subject: [PATCH] computing average rolling resistance --- .../SimulationComponent/Data/VehicleData.cs | 18 ++++++++++++++++-- .../OutputData/XML/XMLCustomerReport.cs | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs index 2422a84ff6..33288dd1bb 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs @@ -89,6 +89,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data private KilogramSquareMeter _wheelsInertia; private double? _totalRollResistanceCoefficient; private double? _rollResistanceCoefficientWithoutTrailer; + private double? _averageRollingResistanceTruck; public List<Axle> AxleData { @@ -191,6 +192,16 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data get { return (CurbWeight ?? 0.SI<Kilogram>()) + (BodyAndTrailerWeight ?? 0.SI<Kilogram>()); } } + public double AverageRollingResistanceTruck + { + get { + if (_averageRollingResistanceTruck == null) { + ComputeRollResistanceAndReducedMassWheels(); + } + return _averageRollingResistanceTruck.GetValueOrDefault(); + } + } + protected void ComputeRollResistanceAndReducedMassWheels() { if (TotalVehicleWeight == 0.SI<Kilogram>()) { @@ -204,7 +215,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data var rrc = 0.0.SI<Scalar>(); var rrcVehicle = 0.0.SI<Scalar>(); - + var averageRRC = 0.0; + var vehicleWheels = 0; var wheelsInertia = 0.0.SI<KilogramSquareMeter>(); var vehicleWeightShare = 0.0; foreach (var axle in _axleData) { @@ -216,16 +228,18 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data var rrcShare = axle.AxleWeightShare * axle.RollResistanceCoefficient * Math.Pow(baseValue, Physics.RollResistanceExponent - 1); - if (axle.AxleType != AxleType.Trailer) { rrcVehicle += rrcShare; vehicleWeightShare += axle.AxleWeightShare; + averageRRC += axle.RollResistanceCoefficient * nrWheels; + vehicleWheels += nrWheels; } rrc += rrcShare; wheelsInertia += nrWheels * axle.Inertia; } RollResistanceCoefficientWithoutTrailer = rrcVehicle / vehicleWeightShare; TotalRollResistanceCoefficient = rrc; + _averageRollingResistanceTruck = averageRRC / vehicleWheels; WheelsInertia = wheelsInertia; } diff --git a/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs b/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs index 1a03981f6d..0ed4b80bf6 100644 --- a/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs @@ -89,7 +89,7 @@ namespace TUGraz.VectoCore.OutputData.XML new XElement(tns + XMLNames.Report_GetGearbox_GearsCount, modelData.GearboxData.Gears.Count), new XElement(tns + XMLNames.Report_Vehicle_Retarder, modelData.Retarder.Type.IsDedicatedComponent()), new XElement(tns + XMLNames.Report_Vehicle_AxleRatio, modelData.AxleGearData.AxleGear.Ratio.ToXMLFormat(3)), - new XElement(tns + XMLNames.Report_Vehicle_AverageRRC, modelData.VehicleData.RollResistanceCoefficientWithoutTrailer) + new XElement(tns + XMLNames.Report_Vehicle_AverageRRC, modelData.VehicleData.AverageRollingResistanceTruck) ); InputDataIntegrity = new XElement(tns + "InputDataSignature", modelData.InputDataHash == null ? CreateDummySig() : new XElement(modelData.InputDataHash)); -- GitLab