Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 047a3f99 authored by Stefanos DOUMPOULAKIS's avatar Stefanos DOUMPOULAKIS
Browse files

Merge branch 'inertia-smaller-engines' into 'amdm2/develop'

fix #189: reconsider inertia for smaller engines

See merge request vecto/vecto!133
parents 61e65bf0 7ef1e4b3
Branches
Tags
No related merge requests found
...@@ -823,13 +823,52 @@ namespace TUGraz.VectoCore.Models.Declaration ...@@ -823,13 +823,52 @@ namespace TUGraz.VectoCore.Models.Declaration
public static readonly KilogramSquareMeter TorqueConverterInertia = 1.2.SI<KilogramSquareMeter>(); public static readonly KilogramSquareMeter TorqueConverterInertia = 1.2.SI<KilogramSquareMeter>();
public static readonly KilogramSquareMeter EngineBaseInertia = 0.41.SI<KilogramSquareMeter>(); public static readonly KilogramSquareMeter EngineBaseInertia = 0.41.SI<KilogramSquareMeter>();
public static readonly KilogramPerMeter EngineDisplacementInertia = (0.27 * 1000).SI<KilogramPerMeter>(); // [kg/m] public static readonly KilogramPerMeter EngineDisplacementInertia = 270.SI<KilogramPerMeter>();
public static readonly Second DefaultEngineStartTime = 1.SI<Second>(); public static readonly Second DefaultEngineStartTime = 1.SI<Second>();
public const double TorqueLimitGearboxFactor = 0.9; public const double TorqueLimitGearboxFactor = 0.9;
public const double TorqueLimitVehicleFactor = 0.95; public const double TorqueLimitVehicleFactor = 0.95;
public static readonly SI SmallEnginesBound = 3.2.SI<Liter>().Cast<CubicMeter>();
public static readonly SI MidEnginesBound = 5.SI<Liter>().Cast<CubicMeter>();
public static readonly KilogramSquareMeter ManualBaseInertia = 1.885.SI<KilogramSquareMeter>();
public static readonly KilogramSquareMeter ATBaseInertia = 1.707.SI<KilogramSquareMeter>();
public static readonly KilogramPerMeter SmallEngineDisplacementInertia = 400.SI<KilogramPerMeter>();
public static readonly KilogramPerMeter MidEngineATDisplacementInertia = 933.SI<KilogramPerMeter>();
public static readonly KilogramPerMeter MidEngineManualDisplacementInertia = 989.SI<KilogramPerMeter>();
public static KilogramSquareMeter EngineInertia(VectoSimulationJobType jobType, CubicMeter displacement, GearboxType? gbxType) public static KilogramSquareMeter EngineInertia(VectoSimulationJobType jobType, CubicMeter displacement, GearboxType? gbxType)
{
if (displacement <= SmallEnginesBound) {
return ComputeSmallEngineInertia(displacement);
}
else if ((displacement > SmallEnginesBound) && (displacement <= MidEnginesBound)) {
return ComputeMidEngineInertia(displacement, gbxType);
}
else {
return ComputeBigEngineInertia(jobType, displacement, gbxType);
}
}
private static KilogramSquareMeter ComputeSmallEngineInertia(CubicMeter displacement)
{
return (SmallEngineDisplacementInertia * displacement).Cast<KilogramSquareMeter>();
}
private static KilogramSquareMeter ComputeMidEngineInertia(CubicMeter displacement, GearboxType? gbxType)
{
if (!gbxType.HasValue) {
throw new VectoException("Gearbox type must be provided!");
}
return gbxType.Value.AutomaticTransmission()
? (MidEngineATDisplacementInertia * displacement) - ATBaseInertia
: (MidEngineManualDisplacementInertia * displacement) - ManualBaseInertia;
}
private static KilogramSquareMeter ComputeBigEngineInertia(VectoSimulationJobType jobType, CubicMeter displacement, GearboxType? gbxType)
{ {
// VB Code: Return 1.3 + 0.41 + 0.27 * (Displ / 1000) // VB Code: Return 1.3 + 0.41 + 0.27 * (Displ / 1000)
KilogramSquareMeter clutchPlateTc; KilogramSquareMeter clutchPlateTc;
......
...@@ -79,6 +79,27 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration ...@@ -79,6 +79,27 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
_kernel = new StandardKernel(new VectoNinjectModule()); _kernel = new StandardKernel(new VectoNinjectModule());
} }
[
TestCase(VectoSimulationJobType.ConventionalVehicle, 0.002, null, 0.8),
TestCase(VectoSimulationJobType.ConventionalVehicle, 0.0032, null, 1.28),
TestCase(VectoSimulationJobType.ConventionalVehicle, 0.0033, GearboxType.ATPowerSplit, 1.3719),
TestCase(VectoSimulationJobType.ConventionalVehicle, 0.0033, GearboxType.MT, 1.3787),
TestCase(VectoSimulationJobType.ConventionalVehicle, 0.005, GearboxType.MT, 3.06),
TestCase(VectoSimulationJobType.ConventionalVehicle, 0.006, GearboxType.MT, 3.33),
TestCase(VectoSimulationJobType.ConventionalVehicle, 0.006, GearboxType.ATPowerSplit, 3.23),
TestCase(VectoSimulationJobType.SerialHybridVehicle, 0.006, null, 2.03)
]
public void EngineInertiaTest(VectoSimulationJobType jobType, double displacement, GearboxType? gbxType,
double inertia)
{
KilogramSquareMeter result = DeclarationData.Engine.EngineInertia(
jobType,
displacement.SI<CubicMeter>(),
gbxType);
Assert.AreEqual(inertia, result.Value(), 1e-4);
}
[TestCase("285/60 R22.5", 10.6, 0.914, 3.03, 0.440766), [TestCase("285/60 R22.5", 10.6, 0.914, 3.03, 0.440766),
TestCase("285/70 R19.5", 7.9, 0.895, 3.05, 0.434453), TestCase("285/70 R19.5", 7.9, 0.895, 3.05, 0.434453),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment