Skip to content

Commit

Permalink
Merge pull request #4225 from NREL/issue-4223
Browse files Browse the repository at this point in the history
Addresses #4223, wrap the new ElectricLoadCenter:Storage:LiIonNMCBattery object in the OS SDK
  • Loading branch information
jmarrec authored Mar 31, 2021
2 parents 574e60d + 278e228 commit 1008572
Show file tree
Hide file tree
Showing 22 changed files with 1,938 additions and 10 deletions.
136 changes: 136 additions & 0 deletions resources/model/OpenStudio.idd
Original file line number Diff line number Diff line change
Expand Up @@ -31834,6 +31834,142 @@ OS:ElectricLoadCenter:Storage:Simple,
N7; \field Initial State of Charge
\units J

OS:ElectricLoadCenter:Storage:LiIonNMCBattery,
\memo Uses Lithium Ion NMC model to simulate rechargeable battery banks in an
\memo electrical load center. The battery bank is a collection of one or more individual
\memo battery modules. Given the surplus or deficit power from the electrical system and
\memo the state of charge from the previous time step, this object can model the voltage,
\memo current, and energy losses with charging and discharging during each time step.
\memo The cumulative battery damage can be also modeled and reported at the end of
\memo each simulation run.
\min-fields 12
A1, \field Handle
\type handle
\required-field
A2, \field Name
\required-field
\type alpha
\reference ElecStorageList
A3, \field Availability Schedule Name
\note Availability schedule name for this system. Schedule value > 0 means the system is available.
\note If this field is blank, the system is always available.
\type object-list
\object-list ScheduleNames
\required-field
A4, \field Zone Name
\type object-list
\object-list ThermalZoneNames
\note Enter name of zone to receive electrical storage losses as heat
\note if blank then electrical storage losses are dissipated to outdoors
N1, \field Radiative Fraction
\type real
\minimum 0
\maximum 1.0
\required-field
A5, \field Lifetime Model
\type choice
\key None
\key KandlerSmith
\required-field
N2, \field Number of Cells in Series
\type integer
\minimum 1
\required-field
\note Battery voltage is calculated by multiplying this field
\note by the nominal cell voltage (Numeric field 13, default 3.342V)
N3, \field Number of Strings in Parallel
\type integer
\minimum 1
\required-field
\note Capacity (Ah) is determined by multiplying this field
\note by the cell capacity (Numeric field 14, default 3.2 Ah)
N4, \field Initial Fractional State of Charge
\type real
\minimum 0
\maximum 1.0
\required-field
\note The state of charge is evaluated based on the
\note maximum capacity defined in the next field.
N5, \field DC to DC Charging Efficiency
\type real
\minimum> 0
\maximum 1
\required-field
N6, \field Battery Mass
\type real
\minimum> 0
\units kg
\required-field
N7, \field Battery Surface Area
\type real
\minimum> 0
\units m2
\required-field
N8, \field Battery Specific Heat Capacity
\type real
\minimum> 0
\units J/kg-K
\required-field
N9, \field Heat Transfer Coefficient Between Battery and Ambient
\type real
\minimum> 0
\units W/m2-K
\required-field
N10, \field Fully Charged Cell Voltage
\type real
\minimum> 0
\units V
\required-field
\note Most users should not need to change this value.
N11, \field Cell Voltage at End of Exponential Zone
\type real
\minimum> 0
\units V
\required-field
\note Most users should not need to change this value.
N12, \field Cell Voltage at End of Nominal Zone
\type real
\minimum> 0
\units V
\required-field
\note Most users should not need to change this value.
N13, \field Default Nominal Cell Voltage
\type real
\minimum> 0
\units V
\required-field
\note Most users should not need to change this value.
N14, \field Fully Charged Cell Capacity
\type real
\minimum> 0
\units Ah
\required-field
\note Most users should not need to change this value.
N15, \field Fraction of Cell Capacity Removed at the End of Exponential Zone
\type real
\minimum> 0.0
\maximum< 1.0
\required-field
\note Most users should not need to change this value.
N16, \field Fraction of Cell Capacity Removed at the End of Nominal Zone
\type real
\minimum> 0.0
\maximum< 1.0
\required-field
\note Most users should not need to change this value.
N17, \field Charge Rate at Which Voltage vs Capacity Curve Was Generated
\type real
\minimum> 0
\required-field
\note Most users should not need to change this value.
N18; \field Battery Cell Internal Electrical Resistance
\type real
\minimum 0
\units ohms
\required-field
\note for a single cell
\note Most users should not need to change this value.

