29 std::string
ID{
"StorageUnit" };
46 void setID(std::string IDi) {
ID = std::move(IDi); }
51 virtual double Cap()
const = 0;
55 virtual double I()
const = 0;
82 virtual double V() = 0;
87 virtual double Vmin()
const = 0;
88 virtual double VMIN()
const = 0;
89 virtual double Vmax()
const = 0;
90 virtual double VMAX()
const = 0;
93 virtual double T() = 0;
96 virtual double thermalModel(
int Nneighb,
double Tneighb[],
double Kneighb[],
double Aneighb[],
double tim) = 0;
97 virtual void setT(
double Tnew) = 0;
102 virtual void timeStep_CC(
double dt,
int steps = 1) = 0;
106 virtual void writeData(
const std::string &prefix) = 0;
113template <
typename T,
typename... Args>
Definition: Deep_ptr.hpp:23
Definition: StorageUnit.hpp:27
virtual double getThotSpot()=0
the T of the hottest element in the SU
bool blockDegAndTherm
if true, degradation and the thermal ODE are ignored
Definition: StorageUnit.hpp:31
std::span< double > viewStates_t
Definition: StorageUnit.hpp:34
virtual void setT(double Tnew)=0
functionality
virtual void writeData(const std::string &prefix)=0
StorageUnit * parent
pointer to the SU 'above' this one [e.g. the module to which a cell is connected]
Definition: StorageUnit.hpp:30
const std::string & getID()
Definition: StorageUnit.hpp:45
virtual Status setVoltage(double Vnew, bool checkI=true, bool print=true)
Definition: StorageUnit.hpp:67
StorageUnit()=default
< basic getters and setters
virtual void timeStep_CC(double dt, int steps=1)=0
take a number of time steps
virtual double getOCV()=0
std::string ID
identification string
Definition: StorageUnit.hpp:29
virtual ~StorageUnit()=default
virtual double getThermalSurface()=0
return the 'A' for the thermal model of this SU (Q = hA*dT)
virtual double Vmin() const =0
lower voltage limit of the cell
virtual double I() const =0
virtual size_t getNcells()=0
return the number of single cells connected to this SU
virtual size_t calculateNcells()
Definition: StorageUnit.hpp:35
virtual void backupStates()
Back-up states.
Definition: StorageUnit.hpp:75
virtual double thermalModel(int Nneighb, double Tneighb[], double Kneighb[], double Aneighb[], double tim)=0
calculate the thermal model of this SU
virtual double getVhigh()=0
return the voltage of the cell with the highest voltage
virtual void restoreStates()
restore backed-up states.
Definition: StorageUnit.hpp:76
virtual void setParent(StorageUnit *p)
set the parent
Definition: StorageUnit.hpp:65
virtual double VMAX() const =0
safety cut off
virtual viewStates_t viewStates()
Only for cells to see individual states.
Definition: StorageUnit.hpp:63
virtual void getStates(getStates_t s)=0
returns one long array with the states
bool isCharging()
negative means charge.
Definition: StorageUnit.hpp:59
bool isDischarging()
positive means discharge.
Definition: StorageUnit.hpp:60
virtual void storeData()=0
virtual Status setStates(setStates_t s, bool checkStates=true, bool print=true)=0
opposite of getStates, check the states are valid?
virtual double Vmax() const =0
upper voltage limit of the cell
auto * getParent()
Definition: StorageUnit.hpp:53
virtual double getVlow()=0
return the voltage of the cell with the lowest voltage
virtual Status setCurrent(double Inew, bool checkV=true, bool print=true)=0
virtual double Cap() const =0
virtual double VMIN() const =0
safety cut off
std::span< double > & setStates_t
To pass states to read, non-expandable container.
Definition: StorageUnit.hpp:32
virtual StorageUnit * copy()=0
copy this SU to a new object
virtual std::string getFullID()
Definition: StorageUnit.hpp:49
StorageUnit(std::string_view ID_, StorageUnit *parent_, bool blockDegAndTherm_)
Definition: StorageUnit.hpp:41
void setBlockDegAndTherm(bool block)
Definition: StorageUnit.hpp:64
std::vector< double > & getStates_t
To pass states to save, expandable container.
Definition: StorageUnit.hpp:33
virtual double V()=0
print is an optional argument
StorageUnit(std::string_view ID_)
Definition: StorageUnit.hpp:40
virtual Status checkVoltage(double &v, bool print) noexcept=0
get the voltage and check if it is valid
void setID(std::string IDi)
Return the full ID string, including the ID of the parent module.
Definition: StorageUnit.hpp:46
virtual bool validStates(bool print=true)=0
checks if a state array is valid
virtual double getRtot()=0
Status setVoltage_iterative(Tsu *su, double Vset)
Definition: free_functions.hpp:25
Slide namespace contains all the types, classes, and functions for the simulation framework.
Definition: Cell.hpp:27
auto make_SU(Args &&...args)
Definition: StorageUnit.hpp:114
Status
Definition: Status.hpp:15