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

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

extend valid range of loss-map (needs to be adapted later)

parent 3335fda5
No related branches found
No related tags found
No related merge requests found
......@@ -215,8 +215,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox
{
var torqueLoss = _invertedLossMap.Interpolate(inAngularVelocity.ConvertTo().Rounds.Per.Minute.Value(),
inTorque.Value());
if (torqueLoss.HasValue)
if (torqueLoss.HasValue) {
return (inTorque - torqueLoss.Value.SI<NewtonMeter>()) / _ratio;
}
if (allowExtrapolation) {
torqueLoss = _invertedLossMap.Extrapolate(inAngularVelocity.ConvertTo().Rounds.Per.Minute.Value(), inTorque.Value());
......@@ -235,7 +236,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox
[DebuggerDisplay("GearLossMapEntry({InputSpeed}, {InputTorque}, {TorqueLoss})")]
public class GearLossMapEntry
{
[Required, SIRange(0, 5000 * Constants.RPMToRad)]
[Required, SIRange(0, 10000 * Constants.RPMToRad)]
public PerSecond InputSpeed { get; set; }
[Required, SIRange(-100000, 100000)]
......
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