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

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

hotfix: account for gearbox inertia in dry-run

parent b48f882d
No related branches found
No related tags found
No related merge requests found
...@@ -221,7 +221,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -221,7 +221,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
if (DataBus.VehicleStopped) { if (DataBus.VehicleStopped) {
_engageTime = absTime; _engageTime = absTime;
} }
IResponse retVal; IResponse retVal;
// TODO MQ 2016/03/10: investigate further the effects of having the condition angularvelocity != 0 // TODO MQ 2016/03/10: investigate further the effects of having the condition angularvelocity != 0
if (ClutchClosed(absTime) /* && !angularVelocity.IsEqual(0) */) { if (ClutchClosed(absTime) /* && !angularVelocity.IsEqual(0) */) {
...@@ -337,7 +337,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -337,7 +337,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
Log.Debug("EngineSpeed is below IdleSpeed, Gearbox disengage!"); Log.Debug("EngineSpeed is below IdleSpeed, Gearbox disengage!");
return new ResponseEngineSpeedTooLow { Source = this, GearboxPowerRequest = outTorque * outAngularVelocity }; return new ResponseEngineSpeedTooLow { Source = this, GearboxPowerRequest = outTorque * outAngularVelocity };
} }
var dryRunResponse = NextComponent.Request(absTime, dt, inTorque, inAngularVelocity, true); var inertiaTorqueLossIn =
Formulas.InertiaPower(outAngularVelocity, PreviousState.OutAngularVelocity, ModelData.Inertia, dt) /
avgOutAngularVelocity / ModelData.Gears[Gear].Ratio;
var dryRunResponse = NextComponent.Request(absTime, dt, inTorque + inertiaTorqueLossIn, inAngularVelocity, true);
dryRunResponse.GearboxPowerRequest = outTorque * (PreviousState.OutAngularVelocity + outAngularVelocity) / 2.0; dryRunResponse.GearboxPowerRequest = outTorque * (PreviousState.OutAngularVelocity + outAngularVelocity) / 2.0;
return dryRunResponse; return dryRunResponse;
} }
......
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