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

Skip to content
Snippets Groups Projects
Commit 1eea86bf authored by Michael KRISPER's avatar Michael KRISPER
Browse files

CycleGearbox includes Inertia in DryRuns

parent 99554cb7
No related branches found
No related tags found
No related merge requests found
......@@ -193,15 +193,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
CurrentState.TorqueLossResult = inTorqueLossResult;
var inAngularVelocity = outAngularVelocity * ModelData.Gears[Gear].Ratio;
if (dryRun) {
var dryRunResponse = NextComponent.Request(absTime, dt, inTorque, inAngularVelocity, true);
dryRunResponse.GearboxPowerRequest = outTorque * avgOutAngularVelocity;
return dryRunResponse;
}
// this code has to be _after_ the check for a potential gear-shift!
// (the above block issues dry-run requests and thus may update the CurrentState!)
CurrentState.TransmissionTorqueLoss = inTorque - (outTorque / ModelData.Gears[Gear].Ratio);
if (!inAngularVelocity.IsEqual(0)) {
// MQ 19.2.2016: check! inertia is related to output side, torque loss accounts to input side
CurrentState.InertiaTorqueLossOut =
......@@ -211,6 +202,19 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
} else {
CurrentState.InertiaTorqueLossOut = 0.SI<NewtonMeter>();
}
// todo mk 2016-08-23: add pto auxiliaries!!
if (dryRun) {
var dryRunResponse = NextComponent.Request(absTime, dt, inTorque, inAngularVelocity, true);
dryRunResponse.GearboxPowerRequest = outTorque * avgOutAngularVelocity;
return dryRunResponse;
}
// this code has to be _after_ the check for a potential gear-shift!
// (the above block issues dry-run requests and thus may update the CurrentState!)
CurrentState.TransmissionTorqueLoss = inTorque - (outTorque / ModelData.Gears[Gear].Ratio);
CurrentState.SetState(inTorque, inAngularVelocity, outTorque, outAngularVelocity);
CurrentState.Gear = Gear;
// end critical section
......
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