Tutorial 5 - Simulate CC-CV Cycling

Introduction

In this tutorial, we will use a P2D model to simulate CC-CV cycling. After completing this tutorial, you should have a working knowledge of:
In the CC-CV cycling, the cell is discharged at constant current (CC) and then the charging is also done at constant current till we get close to the upper cut-off voltage and then it is switched to constant voltage mode, where the cell potential is kept constant and the charging current falls off.
We'll use the same model from Tutorial 1.
jsonstruct = parseBattmoJson('Examples/jsondatafiles/sample_input.json');
Parameters are defined in the JSON parameter file and parsed into the MATLAB structure. Once the JSON file has been read into MATLAB as a jsonstruct, its properties can be modified programmatically.

Explore the Control Definition

Let's begin by reviewing the control protocol in BattMo, with the command:
disp(jsonstruct.Control)
controlPolicy: 'CCDischarge' CRate: 1 lowerCutoffVoltage: 2.4000 upperCutoffVoltage: 4.1000 dIdtLimit: 0.0100 dEdtLimit: 0.0100 rampupTime: 0.1000
We see that the default control protocol is set to a constant current (galvanostatic) discharge. To change to a CC-CV cycling protocol, we can use the command:
cccv_control_protocol = parseBattmoJson('cccv_control.json');
jsonstruct_modified = mergeJsonStructs({cccv_control_protocol, jsonstruct});
parameter Control.controlPolicy is assigned twice with different values. we use the value from first jsonstruct. parameter Control.lowerCutoffVoltage is assigned twice with different values. we use the value from first jsonstruct.
Now we can explore the modified control protocol definition with the command:
disp(jsonstruct_modified.Control)
controlPolicy: 'CCCV' initialControl: 'discharging' CRate: 1 lowerCutoffVoltage: 2.6000 upperCutoffVoltage: 4.1000 dIdtLimit: 0.0100 dEdtLimit: 0.0100 rampupTime: 0.1000
 
