<jupyter_start><jupyter_text>Tutorial 1 - How to run a model Welcome to PyBaMM! In this notebook, we will run your first PyBaMM model in just a few simple lines. To run through this jupyter notebook simply shift-enter to run the cells. If you are unfamiliar with jupyter notebooks we recommending checking out this [cheat sheet](https://www.cheatography.com/weidadeyue/cheat-sheets/jupyter-notebook/pdf_bw/).We begin by importing the pybamm library into this notebook:<jupyter_code>%pip install pybamm -q    # install PyBaMM if it is not installed
import pybamm<jupyter_output>Note: you may need to restart the kernel to use updated packages.<jupyter_text>We now load the model that we wish to run. For this notebook, we choose the Doyle-Fuller-Newman (DFN) model:<jupyter_code>model = pybamm.lithium_ion.DFN()<jupyter_output><empty_output><jupyter_text>We now use this model to create a PyBaMM Simulation, which is used to process and solve the model:<jupyter_code>sim = pybamm.Simulation(model)<jupyter_output><empty_output><jupyter_text>We can then call 'solve' on our simulation object to solve the model, passing the window of time to solve for in seconds (here 1 hour):<jupyter_code>sim.solve([0, 3600])<jupyter_output><empty_output><jupyter_text>Finally, we can call 'plot' to generate a dynamic plot of the key variables:<jupyter_code>sim.plot()<jupyter_output><empty_output><jupyter_text>In this tutorial, we have solved a model with the inbuilt default settings. However, PyBaMM is designed to be highly customisable. Over the course of the getting started tutorials, we will see how various settings can be changed so that the model is appropriate for your situation. In [Tutorial 2](./Tutorial%202%20-%20Compare%20models.ipynb) we cover how to simulate and compare different models.  ReferencesIf you write a paper that uses PyBaMM, we would be grateful if you could cite the papers relevant to your code. These will change depending on what models and solvers you use. To find out which papers you should cite, you can run:<jupyter_code>pybamm.print_citations()<jupyter_output>[1] <NAME>, <NAME>, <NAME>, <NAME>, and <NAME>. CasADi – A software framework for nonlinear optimization and optimal control. Mathematical Programming Computation, 11(1):1–36, 2019. doi:10.1007/s12532-018-0139-4.
[2] <NAME>, <NAME>, and <NAME>. Modeling of galvanostatic charge and discharge of the lithium/polymer/insertion cell. Journal of the Electrochemical society, 140(6):1526–1533, 1993. doi:10.1149/1.2221597.
[3] <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, and others. Array programming with NumPy. Nature, 585(7825):357–362, 2020. doi:10.1038/s41586-020-2649-2.
[4] <NAME>, <NAME>, <NAME>, <NAME>, and <NAME>. An asymptotic derivation of a single particle model with electrolyte. Journal of The Electrochemical Society, 166(15):A3693–A3706, 2019. doi:10.1149/[...]<jupyter_text>Alternatively, you can print the citations in BibTeX format by running:<jupyter_code>pybamm.print_citations(output_format="bibtex")<jupyter_output>@article{Andersson2019,
  author = {Andersson, <NAME>. and <NAME> <NAME> Rawlings, <NAME>. and <NAME>},
  title = {{CasADi -- A software framework for nonlinear optimization
           and optimal control}},
  journal = {Mathematical Programming Computation},
  volume = {11},
  number = {1},
  pages = {1--36},
  year = {2019},
  publisher = {Springer},
  doi = {10.1007/s12532-018-0139-4},
}


@article{Marquis2019,
  title = {{An asymptotic derivation of a single particle model with electrolyte}},
  author = {Marquis, <NAME>. and Sulzer, Valentin and <NAME>, <NAME>. and <NAME>},
  journal = {Journal of The Electrochemical Society},
  volume = {166},
  number = {15},
  pages = {A3693--A3706},
  year = {2019},
  publisher = {The Electrochemical Society},
  doi = {10.1149/2.0341915jes},
}


@article{Harris2020,
  title = {{Array programming with NumPy}},
  author = {Harris, <NAME>. and <NAME> and <NAME> [...]
{'fraction_non_alphanumeric': 0.11108318673033425, 'fraction_numerical': 0.05302839909525006, 'mean_word_length': 5.21875, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 61, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '145067', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1429, 'n_tokens_neox': 1231, 'n_words': 458, 'path': 'examples/notebooks/Getting Started/Tutorial 1 - How to run a model.ipynb', 'repo_name': 'deepakdinesh1123/PyBaMM', 'size': '4261'}