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

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

Merge pull request #31 in VECTO/vecto-dev from...

Merge pull request #31 in VECTO/vecto-dev from VECTO/mq_vecto-dev:feature/VECTO-1240_hybrid_E2_GS to develop

* commit '1663282b':
  electric motor form: plot graph with values as read from input (not how treated in vecto)
  move conversion of electric motor full-load curve from lookup method in full-load curve to full load curve reader to match with electric map and drag curve
parents e435191a 1663282b
No related branches found
No related tags found
No related merge requests found
...@@ -390,7 +390,7 @@ Public Class ElectricMotorForm ...@@ -390,7 +390,7 @@ Public Class ElectricMotorForm
If Not fullLoadCurve Is Nothing Then If Not fullLoadCurve Is Nothing Then
Dim series As Series = New Series Dim series As Series = New Series
series.Points.DataBindXY(fullLoadCurve.FullLoadEntries.Select(Function(x) x.MotorSpeed.AsRPM).ToArray(), series.Points.DataBindXY(fullLoadCurve.FullLoadEntries.Select(Function(x) x.MotorSpeed.AsRPM).ToArray(),
fullLoadCurve.FullLoadEntries.Select(Function(x) x.FullDriveTorque.Value()).ToArray()) fullLoadCurve.FullLoadEntries.Select(Function(x) -x.FullDriveTorque.Value()).ToArray())
series.ChartType = SeriesChartType.FastLine series.ChartType = SeriesChartType.FastLine
series.BorderWidth = 2 series.BorderWidth = 2
series.Color = Color.DarkBlue series.Color = Color.DarkBlue
...@@ -399,7 +399,7 @@ Public Class ElectricMotorForm ...@@ -399,7 +399,7 @@ Public Class ElectricMotorForm
series = New Series series = New Series
series.Points.DataBindXY(fullLoadCurve.FullLoadEntries.Select(Function(x) x.MotorSpeed.AsRPM).ToArray(), series.Points.DataBindXY(fullLoadCurve.FullLoadEntries.Select(Function(x) x.MotorSpeed.AsRPM).ToArray(),
fullLoadCurve.FullLoadEntries.Select(Function(x) x.FullGenerationTorque.Value()).ToArray()) fullLoadCurve.FullLoadEntries.Select(Function(x) -x.FullGenerationTorque.Value()).ToArray())
series.ChartType = SeriesChartType.FastLine series.ChartType = SeriesChartType.FastLine
series.BorderWidth = 2 series.BorderWidth = 2
series.Color = Color.Blue series.Color = Color.Blue
...@@ -415,7 +415,7 @@ Public Class ElectricMotorForm ...@@ -415,7 +415,7 @@ Public Class ElectricMotorForm
If Not fcMap Is Nothing Then If Not fcMap Is Nothing Then
Dim series As Series = New Series Dim series As Series = New Series
series.Points.DataBindXY(fcMap.Entries.Select(Function(x) x.MotorSpeed.AsRPM).ToArray(), series.Points.DataBindXY(fcMap.Entries.Select(Function(x) x.MotorSpeed.AsRPM).ToArray(),
fcMap.Entries.Select(Function(x) x.Torque.Value()).ToArray()) fcMap.Entries.Select(Function(x) -x.Torque.Value()).ToArray())
series.ChartType = SeriesChartType.Point series.ChartType = SeriesChartType.Point
series.MarkerSize = 3 series.MarkerSize = 3
series.Color = Color.Red series.Color = Color.Red
...@@ -426,7 +426,7 @@ Public Class ElectricMotorForm ...@@ -426,7 +426,7 @@ Public Class ElectricMotorForm
If Not dragCurve Is Nothing Then If Not dragCurve Is Nothing Then
Dim series As Series = New Series Dim series As Series = New Series
series.Points.DataBindXY(dragCurve.Entries.Select(Function(x) x.MotorSpeed.AsRPM).ToArray(), series.Points.DataBindXY(dragCurve.Entries.Select(Function(x) x.MotorSpeed.AsRPM).ToArray(),
dragCurve.Entries.Select(Function(x) x.DragTorque.Value()).ToArray()) dragCurve.Entries.Select(Function(x) -x.DragTorque.Value()).ToArray())
series.ChartType = SeriesChartType.FastLine series.ChartType = SeriesChartType.FastLine
series.BorderWidth = 2 series.BorderWidth = 2
series.Color = Color.Green series.Color = Color.Green
......
...@@ -28,8 +28,8 @@ namespace TUGraz.VectoCore.InputData.Reader.ComponentData ...@@ -28,8 +28,8 @@ namespace TUGraz.VectoCore.InputData.Reader.ComponentData
(from DataRow row in data.Rows (from DataRow row in data.Rows
select new ElectricMotorFullLoadCurve.FullLoadEntry { select new ElectricMotorFullLoadCurve.FullLoadEntry {
MotorSpeed = row.ParseDouble(Fields.MotorSpeed).RPMtoRad() / ratio, MotorSpeed = row.ParseDouble(Fields.MotorSpeed).RPMtoRad() / ratio,
FullDriveTorque = row.ParseDouble(Fields.DrivingTorque).SI<NewtonMeter>() * count * ratio * efficiency, FullDriveTorque = -row.ParseDouble(Fields.DrivingTorque).SI<NewtonMeter>() * count * ratio * efficiency,
FullGenerationTorque = row.ParseDouble(Fields.GenerationTorque).SI<NewtonMeter>() * count * ratio / efficiency FullGenerationTorque = -row.ParseDouble(Fields.GenerationTorque).SI<NewtonMeter>() * count * ratio / efficiency
}).ToList()); }).ToList());
} }
......
...@@ -21,7 +21,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data { ...@@ -21,7 +21,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data {
public NewtonMeter FullLoadDriveTorque(PerSecond angularVelocity) public NewtonMeter FullLoadDriveTorque(PerSecond angularVelocity)
{ {
var idx = FindIndex(angularVelocity); var idx = FindIndex(angularVelocity);
return -VectoMath.Interpolate(FullLoadEntries[idx - 1].MotorSpeed, FullLoadEntries[idx].MotorSpeed, return VectoMath.Interpolate(FullLoadEntries[idx - 1].MotorSpeed, FullLoadEntries[idx].MotorSpeed,
FullLoadEntries[idx - 1].FullDriveTorque, FullLoadEntries[idx].FullDriveTorque, FullLoadEntries[idx - 1].FullDriveTorque, FullLoadEntries[idx].FullDriveTorque,
angularVelocity); angularVelocity);
} }
...@@ -29,7 +29,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data { ...@@ -29,7 +29,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data {
public NewtonMeter FullGenerationTorque(PerSecond angularVelocity) public NewtonMeter FullGenerationTorque(PerSecond angularVelocity)
{ {
var idx = FindIndex(angularVelocity); var idx = FindIndex(angularVelocity);
return -VectoMath.Interpolate(FullLoadEntries[idx - 1].MotorSpeed, FullLoadEntries[idx].MotorSpeed, return VectoMath.Interpolate(FullLoadEntries[idx - 1].MotorSpeed, FullLoadEntries[idx].MotorSpeed,
FullLoadEntries[idx - 1].FullGenerationTorque, FullLoadEntries[idx].FullGenerationTorque, FullLoadEntries[idx - 1].FullGenerationTorque, FullLoadEntries[idx].FullGenerationTorque,
angularVelocity); angularVelocity);
} }
......
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