jsonstruct_modified.NegativeElectrode.Coating.thickness = 32.*micro;
Let's run the simulation and plot the cell voltage curve.
% run the simulation
output_01 = runBatteryJson(jsonstruct_modified);
Warning: Number of cycles has not been given in CCCV control. We use numberOfCycles = 1.
Warning: Both the total time and the number of cycles are given.\nWe do not use the given total time value but compute it instead from the number of cycles.
Solving timestep 01/45: -> 6 Seconds, 187 Milliseconds Solving timestep 02/45: 6 Seconds, 187 Milliseconds -> 12 Seconds, 375 Milliseconds Solving timestep 03/45: 12 Seconds, 375 Milliseconds -> 24 Seconds, 750 Milliseconds Solving timestep 04/45: 24 Seconds, 750 Milliseconds -> 49 Seconds, 500 Milliseconds Solving timestep 05/45: 49 Seconds, 500 Milliseconds -> 99 Seconds Solving timestep 06/45: 99 Seconds -> 198 Seconds Solving timestep 07/45: 198 Seconds -> 396 Seconds Solving timestep 08/45: 396 Seconds -> 594 Seconds Solving timestep 09/45: 594 Seconds -> 792 Seconds Solving timestep 10/45: 792 Seconds -> 990 Seconds Solving timestep 11/45: 990 Seconds -> 1188 Seconds Solving timestep 12/45: 1188 Seconds -> 1386 Seconds Solving timestep 13/45: 1386 Seconds -> 1584 Seconds Solving timestep 14/45: 1584 Seconds -> 1782 Seconds Solving timestep 15/45: 1782 Seconds -> 1980 Seconds Solving timestep 16/45: 1980 Seconds -> 2178 Seconds Solving timestep 17/45: 2178 Seconds -> 2376 Seconds Solving timestep 18/45: 2376 Seconds -> 2574 Seconds Solving timestep 19/45: 2574 Seconds -> 2772 Seconds Solving timestep 20/45: 2772 Seconds -> 2970 Seconds Solving timestep 21/45: 2970 Seconds -> 3168 Seconds Solving timestep 22/45: 3168 Seconds -> 3366 Seconds Solving timestep 23/45: 3366 Seconds -> 3564 Seconds Solving timestep 24/45: 3564 Seconds -> 1 Hour, 162 Seconds Solving timestep 25/45: 1 Hour, 162 Seconds -> 1 Hour, 360 Seconds Solving timestep 26/45: 1 Hour, 360 Seconds -> 1 Hour, 558 Seconds Solving timestep 27/45: 1 Hour, 558 Seconds -> 1 Hour, 756 Seconds switch control from CC_discharge1 to CC_discharge2 Switch control type from CC_discharge2 to CC_charge1 Solving timestep 28/45: 1 Hour, 756 Seconds -> 1 Hour, 954 Seconds Solving timestep 29/45: 1 Hour, 954 Seconds -> 1 Hour, 1152 Seconds Solving timestep 30/45: 1 Hour, 1152 Seconds -> 1 Hour, 1350 Seconds Solving timestep 31/45: 1 Hour, 1350 Seconds -> 1 Hour, 1548 Seconds Solving timestep 32/45: 1 Hour, 1548 Seconds -> 1 Hour, 1746 Seconds Solving timestep 33/45: 1 Hour, 1746 Seconds -> 1 Hour, 1944 Seconds Solving timestep 34/45: 1 Hour, 1944 Seconds -> 1 Hour, 2142 Seconds Solving timestep 35/45: 1 Hour, 2142 Seconds -> 1 Hour, 2340 Seconds Solving timestep 36/45: 1 Hour, 2340 Seconds -> 1 Hour, 2538 Seconds Solving timestep 37/45: 1 Hour, 2538 Seconds -> 1 Hour, 2736 Seconds Solving timestep 38/45: 1 Hour, 2736 Seconds -> 1 Hour, 2934 Seconds Solving timestep 39/45: 1 Hour, 2934 Seconds -> 1 Hour, 3132 Seconds Solving timestep 40/45: 1 Hour, 3132 Seconds -> 1 Hour, 3330 Seconds Solving timestep 41/45: 1 Hour, 3330 Seconds -> 1 Hour, 3528 Seconds Solving timestep 42/45: 1 Hour, 3528 Seconds -> 2 Hours, 126 Seconds Solving timestep 43/45: 2 Hours, 126 Seconds -> 2 Hours, 324 Seconds Solving timestep 44/45: 2 Hours, 324 Seconds -> 2 Hours, 522 Seconds Solving timestep 45/45: 2 Hours, 522 Seconds -> 2 Hours, 720 Seconds Switch control type from CV_charge2 to CC_discharge1 *** Simulation complete. Solved 45 control steps in 4 Seconds, 497 Milliseconds (termination triggered by stopFunction) ***
get the states
states_01 = output_01.states;
% instantiate an empty figure
figure()
% extract the time and voltage quantities
time = cellfun(@(state) state.time, states_01);
voltage = cellfun(@(state) state.('Control').E, states_01);
current = cellfun(@(state) state.('Control').I, states_01);
 
% calculate the capacity
capacity = time .* current;
index=find(capacity == 0);
% plot the discharge curve in the figure
 
plot(time/(hour), voltage, '-', 'linewidth', 3)
 
% add plot annotations
xlabel('Time / h')
ylabel('Cell Voltage / V')
Now let us create electrodes of different thickeness' and run through the CC-CV cycling to see how thickness affects the cell's capacity.
% create a vector of diffent thickness values
thickness = [16,32,64,128].*micro;
markers={'-','-','-','o'};
% instantiate and empty cell array to store the outputs of the simulations
output = cell(size(thickness));
 
% instantiate an empty figure
figure()
 
