313 lines
164 KiB
Plaintext
313 lines
164 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"### Battery life model library\n",
|
||
|
"Example notebook demonstrating how to use the battery life models in Python.\n",
|
||
|
"\n",
|
||
|
"First examples use the Kokam NMC111|Gr 75Ah battery life model. The battery modeled here is a high-power cell with long cycle life. Because nominal cell resistance is low, the relative change of resistance at end-of-life is quite high compared to other cell designs (~300% increase in cell resistance at 80% capacity if not more). Fade rates can be changed in the code to accomodate other cell models. Documentation is provided in the life model class. See https://ieeexplore.ieee.org/abstract/document/7963578 for the aging test details and results used to parameterize this model."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import numpy as np\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"from nmc111_gr_Kokam75Ah_2017 import Nmc111_Gr_Kokam75Ah_Battery\n",
|
||
|
"from battery_profile import BatProfile"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"We instantiate a BatProfile and apply the methods in the specific order to process the intervals for both soc and temperature"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 2,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"profile = BatProfile()\n",
|
||
|
"profile.init_intervals()\n",
|
||
|
"profile.preprocess_soc_intervals()\n",
|
||
|
"profile.temp_sequence_generation()\n",
|
||
|
"profile.process_soc_time()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"After the pre-processing done earlier, we can execute `generate_day_values(number_of_discharges)` to generate curves"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 3,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"soc_day_sequence, temp_day_sequence, time_day_sequence = profile.generate_day_values(4)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 4,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"[<matplotlib.lines.Line2D at 0x7fb0bbb44820>]"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 4,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAh8AAAGdCAYAAACyzRGfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABgwklEQVR4nO3deZwU5Z0/8E/1Od1zAQIzjByCIV54BQyKbsAD3Ii5jEYBDcZNolETSXaDMZrNaCIYsnHZDYn5abKGrCLqesQYTcAkogYPlKCItyIgMA7gMPd0T3fX74+nn+rqnu6ePurorvq8X695OUfbXVRXV33r+3yf76OoqqqCiIiIyCIeuzeAiIiI3IXBBxEREVmKwQcRERFZisEHERERWYrBBxEREVmKwQcRERFZisEHERERWYrBBxEREVnKZ/cGZEokEtizZw/q6+uhKIrdm0NEREQFUFUV3d3daGlpgceTP7dRccHHnj17MGHCBLs3g4iIiEqwa9cujB8/Pu9jKi74qK+vByA2vqGhweatISIiokJ0dXVhwoQJ2nU8n4oLPuRQS0NDA4MPIiKiKlNIyQQLTomIiMhSDD6IiIjIUgw+iIiIyFIMPoiIiMhSDD6IiIjIUgw+iIiIyFIMPoiIiMhSDD6IiIjIUgw+iIiIyFIMPoiIiMhSDD6Ii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0YCAPb3RAxpea8FeFW8j61usR5xQObD6uCDNR/kBkVlPj7zmc/g5ptvxsSJE3HMMcfgH//4B2699VZcdtllAMRwy5IlS7Bs2TJMnToVU6dOxbJlyxAOh7Fw4UJT/gGVJJRcBdPqlW311fjVeIdpFn2
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.plot(time_day_sequence, soc_day_sequence)\n",
|
||
|
"plt.plot(time_day_sequence, temp_day_sequence)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"To run, the life model needs timeseries data: the time in seconds since beginning-of-life of the battery, the state-of-charge of the battery (0 to 1), and the ambient temperature (or battery temperature, if you have a thermal model)."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"Set the `expected_rate` (expected number of discharges per day) and the `number_of_years` (number of years to simulate).\n",
|
||
|
"\n",
|
||
|
"The code below will simulate one day at a time for the given time. \n",
|
||
|
"\n",
|
||
|
"It should not take more than 20s.\n",
|
||
|
"\n",
|
||
|
"There might be occasional runtime warnings"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 5,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"# expected_rate parameter is the expected number of discharges per day\n",
|
||
|
"expected_rate = 42 / 236.0\n",
|
||
|
"number_of_years = 30\n",
|
||
|
"# 1 year simulation\n",
|
||
|
"cell = Nmc111_Gr_Kokam75Ah_Battery()\n",
|
||
|
"total_day_time = 60 * 60 * 24\n",
|
||
|
"t_days = np.arange(365 * number_of_years)\n",
|
||
|
"for day in t_days:\n",
|
||
|
" num_discharges = np.random.poisson(expected_rate, 1)\n",
|
||
|
" soc_day_sequence, temp_day_sequence, time_day_sequence = profile.generate_day_values(num_discharges)\n",
|
||
|
" cell.update_battery_state(\n",
|
||
|
" t_secs=np.array([total_day_time * day + time for time in time_day_sequence]),\n",
|
||
|
" soc = (soc_day_sequence)/100, # from 0 to 1\n",
|
||
|
" T_celsius=temp_day_sequence\n",
|
||
|
" )"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 6,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkAAAAGwCAYAAABB4NqyAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABcqUlEQVR4nO3deVhU9f4H8PfMwAz7JvsquCCIIuLC4pJmKKbhUpGVW5Z56/7UyLp5b1m2kVaWS7jkli0upZaVmhgqmguK4IYiCgIiyKKyCsjM+f2Bjk2gMgJzgHm/nmee5/KdM2c+c565zrvvdiSCIAggIiIi0iNSsQsgIiIi0jUGICIiItI7DEBERESkdxiAiIiISO8wABEREZHeYQAiIiIivcMARERERHrHQOwCWiKVSoUrV67A3NwcEolE7HKIiIioAQRBQGlpKZydnSGV3r+PhwGoHleuXIGbm5vYZRAREdFDyM7Ohqur632PYQCqh7m5OYDaC2hhYSFyNURERNQQJSUlcHNzU/+O3w8DUD3uDHtZWFgwABEREbUyDZm+wknQREREpHcYgIiIiEjvMAARERGR3mEAIiIiIr3DAERERER6hwGIiIiI9A4DEBEREekdBiAiIiLSOwxAREREpHcYgIiIiEjvMAARERGR3mEAIiIiIr3DAERERER6hwGIiIiI9A4DEBEREekdBiAiIiLSOwxAREREpHdEDUDx8fEYOXIknJ2dIZFI8PPPPz/wNfv27UNgYCCMjIzg5eWFZcuW1Tlm8+bN8PX1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 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.plot(cell.stressors['t_days']/365, cell.outputs['q'])\n",
|
||
|
"plt.xlabel('Time (years)')\n",
|
||
|
"plt.ylabel('Relative discharge capacity')\n",
|
||
|
"plt.ylim((0.7, 1.02))\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"The battery model should be run in timesteps relavent to battery degradation, such as once per day. Larger or smaller timesteps could be used if desired, but timesteps should avoid splitting up cycles, or at least be long enough that miscounting cycles due to splitting them up does not introduce much error.\n",
|
||
|
"\n",
|
||
|
"Each battery model tracks the history of it's inputs (`stressors`), calculated degradation rates (`rates`), internal states (`states`), and outputs (`outputs`) each time `update_battery_state` is called. Debugging models is easier because the values of all inputs, internal calculations, and outputs are tracked."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"The cell resistance and capacity trajectories are wiggily because the temperature of the battery is varying throughout each year, varying the degradation rate. Dispatch is the same each day, so that is constant.\n",
|
||
|
"\n",
|
||
|
"The model keeps track of how much charge-throughput has occured throughout life, as well, based on the input state-of-charge timeseries. Conversion from charge-throughput, in Amp-hours, to changes of cell state-of-charge, which is dependent on battery performance (health, temperature and SOC dependent resistances), is assumed to happen externally to the model. This simple simulation is essentially assuming that the current magnitude is continuously being adjusted based on the the state-of-health of the battery."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 7,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAk0AAAGwCAYAAAC0HlECAAAAOXRF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t6rkfMTERFRzalToSknJwd2dnYqbXZ2dqioqEBeXt4T++Tk5Dz2vDNmzEBBQYH4yszM1H7xREREVKcZSV2ApmQymcr7B1cXH26vrs+jbQ8zNTWFqampFqskIiIifVOnZprs7e2rzBjl5ubCyMgIjRs3fmKfR2efiIiIiDRRp0JTYGAgoqOjVdr27t2LTp06wdjY+Il9goKCaq1OIiIi0j+SXp67e/cuLl26JL5PT09HQkICbGxs4OrqihkzZiArKwvr168HUHmn3DfffIOIiAi8/vrrOHbsGFavXq1yV9zkyZPRvXt3LFy4EIMHD8Zvv/2Gffv24ejRo7U+PiIiItIfks40nT59Gr6+vvD19QUAREREwNfXF7NnzwYAZGdnIyMjQ+zv7u6OXbt24eDBg+jQoQM+/vhjLF26FC+//LLYJygoCJs3b8batWvh7e2NdevWYcuWLfD396/dwREREZFe0Zl9mnRJTe3zEJdxB8OWx8DVxhyH3++ptfMSERER92kiIiIi0gkMTURERERqYGgiIiIiUgNDExEREZEaGJqIiIiI1MDQRERERKQGhiYiIiIiNTA0EREREamBoYmIiIhIDQxNRERERGpgaCIiIiJSA0MTERERkRoYmoiIiIjUwNBEREREpAaGJiIiIiI1MDQRERERqYGhiYiIiEgNDE1EREREamBoIiIiIlIDQxMRERGRGhiaiIiIiNTA0ERERESkBoYmIiIiIjUwNBERERGpgaGJiIiISA0MTURERERqYGgiIiIiUgNDUy0ykMkAAIUl5VAqBYmrISIiIk0wNNWi1nYNAAD5xeW4ebdU4mqIiIhIEwxNtcjcxAhy48ofeVmFUuJqiIiISBMMTbXM2KDyR17By3NERER1CkNTLTMyrFzXVKHgTBMREVFdwtBUywz/f6apXMGZJiIiorqEoamWNTA1BABcvFEkcSVERESkCYamWubv3hgAsD0+S+JKiIiISBMMTbVsaEcnAMChizeRx20HiIiI6gyGplrm724Deys5ACAhI1/aYoiIiEhtDE21TCaTwd5aLnUZREREpCGGJgmYGFX+2NPz7klcCREREamLoUkCndwaAQB+P5MtcSVERESkLoYmCfTxtAMApN+8K3El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yWVZWlrgX08WLF3Hy5En4+/vjzp07WLRoEc6ePYvvv/9ePOe8efMQEBCAVq1aobCwEEuXLkVCQgKWLVsmyRifZGKPFlgUfRFlCiWu3LqH5k0aSF0SERERPYakoSk0NBS3bt3C/PnzkZ2dDS8vL+zatQtubm4AgOzsbJU9mxQKBb788kukpKTA2NgYPXv2RExMDJo1ayb2yc/PxxtvvIGcnBxYW1vD19cXhw8fRpcuXWp7eE9lYmQAAxmgFICEzHyGJiIiIh0mEwSB14UeUVhYCGtraxQUFNT4+qaRK4/jWNot/O8VH/zbz7lGvxcREZE+q+nf35LfPVffyY0r/wgu3iiSuBIiIiJ6EoYmiXVqZgMAWHk4DeUKpcTVEBER0eMwNEnslYcuyV3Pvy9hJURERPQkGoem9PT0mqij3mpqJRc3ubx8867E1RAREdHjaByaWrZsiZ49e+LHH39ESUlJTdRU78iNK3czv5TL0ERERKSrNA5NiYmJ8PX1xbvvvgt7e3u8+eabOHnyZE3UVm8M6eAIAFi8L5UP7yUiItJRGocmLy8vLFq0CFlZWVi7di1ycnLQtWtXtGvXDosWLcLNmzdrok69NqGbOwCguEyB1Ud5+ZOIiEgXPfNCcCMjIwwdOhQ//fQTFi5ciMuXL2PatGlwdnbGmDFjkJ2drc069ZqDtRl
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.plot(cell.stressors['efc'], cell.outputs['q'])\n",
|
||
|
"plt.xlabel('Equivalent full cycles')\n",
|
||
|
"plt.ylabel('Relative discharge capacity')\n",
|
||
|
"plt.ylim((0.7, 1.02))\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"This dispatch has a little more than 1 EFC per day.\n",
|
||
|
"\n",
|
||
|
"We can plot the separate contributions to capacity or resistance fade, as well."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 8,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"(0.5, 1.02)"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 8,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAGwCAYAAABVdURTAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABZTElEQVR4nO3dd1hTZ8MG8DuMsIeADBEEFyKgKDjAvbC4q221ah21VWuXs621Vmt9i7XuWldd1VpXHbV10ioqdYKoIE6GIIIIKFNWcr4/+EybgppgwoFw/64r12WenHNyJ1++cr/PWRJBEAQQERER6Qg9sQMQERERaRLLDREREekUlhsiIiLSKSw3REREpFNYboiIiEinsNwQERGRTmG5ISIiIp1iIHaAqiaXy3H//n1YWFhAIpGIHYeIiIhUIAgCcnNzUa9ePejpPX9uptaVm/v378PFxUXsGERERFQJycnJqF+//nOXqXXlxsLCAkDZl2NpaSlyGiIiIlJFTk4OXFxcFH/Hn6fWlZunu6IsLS1ZboiIiGoYVQ4p4QHFREREpFNYboiIiEinsNwQERGRTql1x9xoTX4msGWg2CmIiIjEZ2YLjPpNtLdnudEUeSnwIFrsFEREROIzdxT17VluNMXEGhi5V+wURERE4jMwEvftRX13XWJgBDTuIXYKIiKiWo8HFBMREZFOEbXcnDp1Cv3790e9evUgkUiwf//+F65z8uRJ+Pn5wdjYGA0bNsSaNWu0H5SIiIhqDFHLTX5+Plq2bImVK1eqtHxCQgL69OmDTp06ISoqCp9//jk++ugj7NmzR8tJiY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DXkNj3PzxY5ERERUY7HcVAPGRlIcO7AHBqZWEOybYsGRG2JHIiIiqrFYbqqJVp6NsPvPM7Dp9R52RKZh18VksSMRERHVSCw31ciggOb4uEcTAMDMXy/hlyNnRE5ERERU87DcVDOTezZBr0bmSNnxJUYNfgXHz18ROxIREVGNwnJTzUgkEiwc6gcTSQlkT3LRr39/XuCPiIhIDSw31VAdS3Oc/vMQpFZ18eRhMvy69MLDR9lixyIiIqoRWG6qKe/Gbti5Zz/0jM2RGXcVLTsGISefdxAnIiJ6EZabamxQj0Cs3/YrJIbGSI29gJZd+qKwqFjsWERERNUay001N3Zwbyxdvw0SfUMkxVzEhFWHIJcLYsciIiKqtkQvN6tWrYK7uzuMjY3h5+eH06dPP3f5H374AZ6enjAxMYGHhwe2bNlSRUnF8/Gowfh65SY4jfwWJx8YYtruKyiVycWORUREVC2JWm527tyJyZMnY9asWYiKikKnTp0QHByMpKSkCpdfvXo1Zs6ciblz5+LatWv46quv8P777+P333+v4uRVb9bEEVjz0avQ15NgX1QK3lywE3kFhWLHIiIiqnYkgiCIto+jXbt2aN26NVav/udu2J6enhg0aBBCQkLKLR8YGIgOHTrgu+++U4xNnjwZERERCA8Pr/A9ioqKUFRUpHiek5MDFxcXZGdnw9LSUoOfpmocu5aGcd9tR8r2WXBu1gpXTx9FHUtzsWMRERFpVU5ODqysrFT6+y3azE1xcTEiIyMRFBSkNB4UFIQzZyq+Mm9RURGMjY2VxkxMTHDhwgWUlJRUuE5ISAisrKwUDxcXF818AJEEeTni487OgFyOe1fPwLNdVzzIfCx2LCIiompDtHKTkZEBmUwGBwcHpXEHBwekpaVVuE7v3r2xfv16REZGQhAEREREYOPGjSgpKUFGRkaF68ycORPZ2dmKR3Jyzb9n0/S338APW3ZBT2qCBzci0bxNJ9xMuCd2LCIiompB9AOKJRKJ0nNBEMqNPTV79mwEBwejffv2MDQ
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.plot(cell.stressors['t_days']/365, cell.outputs['q_LLI'])\n",
|
||
|
"plt.plot(cell.stressors['t_days']/365, cell.outputs['q_LAM'])\n",
|
||
|
"plt.plot(cell.stressors['t_days']/365, cell.outputs['q'], '--k')\n",
|
||
|
"plt.xlabel('Time (years)')\n",
|
||
|
"plt.ylabel('Relative discharge capacity')\n",
|
||
|
"plt.legend([r'q$_{LLI}$', r'q$_{LAM}$', 'q'])\n",
|
||
|
"plt.ylim((0.5, 1.02))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"attachments": {},
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"From the result, the cell will experience sudden failure very shortly; considering this is near 70% remaining capacity, this is physically reasonable."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 9,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjMAAAGwCAYAAABcnuQpAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABYZElEQVR4nO3dd1hT5+MF8BNW2CAiSxFBxaq4J7gXiguqtm7Bva3bqlWxDtRW66xt3aN1j7oVq6C4B4qIAxUBFcQFQZAwcn9/+DW/UkEJAjch5/M8eR5zc5Oc3t42x/eOVyIIggAiIiIiDaUjdgAiIiKiL8EyQ0RERBqNZYaIiIg0GssMERERaTSWGSIiItJoLDNERESk0VhmiIiISKPpiR2gsCkUCjx79gxmZmaQSCRixyEiIqI8EAQBycnJcHBwgI7Op8dein2ZefbsGRwdHcWOQURERPkQGxuLMmXKfHKdYl9mzMzMALzfGObm5iKnISIioryQ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h4aObMmTh58iQ8PDwAAOfOncOsWbNga2urXH/KlCmoVq0aAOD+/fvKK5uIiEh9rdt9FEP6fgtF2luY2jkjJOgkalRyETuWKFhmionbt2/jxIkTWLNmDQCgYcOGGDx4MCQSibLIAEDFihUREREBGxsb9O3bFwDQvXt3AMCzZ89gbW0NA4PidWdIIqLi5sDl+xjS5xso5CkoWb46rgUHwqm0jdixRCMRivnd1mQyGSwsLJCUlARzc/Nsr6WlpSEqKgrOzs4wNDQUKaHm4XYjIhLPnmtPMHlPGGS3z8Ao5gJCTx9CScvidy7
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.plot(cell.stressors['t_days']/365, cell.outputs['r_LLI'])\n",
|
||
|
"plt.plot(cell.stressors['t_days']/365, cell.outputs['r_LAM'])\n",
|
||
|
"plt.plot(cell.stressors['t_days']/365, cell.outputs['r'], '--k')\n",
|
||
|
"plt.xlabel('Time (years)')\n",
|
||
|
"plt.ylabel('Relative DC resistance')\n",
|
||
|
"plt.legend([r'r$_{LLI}$', r'r$_{LAM}$', 'r'])\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"kernelspec": {
|
||
|
"display_name": "base",
|
||
|
"language": "python",
|
||
|
"name": "python3"
|
||
|
},
|
||
|
"language_info": {
|
||
|
"codemirror_mode": {
|
||
|
"name": "ipython",
|
||
|
"version": 3
|
||
|
},
|
||
|
"file_extension": ".py",
|
||
|
"mimetype": "text/x-python",
|
||
|
"name": "python",
|
||
|
"nbconvert_exporter": "python",
|
||
|
"pygments_lexer": "ipython3",
|
||
|
"version": "3.10.12"
|
||
|
},
|
||
|
"orig_nbformat": 4,
|
||
|
"vscode": {
|
||
|
"interpreter": {
|
||
|
"hash": "e4cce46d6be9934fbd27f9ca0432556941ea5bdf741d4f4d64c6cd7f8dfa8fba"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 2
|
||
|
}
|