OS:ElectricLoadCenter:Transformer,
\memo a list of meters that can be reported are available after a run on
\memo the meter dictionary file (.mdd) if the Output:VariableDictionary has been requested.
Expand Down
5 changes: 4 additions & 1 deletion src/energyplus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ set(${target_name}_src
ForwardTranslator/ForwardTranslateElectricLoadCenterInverterLookUpTable.cpp
ForwardTranslator/ForwardTranslateElectricLoadCenterInverterSimple.cpp
ForwardTranslator/ForwardTranslateElectricLoadCenterInverterPVWatts.cpp
ForwardTranslator/ForwardTranslateElectricLoadCenterStorageConverter.cpp
ForwardTranslator/ForwardTranslateElectricLoadCenterStorageSimple.cpp
ForwardTranslator/ForwardTranslateElectricLoadCenterStorageConverter.cpp
ForwardTranslator/ForwardTranslateElectricLoadCenterStorageLiIonNMCBattery.cpp
ForwardTranslator/ForwardTranslateElectricLoadCenterTransformer.cpp
ForwardTranslator/ForwardTranslateEnergyManagementSystemActuator.cpp
ForwardTranslator/ForwardTranslateEnergyManagementSystemConstructionIndexVariable.cpp
Expand Down Expand Up @@ -466,6 +467,7 @@ set(${target_name}_src
ReverseTranslator/ReverseTranslateElectricEquipment.cpp
ReverseTranslator/ReverseTranslateElectricLoadCenterStorageSimple.cpp
ReverseTranslator/ReverseTranslateElectricLoadCenterStorageConverter.cpp
ReverseTranslator/ReverseTranslateElectricLoadCenterStorageLiIonNMCBattery.cpp
ReverseTranslator/ReverseTranslateEnergyManagementSystemActuator.cpp
ReverseTranslator/ReverseTranslateEnergyManagementSystemActuator.cpp
ReverseTranslator/ReverseTranslateEnergyManagementSystemConstructionIndexVariable.cpp
Expand Down Expand Up @@ -640,6 +642,7 @@ set(${target_name}_test_src
Test/ElectricEquipment_GTest.cpp
Test/ElectricEquipmentITEAirCooled_GTest.cpp
Test/ElectricLoadCenterDistribution_GTest.cpp
Test/ElectricLoadCenterStorageLiIonNMCBattery_GTest.cpp
Test/ElectricLoadCenterTransformer_GTest.cpp
Test/EMS_GTest.cpp
Test/EvaporativeCoolerDirectResearchSpecial_GTest.cpp
Expand Down
6 changes: 6 additions & 0 deletions src/energyplus/ForwardTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,11 @@ namespace energyplus {
retVal = translateElectricLoadCenterStorageConverter(temp);
break;
}
case openstudio::IddObjectType::OS_ElectricLoadCenter_Storage_LiIonNMCBattery: {
model::ElectricLoadCenterStorageLiIonNMCBattery temp = modelObject.cast<ElectricLoadCenterStorageLiIonNMCBattery>();
retVal = translateElectricLoadCenterStorageLiIonNMCBattery(temp);
break;
}
case openstudio::IddObjectType::OS_ElectricLoadCenter_Transformer: {
model::ElectricLoadCenterTransformer temp = modelObject.cast<ElectricLoadCenterTransformer>();
retVal = translateElectricLoadCenterTransformer(temp);
Expand Down Expand Up @@ -3241,6 +3246,7 @@ namespace energyplus {
// result.push_back(IddObjectType::OS_ElectricLoadCenter_Inverter_PVWatts);
// result.push_back(IddObjectType::OS_ElectricLoadCenter_Storage_Simple);
// result.push_back(IddObjectType::OS_ElectricLoadCenter_Storage_Converter);
// result.push_back(IddObjectType::OS_ElectricLoadCenter_Storage_LiIonNMCBattery);

// Generator_Photovoltaic is responsible for translating these three
// result.push_back(IddObjectType::OS_PhotovoltaicPerformance_EquivalentOneDiode);
Expand Down
3 changes: 3 additions & 0 deletions src/energyplus/ForwardTranslator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ namespace model {
class ElectricLoadCenterInverterPVWatts;
class ElectricLoadCenterStorageSimple;
class ElectricLoadCenterStorageConverter;
class ElectricLoadCenterStorageLiIonNMCBattery;
class ElectricLoadCenterTransformer;
class EnergyManagementSystemActuator;
class EnergyManagementSystemConstructionIndexVariable;
Expand Down Expand Up @@ -881,6 +882,8 @@ namespace energyplus {

boost::optional<IdfObject> translateElectricLoadCenterStorageConverter(model::ElectricLoadCenterStorageConverter& modelObject);

boost::optional<IdfObject> translateElectricLoadCenterStorageLiIonNMCBattery(model::ElectricLoadCenterStorageLiIonNMCBattery& modelObject);

boost::optional<IdfObject> translateElectricLoadCenterTransformer(model::ElectricLoadCenterTransformer& modelObject);

boost::optional<IdfObject> translateEnergyManagementSystemActuator(model::EnergyManagementSystemActuator& modelObject);
Expand Down
Loading

0 comments on commit 1008572

Please # to comment.