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

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

adding torque converter operating point to response (for debugging)

parent 0e46c74b
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,8 @@
using System.Linq;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox;
using TUGraz.VectoCore.Models.SimulationComponent.Impl;
namespace TUGraz.VectoCore.Models.Connector.Ports.Impl
{
......@@ -56,6 +58,8 @@ namespace TUGraz.VectoCore.Models.Connector.Ports.Impl
public Watt BrakePower { get; set; }
public Watt AuxiliariesPowerDemand { get; set; }
public TorqueConverterOperatingPoint TorqueConverterOperatingPoint { get; set; }
public override string ToString()
{
var t = GetType();
......
......@@ -148,6 +148,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox
public double SpeedRatio;
public double TorqueRatio;
public override string ToString()
{
return string.Format("n_out: {0}, n_in: {1}, tq_out: {2}, tq_in {3}, nu: {4}, my: {5}", OutAngularVelocity,
InAngularVelocity, OutTorque, InTorque, SpeedRatio, TorqueRatio);
}
}
public class TorqueConverterEntry
......
......@@ -61,27 +61,20 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var deltaEngine = (engineResponse.DeltaFullLoad > 0 ? engineResponse.DeltaFullLoad : 0.SI<Watt>()) +
(engineResponse.DeltaDragLoad < 0 ? -engineResponse.DeltaDragLoad : 0.SI<Watt>());
if (deltaTorqueConverter.IsEqual(0)) {
if (DataBus.DriverBehavior != DrivingBehavior.Braking) {
if (engineResponse.DeltaFullLoad.IsSmaller(Constants.SimulationSettings.LineSearchTolerance)) {
return new ResponseDryRun { Source = this, DeltaFullLoad = engineResponse.DeltaFullLoad };
}
//if (DataBus.DriverAcceleration.IsSmallerOrEqual(0.1.SI<MeterPerSquareSecond>())) {
// dryOperatingPoint = SearchOperatingPointFor
//}
} else {
if (engineResponse.DeltaDragLoad.IsSmaller(Constants.SimulationSettings.LineSearchTolerance)) {
return new ResponseDryRun { Source = this, DeltaDragLoad = engineResponse.DeltaDragLoad };
}
}
return engineResponse;
return new ResponseDryRun {
Source = this,
DeltaFullLoad = engineResponse.DeltaFullLoad,
DeltaDragLoad = engineResponse.DeltaDragLoad,
TorqueConverterOperatingPoint = dryOperatingPoint
};
}
var delta = deltaTorqueConverter.Value() * (deltaEngine.IsEqual(0) ? 1 : deltaEngine.Value());
return new ResponseDryRun() {
Source = this,
DeltaFullLoad = delta.SI<Watt>(),
DeltaDragLoad = delta.SI<Watt>()
DeltaDragLoad = delta.SI<Watt>(),
TorqueConverterOperatingPoint = dryOperatingPoint
};
}
var operatingPoint = FindOperatingPoint(outTorque, outAngularVelocity);
......@@ -91,9 +84,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
(PreviousState.OutAngularVelocity + operatingPoint.OutAngularVelocity) / 2.0;
if (!delta.IsEqual(0, Constants.SimulationSettings.LineSearchTolerance)) {
if (delta > 0) {
return new ResponseOverload { Source = this, Delta = delta };
return new ResponseOverload { Source = this, Delta = delta, TorqueConverterOperatingPoint = operatingPoint };
}
return new ResponseUnderload { Source = this, Delta = delta };
return new ResponseUnderload { Source = this, Delta = delta, TorqueConverterOperatingPoint = operatingPoint };
}
}
var ratio = Gearbox.ModelData.Gears[Gearbox.Gear].TorqueConverterRatio;
......@@ -102,7 +95,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return new ResponseGearShift() { Source = this };
}
var retVal = NextComponent.Request(absTime, dt, operatingPoint.InTorque, operatingPoint.InAngularVelocity, dryRun);
return retVal;
}
......
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