src/model/ElectricLoadCenterStorageLiIonNMCBattery.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #include "ElectricLoadCenterStorageLiIonNMCBattery.hpp" | ||
| 7 | #include "ElectricLoadCenterStorageLiIonNMCBattery_Impl.hpp" | ||
| 8 | |||
| 9 | #include "Schedule.hpp" | ||
| 10 | #include "Schedule_Impl.hpp" | ||
| 11 | #include "ThermalZone.hpp" | ||
| 12 | #include "ThermalZone_Impl.hpp" | ||
| 13 | #include "Model.hpp" | ||
| 14 | #include "Model_Impl.hpp" | ||
| 15 | |||
| 16 | #include "ScheduleTypeLimits.hpp" | ||
| 17 | #include "ScheduleTypeRegistry.hpp" | ||
| 18 | |||
| 19 | #include <utilities/idd/IddFactory.hxx> | ||
| 20 | #include <utilities/idd/IddEnums.hxx> | ||
| 21 | #include <utilities/idd/OS_ElectricLoadCenter_Storage_LiIonNMCBattery_FieldEnums.hxx> | ||
| 22 | |||
| 23 | #include "../utilities/units/Unit.hpp" | ||
| 24 | #include "../utilities/core/Assert.hpp" | ||
| 25 | |||
| 26 | namespace openstudio { | ||
| 27 | namespace model { | ||
| 28 | |||
| 29 | namespace detail { | ||
| 30 | |||
| 31 | 10 | ElectricLoadCenterStorageLiIonNMCBattery_Impl::ElectricLoadCenterStorageLiIonNMCBattery_Impl(const IdfObject& idfObject, Model_Impl* model, | |
| 32 | 10 | bool keepHandle) | |
| 33 | 10 | : ElectricalStorage_Impl(idfObject, model, keepHandle) { | |
| 34 |
4/6✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 10 times.
✗ Branch 13 not taken.
|
10 | OS_ASSERT(idfObject.iddObject().type() == ElectricLoadCenterStorageLiIonNMCBattery::iddObjectType()); |
| 35 | 10 | } | |
| 36 | |||
| 37 | ✗ | ElectricLoadCenterStorageLiIonNMCBattery_Impl::ElectricLoadCenterStorageLiIonNMCBattery_Impl( | |
| 38 | ✗ | const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle) | |
| 39 | ✗ | : ElectricalStorage_Impl(other, model, keepHandle) { | |
| 40 | ✗ | OS_ASSERT(other.iddObject().type() == ElectricLoadCenterStorageLiIonNMCBattery::iddObjectType()); | |
| 41 | ✗ | } | |
| 42 | |||
| 43 | 6 | ElectricLoadCenterStorageLiIonNMCBattery_Impl::ElectricLoadCenterStorageLiIonNMCBattery_Impl( | |
| 44 | 6 | const ElectricLoadCenterStorageLiIonNMCBattery_Impl& other, Model_Impl* model, bool keepHandle) | |
| 45 | 6 | : ElectricalStorage_Impl(other, model, keepHandle) {} | |
| 46 | |||
| 47 | ✗ | const std::vector<std::string>& ElectricLoadCenterStorageLiIonNMCBattery_Impl::outputVariableNames() const { | |
| 48 | static const std::vector<std::string> result{ | ||
| 49 | "Electric Storage Operating mode Index", "Electric Storage Battery Charge State", "Electric Storage Charge Fraction", | ||
| 50 | "Electric Storage Total Current", "Electric Storage Total Voltage", "Electric Storage Degradation Fraction", | ||
| 51 | "Electric Storage Charge Power", "Electric Storage Charge Energy", "Electric Storage Production Decrement Energy", | ||
| 52 | "Electric Storage Discharge Power", "Electric Storage Discharge Energy", "Electric Storage Thermal Loss Rate", | ||
| 53 | ✗ | "Electric Storage Thermal Loss Energy", "Electric Storage Battery Temperature"}; | |
| 54 | ✗ | return result; | |
| 55 | ✗ | } | |
| 56 | |||
| 57 | ✗ | IddObjectType ElectricLoadCenterStorageLiIonNMCBattery_Impl::iddObjectType() const { | |
| 58 | ✗ | return ElectricLoadCenterStorageLiIonNMCBattery::iddObjectType(); | |
| 59 | } | ||
| 60 | |||
| 61 | ✗ | std::vector<ScheduleTypeKey> ElectricLoadCenterStorageLiIonNMCBattery_Impl::getScheduleTypeKeys(const Schedule& schedule) const { | |
| 62 | ✗ | std::vector<ScheduleTypeKey> result; | |
| 63 | ✗ | UnsignedVector fieldIndices = getSourceIndices(schedule.handle()); | |
| 64 | ✗ | UnsignedVector::const_iterator b(fieldIndices.begin()); | |
| 65 | ✗ | UnsignedVector::const_iterator e(fieldIndices.end()); | |
| 66 | ✗ | if (std::find(b, e, OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::AvailabilityScheduleName) != e) { | |
| 67 | ✗ | result.push_back(ScheduleTypeKey("ElectricLoadCenterStorageLiIonNMCBattery", "Availability")); | |
| 68 | } | ||
| 69 | ✗ | return result; | |
| 70 | ✗ | } | |
| 71 | |||
| 72 | //@} | ||
| 73 | /** @name Getters */ | ||
| 74 | //@{ | ||
| 75 | |||
| 76 | // Included in parent class | ||
| 77 | // boost::optional<ElectricLoadCenterDistribution> ElectricLoadCenterStorageLiIonNMCBattery_Impl::electricLoadCenterDistribution() const | ||
| 78 | |||
| 79 | 4 | boost::optional<Schedule> ElectricLoadCenterStorageLiIonNMCBattery_Impl::optionalAvailabilitySchedule() const { | |
| 80 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::AvailabilityScheduleName); |
| 81 | } | ||
| 82 | |||
| 83 | 4 | Schedule ElectricLoadCenterStorageLiIonNMCBattery_Impl::availabilitySchedule() const { | |
| 84 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<Schedule> value = optionalAvailabilitySchedule(); |
| 85 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
|
4 | if (!value) { |
| 86 | //LOG_AND_THROW(briefDescription() << " does not have an Availability Schedule attached."); | ||
| 87 | // I'm choosing to just return alwaysOnDiscreteSchedule | ||
| 88 | ✗ | return this->model().alwaysOnDiscreteSchedule(); | |
| 89 | } | ||
| 90 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | return value.get(); |
| 91 | 4 | } | |
| 92 | |||
| 93 | // Optional thermal Zone for heat gains | ||
| 94 | 8 | boost::optional<ThermalZone> ElectricLoadCenterStorageLiIonNMCBattery_Impl::thermalZone() const { | |
| 95 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | return getObject<ModelObject>().getModelObjectTarget<ThermalZone>(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::ZoneName); |
| 96 | } | ||
| 97 | |||
| 98 | 6 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::radiativeFraction() const { | |
| 99 |
1/1✓ Branch 1 taken 6 times.
|
6 | boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::RadiativeFraction, true); |
| 100 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
✗ Branch 4 not taken.
|
6 | OS_ASSERT(value); |
| 101 |
1/1✓ Branch 1 taken 6 times.
|
12 | return value.get(); |
| 102 | } | ||
| 103 | |||
| 104 | 4 | std::string ElectricLoadCenterStorageLiIonNMCBattery_Impl::lifetimeModel() const { | |
| 105 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<std::string> value = getString(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::LifetimeModel, true); |
| 106 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 107 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
8 | return value.get(); |
| 108 | 4 | } | |
| 109 | |||
| 110 | 5 | int ElectricLoadCenterStorageLiIonNMCBattery_Impl::numberofCellsinSeries() const { | |
| 111 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<int> value = getInt(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::NumberofCellsinSeries, true); |
| 112 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
|
5 | OS_ASSERT(value); |
| 113 |
1/1✓ Branch 1 taken 5 times.
|
10 | return value.get(); |
| 114 | } | ||
| 115 | |||
| 116 | 5 | int ElectricLoadCenterStorageLiIonNMCBattery_Impl::numberofStringsinParallel() const { | |
| 117 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<int> value = getInt(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::NumberofStringsinParallel, true); |
| 118 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
|
5 | OS_ASSERT(value); |
| 119 |
1/1✓ Branch 1 taken 5 times.
|
10 | return value.get(); |
| 120 | } | ||
| 121 | |||
| 122 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::initialFractionalStateofCharge() const { | |
| 123 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::InitialFractionalStateofCharge, true); |
| 124 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 125 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 126 | } | ||
| 127 | |||
| 128 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::dctoDCChargingEfficiency() const { | |
| 129 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::DCtoDCChargingEfficiency, true); |
| 130 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 131 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 132 | } | ||
| 133 | |||
| 134 | 5 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::batteryMass() const { | |
| 135 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::BatteryMass, true); |
| 136 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
|
5 | OS_ASSERT(value); |
| 137 |
1/1✓ Branch 1 taken 5 times.
|
10 | return value.get(); |
| 138 | } | ||
| 139 | |||
| 140 | 5 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::batterySurfaceArea() const { | |
| 141 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::BatterySurfaceArea, true); |
| 142 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
|
5 | OS_ASSERT(value); |
| 143 |
1/1✓ Branch 1 taken 5 times.
|
10 | return value.get(); |
| 144 | } | ||
| 145 | |||
| 146 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::batterySpecificHeatCapacity() const { | |
| 147 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::BatterySpecificHeatCapacity, true); |
| 148 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 149 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 150 | } | ||
| 151 | |||
| 152 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::heatTransferCoefficientBetweenBatteryandAmbient() const { | |
| 153 | boost::optional<double> value = | ||
| 154 |
1/1✓ Branch 1 taken 4 times.
|
4 | getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::HeatTransferCoefficientBetweenBatteryandAmbient, true); |
| 155 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 156 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 157 | } | ||
| 158 | |||
| 159 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::fullyChargedCellVoltage() const { | |
| 160 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::FullyChargedCellVoltage, true); |
| 161 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 162 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 163 | } | ||
| 164 | |||
| 165 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::cellVoltageatEndofExponentialZone() const { | |
| 166 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::CellVoltageatEndofExponentialZone, true); |
| 167 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 168 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 169 | } | ||
| 170 | |||
| 171 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::cellVoltageatEndofNominalZone() const { | |
| 172 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::CellVoltageatEndofNominalZone, true); |
| 173 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 174 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 175 | } | ||
| 176 | |||
| 177 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::defaultNominalCellVoltage() const { | |
| 178 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::DefaultNominalCellVoltage, true); |
| 179 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 180 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 181 | } | ||
| 182 | |||
| 183 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::fullyChargedCellCapacity() const { | |
| 184 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::FullyChargedCellCapacity, true); |
| 185 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 186 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 187 | } | ||
| 188 | |||
| 189 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::fractionofCellCapacityRemovedattheEndofExponentialZone() const { | |
| 190 | boost::optional<double> value = | ||
| 191 |
1/1✓ Branch 1 taken 4 times.
|
4 | getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::FractionofCellCapacityRemovedattheEndofExponentialZone, true); |
| 192 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 193 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 194 | } | ||
| 195 | |||
| 196 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::fractionofCellCapacityRemovedattheEndofNominalZone() const { | |
| 197 | boost::optional<double> value = | ||
| 198 |
1/1✓ Branch 1 taken 4 times.
|
4 | getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::FractionofCellCapacityRemovedattheEndofNominalZone, true); |
| 199 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 200 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 201 | } | ||
| 202 | |||
| 203 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::chargeRateatWhichVoltagevsCapacityCurveWasGenerated() const { | |
| 204 | boost::optional<double> value = | ||
| 205 |
1/1✓ Branch 1 taken 4 times.
|
4 | getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::ChargeRateatWhichVoltagevsCapacityCurveWasGenerated, true); |
| 206 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 207 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 208 | } | ||
| 209 | |||
| 210 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery_Impl::batteryCellInternalElectricalResistance() const { | |
| 211 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::BatteryCellInternalElectricalResistance, true); |
| 212 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 213 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 214 | } | ||
| 215 | |||
| 216 | //@} | ||
| 217 | /** @name Setters */ | ||
| 218 | //@{ | ||
| 219 | |||
| 220 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setAvailabilitySchedule(Schedule& schedule) { | |
| 221 |
3/3✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
✓ Branch 7 taken 11 times.
|
44 | bool result = setSchedule(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::AvailabilityScheduleName, |
| 222 | "ElectricLoadCenterStorageLiIonNMCBattery", "Availability", schedule); | ||
| 223 | 11 | return result; | |
| 224 | } | ||
| 225 | |||
| 226 | // Set the thermal Zone for heat gains | ||
| 227 | 3 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setThermalZone(const ThermalZone& thermalZone) { | |
| 228 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | bool result = setPointer(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::ZoneName, thermalZone.handle()); |
| 229 | 3 | return result; | |
| 230 | } | ||
| 231 | |||
| 232 | // Reset the zone (leave blank) | ||
| 233 | 1 | void ElectricLoadCenterStorageLiIonNMCBattery_Impl::resetThermalZone() { | |
| 234 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::ZoneName, ""); |
| 235 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 236 | 1 | } | |
| 237 | |||
| 238 | 12 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setRadiativeFraction(double radiativeFraction) { | |
| 239 | 12 | bool result = setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::RadiativeFraction, radiativeFraction); | |
| 240 | 12 | return result; | |
| 241 | } | ||
| 242 | |||
| 243 | 13 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setLifetimeModel(const std::string& lifetimeModel) { | |
| 244 | 13 | bool result = setString(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::LifetimeModel, lifetimeModel); | |
| 245 | 13 | return result; | |
| 246 | } | ||
| 247 | |||
| 248 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setNumberofCellsinSeries(int numberofCellsinSeries) { | |
| 249 | 11 | bool result = setInt(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::NumberofCellsinSeries, numberofCellsinSeries); | |
| 250 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 11 times.
|
11 | OS_ASSERT(result); |
| 251 | 11 | return result; | |
| 252 | } | ||
| 253 | |||
| 254 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setNumberofStringsinParallel(int numberofStringsinParallel) { | |
| 255 | 11 | bool result = setInt(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::NumberofStringsinParallel, numberofStringsinParallel); | |
| 256 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 11 times.
|
11 | OS_ASSERT(result); |
| 257 | 11 | return result; | |
| 258 | } | ||
| 259 | |||
| 260 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setInitialFractionalStateofCharge(double initialFractionalStateofCharge) { | |
| 261 | 11 | bool result = setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::InitialFractionalStateofCharge, initialFractionalStateofCharge); | |
| 262 | 11 | return result; | |
| 263 | } | ||
| 264 | |||
| 265 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setDCtoDCChargingEfficiency(double dctoDCChargingEfficiency) { | |
| 266 | 11 | bool result = setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::DCtoDCChargingEfficiency, dctoDCChargingEfficiency); | |
| 267 | 11 | return result; | |
| 268 | } | ||
| 269 | |||
| 270 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setBatteryMass(double batteryMass) { | |
| 271 | 11 | bool result = setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::BatteryMass, batteryMass); | |
| 272 | 11 | return result; | |
| 273 | } | ||
| 274 | |||
| 275 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setBatterySurfaceArea(double batterySurfaceArea) { | |
| 276 | 11 | bool result = setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::BatterySurfaceArea, batterySurfaceArea); | |
| 277 | 11 | return result; | |
| 278 | } | ||
| 279 | |||
| 280 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setBatterySpecificHeatCapacity(double batterySpecificHeatCapacity) { | |
| 281 | 11 | bool result = setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::BatterySpecificHeatCapacity, batterySpecificHeatCapacity); | |
| 282 | 11 | return result; | |
| 283 | } | ||
| 284 | |||
| 285 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setHeatTransferCoefficientBetweenBatteryandAmbient( | |
| 286 | double heatTransferCoefficientBetweenBatteryandAmbient) { | ||
| 287 | 11 | bool result = setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::HeatTransferCoefficientBetweenBatteryandAmbient, | |
| 288 | heatTransferCoefficientBetweenBatteryandAmbient); | ||
| 289 | 11 | return result; | |
| 290 | } | ||
| 291 | |||
| 292 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setFullyChargedCellVoltage(double fullyChargedCellVoltage) { | |
| 293 | 11 | bool result = setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::FullyChargedCellVoltage, fullyChargedCellVoltage); | |
| 294 | 11 | return result; | |
| 295 | } | ||
| 296 | |||
| 297 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setCellVoltageatEndofExponentialZone(double cellVoltageatEndofExponentialZone) { | |
| 298 | bool result = | ||
| 299 | 11 | setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::CellVoltageatEndofExponentialZone, cellVoltageatEndofExponentialZone); | |
| 300 | 11 | return result; | |
| 301 | } | ||
| 302 | |||
| 303 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setCellVoltageatEndofNominalZone(double cellVoltageatEndofNominalZone) { | |
| 304 | 11 | bool result = setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::CellVoltageatEndofNominalZone, cellVoltageatEndofNominalZone); | |
| 305 | 11 | return result; | |
| 306 | } | ||
| 307 | |||
| 308 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setDefaultNominalCellVoltage(double defaultNominalCellVoltage) { | |
| 309 | 11 | bool result = setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::DefaultNominalCellVoltage, defaultNominalCellVoltage); | |
| 310 | 11 | return result; | |
| 311 | } | ||
| 312 | |||
| 313 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setFullyChargedCellCapacity(double fullyChargedCellCapacity) { | |
| 314 | 11 | bool result = setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::FullyChargedCellCapacity, fullyChargedCellCapacity); | |
| 315 | 11 | return result; | |
| 316 | } | ||
| 317 | |||
| 318 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setFractionofCellCapacityRemovedattheEndofExponentialZone( | |
| 319 | double fractionofCellCapacityRemovedattheEndofExponentialZone) { | ||
| 320 | 11 | bool result = setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::FractionofCellCapacityRemovedattheEndofExponentialZone, | |
| 321 | fractionofCellCapacityRemovedattheEndofExponentialZone); | ||
| 322 | 11 | return result; | |
| 323 | } | ||
| 324 | |||
| 325 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setFractionofCellCapacityRemovedattheEndofNominalZone( | |
| 326 | double fractionofCellCapacityRemovedattheEndofNominalZone) { | ||
| 327 | 11 | bool result = setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::FractionofCellCapacityRemovedattheEndofNominalZone, | |
| 328 | fractionofCellCapacityRemovedattheEndofNominalZone); | ||
| 329 | 11 | return result; | |
| 330 | } | ||
| 331 | |||
| 332 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setChargeRateatWhichVoltagevsCapacityCurveWasGenerated( | |
| 333 | double chargeRateatWhichVoltagevsCapacityCurveWasGenerated) { | ||
| 334 | 11 | bool result = setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::ChargeRateatWhichVoltagevsCapacityCurveWasGenerated, | |
| 335 | chargeRateatWhichVoltagevsCapacityCurveWasGenerated); | ||
| 336 | 11 | return result; | |
| 337 | } | ||
| 338 | |||
| 339 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery_Impl::setBatteryCellInternalElectricalResistance(double batteryCellInternalElectricalResistance) { | |
| 340 | 11 | bool result = setDouble(OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::BatteryCellInternalElectricalResistance, | |
| 341 | batteryCellInternalElectricalResistance); | ||
| 342 | 11 | return result; | |
| 343 | } | ||
| 344 | |||
| 345 | ✗ | std::vector<EMSActuatorNames> ElectricLoadCenterStorageLiIonNMCBattery_Impl::emsActuatorNames() const { | |
| 346 | ✗ | std::vector<EMSActuatorNames> actuators{{"Electrical Storage", "Power Draw Rate"}, {"Electrical Storage", "Power Charge Rate"}}; | |
| 347 | ✗ | return actuators; | |
| 348 | ✗ | } | |
| 349 | |||
| 350 | ✗ | std::vector<std::string> ElectricLoadCenterStorageLiIonNMCBattery_Impl::emsInternalVariableNames() const { | |
| 351 | ✗ | std::vector<std::string> types{}; // TODO | |
| 352 | ✗ | return types; | |
| 353 | } | ||
| 354 | } // namespace detail | ||
| 355 | |||
| 356 | /* Default Constructor */ | ||
| 357 | 1 | ElectricLoadCenterStorageLiIonNMCBattery::ElectricLoadCenterStorageLiIonNMCBattery(const Model& model) | |
| 358 | 1 | : ElectricalStorage(ElectricLoadCenterStorageLiIonNMCBattery::iddObjectType(), model) { | |
| 359 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 5 not taken.
|
1 | OS_ASSERT(getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()); |
| 360 | |||
| 361 | // Defaults to alwaysOn | ||
| 362 |
1/1✓ Branch 1 taken 1 time.
|
1 | Schedule schedule = model.alwaysOnDiscreteSchedule(); |
| 363 |
1/1✓ Branch 1 taken 1 time.
|
1 | bool ok = setAvailabilitySchedule(schedule); |
| 364 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
|
1 | OS_ASSERT(ok); |
| 365 | |||
| 366 | // These from ShopWithPVandLiIonBattery.idf. They should be modified by user! | ||
| 367 |
1/1✓ Branch 1 taken 1 time.
|
1 | setNumberofCellsinSeries(139); |
| 368 |
1/1✓ Branch 1 taken 1 time.
|
1 | setNumberofStringsinParallel(25); |
| 369 |
1/1✓ Branch 1 taken 1 time.
|
1 | setBatteryMass(342.0); |
| 370 |
1/1✓ Branch 1 taken 1 time.
|
1 | setBatterySurfaceArea(4.26); |
| 371 | |||
| 372 |
1/1✓ Branch 1 taken 1 time.
|
1 | setRadiativeFraction(0); |
| 373 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | setLifetimeModel("KandlerSmith"); |
| 374 |
1/1✓ Branch 1 taken 1 time.
|
1 | setInitialFractionalStateofCharge(0.5); |
| 375 |
1/1✓ Branch 1 taken 1 time.
|
1 | setDCtoDCChargingEfficiency(0.95); |
| 376 |
1/1✓ Branch 1 taken 1 time.
|
1 | setBatterySpecificHeatCapacity(1500); |
| 377 |
1/1✓ Branch 1 taken 1 time.
|
1 | setHeatTransferCoefficientBetweenBatteryandAmbient(7.5); |
| 378 |
1/1✓ Branch 1 taken 1 time.
|
1 | setFullyChargedCellVoltage(4.2); |
| 379 |
1/1✓ Branch 1 taken 1 time.
|
1 | setCellVoltageatEndofExponentialZone(3.53); |
| 380 |
1/1✓ Branch 1 taken 1 time.
|
1 | setCellVoltageatEndofNominalZone(3.342); |
| 381 |
1/1✓ Branch 1 taken 1 time.
|
1 | setDefaultNominalCellVoltage(3.342); |
| 382 |
1/1✓ Branch 1 taken 1 time.
|
1 | setFullyChargedCellCapacity(3.2); |
| 383 |
1/1✓ Branch 1 taken 1 time.
|
1 | setFractionofCellCapacityRemovedattheEndofExponentialZone(0.8075); |
| 384 |
1/1✓ Branch 1 taken 1 time.
|
1 | setFractionofCellCapacityRemovedattheEndofNominalZone(0.976875); |
| 385 |
1/1✓ Branch 1 taken 1 time.
|
1 | setChargeRateatWhichVoltagevsCapacityCurveWasGenerated(1); |
| 386 |
1/1✓ Branch 1 taken 1 time.
|
1 | setBatteryCellInternalElectricalResistance(0.09); |
| 387 | 1 | } | |
| 388 | |||
| 389 | /* Constructor. Defaults the availabilitySchedule to alwaysOnDiscreteSchedule */ | ||
| 390 | 9 | ElectricLoadCenterStorageLiIonNMCBattery::ElectricLoadCenterStorageLiIonNMCBattery(const Model& model, const int numberofCellsinSeries, | |
| 391 | const int numberofStringsinParallel, const double batteryMass, | ||
| 392 | 9 | const double batterySurfaceArea) | |
| 393 | 9 | : ElectricalStorage(ElectricLoadCenterStorageLiIonNMCBattery::iddObjectType(), model) { | |
| 394 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 9 times.
✗ Branch 5 not taken.
|
9 | OS_ASSERT(getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()); |
| 395 | |||
| 396 | // Defaults to alwaysOn | ||
| 397 |
1/1✓ Branch 1 taken 9 times.
|
9 | Schedule schedule = model.alwaysOnDiscreteSchedule(); |
| 398 |
1/1✓ Branch 1 taken 9 times.
|
9 | bool ok = setAvailabilitySchedule(schedule); |
| 399 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
|
9 | OS_ASSERT(ok); |
| 400 | |||
| 401 |
1/1✓ Branch 1 taken 9 times.
|
9 | setRadiativeFraction(0); |
| 402 |
2/2✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
|
9 | setLifetimeModel("KandlerSmith"); |
| 403 |
1/1✓ Branch 1 taken 9 times.
|
9 | setNumberofCellsinSeries(numberofCellsinSeries); |
| 404 |
1/1✓ Branch 1 taken 9 times.
|
9 | setNumberofStringsinParallel(numberofStringsinParallel); |
| 405 |
1/1✓ Branch 1 taken 9 times.
|
9 | setInitialFractionalStateofCharge(0.5); |
| 406 |
1/1✓ Branch 1 taken 9 times.
|
9 | setDCtoDCChargingEfficiency(0.95); |
| 407 |
1/1✓ Branch 1 taken 9 times.
|
9 | setBatteryMass(batteryMass); |
| 408 |
1/1✓ Branch 1 taken 9 times.
|
9 | setBatterySurfaceArea(batterySurfaceArea); |
| 409 |
1/1✓ Branch 1 taken 9 times.
|
9 | setBatterySpecificHeatCapacity(1500); |
| 410 |
1/1✓ Branch 1 taken 9 times.
|
9 | setHeatTransferCoefficientBetweenBatteryandAmbient(7.5); |
| 411 |
1/1✓ Branch 1 taken 9 times.
|
9 | setFullyChargedCellVoltage(4.2); |
| 412 |
1/1✓ Branch 1 taken 9 times.
|
9 | setCellVoltageatEndofExponentialZone(3.53); |
| 413 |
1/1✓ Branch 1 taken 9 times.
|
9 | setCellVoltageatEndofNominalZone(3.342); |
| 414 |
1/1✓ Branch 1 taken 9 times.
|
9 | setDefaultNominalCellVoltage(3.342); |
| 415 |
1/1✓ Branch 1 taken 9 times.
|
9 | setFullyChargedCellCapacity(3.2); |
| 416 |
1/1✓ Branch 1 taken 9 times.
|
9 | setFractionofCellCapacityRemovedattheEndofExponentialZone(0.8075); |
| 417 |
1/1✓ Branch 1 taken 9 times.
|
9 | setFractionofCellCapacityRemovedattheEndofNominalZone(0.976875); |
| 418 |
1/1✓ Branch 1 taken 9 times.
|
9 | setChargeRateatWhichVoltagevsCapacityCurveWasGenerated(1); |
| 419 |
1/1✓ Branch 1 taken 9 times.
|
9 | setBatteryCellInternalElectricalResistance(0.09); |
| 420 | 9 | } | |
| 421 | |||
| 422 | 7750 | IddObjectType ElectricLoadCenterStorageLiIonNMCBattery::iddObjectType() { | |
| 423 |
1/1✓ Branch 1 taken 7750 times.
|
7750 | return {IddObjectType::OS_ElectricLoadCenter_Storage_LiIonNMCBattery}; |
| 424 | } | ||
| 425 | |||
| 426 | ✗ | std::vector<std::string> ElectricLoadCenterStorageLiIonNMCBattery::lifetimeModelValues() { | |
| 427 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), | |
| 428 | ✗ | OS_ElectricLoadCenter_Storage_LiIonNMCBatteryFields::LifetimeModel); | |
| 429 | } | ||
| 430 | |||
| 431 | // Convenience method to return the electricalLoadCenter on which it's assigned (optional) | ||
| 432 | // Included in parent | ||
| 433 | // boost::optional<ElectricLoadCenterDistribution> ElectricLoadCenterStorageLiIonNMCBattery::electricLoadCenterDistribution() const | ||
| 434 | // { | ||
| 435 | // return getImpl<detail::Generator_Impl>()->electricLoadCenterDistribution(); | ||
| 436 | // } | ||
| 437 | |||
| 438 | 4 | Schedule ElectricLoadCenterStorageLiIonNMCBattery::availabilitySchedule() const { | |
| 439 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->availabilitySchedule(); |
| 440 | } | ||
| 441 | |||
| 442 | // Included in parent shouldn't need that | ||
| 443 | //boost::optional<ThermalZone> ElectricLoadCenterStorageLiIonNMCBattery::thermalZone() const { | ||
| 444 | // return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->thermalZone(); | ||
| 445 | //} | ||
| 446 | |||
| 447 | 6 | double ElectricLoadCenterStorageLiIonNMCBattery::radiativeFraction() const { | |
| 448 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->radiativeFraction(); |
| 449 | } | ||
| 450 | |||
| 451 | 4 | std::string ElectricLoadCenterStorageLiIonNMCBattery::lifetimeModel() const { | |
| 452 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->lifetimeModel(); |
| 453 | } | ||
| 454 | |||
| 455 | 5 | int ElectricLoadCenterStorageLiIonNMCBattery::numberofCellsinSeries() const { | |
| 456 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->numberofCellsinSeries(); |
| 457 | } | ||
| 458 | |||
| 459 | 5 | int ElectricLoadCenterStorageLiIonNMCBattery::numberofStringsinParallel() const { | |
| 460 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->numberofStringsinParallel(); |
| 461 | } | ||
| 462 | |||
| 463 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery::initialFractionalStateofCharge() const { | |
| 464 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->initialFractionalStateofCharge(); |
| 465 | } | ||
| 466 | |||
| 467 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery::dctoDCChargingEfficiency() const { | |
| 468 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->dctoDCChargingEfficiency(); |
| 469 | } | ||
| 470 | |||
| 471 | 5 | double ElectricLoadCenterStorageLiIonNMCBattery::batteryMass() const { | |
| 472 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->batteryMass(); |
| 473 | } | ||
| 474 | |||
| 475 | 5 | double ElectricLoadCenterStorageLiIonNMCBattery::batterySurfaceArea() const { | |
| 476 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->batterySurfaceArea(); |
| 477 | } | ||
| 478 | |||
| 479 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery::batterySpecificHeatCapacity() const { | |
| 480 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->batterySpecificHeatCapacity(); |
| 481 | } | ||
| 482 | |||
| 483 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery::heatTransferCoefficientBetweenBatteryandAmbient() const { | |
| 484 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->heatTransferCoefficientBetweenBatteryandAmbient(); |
| 485 | } | ||
| 486 | |||
| 487 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery::fullyChargedCellVoltage() const { | |
| 488 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->fullyChargedCellVoltage(); |
| 489 | } | ||
| 490 | |||
| 491 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery::cellVoltageatEndofExponentialZone() const { | |
| 492 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->cellVoltageatEndofExponentialZone(); |
| 493 | } | ||
| 494 | |||
| 495 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery::cellVoltageatEndofNominalZone() const { | |
| 496 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->cellVoltageatEndofNominalZone(); |
| 497 | } | ||
| 498 | |||
| 499 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery::defaultNominalCellVoltage() const { | |
| 500 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->defaultNominalCellVoltage(); |
| 501 | } | ||
| 502 | |||
| 503 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery::fullyChargedCellCapacity() const { | |
| 504 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->fullyChargedCellCapacity(); |
| 505 | } | ||
| 506 | |||
| 507 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery::fractionofCellCapacityRemovedattheEndofExponentialZone() const { | |
| 508 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->fractionofCellCapacityRemovedattheEndofExponentialZone(); |
| 509 | } | ||
| 510 | |||
| 511 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery::fractionofCellCapacityRemovedattheEndofNominalZone() const { | |
| 512 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->fractionofCellCapacityRemovedattheEndofNominalZone(); |
| 513 | } | ||
| 514 | |||
| 515 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery::chargeRateatWhichVoltagevsCapacityCurveWasGenerated() const { | |
| 516 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->chargeRateatWhichVoltagevsCapacityCurveWasGenerated(); |
| 517 | } | ||
| 518 | |||
| 519 | 4 | double ElectricLoadCenterStorageLiIonNMCBattery::batteryCellInternalElectricalResistance() const { | |
| 520 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->batteryCellInternalElectricalResistance(); |
| 521 | } | ||
| 522 | |||
| 523 | // Setters | ||
| 524 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setAvailabilitySchedule(Schedule& schedule) { | |
| 525 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setAvailabilitySchedule(schedule); |
| 526 | } | ||
| 527 | |||
| 528 | // Included in parent shouldn't need that | ||
| 529 | //bool ElectricLoadCenterStorageLiIonNMCBattery::setThermalZone(ThermalZone& zone) { | ||
| 530 | // return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setThermalZone(zone); | ||
| 531 | //} | ||
| 532 | //void ElectricLoadCenterStorageLiIonNMCBattery::resetThermalZone() { | ||
| 533 | // getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->resetThermalZone(); | ||
| 534 | //} | ||
| 535 | |||
| 536 | 12 | bool ElectricLoadCenterStorageLiIonNMCBattery::setRadiativeFraction(double radiativeFraction) { | |
| 537 |
1/1✓ Branch 3 taken 12 times.
|
12 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setRadiativeFraction(radiativeFraction); |
| 538 | } | ||
| 539 | |||
| 540 | 13 | bool ElectricLoadCenterStorageLiIonNMCBattery::setLifetimeModel(const std::string& lifetimeModel) { | |
| 541 |
1/1✓ Branch 3 taken 13 times.
|
13 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setLifetimeModel(lifetimeModel); |
| 542 | } | ||
| 543 | |||
| 544 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setNumberofCellsinSeries(int numberofCellsinSeries) { | |
| 545 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setNumberofCellsinSeries(numberofCellsinSeries); |
| 546 | } | ||
| 547 | |||
| 548 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setNumberofStringsinParallel(int numberofStringsinParallel) { | |
| 549 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setNumberofStringsinParallel(numberofStringsinParallel); |
| 550 | } | ||
| 551 | |||
| 552 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setInitialFractionalStateofCharge(double initialFractionalStateofCharge) { | |
| 553 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setInitialFractionalStateofCharge(initialFractionalStateofCharge); |
| 554 | } | ||
| 555 | |||
| 556 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setDCtoDCChargingEfficiency(double dctoDCChargingEfficiency) { | |
| 557 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setDCtoDCChargingEfficiency(dctoDCChargingEfficiency); |
| 558 | } | ||
| 559 | |||
| 560 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setBatteryMass(double batteryMass) { | |
| 561 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setBatteryMass(batteryMass); |
| 562 | } | ||
| 563 | |||
| 564 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setBatterySurfaceArea(double batterySurfaceArea) { | |
| 565 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setBatterySurfaceArea(batterySurfaceArea); |
| 566 | } | ||
| 567 | |||
| 568 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setBatterySpecificHeatCapacity(double batterySpecificHeatCapacity) { | |
| 569 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setBatterySpecificHeatCapacity(batterySpecificHeatCapacity); |
| 570 | } | ||
| 571 | |||
| 572 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setHeatTransferCoefficientBetweenBatteryandAmbient( | |
| 573 | double heatTransferCoefficientBetweenBatteryandAmbient) { | ||
| 574 |
1/1✓ Branch 3 taken 11 times.
|
22 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setHeatTransferCoefficientBetweenBatteryandAmbient( |
| 575 | 22 | heatTransferCoefficientBetweenBatteryandAmbient); | |
| 576 | } | ||
| 577 | |||
| 578 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setFullyChargedCellVoltage(double fullyChargedCellCapacity) { | |
| 579 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setFullyChargedCellVoltage(fullyChargedCellCapacity); |
| 580 | } | ||
| 581 | |||
| 582 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setCellVoltageatEndofExponentialZone(double cellVoltageatEndofExponentialZone) { | |
| 583 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setCellVoltageatEndofExponentialZone(cellVoltageatEndofExponentialZone); |
| 584 | } | ||
| 585 | |||
| 586 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setCellVoltageatEndofNominalZone(double cellVoltageatEndofNominalZone) { | |
| 587 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setCellVoltageatEndofNominalZone(cellVoltageatEndofNominalZone); |
| 588 | } | ||
| 589 | |||
| 590 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setDefaultNominalCellVoltage(double defaultNominalCellVoltage) { | |
| 591 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setDefaultNominalCellVoltage(defaultNominalCellVoltage); |
| 592 | } | ||
| 593 | |||
| 594 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setFullyChargedCellCapacity(double fullyChargedCellCapacity) { | |
| 595 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setFullyChargedCellCapacity(fullyChargedCellCapacity); |
| 596 | } | ||
| 597 | |||
| 598 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setFractionofCellCapacityRemovedattheEndofExponentialZone( | |
| 599 | double fractionofCellCapacityRemovedattheEndofExponentialZone) { | ||
| 600 |
1/1✓ Branch 3 taken 11 times.
|
22 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setFractionofCellCapacityRemovedattheEndofExponentialZone( |
| 601 | 22 | fractionofCellCapacityRemovedattheEndofExponentialZone); | |
| 602 | } | ||
| 603 | |||
| 604 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setFractionofCellCapacityRemovedattheEndofNominalZone( | |
| 605 | double fractionofCellCapacityRemovedattheEndofNominalZone) { | ||
| 606 |
1/1✓ Branch 3 taken 11 times.
|
22 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setFractionofCellCapacityRemovedattheEndofNominalZone( |
| 607 | 22 | fractionofCellCapacityRemovedattheEndofNominalZone); | |
| 608 | } | ||
| 609 | |||
| 610 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setChargeRateatWhichVoltagevsCapacityCurveWasGenerated( | |
| 611 | double chargeRateatWhichVoltagevsCapacityCurveWasGenerated) { | ||
| 612 |
1/1✓ Branch 3 taken 11 times.
|
22 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setChargeRateatWhichVoltagevsCapacityCurveWasGenerated( |
| 613 | 22 | chargeRateatWhichVoltagevsCapacityCurveWasGenerated); | |
| 614 | } | ||
| 615 | |||
| 616 | 11 | bool ElectricLoadCenterStorageLiIonNMCBattery::setBatteryCellInternalElectricalResistance(double batteryCellInternalElectricalResistance) { | |
| 617 |
1/1✓ Branch 3 taken 11 times.
|
22 | return getImpl<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl>()->setBatteryCellInternalElectricalResistance( |
| 618 | 22 | batteryCellInternalElectricalResistance); | |
| 619 | } | ||
| 620 | |||
| 621 | /// @cond | ||
| 622 | 5 | ElectricLoadCenterStorageLiIonNMCBattery::ElectricLoadCenterStorageLiIonNMCBattery( | |
| 623 | 5 | std::shared_ptr<detail::ElectricLoadCenterStorageLiIonNMCBattery_Impl> impl) | |
| 624 |
1/1✓ Branch 3 taken 5 times.
|
5 | : ElectricalStorage(std::move(impl)) {} |
| 625 | /// @endcond | ||
| 626 | |||
| 627 | } // namespace model | ||
| 628 | } // namespace openstudio | ||
| 629 |