% use a for-loop to iterate through the vector of c-rates
for i = 1 : numel(thickness)
% modify the value for the coating thickness for the negative electrode
jsonstruct_modified.NegativeElectrode.Coating.thickness = thickness(i);
% run the simulation and store the results in the output cell array
output{i} = runBatteryJson(jsonstruct_modified);
% retrieve the states from the simulation result
states = output{i}.states;
% extract the time and voltage quantities
time = cellfun(@(state) state.time, states);
voltage = cellfun(@(state) state.('Control').E, states);
current = cellfun(@(state) state.('Control').I, states);
% calculate the capacity
capacity = time .* current;
index=find(capacity == 0);
% plot only the discharge part of the curve in the figure
plot((capacity(1:index-1)/(hour*milli)), voltage(1:index-1), markers{i}, 'linewidth', 3)
hold on
end
Warning: Number of cycles has not been given in CCCV control. We use numberOfCycles = 1.
Warning: Both the total time and the number of cycles are given.\nWe do not use the given total time value but compute it instead from the number of cycles.
Solving timestep 01/45: -> 6 Seconds, 187 Milliseconds Solving timestep 02/45: 6 Seconds, 187 Milliseconds -> 12 Seconds, 375 Milliseconds Solving timestep 03/45: 12 Seconds, 375 Milliseconds -> 24 Seconds, 750 Milliseconds Solving timestep 04/45: 24 Seconds, 750 Milliseconds -> 49 Seconds, 500 Milliseconds Solving timestep 05/45: 49 Seconds, 500 Milliseconds -> 99 Seconds Solving timestep 06/45: 99 Seconds -> 198 Seconds Solving timestep 07/45: 198 Seconds -> 396 Seconds Solving timestep 08/45: 396 Seconds -> 594 Seconds Solving timestep 09/45: 594 Seconds -> 792 Seconds Solving timestep 10/45: 792 Seconds -> 990 Seconds Solving timestep 11/45: 990 Seconds -> 1188 Seconds Solving timestep 12/45: 1188 Seconds -> 1386 Seconds Solving timestep 13/45: 1386 Seconds -> 1584 Seconds Solving timestep 14/45: 1584 Seconds -> 1782 Seconds Solving timestep 15/45: 1782 Seconds -> 1980 Seconds Solving timestep 16/45: 1980 Seconds -> 2178 Seconds Solving timestep 17/45: 2178 Seconds -> 2376 Seconds Solving timestep 18/45: 2376 Seconds -> 2574 Seconds Solving timestep 19/45: 2574 Seconds -> 2772 Seconds Solving timestep 20/45: 2772 Seconds -> 2970 Seconds Solving timestep 21/45: 2970 Seconds -> 3168 Seconds Solving timestep 22/45: 3168 Seconds -> 3366 Seconds Solving timestep 23/45: 3366 Seconds -> 3564 Seconds Solving timestep 24/45: 3564 Seconds -> 1 Hour, 162 Seconds Solving timestep 25/45: 1 Hour, 162 Seconds -> 1 Hour, 360 Seconds Solving timestep 26/45: 1 Hour, 360 Seconds -> 1 Hour, 558 Seconds Solving timestep 27/45: 1 Hour, 558 Seconds -> 1 Hour, 756 Seconds switch control from CC_discharge1 to CC_discharge2 Switch control type from CC_discharge2 to CC_charge1 Solving timestep 28/45: 1 Hour, 756 Seconds -> 1 Hour, 954 Seconds Solving timestep 29/45: 1 Hour, 954 Seconds -> 1 Hour, 1152 Seconds Solving timestep 30/45: 1 Hour, 1152 Seconds -> 1 Hour, 1350 Seconds Solving timestep 31/45: 1 Hour, 1350 Seconds -> 1 Hour, 1548 Seconds Solving timestep 32/45: 1 Hour, 1548 Seconds -> 1 Hour, 1746 Seconds Solving timestep 33/45: 1 Hour, 1746 Seconds -> 1 Hour, 1944 Seconds Solving timestep 34/45: 1 Hour, 1944 Seconds -> 1 Hour, 2142 Seconds Solving timestep 35/45: 1 Hour, 2142 Seconds -> 1 Hour, 2340 Seconds Solving timestep 36/45: 1 Hour, 2340 Seconds -> 1 Hour, 2538 Seconds Solving timestep 37/45: 1 Hour, 2538 Seconds -> 1 Hour, 2736 Seconds Solving timestep 38/45: 1 Hour, 2736 Seconds -> 1 Hour, 2934 Seconds Solving timestep 39/45: 1 Hour, 2934 Seconds -> 1 Hour, 3132 Seconds Solving timestep 40/45: 1 Hour, 3132 Seconds -> 1 Hour, 3330 Seconds Solving timestep 41/45: 1 Hour, 3330 Seconds -> 1 Hour, 3528 Seconds Solving timestep 42/45: 1 Hour, 3528 Seconds -> 2 Hours, 126 Seconds Solving timestep 43/45: 2 Hours, 126 Seconds -> 2 Hours, 324 Seconds Solving timestep 44/45: 2 Hours, 324 Seconds -> 2 Hours, 522 Seconds Switch control type from CV_charge2 to CC_discharge1 *** Simulation complete. Solved 44 control steps in 4 Seconds, 765 Milliseconds (termination triggered by stopFunction) ***
Warning: Number of cycles has not been given in CCCV control. We use numberOfCycles = 1.
Warning: Both the total time and the number of cycles are given.\nWe do not use the given total time value but compute it instead from the number of cycles.
Solving timestep 01/45: -> 6 Seconds, 187 Milliseconds Solving timestep 02/45: 6 Seconds, 187 Milliseconds -> 12 Seconds, 375 Milliseconds Solving timestep 03/45: 12 Seconds, 375 Milliseconds -> 24 Seconds, 750 Milliseconds Solving timestep 04/45: 24 Seconds, 750 Milliseconds -> 49 Seconds, 500 Milliseconds Solving timestep 05/45: 49 Seconds, 500 Milliseconds -> 99 Seconds Solving timestep 06/45: 99 Seconds -> 198 Seconds Solving timestep 07/45: 198 Seconds -> 396 Seconds Solving timestep 08/45: 396 Seconds -> 594 Seconds Solving timestep 09/45: 594 Seconds -> 792 Seconds Solving timestep 10/45: 792 Seconds -> 990 Seconds Solving timestep 11/45: 990 Seconds -> 1188 Seconds Solving timestep 12/45: 1188 Seconds -> 1386 Seconds Solving timestep 13/45: 1386 Seconds -> 1584 Seconds Solving timestep 14/45: 1584 Seconds -> 1782 Seconds Solving timestep 15/45: 1782 Seconds -> 1980 Seconds Solving timestep 16/45: 1980 Seconds -> 2178 Seconds Solving timestep 17/45: 2178 Seconds -> 2376 Seconds Solving timestep 18/45: 2376 Seconds -> 2574 Seconds Solving timestep 19/45: 2574 Seconds -> 2772 Seconds Solving timestep 20/45: 2772 Seconds -> 2970 Seconds Solving timestep 21/45: 2970 Seconds -> 3168 Seconds Solving timestep 22/45: 3168 Seconds -> 3366 Seconds Solving timestep 23/45: 3366 Seconds -> 3564 Seconds Solving timestep 24/45: 3564 Seconds -> 1 Hour, 162 Seconds Solving timestep 25/45: 1 Hour, 162 Seconds -> 1 Hour, 360 Seconds Solving timestep 26/45: 1 Hour, 360 Seconds -> 1 Hour, 558 Seconds Solving timestep 27/45: 1 Hour, 558 Seconds -> 1 Hour, 756 Seconds switch control from CC_discharge1 to CC_discharge2 Switch control type from CC_discharge2 to CC_charge1 Solving timestep 28/45: 1 Hour, 756 Seconds -> 1 Hour, 954 Seconds Solving timestep 29/45: 1 Hour, 954 Seconds -> 1 Hour, 1152 Seconds Solving timestep 30/45: 1 Hour, 1152 Seconds -> 1 Hour, 1350 Seconds Solving timestep 31/45: 1 Hour, 1350 Seconds -> 1 Hour, 1548 Seconds Solving timestep 32/45: 1 Hour, 1548 Seconds -> 1 Hour, 1746 Seconds Solving timestep 33/45: 1 Hour, 1746 Seconds -> 1 Hour, 1944 Seconds Solving timestep 34/45: 1 Hour, 1944 Seconds -> 1 Hour, 2142 Seconds Solving timestep 35/45: 1 Hour, 2142 Seconds -> 1 Hour, 2340 Seconds Solving timestep 36/45: 1 Hour, 2340 Seconds -> 1 Hour, 2538 Seconds Solving timestep 37/45: 1 Hour, 2538 Seconds -> 1 Hour, 2736 Seconds Solving timestep 38/45: 1 Hour, 2736 Seconds -> 1 Hour, 2934 Seconds Solving timestep 39/45: 1 Hour, 2934 Seconds -> 1 Hour, 3132 Seconds Solving timestep 40/45: 1 Hour, 3132 Seconds -> 1 Hour, 3330 Seconds Solving timestep 41/45: 1 Hour, 3330 Seconds -> 1 Hour, 3528 Seconds Solving timestep 42/45: 1 Hour, 3528 Seconds -> 2 Hours, 126 Seconds Solving timestep 43/45: 2 Hours, 126 Seconds -> 2 Hours, 324 Seconds Solving timestep 44/45: 2 Hours, 324 Seconds -> 2 Hours, 522 Seconds Solving timestep 45/45: 2 Hours, 522 Seconds -> 2 Hours, 720 Seconds Switch control type from CV_charge2 to CC_discharge1 *** Simulation complete. Solved 45 control steps in 4 Seconds, 525 Milliseconds (termination triggered by stopFunction) ***
Warning: Number of cycles has not been given in CCCV control. We use numberOfCycles = 1.
Warning: Both the total time and the number of cycles are given.\nWe do not use the given total time value but compute it instead from the number of cycles.
Solving timestep 01/45: -> 6 Seconds, 187 Milliseconds Solving timestep 02/45: 6 Seconds, 187 Milliseconds -> 12 Seconds, 375 Milliseconds Solving timestep 03/45: 12 Seconds, 375 Milliseconds -> 24 Seconds, 750 Milliseconds Solving timestep 04/45: 24 Seconds, 750 Milliseconds -> 49 Seconds, 500 Milliseconds Solving timestep 05/45: 49 Seconds, 500 Milliseconds -> 99 Seconds Solving timestep 06/45: 99 Seconds -> 198 Seconds Solving timestep 07/45: 198 Seconds -> 396 Seconds Solving timestep 08/45: 396 Seconds -> 594 Seconds Solving timestep 09/45: 594 Seconds -> 792 Seconds Solving timestep 10/45: 792 Seconds -> 990 Seconds Solving timestep 11/45: 990 Seconds -> 1188 Seconds Solving timestep 12/45: 1188 Seconds -> 1386 Seconds Solving timestep 13/45: 1386 Seconds -> 1584 Seconds Solving timestep 14/45: 1584 Seconds -> 1782 Seconds Solving timestep 15/45: 1782 Seconds -> 1980 Seconds Solving timestep 16/45: 1980 Seconds -> 2178 Seconds Solving timestep 17/45: 2178 Seconds -> 2376 Seconds Solving timestep 18/45: 2376 Seconds -> 2574 Seconds Solving timestep 19/45: 2574 Seconds -> 2772 Seconds Solving timestep 20/45: 2772 Seconds -> 2970 Seconds Solving timestep 21/45: 2970 Seconds -> 3168 Seconds Solving timestep 22/45: 3168 Seconds -> 3366 Seconds Solving timestep 23/45: 3366 Seconds -> 3564 Seconds Solving timestep 24/45: 3564 Seconds -> 1 Hour, 162 Seconds switch control from CC_discharge1 to CC_discharge2 Switch control type from CC_discharge2 to CC_charge1 Solving timestep 25/45: 1 Hour, 162 Seconds -> 1 Hour, 360 Seconds Solving timestep 26/45: 1 Hour, 360 Seconds -> 1 Hour, 558 Seconds Solving timestep 27/45: 1 Hour, 558 Seconds -> 1 Hour, 756 Seconds Solving timestep 28/45: 1 Hour, 756 Seconds -> 1 Hour, 954 Seconds Solving timestep 29/45: 1 Hour, 954 Seconds -> 1 Hour, 1152 Seconds Solving timestep 30/45: 1 Hour, 1152 Seconds -> 1 Hour, 1350 Seconds Solving timestep 31/45: 1 Hour, 1350 Seconds -> 1 Hour, 1548 Seconds Solving timestep 32/45: 1 Hour, 1548 Seconds -> 1 Hour, 1746 Seconds Solving timestep 33/45: 1 Hour, 1746 Seconds -> 1 Hour, 1944 Seconds Solving timestep 34/45: 1 Hour, 1944 Seconds -> 1 Hour, 2142 Seconds Solving timestep 35/45: 1 Hour, 2142 Seconds -> 1 Hour, 2340 Seconds Solving timestep 36/45: 1 Hour, 2340 Seconds -> 1 Hour, 2538 Seconds Solving timestep 37/45: 1 Hour, 2538 Seconds -> 1 Hour, 2736 Seconds Solving timestep 38/45: 1 Hour, 2736 Seconds -> 1 Hour, 2934 Seconds Solving timestep 39/45: 1 Hour, 2934 Seconds -> 1 Hour, 3132 Seconds Switch control type from CV_charge2 to CC_discharge1 *** Simulation complete. Solved 39 control steps in 4 Seconds, 661 Milliseconds (termination triggered by stopFunction) ***
Warning: Number of cycles has not been given in CCCV control. We use numberOfCycles = 1.
Warning: Both the total time and the number of cycles are given.\nWe do not use the given total time value but compute it instead from the number of cycles.
Solving timestep 01/45: -> 6 Seconds, 187 Milliseconds Solving timestep 02/45: 6 Seconds, 187 Milliseconds -> 12 Seconds, 375 Milliseconds Solving timestep 03/45: 12 Seconds, 375 Milliseconds -> 24 Seconds, 750 Milliseconds Solving timestep 04/45: 24 Seconds, 750 Milliseconds -> 49 Seconds, 500 Milliseconds Solving timestep 05/45: 49 Seconds, 500 Milliseconds -> 99 Seconds Solving timestep 06/45: 99 Seconds -> 198 Seconds Solving timestep 07/45: 198 Seconds -> 396 Seconds Solving timestep 08/45: 396 Seconds -> 594 Seconds Solving timestep 09/45: 594 Seconds -> 792 Seconds Solving timestep 10/45: 792 Seconds -> 990 Seconds Solving timestep 11/45: 990 Seconds -> 1188 Seconds Solving timestep 12/45: 1188 Seconds -> 1386 Seconds Solving timestep 13/45: 1386 Seconds -> 1584 Seconds Solving timestep 14/45: 1584 Seconds -> 1782 Seconds Solving timestep 15/45: 1782 Seconds -> 1980 Seconds Solving timestep 16/45: 1980 Seconds -> 2178 Seconds Solving timestep 17/45: 2178 Seconds -> 2376 Seconds Solving timestep 18/45: 2376 Seconds -> 2574 Seconds Solving timestep 19/45: 2574 Seconds -> 2772 Seconds Solving timestep 20/45: 2772 Seconds -> 2970 Seconds Solving timestep 21/45: 2970 Seconds -> 3168 Seconds Solving timestep 22/45: 3168 Seconds -> 3366 Seconds Solving timestep 23/45: 3366 Seconds -> 3564 Seconds Solving timestep 24/45: 3564 Seconds -> 1 Hour, 162 Seconds switch control from CC_discharge1 to CC_discharge2 Switch control type from CC_discharge2 to CC_charge1 Solving timestep 25/45: 1 Hour, 162 Seconds -> 1 Hour, 360 Seconds Solving timestep 26/45: 1 Hour, 360 Seconds -> 1 Hour, 558 Seconds Solving timestep 27/45: 1 Hour, 558 Seconds -> 1 Hour, 756 Seconds Solving timestep 28/45: 1 Hour, 756 Seconds -> 1 Hour, 954 Seconds Solving timestep 29/45: 1 Hour, 954 Seconds -> 1 Hour, 1152 Seconds Solving timestep 30/45: 1 Hour, 1152 Seconds -> 1 Hour, 1350 Seconds Solving timestep 31/45: 1 Hour, 1350 Seconds -> 1 Hour, 1548 Seconds Solving timestep 32/45: 1 Hour, 1548 Seconds -> 1 Hour, 1746 Seconds Solving timestep 33/45: 1 Hour, 1746 Seconds -> 1 Hour, 1944 Seconds Solving timestep 34/45: 1 Hour, 1944 Seconds -> 1 Hour, 2142 Seconds Solving timestep 35/45: 1 Hour, 2142 Seconds -> 1 Hour, 2340 Seconds Solving timestep 36/45: 1 Hour, 2340 Seconds -> 1 Hour, 2538 Seconds Solving timestep 37/45: 1 Hour, 2538 Seconds -> 1 Hour, 2736 Seconds Solving timestep 38/45: 1 Hour, 2736 Seconds -> 1 Hour, 2934 Seconds Solving timestep 39/45: 1 Hour, 2934 Seconds -> 1 Hour, 3132 Seconds Solver did not converge in 10 iterations for timestep of length 198 Seconds. Cutting timestep. Solver did not converge in 10 iterations for timestep of length 99 Seconds. Cutting timestep. Solver did not converge in 10 iterations for timestep of length 49 Seconds, 500 Milliseconds. Cutting timestep. Switch control type from CV_charge2 to CC_discharge1 *** Simulation complete. Solved 39 control steps in 22 Seconds, 707 Milliseconds (termination triggered by stopFunction) ***
hold off
xlabel('Capacity / mA \cdot h')
ylabel('Voltage / V')
legend('t_{NE} = 16 µm', 't_{NE} = 32 µm', 't_{NE} = 64 µm','t_{NE} = 128 µm')
We see that increasing the thickness of the negative electrode beyond a certain value has no effect on the capacity of the cell, since the Li source (at the cathode and its thickness) isn't changing.

Summary

In this tutorial, we explored how to modify control parameters in BattMo and simulate CC-CV cycling of NMC-Graphite cell at a CRate of 1 and also saw the effect of thickness on cell capacity.