diff --git a/VECTO/GUI/BusAuxiliariesEngParametersForm.Designer.vb b/VECTO/GUI/BusAuxiliariesEngParametersForm.Designer.vb index 8394844def2e15b0d847b1b7be3887aec2164374..e99b1b7d9e00ebfbcc02d83220391383c6b3bcc8 100644 --- a/VECTO/GUI/BusAuxiliariesEngParametersForm.Designer.vb +++ b/VECTO/GUI/BusAuxiliariesEngParametersForm.Designer.vb @@ -56,6 +56,15 @@ Partial Class BusAuxiliariesEngParametersForm Me.ShowInFolderToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.lblTitle = New System.Windows.Forms.Label() Me.gbElectricSystem = New System.Windows.Forms.GroupBox() + Me.pnDCDCEff = New System.Windows.Forms.Panel() + Me.lblDCDCEff = New System.Windows.Forms.Label() + Me.lblDCDCEffUnit = New System.Windows.Forms.Label() + Me.tbDCDCEff = New System.Windows.Forms.TextBox() + Me.pnES_HEVREESS = New System.Windows.Forms.Panel() + Me.cbES_HEVREESS = New System.Windows.Forms.CheckBox() + Me.Panel1 = New System.Windows.Forms.Panel() + Me.cbAlternatorTechnology = New System.Windows.Forms.ComboBox() + Me.lbAlternatorTechnology = New System.Windows.Forms.Label() Me.pnSmartElectricParams = New System.Windows.Forms.Panel() Me.pnElectricStorageCapacity = New System.Windows.Forms.Panel() Me.lblElectricStorageCapacity = New System.Windows.Forms.Label() @@ -113,20 +122,18 @@ Partial Class BusAuxiliariesEngParametersForm Me.lblHvacMechPowerDemand = New System.Windows.Forms.Label() Me.lblHvacMechPowerDemandUnit = New System.Windows.Forms.Label() Me.tbHvacMechPowerDemand = New System.Windows.Forms.TextBox() - Me.Panel1 = New System.Windows.Forms.Panel() - Me.lbAlternatorTechnology = New System.Windows.Forms.Label() - Me.cbAlternatorTechnology = New System.Windows.Forms.ComboBox() - Me.pnES_HEVREESS = New System.Windows.Forms.Panel() - Me.cbES_HEVREESS = New System.Windows.Forms.CheckBox() - Me.pnDCDCEff = New System.Windows.Forms.Panel() - Me.lblDCDCEff = New System.Windows.Forms.Label() - Me.lblDCDCEffUnit = New System.Windows.Forms.Label() - Me.tbDCDCEff = New System.Windows.Forms.TextBox() + Me.pnBattEfficiency = New System.Windows.Forms.Panel() + Me.lblBatEfficiency = New System.Windows.Forms.Label() + Me.lblBatEfficiencyUnit = New System.Windows.Forms.Label() + Me.tbBatEfficiency = New System.Windows.Forms.TextBox() Me.ToolStrip1.SuspendLayout Me.StatusStrip1.SuspendLayout CType(Me.PictureBox1,System.ComponentModel.ISupportInitialize).BeginInit Me.CmOpenFile.SuspendLayout Me.gbElectricSystem.SuspendLayout + Me.pnDCDCEff.SuspendLayout + Me.pnES_HEVREESS.SuspendLayout + Me.Panel1.SuspendLayout Me.pnSmartElectricParams.SuspendLayout Me.pnElectricStorageCapacity.SuspendLayout Me.pnMaxAlternatorPower.SuspendLayout @@ -144,16 +151,14 @@ Partial Class BusAuxiliariesEngParametersForm Me.pnHvacAuxHeaterPwr.SuspendLayout Me.pnHvacElecPowerDemand.SuspendLayout Me.pnHvacMechPowerDemand.SuspendLayout - Me.Panel1.SuspendLayout - Me.pnES_HEVREESS.SuspendLayout - Me.pnDCDCEff.SuspendLayout + Me.pnBattEfficiency.SuspendLayout Me.SuspendLayout ' 'ButCancel ' Me.ButCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) Me.ButCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.ButCancel.Location = New System.Drawing.Point(936, 369) + Me.ButCancel.Location = New System.Drawing.Point(936, 505) Me.ButCancel.Name = "ButCancel" Me.ButCancel.Size = New System.Drawing.Size(75, 23) Me.ButCancel.TabIndex = 13 @@ -163,7 +168,7 @@ Partial Class BusAuxiliariesEngParametersForm 'ButOK ' Me.ButOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) - Me.ButOK.Location = New System.Drawing.Point(855, 369) + Me.ButOK.Location = New System.Drawing.Point(855, 505) Me.ButOK.Name = "ButOK" Me.ButOK.Size = New System.Drawing.Size(75, 23) Me.ButOK.TabIndex = 12 @@ -252,7 +257,7 @@ Partial Class BusAuxiliariesEngParametersForm 'StatusStrip1 ' Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.LbStatus}) - Me.StatusStrip1.Location = New System.Drawing.Point(0, 395) + Me.StatusStrip1.Location = New System.Drawing.Point(0, 531) Me.StatusStrip1.Name = "StatusStrip1" Me.StatusStrip1.Size = New System.Drawing.Size(1023, 22) Me.StatusStrip1.SizingGrip = false @@ -316,18 +321,98 @@ Partial Class BusAuxiliariesEngParametersForm Me.gbElectricSystem.Controls.Add(Me.pnCurrentDemand) Me.gbElectricSystem.Location = New System.Drawing.Point(12, 74) Me.gbElectricSystem.Name = "gbElectricSystem" - Me.gbElectricSystem.Size = New System.Drawing.Size(317, 303) + Me.gbElectricSystem.Size = New System.Drawing.Size(317, 403) Me.gbElectricSystem.TabIndex = 49 Me.gbElectricSystem.TabStop = false Me.gbElectricSystem.Text = "Electric System" ' + 'pnDCDCEff + ' + Me.pnDCDCEff.Controls.Add(Me.lblDCDCEff) + Me.pnDCDCEff.Controls.Add(Me.lblDCDCEffUnit) + Me.pnDCDCEff.Controls.Add(Me.tbDCDCEff) + Me.pnDCDCEff.Location = New System.Drawing.Point(10, 294) + Me.pnDCDCEff.Name = "pnDCDCEff" + Me.pnDCDCEff.Size = New System.Drawing.Size(288, 28) + Me.pnDCDCEff.TabIndex = 26 + ' + 'lblDCDCEff + ' + Me.lblDCDCEff.AutoSize = true + Me.lblDCDCEff.Location = New System.Drawing.Point(3, 7) + Me.lblDCDCEff.Name = "lblDCDCEff" + Me.lblDCDCEff.Size = New System.Drawing.Size(140, 13) + Me.lblDCDCEff.TabIndex = 0 + Me.lblDCDCEff.Text = "DC/DC Converter Efficiency" + ' + 'lblDCDCEffUnit + ' + Me.lblDCDCEffUnit.AutoSize = true + Me.lblDCDCEffUnit.Location = New System.Drawing.Point(258, 7) + Me.lblDCDCEffUnit.Name = "lblDCDCEffUnit" + Me.lblDCDCEffUnit.Size = New System.Drawing.Size(16, 13) + Me.lblDCDCEffUnit.TabIndex = 24 + Me.lblDCDCEffUnit.Text = "[-]" + ' + 'tbDCDCEff + ' + Me.tbDCDCEff.Location = New System.Drawing.Point(197, 4) + Me.tbDCDCEff.Name = "tbDCDCEff" + Me.tbDCDCEff.Size = New System.Drawing.Size(57, 20) + Me.tbDCDCEff.TabIndex = 3 + ' + 'pnES_HEVREESS + ' + Me.pnES_HEVREESS.Controls.Add(Me.cbES_HEVREESS) + Me.pnES_HEVREESS.Location = New System.Drawing.Point(10, 265) + Me.pnES_HEVREESS.Name = "pnES_HEVREESS" + Me.pnES_HEVREESS.Size = New System.Drawing.Size(288, 28) + Me.pnES_HEVREESS.TabIndex = 54 + ' + 'cbES_HEVREESS + ' + Me.cbES_HEVREESS.AutoSize = true + Me.cbES_HEVREESS.Location = New System.Drawing.Point(6, 6) + Me.cbES_HEVREESS.Name = "cbES_HEVREESS" + Me.cbES_HEVREESS.Size = New System.Drawing.Size(160, 17) + Me.cbES_HEVREESS.TabIndex = 25 + Me.cbES_HEVREESS.Text = "ES supply from HEV REESS" + Me.cbES_HEVREESS.UseVisualStyleBackColor = true + ' + 'Panel1 + ' + Me.Panel1.Controls.Add(Me.cbAlternatorTechnology) + Me.Panel1.Controls.Add(Me.lbAlternatorTechnology) + Me.Panel1.Location = New System.Drawing.Point(10, 139) + Me.Panel1.Name = "Panel1" + Me.Panel1.Size = New System.Drawing.Size(288, 28) + Me.Panel1.TabIndex = 26 + ' + 'cbAlternatorTechnology + ' + Me.cbAlternatorTechnology.FormattingEnabled = true + Me.cbAlternatorTechnology.Location = New System.Drawing.Point(134, 4) + Me.cbAlternatorTechnology.Name = "cbAlternatorTechnology" + Me.cbAlternatorTechnology.Size = New System.Drawing.Size(121, 21) + Me.cbAlternatorTechnology.TabIndex = 1 + ' + 'lbAlternatorTechnology + ' + Me.lbAlternatorTechnology.AutoSize = true + Me.lbAlternatorTechnology.Location = New System.Drawing.Point(3, 7) + Me.lbAlternatorTechnology.Name = "lbAlternatorTechnology" + Me.lbAlternatorTechnology.Size = New System.Drawing.Size(111, 13) + Me.lbAlternatorTechnology.TabIndex = 0 + Me.lbAlternatorTechnology.Text = "Alternator Technology" + ' 'pnSmartElectricParams ' + Me.pnSmartElectricParams.Controls.Add(Me.pnBattEfficiency) Me.pnSmartElectricParams.Controls.Add(Me.pnElectricStorageCapacity) Me.pnSmartElectricParams.Controls.Add(Me.pnMaxAlternatorPower) Me.pnSmartElectricParams.Location = New System.Drawing.Point(10, 168) Me.pnSmartElectricParams.Name = "pnSmartElectricParams" - Me.pnSmartElectricParams.Size = New System.Drawing.Size(288, 66) + Me.pnSmartElectricParams.Size = New System.Drawing.Size(288, 96) Me.pnSmartElectricParams.TabIndex = 27 ' 'pnElectricStorageCapacity @@ -833,84 +918,40 @@ Partial Class BusAuxiliariesEngParametersForm Me.tbHvacMechPowerDemand.Size = New System.Drawing.Size(57, 20) Me.tbHvacMechPowerDemand.TabIndex = 3 ' - 'Panel1 + 'pnBattEfficiency ' - Me.Panel1.Controls.Add(Me.cbAlternatorTechnology) - Me.Panel1.Controls.Add(Me.lbAlternatorTechnology) - Me.Panel1.Location = New System.Drawing.Point(10, 139) - Me.Panel1.Name = "Panel1" - Me.Panel1.Size = New System.Drawing.Size(288, 28) - Me.Panel1.TabIndex = 26 - ' - 'lbAlternatorTechnology - ' - Me.lbAlternatorTechnology.AutoSize = true - Me.lbAlternatorTechnology.Location = New System.Drawing.Point(3, 7) - Me.lbAlternatorTechnology.Name = "lbAlternatorTechnology" - Me.lbAlternatorTechnology.Size = New System.Drawing.Size(111, 13) - Me.lbAlternatorTechnology.TabIndex = 0 - Me.lbAlternatorTechnology.Text = "Alternator Technology" + Me.pnBattEfficiency.Controls.Add(Me.lblBatEfficiency) + Me.pnBattEfficiency.Controls.Add(Me.lblBatEfficiencyUnit) + Me.pnBattEfficiency.Controls.Add(Me.tbBatEfficiency) + Me.pnBattEfficiency.Location = New System.Drawing.Point(0, 63) + Me.pnBattEfficiency.Name = "pnBattEfficiency" + Me.pnBattEfficiency.Size = New System.Drawing.Size(300, 28) + Me.pnBattEfficiency.TabIndex = 28 ' - 'cbAlternatorTechnology + 'lblBatEfficiency ' - Me.cbAlternatorTechnology.FormattingEnabled = true - Me.cbAlternatorTechnology.Location = New System.Drawing.Point(134, 4) - Me.cbAlternatorTechnology.Name = "cbAlternatorTechnology" - Me.cbAlternatorTechnology.Size = New System.Drawing.Size(121, 21) - Me.cbAlternatorTechnology.TabIndex = 1 + Me.lblBatEfficiency.AutoSize = true + Me.lblBatEfficiency.Location = New System.Drawing.Point(3, 7) + Me.lblBatEfficiency.Name = "lblBatEfficiency" + Me.lblBatEfficiency.Size = New System.Drawing.Size(131, 13) + Me.lblBatEfficiency.TabIndex = 0 + Me.lblBatEfficiency.Text = "Electric Storage Efficiency" ' - 'pnES_HEVREESS + 'lblBatEfficiencyUnit ' - Me.pnES_HEVREESS.Controls.Add(Me.cbES_HEVREESS) - Me.pnES_HEVREESS.Location = New System.Drawing.Point(10, 235) - Me.pnES_HEVREESS.Name = "pnES_HEVREESS" - Me.pnES_HEVREESS.Size = New System.Drawing.Size(288, 28) - Me.pnES_HEVREESS.TabIndex = 54 + Me.lblBatEfficiencyUnit.AutoSize = true + Me.lblBatEfficiencyUnit.Location = New System.Drawing.Point(258, 7) + Me.lblBatEfficiencyUnit.Name = "lblBatEfficiencyUnit" + Me.lblBatEfficiencyUnit.Size = New System.Drawing.Size(16, 13) + Me.lblBatEfficiencyUnit.TabIndex = 24 + Me.lblBatEfficiencyUnit.Text = "[-]" ' - 'cbES_HEVREESS + 'tbBatEfficiency ' - Me.cbES_HEVREESS.AutoSize = true - Me.cbES_HEVREESS.Location = New System.Drawing.Point(6, 6) - Me.cbES_HEVREESS.Name = "cbES_HEVREESS" - Me.cbES_HEVREESS.Size = New System.Drawing.Size(160, 17) - Me.cbES_HEVREESS.TabIndex = 25 - Me.cbES_HEVREESS.Text = "ES supply from HEV REESS" - Me.cbES_HEVREESS.UseVisualStyleBackColor = true - ' - 'pnDCDCEff - ' - Me.pnDCDCEff.Controls.Add(Me.lblDCDCEff) - Me.pnDCDCEff.Controls.Add(Me.lblDCDCEffUnit) - Me.pnDCDCEff.Controls.Add(Me.tbDCDCEff) - Me.pnDCDCEff.Location = New System.Drawing.Point(10, 264) - Me.pnDCDCEff.Name = "pnDCDCEff" - Me.pnDCDCEff.Size = New System.Drawing.Size(288, 28) - Me.pnDCDCEff.TabIndex = 26 - ' - 'lblDCDCEff - ' - Me.lblDCDCEff.AutoSize = true - Me.lblDCDCEff.Location = New System.Drawing.Point(3, 7) - Me.lblDCDCEff.Name = "lblDCDCEff" - Me.lblDCDCEff.Size = New System.Drawing.Size(140, 13) - Me.lblDCDCEff.TabIndex = 0 - Me.lblDCDCEff.Text = "DC/DC Converter Efficiency" - ' - 'lblDCDCEffUnit - ' - Me.lblDCDCEffUnit.AutoSize = true - Me.lblDCDCEffUnit.Location = New System.Drawing.Point(258, 7) - Me.lblDCDCEffUnit.Name = "lblDCDCEffUnit" - Me.lblDCDCEffUnit.Size = New System.Drawing.Size(16, 13) - Me.lblDCDCEffUnit.TabIndex = 24 - Me.lblDCDCEffUnit.Text = "[-]" - ' - 'tbDCDCEff - ' - Me.tbDCDCEff.Location = New System.Drawing.Point(197, 4) - Me.tbDCDCEff.Name = "tbDCDCEff" - Me.tbDCDCEff.Size = New System.Drawing.Size(57, 20) - Me.tbDCDCEff.TabIndex = 3 + Me.tbBatEfficiency.Location = New System.Drawing.Point(197, 4) + Me.tbBatEfficiency.Name = "tbBatEfficiency" + Me.tbBatEfficiency.Size = New System.Drawing.Size(57, 20) + Me.tbBatEfficiency.TabIndex = 3 ' 'BusAuxiliariesEngParametersForm ' @@ -918,7 +959,7 @@ Partial Class BusAuxiliariesEngParametersForm Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.ButCancel - Me.ClientSize = New System.Drawing.Size(1023, 417) + Me.ClientSize = New System.Drawing.Size(1023, 553) Me.Controls.Add(Me.gbHVAC) Me.Controls.Add(Me.bgPneumaticSystem) Me.Controls.Add(Me.gbElectricSystem) @@ -942,6 +983,12 @@ Partial Class BusAuxiliariesEngParametersForm CType(Me.PictureBox1,System.ComponentModel.ISupportInitialize).EndInit Me.CmOpenFile.ResumeLayout(false) Me.gbElectricSystem.ResumeLayout(false) + Me.pnDCDCEff.ResumeLayout(false) + Me.pnDCDCEff.PerformLayout + Me.pnES_HEVREESS.ResumeLayout(false) + Me.pnES_HEVREESS.PerformLayout + Me.Panel1.ResumeLayout(false) + Me.Panel1.PerformLayout Me.pnSmartElectricParams.ResumeLayout(false) Me.pnElectricStorageCapacity.ResumeLayout(false) Me.pnElectricStorageCapacity.PerformLayout @@ -973,12 +1020,8 @@ Partial Class BusAuxiliariesEngParametersForm Me.pnHvacElecPowerDemand.PerformLayout Me.pnHvacMechPowerDemand.ResumeLayout(false) Me.pnHvacMechPowerDemand.PerformLayout - Me.Panel1.ResumeLayout(false) - Me.Panel1.PerformLayout - Me.pnES_HEVREESS.ResumeLayout(false) - Me.pnES_HEVREESS.PerformLayout - Me.pnDCDCEff.ResumeLayout(false) - Me.pnDCDCEff.PerformLayout + Me.pnBattEfficiency.ResumeLayout(false) + Me.pnBattEfficiency.PerformLayout Me.ResumeLayout(false) Me.PerformLayout @@ -1068,4 +1111,8 @@ End Sub Friend WithEvents tbDCDCEff As TextBox Friend WithEvents pnES_HEVREESS As Panel Friend WithEvents cbES_HEVREESS As CheckBox + Friend WithEvents pnBattEfficiency As Panel + Friend WithEvents lblBatEfficiency As Label + Friend WithEvents lblBatEfficiencyUnit As Label + Friend WithEvents tbBatEfficiency As TextBox End Class diff --git a/VECTO/GUI/BusAuxiliariesEngParametersForm.vb b/VECTO/GUI/BusAuxiliariesEngParametersForm.vb index 0df4261bc3eed3771252f8e6ca125da878e365d9..c6d35a7063a36cd544c89b34f187698c778c0a46 100644 --- a/VECTO/GUI/BusAuxiliariesEngParametersForm.vb +++ b/VECTO/GUI/BusAuxiliariesEngParametersForm.vb @@ -186,6 +186,7 @@ Public Class BusAuxiliariesEngParametersForm cbAlternatorTechnology.SelectedValue = inputData.ElectricSystem.AlternatorType tbMaxAlternatorPower.Text = inputData.ElectricSystem.MaxAlternatorPower.ToGUIFormat() tbElectricStorageCapacity.Text = inputData.ElectricSystem.ElectricStorageCapacity.ConvertToWattHour().Value.ToGUIFormat() + tbBatEfficiency.Text = inputData.ElectricSystem.ElectricStorageEfficiency.ToGuiFormat() tbCompressorMap.Text = GetRelativePath(inputData.PneumaticSystem.CompressorMap.Source, basePath) tbAverageAirDemand.Text = inputData.PneumaticSystem.AverageAirConsumed.ToGUIFormat() @@ -240,6 +241,7 @@ Public Class BusAuxiliariesEngParametersForm busAuxParams.AlternatorType = CType(cbAlternatorTechnology.SelectedValue, AlternatorType) busAuxParams.MaxAlternatorPower = tbMaxAlternatorPower.Text.ToDouble(0) busAuxParams.ElectricStorageCapacity = tbElectricStorageCapacity.Text.ToDouble(0) + busAuxParams.ElectricStorageEfficiency = tbBatEfficiency.Text.ToDouble(1) busAuxParams.DCDCEfficiency = tbDCDCEff.Text.ToDouble(0) busAuxParams.SupplyESFromHEVREESS = cbES_HEVREESS.Checked diff --git a/VECTO/Input Files/BusParamsEngineering.vb b/VECTO/Input Files/BusParamsEngineering.vb index 0dfddbf5009a7f0934f5839db6f3f809c257e999..da4307ff0c7f6869310a6219822a11acf499a690 100644 --- a/VECTO/Input Files/BusParamsEngineering.vb +++ b/VECTO/Input Files/BusParamsEngineering.vb @@ -226,6 +226,8 @@ Public Class BusAuxEngineeringParams End Get End Property + Public Property ElectricStorageEfficiency As Double Implements IBusAuxElectricSystemEngineeringData.ElectricStorageEfficiency + Public ReadOnly Property IBusAuxElectricSystemEngineeringData_AlternatorType As AlternatorType Implements IBusAuxElectricSystemEngineeringData.AlternatorType get Return AlternatorType diff --git a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs index b18ff62bdc99236f0c86e15ada2575297f1e6494..68f506c97ff5999c8b0fbcb96d945e1c050c974c 100644 --- a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs +++ b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs @@ -451,6 +451,7 @@ namespace TUGraz.VectoCommon.InputData Watt MaxAlternatorPower { get; } bool ESSupplyFromHEVREESS { get; } + double ElectricStorageEfficiency { get; } } public interface IBusAuxHVACData diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONBusAuxiliariesEngineeringData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONBusAuxiliariesEngineeringData.cs index e40e8ad05c20358a73c6f8ac8bf1aa9aa90e8a1a..698c705fb38092f84b7de81ae3ae66891c93a5d9 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONBusAuxiliariesEngineeringData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONBusAuxiliariesEngineeringData.cs @@ -117,6 +117,14 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON } } + public double ElectricStorageEfficiency + { + get + { + return _electric["BatteryEfficiency"] == null ? 1 : _electric.GetEx<double>("BatteryEfficiency"); + } + } + #endregion #region Implementation of IBusAuxHVACData diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs index 38d871ccfd955d67a42f0bbadddf026bb0312b98..d5de50b92a63dea1c33b74f3dcffd08f98fffece 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs @@ -521,7 +521,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter //InputData = auxInputData.BusAuxiliariesData, ElectricalUserInputsConfig = new ElectricsUserInputsConfig() { PowerNetVoltage = Constants.BusAuxiliaries.ElectricSystem.PowernetVoltage, - StoredEnergyEfficiency = Constants.BusAuxiliaries.ElectricSystem.StoredEnergyEfficiency, + //StoredEnergyEfficiency = Constants.BusAuxiliaries.ElectricSystem.StoredEnergyEfficiency, ResultCardIdle = new DummyResultCard(), ResultCardOverrun = new DummyResultCard(), ResultCardTraction = new DummyResultCard(), @@ -539,6 +539,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter DCDCEfficiency = busAux.ElectricSystem.DCDCConverterEfficiency.LimitTo(0, 1), MaxAlternatorPower = busAux.ElectricSystem.MaxAlternatorPower, ElectricStorageCapacity = busAux.ElectricSystem.ElectricStorageCapacity ?? 0.SI<WattSecond>(), + StoredEnergyEfficiency = busAux.ElectricSystem.ElectricStorageEfficiency, ElectricalConsumers = GetElectricConsumers(busAux.ElectricSystem) }, PneumaticAuxillariesConfig = new PneumaticsConsumersDemand() { diff --git a/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/Electrics/ElectricsUserInputsConfig.cs b/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/Electrics/ElectricsUserInputsConfig.cs index dca46443500d1c1f4ed6aae6ee89ce0ab07dab58..f6b20452afaa04d573450dfc0ccebaf6816d0728 100644 --- a/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/Electrics/ElectricsUserInputsConfig.cs +++ b/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/Electrics/ElectricsUserInputsConfig.cs @@ -109,6 +109,7 @@ namespace TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.Electric public bool ConnectESToREESS { get; set; } public double DCDCEfficiency { get; set; } + } } diff --git a/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/Electrics/SimpleBattery.cs b/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/Electrics/SimpleBattery.cs index f2a5f33496ec95313c808cacea65e5743c5d402a..192b2cf23c3434fc48402c34abfc851c574baa3b 100644 --- a/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/Electrics/SimpleBattery.cs +++ b/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/Electrics/SimpleBattery.cs @@ -67,12 +67,15 @@ namespace TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.Electric public class SimpleBattery : StatefulVectoSimulationComponent<SimpleBattery.State>, ISimpleBattery { - public SimpleBattery(IVehicleContainer container, WattSecond capacity, double soc = 0.9) : base(container) + public SimpleBattery(IVehicleContainer container, WattSecond capacity, double storageEfficiency, double soc = 0.9) : base(container) { Capacity = capacity; SOC = soc; + StorageEfficiency = storageEfficiency; } + public double StorageEfficiency { get; set; } + #region Implementation of ISimpleBattery public double SOC { get; private set; } @@ -84,10 +87,12 @@ namespace TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.Electric public void ConsumeEnergy(WattSecond energy, bool dryRun) { + var batEnergy = energy * (energy.IsGreater(0) ? StorageEfficiency : 1); + if (!dryRun) { - CurrentState.ConsumedEnergy = energy; + CurrentState.ConsumedEnergy = batEnergy; } - var tmpSoc = SOC + energy / Capacity; + var tmpSoc = SOC + batEnergy / Capacity; if (tmpSoc > 1) { Log.Warn("SOC would exceed max!"); @@ -102,7 +107,7 @@ namespace TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.Electric public WattSecond MaxChargeEnergy() { - return -(SOC - 1) * Capacity; + return -(SOC - 1) * Capacity / StorageEfficiency; } public WattSecond MaxDischargeEnergy() diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs b/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs index a88c9c267788aa6cf7b14eea9bd5fb87f16850e9..41f553960998bc4c076aef177aa31475f78c958d 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs @@ -454,7 +454,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl if (container.BusAux is BusAuxiliariesAdapter busAux) { var auxCfg = data.BusAuxiliaries; var electricStorage = auxCfg.ElectricalUserInputsConfig.AlternatorType == AlternatorType.Smart - ? new SimpleBattery(container, auxCfg.ElectricalUserInputsConfig.ElectricStorageCapacity) + ? new SimpleBattery(container, auxCfg.ElectricalUserInputsConfig.ElectricStorageCapacity, auxCfg.ElectricalUserInputsConfig.StoredEnergyEfficiency) : (ISimpleBattery)new NoBattery(container); busAux.ElectricStorage = electricStorage; if (data.BusAuxiliaries.ElectricalUserInputsConfig.ConnectESToREESS) { @@ -727,7 +727,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl if (container.BusAux is BusAuxiliariesAdapter busAux) { var auxCfg = data.BusAuxiliaries; var electricStorage = auxCfg.ElectricalUserInputsConfig.AlternatorType == AlternatorType.Smart - ? new SimpleBattery(container, auxCfg.ElectricalUserInputsConfig.ElectricStorageCapacity) + ? new SimpleBattery(container, auxCfg.ElectricalUserInputsConfig.ElectricStorageCapacity, auxCfg.ElectricalUserInputsConfig.StoredEnergyEfficiency) : (ISimpleBattery)new NoBattery(container); busAux.ElectricStorage = electricStorage; if (data.BusAuxiliaries.ElectricalUserInputsConfig.ConnectESToREESS) { @@ -841,7 +841,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl var busAux = new BusAuxiliariesAdapter(container, data.BusAuxiliaries, conventionalAux); var auxCfg = data.BusAuxiliaries; var electricStorage = auxCfg.ElectricalUserInputsConfig.AlternatorType == AlternatorType.Smart - ? new SimpleBattery(container, auxCfg.ElectricalUserInputsConfig.ElectricStorageCapacity) + ? new SimpleBattery(container, auxCfg.ElectricalUserInputsConfig.ElectricStorageCapacity, auxCfg.ElectricalUserInputsConfig.StoredEnergyEfficiency) : (ISimpleBattery)new NoBattery(container); busAux.ElectricStorage = electricStorage; return busAux; diff --git a/VectoCore/VectoCore/OutputData/FileIO/JSONFileWriter.cs b/VectoCore/VectoCore/OutputData/FileIO/JSONFileWriter.cs index c78d1ffcbb21049ae2e98c1225dd7306a213eba9..3bbf6ce5f2292a137ebde0fb73bf7994d0d5a989 100644 --- a/VectoCore/VectoCore/OutputData/FileIO/JSONFileWriter.cs +++ b/VectoCore/VectoCore/OutputData/FileIO/JSONFileWriter.cs @@ -1142,6 +1142,7 @@ public class JSONFileWriter : IOutputFileWriter {"CurrentDemandEngineOffStandstill", busAux.ElectricSystem.CurrentDemandEngineOffStandstill.Value()}, {"AlternatorType", busAux.ElectricSystem.AlternatorType.ToString()}, {"ElectricStorageCapacity", busAux.ElectricSystem.ElectricStorageCapacity.ConvertToWattHour().Value}, + {"BatteryEfficiency", busAux.ElectricSystem.ElectricStorageEfficiency}, {"MaxAlternatorPower", busAux.ElectricSystem.MaxAlternatorPower.Value()}, {"DCDCConverterEfficiency", busAux.ElectricSystem.DCDCConverterEfficiency}, {"ESSupplyFromHEVREESS", busAux.ElectricSystem.ESSupplyFromHEVREESS} diff --git a/VectoCore/VectoCoreTest/Integration/BusAuxiliaries/AuxDemandTest.cs b/VectoCore/VectoCoreTest/Integration/BusAuxiliaries/AuxDemandTest.cs index e9e9331a727f2d83d622152654525493b2632da6..ed5b0e54dbfb0367a791d4e2967b40baf0f2fd2c 100644 --- a/VectoCore/VectoCoreTest/Integration/BusAuxiliaries/AuxDemandTest.cs +++ b/VectoCore/VectoCoreTest/Integration/BusAuxiliaries/AuxDemandTest.cs @@ -167,7 +167,7 @@ namespace TUGraz.VectoCore.Tests.Integration.BusAuxiliaries var auxConfig = BusAuxiliaryInputData.ReadBusAuxiliaries(auxFilePath, vehicle.RunData.VehicleData); var busAux = new BusAuxiliariesAdapter(vehicle, auxConfig); var electricStorage = auxConfig.ElectricalUserInputsConfig.AlternatorType == AlternatorType.Smart - ? new SimpleBattery(vehicle, auxConfig.ElectricalUserInputsConfig.ElectricStorageCapacity) + ? new SimpleBattery(vehicle, auxConfig.ElectricalUserInputsConfig.ElectricStorageCapacity, auxConfig.ElectricalUserInputsConfig.StoredEnergyEfficiency) : (ISimpleBattery)new NoBattery(vehicle); busAux.ElectricStorage = electricStorage; return busAux; diff --git a/VectoCore/VectoCoreTest/Integration/CoachAdvancedAuxPowertrain.cs b/VectoCore/VectoCoreTest/Integration/CoachAdvancedAuxPowertrain.cs index b70bd3fda0440353a8ab6eade5efaf83bc0a6e67..cacaecef4fb6ce7ea03ea42ff5a45c3ce0511c7c 100644 --- a/VectoCore/VectoCoreTest/Integration/CoachAdvancedAuxPowertrain.cs +++ b/VectoCore/VectoCoreTest/Integration/CoachAdvancedAuxPowertrain.cs @@ -123,7 +123,7 @@ namespace TUGraz.VectoCore.Tests.Integration var auxCfg = runData.BusAuxiliaries; var electricStorage = auxCfg.ElectricalUserInputsConfig.AlternatorType == AlternatorType.Smart - ? new SimpleBattery(container, auxCfg.ElectricalUserInputsConfig.ElectricStorageCapacity) + ? new SimpleBattery(container, auxCfg.ElectricalUserInputsConfig.ElectricStorageCapacity, auxCfg.ElectricalUserInputsConfig.StoredEnergyEfficiency) : (ISimpleBattery)new NoBattery(container); aux.ElectricStorage = electricStorage; engine.Connect(aux.Port());