SLIDE  3.0.0
A simulator for lithium-ion battery pack degradation
Loading...
Searching...
No Matches
CoolSystem.hpp
Go to the documentation of this file.
1/*
2 * CoolSystem.hpp
3 *
4 * Created on: 29 Apr 2020
5 * Author(s): Jorn Reniers, Volkan Kumtepeli
6 */
7
8#pragma once
9
10#include "../settings/settings.hpp"
11#include "../StorageUnit.hpp"
12#include "../types/Histogram.hpp"
13#include "../types/data_storage/cell_data.hpp"
14
16
17#include <string>
18#include <cstdlib>
19
20namespace slide {
22{
23protected:
26 double flowrate{};
27
29 double fluid_rho;
30 double fluid_cp;
31 double fluid_V;
32
34 size_t Ncells{ 0 };
35
38 // 1 always on
48 double Across;
49 double eta{ 0.5 };
50
51 friend struct CoolSystemData;
52
53public:
55 CoolSystem();
56 CoolSystem(size_t Ncells, int control);
57 virtual ~CoolSystem() = default;
58
59 double T() { return Tcoolant; }
60 void setT(double Tnew);
61 virtual double dstate(double Etot, double Echildren, double t);
62
63 virtual double getH();
64 auto getFlr() { return flowrate; }
65 auto getControl() { return control_strategy; }
68
70 virtual void control(double Thot_local, double Thot_global);
71
72 virtual void storeData(size_t Ncells);
73 virtual void writeData(const std::string &prefix);
74
77 auto getTotalTime() { return coolData.cData.t_life; }
78
79 virtual CoolSystem *copy() { return new CoolSystem(*this); }
80};
81
82} // namespace slide
Definition: CoolSystem.hpp:22
auto getControl()
Definition: CoolSystem.hpp:65
void setControl(int control)
Definition: CoolSystem.hpp:69
auto getEoperation()
Definition: CoolSystem.hpp:66
double control_onoff_Ton
T when the system switches on.
Definition: CoolSystem.hpp:43
double control_prop_T
T to which the proportional control cools the children.
Definition: CoolSystem.hpp:46
virtual void storeData(size_t Ncells)
Definition: CoolSystem.cpp:282
virtual double getH()
Definition: CoolSystem.cpp:125
size_t Ncells
cooling system properties
Definition: CoolSystem.hpp:34
void setT(double Tnew)
Definition: CoolSystem.cpp:110
void reset_Eoperation()
Definition: CoolSystem.hpp:67
auto getHeatabsorbed()
for unit testing, total heat evacuated from children over entire lifetime (heat capacity not constant...
Definition: CoolSystem.hpp:76
int control_strategy
integer indicating how the cooling is done
Definition: CoolSystem.hpp:37
double eta
efficiency
Definition: CoolSystem.hpp:49
CoolSystem()
Definition: CoolSystem.cpp:20
double control_onoff_flr
flow rate when on
Definition: CoolSystem.hpp:45
virtual ~CoolSystem()=default
virtual void writeData(const std::string &prefix)
Definition: CoolSystem.cpp:315
auto getHeatEvac()
for unit testing, total heat evacuated from children over entire lifetime
Definition: CoolSystem.hpp:75
virtual double dstate(double Etot, double Echildren, double t)
calculate the new coolant temperature from a heat exchange of Etot
Definition: CoolSystem.cpp:174
auto getFlr()
Definition: CoolSystem.hpp:64
double fluid_cp
heat capcity of cooling fluid J / kG / K
Definition: CoolSystem.hpp:30
CoolSystemData coolData
Definition: CoolSystem.hpp:54
double T()
Definition: CoolSystem.hpp:59
double Tcoolant
< state
Definition: CoolSystem.hpp:25
double flowrate
flow rate of cooling fluid [m3/s]
Definition: CoolSystem.hpp:26
virtual CoolSystem * copy()
Definition: CoolSystem.hpp:79
virtual void control(double Thot_local, double Thot_global)
Definition: CoolSystem.cpp:216
double fluid_rho
density of cooling fluid kg / m3
Definition: CoolSystem.hpp:29
auto getTotalTime()
total time this coolsystem has existed for [s]
Definition: CoolSystem.hpp:77
double control_prop_gain
gain of the proportional controller
Definition: CoolSystem.hpp:47
double control_onoff_Toff
T when the system switches off.
Definition: CoolSystem.hpp:44
double Across
cross section of the fluid [m2], used to convert flow rate to flow speed
Definition: CoolSystem.hpp:48
double fluid_V
total volume of coolant available for this coolsystem m3
Definition: CoolSystem.hpp:31
constexpr double T_ENV
environmental temperature
Definition: settings.hpp:70
Slide namespace contains all the types, classes, and functions for the simulation framework.
Definition: Cell.hpp:27
double Qevac_life
variable for unit testing, total heat evacuated from child SUs over the entire lifetime [J]
Definition: cool_data.hpp:24
double Eoperate
total energy required to operate the coolsystem [J]
Definition: cool_data.hpp:28
double Qabs_life
variable for unit testing, total heat absorbed by heating up the coolant [J]
Definition: cool_data.hpp:25
double t_life
total time in the module's life [s]
Definition: cool_data.hpp:26
Definition: CoolSystemData.hpp:19
CoolSystemCumulative cData
Cumulative variables.
Definition: CoolSystemData.hpp:20