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 20d16cd8 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

AT Gearbox: don't add losses if average speed is 0

parent 24f73dbc
No related branches found
No related tags found
No related merge requests found
......@@ -301,7 +301,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var avgOutAngularVelocity = (PreviousState.OutAngularVelocity + outAngularVelocity) / 2.0;
var avgInAngularVelocity = (PreviousState.InAngularVelocity + inAngularVelocity) / 2.0;
var inTorqueLossResult = effectiveLossMap.GetTorqueLoss(avgOutAngularVelocity, outTorque);
var inTorque = outTorque * (avgOutAngularVelocity / avgInAngularVelocity) + inTorqueLossResult.Value;
var inTorque = avgInAngularVelocity.IsEqual(0) ? outTorque : outTorque * (avgOutAngularVelocity / avgInAngularVelocity) + inTorqueLossResult.Value;
var inertiaTorqueLossOut = !inAngularVelocity.IsEqual(0)
? Formulas.InertiaPower(outAngularVelocity, PreviousState.OutAngularVelocity, ModelData.Inertia, dt) /
......
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