6#ifndef NeTrainSim_EnergyConsumption_h
7#define NeTrainSim_EnergyConsumption_h
21 static constexpr double DefaultLocomotiveAuxiliaryPower = 0.0;
24 static double DefaultLocomotiveBatteryMaxCharge_Electric = 4000.0;
27 static double DefaultLocomotiveBatteryMaxCharge_DieselHybrid = 4000.0;
30 static double DefaultLocomotiveBatteryMaxCharge_BioDieselHybrid = 4000.0;
33 static double DefaultLocomotiveBatteryMaxCharge_HydogenHybrid = 4000.0;
36 static double DefaultLocomotiveBatteryInitialCharge_Electric = 0.6;
38 static double DefaultLocomotiveBatteryInitialCharge_DieselHybrid = 0.6;
40 static double DefaultLocomotiveBatteryInitialCharge_BioDieselHybrid = 0.6;
42 static double DefaultLocomotiveBatteryInitialCharge_HydrogenHybrid = 0.6;
46 static double DefaultLocomotiveTankMaxCapacityDiesel = 20065.0;
50 static double DefaultLocomotiveTankMaxCapacityHydrogen = 20065.0;
52 static double DefaultLocomotiveTankInitialCapacity = 0.9;
55 static constexpr double DefaultLocomotiveMinTankDOD = 0.8;
58 static constexpr double DefaultLocomotiveBatteryDOD = 0.9;
60 static constexpr double DefaultLocomotiveBatteryCRate = 2.0;
63 static constexpr double DefaultLocomotiveBatteryRechargeMaxSOC_Diesel = 0.65;
66 static constexpr double DefaultLocomotiveBatteryRechargeMaxSOC_Other = 0.65;
69 static constexpr double DefaultLocomotiveBatteryRechargeMinSOC_Diesel = 0.20;
72 static constexpr double DefaultLocomotiveBatteryRechargeMinSOC_Other = 0.50;
75 static constexpr double requiredGeneratorPower[] = {1,1,0.8,0.6,0.4,0.2,0.1,0.0};
77 static constexpr double DefaultLocomotivePowerReduction_DieselHybrid = 0.8;
79 static constexpr double DefaultLocomotivePowerReduction_BioDieselHybrid = 0.8;
81 static constexpr double DefaultLocomotivePowerReduction_HydrogenHybrid = 0.5;
90 static constexpr double DefaultCarAuxiliaryPower = 0.0;
93 static double DefaultCarBatteryMaxCapacity = 10000.0;
95 static double DefaultCarBatteryInitialCharge = 0.9;
99 static double DefaultCarTenderMaxCapacity = 87064.471;
101 static double DefaultCarTenderInitialCapacity = 0.9;
104 static constexpr double DefaultCarBatteryDOD = 0.9;
106 static constexpr double DefaultCarBatteryCRate = 2.0;
108 static constexpr double DefaultCarMinTankDOD = 0.9;
120 static double DefaultDieselConversionFactor = 0.1005;
128 static double DefaultBiodieselConversionFactor = 67.0/620.0;
133 static double DefaultHydrogenConversionFactor = 0.002995;
136 static double DefaultDieselDensity = 0.00085;
139 static double DefaultBioDieselDensity = 0.00088;
141 static double DefaultHydrogenDensity = 0.000099836;
143 static double gamma = 0.65;
146 static std::map<TrainTypes::CarType, double> fuelConversionFactor_carTypes = {
154 static std::map<TrainTypes::PowerType, double> fuelConversionFactor_powerTypes = {
178 double getDriveLineEff(
double &trainSpeed,
int notchNumberIndex,
double powerAtWheelProportion,
Definition energyconsumption.cpp:6
std::pair< double, double > getMaxEffeciencyRange(TrainTypes::PowerType powerType)
Gets the maximum efficiency range for a given power type.
Definition energyconsumption.cpp:97
double getFuelConversionFactor(TrainTypes::PowerType powerType)
Gets the fuel conversion factor for a given power type.
Definition energyconsumption.cpp:146
double getEmissions(double fuelConsumption)
Gets the CO2 emissions based on fuel consumption.
Definition energyconsumption.cpp:118
double getGeneratorEff(TrainTypes::PowerType powerType, double powerAtWheelProportion)
Gets the generator efficiency based on power type and power at wheel proportion.
Definition energyconsumption.cpp:72
double getRequiredGeneratorPowerForRecharge(double batterySOC)
Gets the required generator power percentage for recharging the battery based on battery state of cha...
Definition energyconsumption.cpp:110
double getDCBusToTankEff(double powerAtWheelProportion, TrainTypes::PowerType powerType, TrainTypes::LocomotivePowerMethod hybridMethod)
Gets the DC bus-to-tank efficiency based on power proportion at wheel, power type,...
Definition energyconsumption.cpp:19
double getFuelFromEC(TrainTypes::PowerType powerType, double &EC_KWh)
Gets the fuel consumption in liters for a given energy consumption and power type.
Definition energyconsumption.cpp:138
double getDriveLineEff(double &trainSpeed, int notchNumberIndex, double powerAtWheelProportion, TrainTypes::PowerType powerType, TrainTypes::LocomotivePowerMethod hybridMethod)
Gets the drive line efficiency based on train speed, notch number index, power proportion at wheel,...
Definition energyconsumption.cpp:8
double getBatteryEff(TrainTypes::PowerType powerType)
Gets the battery efficiency based on power type.
Definition energyconsumption.cpp:86
double getWheelToDCBusEff(double &trainSpeed)
Gets the wheel-to-DC bus efficiency based on train speed.
Definition energyconsumption.cpp:55
double getLocomotivePowerReductionFactor(TrainTypes::PowerType powerType)
Gets the power reduction factor for a given power type.
Definition energyconsumption.cpp:124
_LocomotivePowerMethod
Values that represent power types.
Definition traintypes.h:337
_PowerType
Values that represent power types.
Definition traintypes.h:168
_CarType
Values that represent car types.
Definition traintypes.h:23