Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

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

Measured speed with gear: more comprehensive error message when using invalid gear in input

parent 5452eb8b
Branches
Tags
No related merge requests found
......@@ -176,6 +176,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
effectiveLossMap = ModelData.Gears[Gear].TorqueConverterGearLossMap;
}
if (effectiveLossMap == null || double.IsNaN(effectiveRatio)) {
throw new VectoSimulationException("Ratio or loss-map for gear {0}{1} invalid. Please check input data", Gear,
torqueConverterLocked ? "L" : "C");
}
var avgOutAngularVelocity = (PreviousState.OutAngularVelocity + outAngularVelocity) / 2.0;
var inTorqueLossResult = effectiveLossMap.GetTorqueLoss(avgOutAngularVelocity, outTorque);
CurrentState.TorqueLossResult = inTorqueLossResult;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment