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 b892b882 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

rename columns for IEPC in vmod file, use separate gearbox derived from APTN...

rename columns for IEPC in vmod file, use separate gearbox derived from APTN to write vmod output, adding missing file
parent ba3d2320
Branches
Tags
No related merge requests found
......@@ -395,17 +395,19 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
[ModalResultField(typeof(SI), caption: "EM_{0}_off")] EM_Off_,
[ModalResultField(typeof(SI), caption: "n_{0}_avg [1/min]", outputFactor: 60 / (2 * Math.PI))] n_IEPC_,
[ModalResultField(typeof(SI), caption: "T_{0} [Nm]")] T_IEPC_,
[ModalResultField(typeof(SI), caption: "T_{0}_map [Nm]")] T_IEPC_map_,
[ModalResultField(typeof(SI), caption: "T_{0}_drive_max [Nm]")] T_IEPC_drive_max_,
[ModalResultField(typeof(SI), caption: "T_{0}_gen_max [Nm]")] T_IEPC_gen_max_,
[ModalResultField(typeof(SI), caption: "P_{0}_gen_max [kW]", outputFactor: 1e-3)] P_IEPC_gen_max_,
[ModalResultField(typeof(SI), caption: "P_{0}_drive_max [kW]", outputFactor: 1e-3)] P_IEPC_drive_max_,
[ModalResultField(typeof(SI), caption: "n_{0}_int_avg [1/min]", outputFactor: 60 / (2 * Math.PI))] n_IEPC_int_,
[ModalResultField(typeof(SI), caption: "T_{0}_int [Nm]")] T_IEPC_,
[ModalResultField(typeof(SI), caption: "T_{0}_int_map [Nm]")] T_IEPC_map_,
[ModalResultField(typeof(SI), caption: "T_{0}_int_drive_max [Nm]")] T_IEPC_int_drive_max_,
[ModalResultField(typeof(SI), caption: "T_{0}_int_gen_max [Nm]")] T_IEPC_int_gen_max_,
[ModalResultField(typeof(SI), caption: "P_{0}_int_gen_max [kW]", outputFactor: 1e-3)] P_IEPC_int_gen_max_,
[ModalResultField(typeof(SI), caption: "P_{0}_int_drive_max [kW]", outputFactor: 1e-3)] P_IEPC_int_drive_max_,
[ModalResultField(typeof(SI), caption: "P_{0}_inertia_loss [kW]", outputFactor: 1e-3)] P_IEPC_electricMotorInertiaLoss_,
[ModalResultField(typeof(SI), caption: "P_{0}_mech_map [kW]", outputFactor: 1e-3)] P_IEPC_mech_map_,
[ModalResultField(typeof(SI), caption: "P_{0}_int_mech_map [kW]", outputFactor: 1e-3)] P_IEPC_int_mech_map_,
[ModalResultField(typeof(SI), caption: "P_{0}_el [kW]", outputFactor: 1e-3)] P_IEPC_el_,
[ModalResultField(typeof(SI), caption: "P_{0}_out [kW]", outputFactor: 1e-3)] P_IEPC_out_,
[ModalResultField(typeof(SI), caption: "n_IEPC_out_avg [kW]", outputFactor: 1e-3)] n_IEPC_out_avg,
[ModalResultField(typeof(SI), caption: "T_IEPC_out [kW]", outputFactor: 1e-3)] T_IEPC_out,
[ModalResultField(typeof(SI), caption: "P_{0}_loss [kW]", outputFactor: 1e-3)] P_IEPC_electricMotorLoss_,
[ModalResultField(typeof(SI), caption: "{0}_off")] IEPC_Off_,
[ModalResultField(typeof(SI), caption: "{0}_OVL [%]", outputFactor: 100)] IEPC_OvlBuffer_,
......
......@@ -891,7 +891,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
//-->AxleGear-->APTNGearbox or SinglespeedGearbox-->Engine E2
var gearbox = data.GearboxData.Gears.Count > 1
? (IGearbox)new APTNGearbox(container, new APTNShiftStrategy(container))
? (IGearbox)new IEPCGearbox(container, new APTNShiftStrategy(container))
: new SingleSpeedGearbox(container, data.GearboxData);
em = GetElectricMachine(PowertrainPosition.IEPC, data.ElectricMachinesData, container, es, ctl);
powertrain
......@@ -985,7 +985,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
//-->AxleGear-->APTNGearbox or SinglespeedGearbox-->Engine E2
var gearbox = data.GearboxData.Gears.Count > 1
? (IGearbox)new APTNGearbox(container, new APTNShiftStrategy(container))
? (IGearbox)new IEPCGearbox(container, new APTNShiftStrategy(container))
: new SingleSpeedGearbox(container, data.GearboxData);
em = GetElectricMachine(PowertrainPosition.IEPC, data.ElectricMachinesData, container, es, ctl);
powertrain
......
......@@ -21,18 +21,18 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl{
var avgDTSpeed = (prevDtSpeed + CurrentState.DrivetrainSpeed) / 2;
//container[ModalResultField.EM_ratio_, Position] = ModelData.RatioADC.SI<Scalar>();
container[ModalResultField.n_IEPC_, Position] = avgEMSpeed;
container[ModalResultField.n_IEPC_int_, Position] = avgEMSpeed;
container[ModalResultField.T_IEPC_, Position] = CurrentState.EMTorque;
container[ModalResultField.T_IEPC_map_, Position] = CurrentState.EmTorqueMap;
container[ModalResultField.T_IEPC_drive_max_, Position] = CurrentState.DriveMax;
container[ModalResultField.T_IEPC_gen_max_, Position] = CurrentState.DragMax;
container[ModalResultField.T_IEPC_int_drive_max_, Position] = CurrentState.DriveMax;
container[ModalResultField.T_IEPC_int_gen_max_, Position] = CurrentState.DragMax;
container[ModalResultField.P_IEPC_gen_max_, Position] = (CurrentState.DragMax ?? 0.SI<NewtonMeter>()) * avgEMSpeed;
container[ModalResultField.P_IEPC_drive_max_, Position] = (CurrentState.DriveMax ?? 0.SI<NewtonMeter>()) * avgEMSpeed;
container[ModalResultField.P_IEPC_int_gen_max_, Position] = (CurrentState.DragMax ?? 0.SI<NewtonMeter>()) * avgEMSpeed;
container[ModalResultField.P_IEPC_int_drive_max_, Position] = (CurrentState.DriveMax ?? 0.SI<NewtonMeter>()) * avgEMSpeed;
//container[ModalResultField.P_EM_electricMotor_em_mech_, Position] = (CurrentState.EMTorque ?? 0.SI<NewtonMeter>()) * avgEMSpeed;
container[ModalResultField.P_IEPC_mech_map_, Position] = (CurrentState.EmTorqueMap ?? 0.SI<NewtonMeter>()) * avgEMSpeed;
container[ModalResultField.P_IEPC_int_mech_map_, Position] = (CurrentState.EmTorqueMap ?? 0.SI<NewtonMeter>()) * avgEMSpeed;
//container[ModalResultField.P_EM_in_, Position] = CurrentState.DrivetrainInTorque * avgDTSpeed;
......
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 IEPCGearbox : APTNGearbox
{
public IEPCGearbox(IVehicleContainer container, IShiftStrategy strategy) : base(container, strategy) { }
protected override void DoWriteModalResults(Second time, Second simulationInterval,
IModalDataContainer container)
{
//var avgInAngularSpeed = (PreviousState.InAngularVelocity + CurrentState.InAngularVelocity) / 2.0;
//var avgOutAngularSpeed = (PreviousState.OutAngularVelocity + CurrentState.OutAngularVelocity) / 2.0;
//var inPower = CurrentState.InTorque * avgInAngularSpeed;
//var outPower = CurrentState.OutTorque * avgOutAngularSpeed;
container[ModalResultField.Gear] = Disengaged || DataBus.VehicleInfo.VehicleStopped ? 0 : Gear.Gear;
//container[ModalResultField.P_gbx_loss] = inPower - outPower;
//container[ModalResultField.P_gbx_inertia] = CurrentState.InertiaTorqueLossOut * avgOutAngularSpeed;
//container[ModalResultField.P_gbx_in] = inPower;
container[ModalResultField.n_IEPC_out_avg] = (PreviousState.OutAngularVelocity +
CurrentState.OutAngularVelocity) / 2.0;
container[ModalResultField.T_IEPC_out] = CurrentState.OutTorque;
//container[ModalResultField.T_gbx_in] = CurrentState.InTorque;
_strategy.WriteModalResults(container);
}
}
}
\ No newline at end of file
......@@ -95,15 +95,15 @@ namespace TUGraz.VectoCore.OutputData
};
private readonly ModalResultField[] _iepcColumns = {
ModalResultField.n_IEPC_,
ModalResultField.n_IEPC_int_,
ModalResultField.T_IEPC_,
ModalResultField.T_IEPC_map_,
ModalResultField.T_IEPC_drive_max_,
ModalResultField.T_IEPC_gen_max_,
ModalResultField.P_IEPC_gen_max_,
ModalResultField.P_IEPC_drive_max_,
ModalResultField.T_IEPC_int_drive_max_,
ModalResultField.T_IEPC_int_gen_max_,
ModalResultField.P_IEPC_int_gen_max_,
ModalResultField.P_IEPC_int_drive_max_,
ModalResultField.P_IEPC_electricMotorInertiaLoss_,
ModalResultField.P_IEPC_mech_map_,
ModalResultField.P_IEPC_int_mech_map_,
ModalResultField.P_IEPC_el_,
ModalResultField.P_IEPC_out_,
ModalResultField.P_IEPC_electricMotorLoss_,
......@@ -356,7 +356,7 @@ namespace TUGraz.VectoCore.OutputData
}
var elPwrField = emPos == PowertrainPosition.IEPC ? ModalResultField.P_IEPC_el_ : ModalResultField.P_EM_electricMotor_el_;
var mechPwrField = emPos == PowertrainPosition.IEPC ? ModalResultField.P_IEPC_mech_map_ : ModalResultField.P_EM_mech_;
var mechPwrField = emPos == PowertrainPosition.IEPC ? ModalResultField.P_IEPC_int_mech_map_ : ModalResultField.P_EM_mech_;
var selected = Data.AsEnumerable().Select(r => {
var dt = r.Field<Second>(ModalResultField.simulationInterval.GetName());
return new {
......@@ -417,7 +417,7 @@ namespace TUGraz.VectoCore.OutputData
}
var offField = emPos == PowertrainPosition.IEPC ? ModalResultField.IEPC_Off_ : ModalResultField.EM_Off_;
var elPwrField = emPos == PowertrainPosition.IEPC ? ModalResultField.P_IEPC_el_ : ModalResultField.P_EM_electricMotor_el_;
var mechPwrField = emPos == PowertrainPosition.IEPC ? ModalResultField.P_IEPC_mech_map_ : ModalResultField.P_EM_mech_;
var mechPwrField = emPos == PowertrainPosition.IEPC ? ModalResultField.P_IEPC_int_mech_map_ : ModalResultField.P_EM_mech_;
var selected = Data.AsEnumerable().Select(r => {
var dt = r.Field<Second>(ModalResultField.simulationInterval.GetName());
return new {
......@@ -531,7 +531,7 @@ namespace TUGraz.VectoCore.OutputData
public PerSecond ElectricMotorAverageSpeed(PowertrainPosition emPos)
{
var field = emPos == PowertrainPosition.IEPC
? ModalResultField.n_IEPC_
? ModalResultField.n_IEPC_int_
: ModalResultField.n_EM_electricMotor_;
var integral = GetValues(x => x.Field<PerSecond>(string.Format(field.GetCaption(), emPos.GetName())).Value() *
x.Field<Second>(ModalResultField.simulationInterval.GetName()).Value()).Sum();
......
{
"Header": {
"CreatedBy": "",
"Date": "2020-09-07T15:28:08.3781385Z",
"AppVersion": "3",
"FileVersion": 2
},
"Body": {
"----EquivalenceFactor": 2.0,
"MinSoC": 24.0,
"----MaxSoC": 80.0,
"TargetSoC": 70.0,
"----AuxBufferTime": 5.0,
"----AuxBufferChgTime": 5.0,
"----MinICEOnTime": 10.0,
"GensetMinOptPowerFactor": 0.2
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment