Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=MaxNameLength), | public | :: | Name | = | ' ' | ||
integer, | public | :: | StorageModelMode | = | 0 | ||
integer, | public | :: | AvailSchedPtr | = | 0 | ||
integer, | public | :: | HeatLossesDestination | = | 0 | ||
integer, | public | :: | ZoneNum | = | 0 | ||
real(kind=r64), | public | :: | ZoneRadFract | = | 0.0D0 | ||
real(kind=r64), | public | :: | StartingEnergyStored | = | 0.0D0 | ||
real(kind=r64), | public | :: | EnergeticEfficCharge | = | 0.0D0 | ||
real(kind=r64), | public | :: | EnergeticEfficDischarge | = | 0.0D0 | ||
real(kind=r64), | public | :: | MaxPowerDraw | = | 0.0D0 | ||
real(kind=r64), | public | :: | MaxPowerStore | = | 0.0D0 | ||
real(kind=r64), | public | :: | MaxEnergyCapacity | = | 0.0D0 | ||
integer, | public | :: | ParallelNum | = | 0 | ||
integer, | public | :: | SeriesNum | = | 0 | ||
integer, | public | :: | ChargeCurveNum | = | 0 | ||
integer, | public | :: | DischargeCurveNum | = | 0 | ||
integer, | public | :: | CycleBinNum | = | 0 | ||
real(kind=r64), | public | :: | StartingSOC | = | 0.0D0 | ||
real(kind=r64), | public | :: | MaxAhCapacity | = | 0.0D0 | ||
real(kind=r64), | public | :: | AvailableFrac | = | 0.0D0 | ||
real(kind=r64), | public | :: | ChargeConversionRate | = | 0.0D0 | ||
real(kind=r64), | public | :: | ChargedOCV | = | 0.0D0 | ||
real(kind=r64), | public | :: | DischargedOCV | = | 0.0D0 | ||
real(kind=r64), | public | :: | InternalR | = | 0.0D0 | ||
real(kind=r64), | public | :: | MaxDischargeI | = | 0.0D0 | ||
real(kind=r64), | public | :: | CutoffV | = | 0.0D0 | ||
real(kind=r64), | public | :: | MaxChargeRate | = | 0.0D0 | ||
integer, | public | :: | LifeCalculation | = | 0 | ||
integer, | public | :: | LifeCurveNum | = | 0 | ||
real(kind=r64), | public | :: | ThisTimeStepStateOfCharge | = | 0.0D0 | ||
real(kind=r64), | public | :: | LastTimeStepStateOfCharge | = | 0.0D0 | ||
real(kind=r64), | public | :: | PelNeedFromStorage | = | 0.0D0 | ||
real(kind=r64), | public | :: | PelFromStorage | = | 0.0D0 | ||
logical, | public | :: | EMSOverridePelFromStorage | = | .FALSE. | ||
real(kind=r64), | public | :: | EMSValuePelFromStorage | = | 0.0D0 | ||
real(kind=r64), | public | :: | PelIntoStorage | = | 0.0D0 | ||
logical, | public | :: | EMSOverridePelIntoStorage | = | .FALSE. | ||
real(kind=r64), | public | :: | EMSValuePelIntoStorage | = | 0.0D0 | ||
real(kind=r64), | public | :: | QdotConvZone | = | 0.0D0 | ||
real(kind=r64), | public | :: | QdotRadZone | = | 0.0D0 | ||
real(kind=r64), | public | :: | TimeElapsed | = | 0.0D0 | ||
real(kind=r64), | public | :: | ThisTimeStepAvailable | = | 0.0D0 | ||
real(kind=r64), | public | :: | ThisTimeStepBound | = | 0.0D0 | ||
real(kind=r64), | public | :: | LastTimeStepAvailable | = | 0.0D0 | ||
real(kind=r64), | public | :: | LastTimeStepBound | = | 0.0D0 | ||
real(kind=r64), | public | :: | LastTwoTimeStepAvailable | = | 0.0D0 | ||
real(kind=r64), | public | :: | LastTwoTimeStepBound | = | 0.0D0 | ||
integer, | public | :: | count0 | = | 0 | ||
real(kind=r64), | public, | DIMENSION(:), ALLOCATABLE | :: | B10 | |||
real(kind=r64), | public, | DIMENSION(:), ALLOCATABLE | :: | X0 | |||
real(kind=r64), | public, | DIMENSION(:), ALLOCATABLE | :: | Nmb0 | |||
real(kind=r64), | public, | DIMENSION(:), ALLOCATABLE | :: | OneNmb0 | |||
real(kind=r64), | public | :: | ElectEnergyinStorage | = | 0.0D0 | ||
real(kind=r64), | public | :: | StoredPower | = | 0.0D0 | ||
real(kind=r64), | public | :: | StoredEnergy | = | 0.0D0 | ||
real(kind=r64), | public | :: | DecrementedEnergyStored | = | 0.0D0 | ||
real(kind=r64), | public | :: | DrawnPower | = | 0.0D0 | ||
real(kind=r64), | public | :: | DrawnEnergy | = | 0.0D0 | ||
real(kind=r64), | public | :: | ThermLossRate | = | 0.0D0 | ||
real(kind=r64), | public | :: | ThermLossEnergy | = | 0.0D0 | ||
integer, | public | :: | StorageMode | = | 0 | ||
real(kind=r64), | public | :: | AbsoluteSOC | = | 0.0D0 | ||
real(kind=r64), | public | :: | FractionSOC | = | 0.0D0 | ||
real(kind=r64), | public | :: | BatteryCurrent | = | 0.0D0 | ||
real(kind=r64), | public | :: | BatteryVoltage | = | 0.0D0 | ||
real(kind=r64), | public | :: | BatteryDamage | = | 0.0D0 |
TYPE, PUBLIC :: ElecStorageDataStruct
!user defined variables
CHARACTER(len=MaxNameLength) :: Name = ' ' !name of this electrical storage module
INTEGER :: StorageModelMode = 0 ! type of model parameter, SimpleBucketStorage
INTEGER :: AvailSchedPtr = 0 ! availability schedule index.
INTEGER :: HeatLossesDestination = 0 ! mode for where thermal losses go
INTEGER :: ZoneNum = 0 ! destination zone for heat losses from inverter.
REAL(r64) :: ZoneRadFract = 0.0D0 ! radiative fraction for thermal losses to zone
REAL(r64) :: StartingEnergyStored = 0.0D0 ![J] joules inside at beginning of environment period
REAL(r64) :: EnergeticEfficCharge = 0.0D0 ! [ ] efficiency of charging
REAL(r64) :: EnergeticEfficDischarge = 0.0D0 ! [ ] efficiency of discharging
REAL(r64) :: MaxPowerDraw = 0.0D0 ! [W] max rate of discharge
REAL(r64) :: MaxPowerStore = 0.0D0 ! [W] max rate of charge
REAL(r64) :: MaxEnergyCapacity = 0.0D0 ! [J] max storage capacity
INTEGER :: ParallelNum = 0 ! [ ] number of battery modules in parallel
INTEGER :: SeriesNum = 0 ! [ ] number of battery modules in series
INTEGER :: ChargeCurveNum = 0 ! [ ] voltage change curve index number for charging
INTEGER :: DischargeCurveNum = 0 ! [ ] voltage change curve index number for discharging
INTEGER :: CycleBinNum = 0 ! [ ] number of cycle bins
REAL(r64) :: StartingSOC = 0.0D0 ! [ ] initial fractional state of charge
REAL(r64) :: MaxAhCapacity = 0.0D0 ! [Ah]maximum capacity
REAL(r64) :: AvailableFrac = 0.0D0 ! [ ] fraction of available charge capacity
REAL(r64) :: ChargeConversionRate = 0.0D0 ! [1/h]change rate from bound charge energy to available charge
REAL(r64) :: ChargedOCV = 0.0D0 ! [V] fully charged oppen circuit voltage
REAL(r64) :: DischargedOCV = 0.0D0 ! [V] fully discharged open circuit voltage
REAL(r64) :: InternalR = 0.0D0 ! [ohm]internal electric resistance
REAL(r64) :: MaxDischargeI = 0.0D0 ! [A] maximum discharging current
REAL(r64) :: CutoffV = 0.0D0 ! [V] cut-off voltage
REAL(r64) :: MaxChargeRate = 0.0D0 ! [1/h]charge rate limit
INTEGER :: LifeCalculation = 0 ! [ ]battery life calculation: Yes or No
INTEGER :: LifeCurveNum = 0 ! [ ]battery life curve name index number
!calculated and from elsewhere vars
REAL(r64) :: ThisTimeStepStateOfCharge = 0.0D0 ! [J]
REAL(r64) :: LastTimeStepStateOfCharge = 0.0D0 ! [J]
REAL(r64) :: PelNeedFromStorage = 0.0D0 ! [W]
REAL(r64) :: PelFromStorage = 0.0D0 ! [W]
LOGICAL :: EMSOverridePelFromStorage = .FALSE. ! if true, EMS calling for override
REAL(r64) :: EMSValuePelFromStorage = 0.0D0 ! value EMS is directing to use, power from storage [W]
REAL(r64) :: PelIntoStorage = 0.0D0 ! [W]
LOGICAL :: EMSOverridePelIntoStorage = .FALSE. ! if true, EMS calling for override
REAL(r64) :: EMSValuePelIntoStorage = 0.0D0 ! value EMS is directing to use, power into storage [W]
REAL(r64) :: QdotConvZone = 0.0D0 ! [W]
REAL(r64) :: QdotRadZone = 0.0D0 ! [W]
REAL(r64) :: TimeElapsed = 0.0D0 ! [h]
REAL(r64) :: ThisTimeStepAvailable = 0.0D0 ! [Ah] available charge at the current timestep
REAL(r64) :: ThisTimeStepBound = 0.0D0 ! [Ah] bound charge at the current timestep
REAL(r64) :: LastTimeStepAvailable = 0.0D0 ! [Ah] available charge at the previous timestep
REAL(r64) :: LastTimeStepBound = 0.0D0 ! [Ah] bound charge at the previous timestep
REAL(r64) :: LastTwoTimeStepAvailable = 0.0D0 ! [Ah] available charge at the previous two timesteps
REAL(r64) :: LastTwoTimeStepBound = 0.0D0 ! [Ah] bound charge at the previous two timesteps
!battery life calculation variables
INTEGER :: count0 = 0
REAL(r64), DIMENSION(:), ALLOCATABLE :: B10
REAL(r64), DIMENSION(:), ALLOCATABLE :: X0
REAL(r64), DIMENSION(:), ALLOCATABLE :: Nmb0
REAL(r64), DIMENSION(:), ALLOCATABLE :: OneNmb0
!report
REAL(r64) :: ElectEnergyinStorage = 0.0D0 ! [J] state of charge
REAL(r64) :: StoredPower = 0.0D0 ! [W]
REAL(r64) :: StoredEnergy = 0.0D0 ! [J]
REAL(r64) :: DecrementedEnergyStored = 0.0D0 ! [J] this is the negative of StoredEnergy
REAL(r64) :: DrawnPower = 0.0D0 ! [W]
REAL(r64) :: DrawnEnergy = 0.0D0 ! [J]
REAL(r64) :: ThermLossRate = 0.0D0 ! [W]
REAL(r64) :: ThermLossEnergy = 0.0D0 ! [J]
INTEGER :: StorageMode = 0 ! [ ] mode of operation 0 for idle, 1 for discharging, 2 for charging
REAL(r64) :: AbsoluteSOC = 0.0D0 ! [Ah] total state of charge
REAL(r64) :: FractionSOC = 0.0D0 ! [ ] fractional state of charge
REAL(r64) :: BatteryCurrent = 0.0D0 ! [A] total current
REAL(r64) :: BatteryVoltage = 0.0D0 ! [V] total voltage
REAL(r64) :: BatteryDamage = 0.0D0 ! [ ] fractional battery damage
END TYPE ElecStorageDataStruct