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

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

Merge pull request #513 in VECTO/vecto-sim from...

Merge pull request #513 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:bugfix/VECTO-575-vecto-simulation-aborts to master

* commit '435a6f87':
  remove double accounting of gearbox inertia loss during dry-run search
parents 9809f54f 435a6f87
No related branches found
No related tags found
No related merge requests found
......@@ -319,11 +319,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
inTorque += inertiaTorqueLossOut / ModelData.Gears[Gear].Ratio;
if (dryRun) {
var inertiaTorqueLossIn = avgOutAngularVelocity.IsEqual(0, 1e-9)
? 0.SI<NewtonMeter>()
: Formulas.InertiaPower(outAngularVelocity, PreviousState.OutAngularVelocity, ModelData.Inertia, dt) /
avgOutAngularVelocity / ModelData.Gears[Gear].Ratio;
var dryRunResponse = NextComponent.Request(absTime, dt, inTorque + inertiaTorqueLossIn, inAngularVelocity, true);
var dryRunResponse = NextComponent.Request(absTime, dt, inTorque, inAngularVelocity, true);
dryRunResponse.GearboxPowerRequest = outTorque * (PreviousState.OutAngularVelocity + outAngularVelocity) / 2.0;
return dryRunResponse;
}
......@@ -431,4 +427,4 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
base.DoCommitSimulationStep();
}
}
}
\ No newline at end of file
}
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