diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs index 2422a84ff6faa1154fef0106916db14c0267ee7c..33288dd1bb1294a652bf2c2cca7d11bd8d8d757d 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 1a03981f6dbada0a0f94248cb7cc04f3c9a93268..0ed4b80bf6fc941ae6ca0af5e8fc5edd4d12a1f0 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));