Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 678a546b authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

computing average rolling resistance

parent 5128d869
No related branches found
Tags Release/v3.1.2.796
No related merge requests found
......@@ -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;
}
......
......@@ -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));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment