EMAT30008: Scientific Computing

The aim of this exercise is to practise using Jupyter Notebooks to combine written text and Python code.

Lithium-ion batteries power many of today's technologies such as phones, laptops, and electric vehicles. Ensuring that lithium-ion batteries remain cool is critical to ensuring that they remain safe. If the temperature of a lithium-ion battery exceeds 60 ^\circC, then the battery can start to degrade leading to the release of flammable gases.

The temperature of a lithium-ion battery is roughly determined by a balance between the heat that is generated by Joule heating and the heat that is lost into the surrounding environment. The battery temperature can be approximated by the equation

T=Tair+I2Rh, T = T_\mathrm{air} + \frac{I^2 R}{h},

where Tair=23T_\mathrm{air} = 23 ^\circC is the temperature of the air surrounding the battery, R=3×104R = 3 \times 10^{-4} Ohms is electrical resistance of the battery, II is the current being drawn from the battery, and h=1.86×104h = 1.86 \times 10^{-4} W/^\circC is the coefficient of heat transfer between the battery and the environment.

In this exercise, we will examine the thermal response of a battery to different electrical currents with the aim of determining when the battery will be safe to use.

  1. Create a Jupyter Notebook called Battery. This should create a new file called Battery.ipynb

  2. Convert the first cell into a markdown cell. Add a title using heading level one (#). Then use heading level two (##) to create a section called "Introduction". Then add some text and an equation to describe the problem you will be solving. This text could be similar to that above.

  3. Create three new cells. Turn the first into a markdown cell and use heading level two to create a section called "Maximum current". In the second cell, use SciPy's root function to compute the current II at which the battery temperature is equal to 60 ^\circC. Convert the third cell into a markdown cell and write some text on your findings.

  4. Create two new cells. In the first, add a section called "Alternating current". Suppose that an alternating current of the form I(t)=I0sin(ωt)I(t) = I_0 \sin (\omega t) is applied to the battery with I0=4I_0 = 4 A and ω=314\omega = 314 s1^{-1}. In the second cell, use Matplotlib to plot the temperature of the battery as a function of time.

  5. Bonus advanced question: The electric resistance is often a function of temperature. Assume that R=R0exp(αT)R = R_0 \exp(\alpha T) with R0=3×104R_0 = 3 \times 10^{-4} Ohms and α=0.01\alpha = 0.01 1/^\circC. Plot the battery temperature as a function of time when an alternating current is applied to it. Compare your results to the case when the resistance RR is constant (R=R0R = R_0). Investigate what happens as α\alpha is increased. Write some text that explains your results.