Calculating battery current during charging in CCCV
There are several effects that can be modeled with increasing complexity, among them:  


Open Circuit Voltage (ideal voltage source, current unrelated to voltage)  
Stage of charge (tracks capacity/efficiency and has memory) 
Linear polarization (adds series resistance)
Diffusion voltages (discharge creates polarization, and departure from Open Cell Voltage)
Warburg impedance (models electrolyte)


What you want to model at minimum would be a state of charge model.

Edit: 

If your confused about how to calculate the current and voltage for a simple model this is how it works. Lets look at a simple battery model 

v(t) = OCV(z(t)) − i (t)*R0.



To calculate the voltage the first thing you will need is the OCV vs state of charge curve, which you have shown above. OCV(z(t)) can run from 0 to 100% or in your case 0 to 40Ah. (If you wanted to you could multiply the graph by 100/40Ah to get the SOC in percent)

You then need to keep track of where you are on the SOC curve, so in time the update state would be 

\$z[k + 1] = z[k] − i[k]\frac{\Delta t}{Q} \$

to find the new SOC (z[k] is the SOC and it could be in Ah or percent depending on how you keep track of it, k is the current time step, k+1 is the new time step). i[k] is calculated from your circuit model, the battery needs to be connected to some kind of circuit. The circuit model needs to be a descrete time circuit model. If you don't know how to convert a circuit to a discrete time circuit model, this is the subject of a few EE courses and would take a few pages which is beyond the scope of this site. You need to know:  

1) How to convert a circuit model to a system of equations  

2) How to convert memory elements to discrete time.