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

Skip to content
Snippets Groups Projects
Commit 6377573e authored by Michael KRISPER's avatar Michael KRISPER
Browse files

PTO Aux

parent 736267f4
No related branches found
No related tags found
No related merge requests found
Showing
with 1263 additions and 1274 deletions
{
"Header": {
"CreatedBy": " ()",
"Date": "2016-10-05T11:46:12.0710746Z",
"Date": "2016-10-05T12:54:17.7100746Z",
"AppVersion": "3",
"FileVersion": 7
},
......
{
"Header": {
"CreatedBy": " ()",
"Date": "2016-10-05T11:46:38.5720746Z",
"Date": "2016-10-05T12:54:29.6470746Z",
"AppVersion": "3",
"FileVersion": 3
},
......@@ -15,7 +15,7 @@
"AuxiliaryVersion": "CLASSIC",
"AdvancedAuxiliaryFilePath": "",
"Aux": [],
"Padd": 0.0,
"Padd": 3500.0,
"VACC": "Truck.vacc",
"StartStop": {
"Enabled": false,
......
Job [-],Input File [-],Cycle [-],Status,Mass [kg],Loading [kg],time [s],distance [km],speed [km/h],altitudeDelta [m],FC-Map [g/h],FC-Map [g/km],FC-AUXc [g/h],FC-AUXc [g/km],FC-WHTCc [g/h],FC-WHTCc [g/km],FC-AAUX [g/h],FC-AAUX [g/km],FC-Final [g/h],FC-Final [g/km],FC-Final [l/100km],FC-Final [l/100tkm],CO2 [g/km],CO2 [g/tkm],P_wheel_in_pos [kW],P_brake_loss [kW],P_angle_loss [kW],P_tc_loss [kW],P_clutch_pos [kW],P_clutch_neg [kW],P_fcmap_pos [kW],E_aux_CONSTANTAUX [kWh],E_aux_sum [kWh],E_air [kWh],E_roll [kWh],E_grad [kWh],E_inertia [kWh],E_brake [kWh],E_gbx_loss [kWh],E_axl_loss [kWh],E_angle_loss [kWh],E_ret_loss [kWh],E_tc_loss [kWh],E_clutch_pos [kWh],E_clutch_neg [kWh],E_fcmap_pos [kWh],a [m/s^2],a_pos [m/s^2],a_neg [m/s^2],AccelerationTimeShare [%],DecelerationTimeShare [%],CruiseTimeShare [%],StopTimeShare [%]
1-0,Class4_RigidTruck_ENG_PTO,PTO_Collector.vdri,Success,11500.0000,7100.0000,1104.5954,0.8003,2.6083,-1.2842,5884.3006,2256.0034,5884.3006,2256.0034,5884.3006,2256.0034,5884.3006,2256.0034,5884.3006,2256.0034,271154.2596,38190.7408,7128.9709,1004.0804,3.2488,2.0436,0.0000,0.0000,19.9078,-16.1640,23.1464,0.0000,0.9211,0.0111,0.2319,-0.0649,0.0545,0.6271,0.4267,0.0539,0.0000,0.0121,0.0000,4.7745,-0.2107,6.2920,-0.0049,0.5244,-0.5821,13.5870,13.0435,0.0000,71.5194
Job [-],Input File [-],Cycle [-],Status,Mass [kg],Loading [kg],time [s],distance [km],speed [km/h],altitudeDelta [m],FC-Map [g/h],FC-Map [g/km],FC-AUXc [g/h],FC-AUXc [g/km],FC-WHTCc [g/h],FC-WHTCc [g/km],FC-AAUX [g/h],FC-AAUX [g/km],FC-Final [g/h],FC-Final [g/km],FC-Final [l/100km],FC-Final [l/100tkm],CO2 [g/km],CO2 [g/tkm],P_wheel_in_pos [kW],P_brake_loss [kW],P_angle_loss [kW],P_tc_loss [kW],P_clutch_pos [kW],P_clutch_neg [kW],P_fcmap_pos [kW],E_aux_PTO_consum [kWh],E_aux_CONSTANTAUX [kWh],E_aux_PTO_transm [kWh],E_aux_sum [kWh],E_air [kWh],E_roll [kWh],E_grad [kWh],E_inertia [kWh],E_brake [kWh],E_gbx_loss [kWh],E_axl_loss [kWh],E_angle_loss [kWh],E_ret_loss [kWh],E_tc_loss [kWh],E_clutch_pos [kWh],E_clutch_neg [kWh],E_fcmap_pos [kWh],a [m/s^2],a_pos [m/s^2],a_neg [m/s^2],AccelerationTimeShare [%],DecelerationTimeShare [%],CruiseTimeShare [%],StopTimeShare [%]
1-0,Class4_RigidTruck_ENG_PTO,PTO_Collector.vdri,Success,11500.0000,7100.0000,1104.6000,0.8003,2.6083,-1.2842,6463.2975,2477.9974,6463.2975,2477.9974,6463.2975,2477.9974,6463.2975,2477.9974,6463.2975,2477.9974,297836.2270,41948.7644,7830.4718,1102.8834,3.2488,1.6730,0.0000,0.0000,19.6764,-18.0379,27.3844,3.8377,1.0746,0.3070,2.3028,0.0111,0.2319,-0.0649,0.0420,0.5133,0.3526,0.0582,0.0000,0.0121,0.0000,4.7190,-0.3328,7.4714,-0.0049,0.5244,-0.5821,13.5870,13.0435,0.0000,71.5191
......@@ -47,11 +47,13 @@ namespace TUGraz.VectoCore.Configuration
public static class IDs
{
public static string PTOTransmission = "PTO_transm";
public const string Fan = "FAN";
public const string SteeringPump = "STP";
public const string ElectricSystem = "ES";
public const string HeatingVentilationAirCondition = "AC";
public const string PneumaticSystem = "PS";
public const string PTOConsumer = "PTO_consum";
}
public static class Names
......@@ -81,7 +83,6 @@ namespace TUGraz.VectoCore.Configuration
public const string GearboxDataFile = ".vgbx";
public const string CycleFile = ".vdri";
public const string DriverAccelerationCurve = ".vacc";
......
......@@ -285,9 +285,6 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
/// </summary>
[ModalResultField(typeof(SI), caption: "P_wheel_in [kW]", outputFactor: 1e-3)] P_wheel_in,
[ModalResultField(typeof(SI), caption: "P_PTO_transm [kW]", outputFactor: 1e-3)] P_PTO_transm,
[ModalResultField(typeof(SI), caption: "P_PTO_consum [kW]", outputFactor: 1e-3)] P_PTO_consum,
/// <summary>
/// [kW] Brake power. Drag power is included in Pe.
/// </summary>
......
......@@ -34,12 +34,15 @@ using System.Linq;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.SimulationComponent;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Impl;
using TUGraz.VectoCore.OutputData;
using TUGraz.VectoCore.Utils;
using Wheels = TUGraz.VectoCore.Models.SimulationComponent.Impl.Wheels;
namespace TUGraz.VectoCore.Models.Simulation.Impl
{
......@@ -108,7 +111,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
// PWheelCycle --> AxleGear --> CycleClutch --> Engine <-- Aux
var powertrain = new PWheelCycle(container, data.Cycle, data.AxleGearData.AxleGear.Ratio,
gearbox.ModelData.Gears.ToDictionary(g => g.Key, g => g.Value.Ratio))
gearbox.ModelData.Gears.ToDictionary(g => g.Key, g => g.Value.Ratio))
.AddComponent(new AxleGear(container, data.AxleGearData))
.AddComponent(data.AngledriveData != null ? new Angledrive(container, data.AngledriveData) : null)
.AddComponent(gearbox, data.Retarder, data.PTO, container)
......@@ -256,6 +259,13 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
}
container.ModalData.AddAuxiliary(id);
}
if (data.PTO != null) {
aux.AddConstant(Constants.Auxiliaries.IDs.PTOTransmission,
DeclarationData.PTOTransmission.Lookup(data.PTO.TransmissionType));
container.ModalData.AddAuxiliary(Constants.Auxiliaries.IDs.PTOTransmission);
}
return aux;
}
......
......@@ -122,8 +122,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
protected override void DoWriteModalResults(IModalDataContainer container)
{
foreach (var kv in CurrentState.PowerDemands.Where(kv => !string.IsNullOrWhiteSpace(kv.Key))) {
container[kv.Key] = kv.Value;
if (CurrentState.PowerDemands != null) {
foreach (var kv in CurrentState.PowerDemands.Where(kv => !string.IsNullOrWhiteSpace(kv.Key))) {
container[kv.Key] = kv.Value;
}
}
if (container[ModalResultField.P_aux] == null || container[ModalResultField.P_aux] == DBNull.Value) {
// only overwrite if nobody else already wrote the total aux power
......
using System;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Models.Simulation;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.OutputData;
namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
{
public class GearboxAuxiliary : EngineAuxiliary
{
public GearboxAuxiliary(IVehicleContainer container) : base(container) {}
protected override void DoWriteModalResults(IModalDataContainer container)
{
if (CurrentState.PowerDemands != null) {
if (CurrentState.PowerDemands.ContainsKey("PTO_TRANSM"))
container[ModalResultField.P_PTO_transm] = CurrentState.PowerDemands["PTO_TRANSM"];
if (CurrentState.PowerDemands.ContainsKey("PTO_CONSUMER"))
container[ModalResultField.P_PTO_consum] = CurrentState.PowerDemands["PTO_CONSUMER"];
} else {
container[ModalResultField.P_PTO_transm] = 0.SI<Watt>();
if (container[ModalResultField.P_PTO_consum] == null || container[ModalResultField.P_PTO_consum] == DBNull.Value)
container[ModalResultField.P_PTO_consum] = 0.SI<Watt>();
}
}
}
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ using System.Linq;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.Models.Connector.Ports;
using TUGraz.VectoCore.Models.Connector.Ports.Impl;
using TUGraz.VectoCore.Models.Simulation.Data;
......@@ -69,7 +70,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
protected override void DoWriteModalResults(IModalDataContainer container)
{
base.DoWriteModalResults(container);
container[ModalResultField.P_PTO_consum] = CurrentState.InTorque * CurrentState.InAngularVelocity;
container[Constants.Auxiliaries.IDs.PTOConsumer] = CurrentState.InTorque * CurrentState.InAngularVelocity;
}
}
}
\ No newline at end of file
......@@ -162,8 +162,6 @@ namespace TUGraz.VectoCore.OutputData
ModalResultField.P_brake_loss,
ModalResultField.P_wheel_in,
ModalResultField.P_wheel_inertia,
ModalResultField.P_PTO_transm,
ModalResultField.P_PTO_consum,
ModalResultField.P_trac,
ModalResultField.P_slope,
ModalResultField.P_air,
......
......@@ -32,6 +32,7 @@
using System;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.InputData.Reader;
using TUGraz.VectoCore.Models.Connector.Ports;
using TUGraz.VectoCore.Models.Declaration;
......@@ -119,9 +120,8 @@ namespace TUGraz.VectoCore.Utils
{
if (pto != null) {
var aux = new GearboxAuxiliary(container);
var power = DeclarationData.PTOTransmission.Lookup(pto.TransmissionType);
aux.Add("PTO_TRANSM", _ => power);
aux.Add("PTO_CONSUMER", n => pto.LossMap.GetTorqueLoss(n) * n);
aux.Add(Constants.Auxiliaries.IDs.PTOConsumer, n => pto.LossMap.GetTorqueLoss(n) * n);
container.ModalData.AddAuxiliary(Constants.Auxiliaries.IDs.PTOConsumer);
gearbox.Connect(aux);
}
......
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