Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

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

gearbox inertia according to patch

parent 7a74a251
No related branches found
No related tags found
No related merge requests found
......@@ -352,18 +352,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var inAngularVelocity = outAngularVelocity * ModelData.Gears[Gear].Ratio;
NewtonMeter inertiaTorqueLossOut;
if (!inAngularVelocity.IsEqual(0)) {
// MQ 19.2.2016: check! inertia is related to output side, torque loss accounts to input side
inertiaTorqueLossOut =
Formulas.InertiaPower(outAngularVelocity, PreviousState.OutAngularVelocity, ModelData.Inertia, dt) /
avgOutAngularVelocity;
if (dryRun) {
CurrentState.InertiaTorqueLossOut = !inAngularVelocity.IsEqual(0)
? Formulas.InertiaPower(outAngularVelocity, PreviousState.OutAngularVelocity, ModelData.Inertia, dt) /
avgOutAngularVelocity
: 0.SI<NewtonMeter>();
inTorque += CurrentState.InertiaTorqueLossOut / ModelData.Gears[Gear].Ratio;
} else {
inertiaTorqueLossOut = 0.SI<NewtonMeter>();
}
if (dryRun) {
var dryRunResponse = NextComponent.Request(absTime, dt, inTorque, inAngularVelocity, true);
dryRunResponse.GearboxPowerRequest = outTorque * (PreviousState.OutAngularVelocity + outAngularVelocity) / 2.0;
return dryRunResponse;
......@@ -398,7 +393,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
// (the above block issues dry-run requests and thus may update the CurrentState!)
// begin critical section
CurrentState.TransmissionTorqueLoss = inTorque - outTorque / ModelData.Gears[Gear].Ratio;
CurrentState.InertiaTorqueLossOut = inertiaTorqueLossOut;
// MQ 19.2.2016: check! inertia is related to output side, torque loss accounts to input side
CurrentState.InertiaTorqueLossOut = !inAngularVelocity.IsEqual(0)
? Formulas.InertiaPower(outAngularVelocity, PreviousState.OutAngularVelocity, ModelData.Inertia, dt) /
avgOutAngularVelocity
: 0.SI<NewtonMeter>();
inTorque += CurrentState.InertiaTorqueLossOut / ModelData.Gears[Gear].Ratio;
CurrentState.TransmissionTorqueLoss = inTorque - outTorque / ModelData.Gears[Gear].Ratio;
CurrentState.TorqueLossResult = inTorqueLossResult;
CurrentState.SetState(inTorque, inAngularVelocity, outTorque, outAngularVelocity);
CurrentState.Gear = Gear;
......
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