diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/AuxiliaryDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/AuxiliaryDataAdapter.cs index 5019a888906bb2a2f6bc6fa0dea240d133fd1562..1525b5866f19209a24b921d98bd82a274bb01905 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/AuxiliaryDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/AuxiliaryDataAdapter.cs @@ -904,13 +904,13 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen var ssmCooling = DoGetSsmInputs(mission, completedVehicle, primaryVehicle, loadingType, applicableSystemConfigCooling, busAux.HeatPumpTypeCoolingDriverCompartment.Value, - busAux.HeatPumpTypeCoolingPassengerCompartment.Value); + busAux.HeatPumpTypeCoolingPassengerCompartment.Value, true); ssmCooling.ElectricHeater = HeaterType.None; var ssmHeating = DoGetSsmInputs(mission, completedVehicle, primaryVehicle, loadingType, applicableSystemConfigHeating, busAux.HeatPumpTypeHeatingDriverCompartment.Value, - busAux.HeatPumpTypeHeatingPassengerCompartment.Value); + busAux.HeatPumpTypeHeatingPassengerCompartment.Value, false); ssmHeating.ElectricHeater = GetElectricHeater(busAux); - + ssmHeating.HeatingDistributions = DeclarationData.BusAuxiliaries.HeatingDistributionCases; return (ssmCooling, ssmHeating); } @@ -933,11 +933,13 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen private SSMInputs DoGetSsmInputs(Mission mission, IVehicleDeclarationInputData completedVehicle, IVehicleDeclarationInputData primaryVehicle, LoadingType loadingType, BusHVACSystemConfiguration hvacConfiguration, HeatPumpType heatPumpTypeDriverCompartment, - HeatPumpType heatPumpTypePassengerCompartment) + HeatPumpType heatPumpTypePassengerCompartment, bool cooling) { var isDoubleDecker = completedVehicle.VehicleCode.IsDoubleDeckerBus(); - var internalLength = hvacConfiguration == BusHVACSystemConfiguration.Configuration2 + var driverAcOnly = hvacConfiguration.IsOneOf(BusHVACSystemConfiguration.Configuration2, + BusHVACSystemConfiguration.Configuration4); + var internalLength = cooling && driverAcOnly ? 2 * Constants.BusParameters.DriverCompartmentLength // OK : DeclarationData.BusAuxiliaries.CalculateInternalLength( completedVehicle.Length, completedVehicle.VehicleCode, @@ -987,16 +989,25 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen ssmInputs.HVACSystemConfiguration = hvacConfiguration; - ssmInputs.DriverCompartmentLength = hvacConfiguration.RequiresDriverAC() - ? hvacConfiguration.IsOneOf(BusHVACSystemConfiguration.Configuration2, BusHVACSystemConfiguration.Configuration4) - ? 2 * Constants.BusParameters.DriverCompartmentLength - : Constants.BusParameters.DriverCompartmentLength - : 0.SI<Meter>(); - ssmInputs.PassengerCompartmentLength = hvacConfiguration.RequiresPassengerAC() - ? hvacConfiguration.IsOneOf(BusHVACSystemConfiguration.Configuration2, BusHVACSystemConfiguration.Configuration4) - ? 0.SI<Meter>() - : internalLength - Constants.BusParameters.DriverCompartmentLength - : 0.SI<Meter>(); + if (cooling) { + ssmInputs.DriverCompartmentLength = hvacConfiguration.RequiresDriverAC() + ? driverAcOnly + ? 2 * Constants.BusParameters.DriverCompartmentLength + : Constants.BusParameters.DriverCompartmentLength + : 0.SI<Meter>(); + ssmInputs.PassengerCompartmentLength = hvacConfiguration.RequiresPassengerAC() + ? driverAcOnly + ? 0.SI<Meter>() + : internalLength - Constants.BusParameters.DriverCompartmentLength + : 0.SI<Meter>(); + } else { + ssmInputs.DriverCompartmentLength = hvacConfiguration.RequiresDriverAC() + ? Constants.BusParameters.DriverCompartmentLength + : 0.SI<Meter>(); + ssmInputs.PassengerCompartmentLength = hvacConfiguration.RequiresDriverAC() + ? internalLength - Constants.BusParameters.DriverCompartmentLength + : internalLength; + } //ssmInputs.HVACCompressorType = heatPumpTypePassengerCompartment; // use passenger compartment diff --git a/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/M14Impl.cs b/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/M14Impl.cs index 7cd865120e8a70386e31c426fae1334ddd271d47..2093670fd0377f62ca0eadcfc38d34831f39756a 100644 --- a/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/M14Impl.cs +++ b/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/M14Impl.cs @@ -72,7 +72,7 @@ namespace TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl var averageUsableEngineWasteHeat = averageEngineWasteHeatPwr * _ssmTool.SSMInputs.AuxHeater.FuelEnergyToHeatToCoolant * _ssmTool.SSMInputs.AuxHeater.CoolantHeatTransferredToAirCabinHeater; - return _ssmTool.AverageAuxHeaterPower(averageUsableEngineWasteHeat) * cycleTime; + return _ssmTool.AverageHeaterPower(averageUsableEngineWasteHeat).AuxHeaterPower * cycleTime; } }