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 C, 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
where C is the temperature of the air surrounding the battery, Ohms is electrical resistance of the battery, is the current being drawn from the battery, and W/C 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.
Create a Jupyter Notebook called Battery. This should create a new file called Battery.ipynb
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.
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 at which the battery temperature is equal to 60 C. Convert the third cell into a markdown cell and write some text on your findings.
Create two new cells. In the first, add a section called "Alternating current". Suppose that an alternating current of the form is applied to the battery with A and s. In the second cell, use Matplotlib to plot the temperature of the battery as a function of time.
Bonus advanced question: The electric resistance is often a function of temperature. Assume that with Ohms and 1/C. 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 is constant (). Investigate what happens as is increased. Write some text that explains your results.