diff --git a/.flake8 b/.flake8
index 70990935..9acc35b7 100644
--- a/.flake8
+++ b/.flake8
@@ -5,6 +5,12 @@ exclude=
     problems,
     __init__.py,
     venv,
+    bin,
+    etc,
+    lib,
+    lib64,
+    share,
+    pyvenv.cfg
 ignore=
     # False positive for white space before ':' on list slice
     # black should format these correctly
diff --git a/.gitignore b/.gitignore
index 65bb1425..4db0408e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,3 +46,9 @@ pyproject.toml
 
 # virtual enviroment
 venv/
+bin/
+etc/
+lib/
+lib64
+share/
+pyvenv.cfg
diff --git a/pybamm/models/submodels/electrolyte.py b/pybamm/models/submodels/electrolyte.py
index acad18a1..39609690 100644
--- a/pybamm/models/submodels/electrolyte.py
+++ b/pybamm/models/submodels/electrolyte.py
@@ -42,7 +42,7 @@ class StefanMaxwellDiffusion(pybamm.BaseModel):
 
         electrolyte_domain = ["whole cell"]
 
-        c_e = pybamm.Variable("c_e", domain=electrolyte_domain)
+        c_e = pybamm.Variable("c_e", electrolyte_domain)
 
         N_e = -(epsilon ** b) * pybamm.grad(c_e)
 
diff --git a/pybamm/parameters/parameter_values.py b/pybamm/parameters/parameter_values.py
index fe86c94d..74834bdd 100644
--- a/pybamm/parameters/parameter_values.py
+++ b/pybamm/parameters/parameter_values.py
@@ -95,11 +95,15 @@ class ParameterValues(dict):
             model.initial_conditions[variable] = self.process_symbol(equation)
 
         # Boundary conditions are dictionaries {"left": left bc, "right": right bc}
+        new_boundary_conditions = {}
         for variable, bcs in model.boundary_conditions.items():
+            processed_variable = self.process_symbol(variable)
+            new_boundary_conditions[processed_variable] = {}
             for side in ["left", "right"]:
-                model.boundary_conditions[variable][side] = self.process_symbol(
+                new_boundary_conditions[processed_variable][side] = self.process_symbol(
                     bcs[side]
                 )
+        model.boundary_conditions = new_boundary_conditions
 
         for variable, equation in model.variables.items():
             model.variables[variable] = self.process_symbol(equation)

Bug when using model.rhs.evaluate() 
There is an issue using the `model.rhs.evaluate()` function which depends on the form of the flux `N_e` in the electrolyte model which is indicated by an arrow in the code below: 

```
       epsilon = pybamm.standard_parameters.epsilon_s  
        b = pybamm.standard_parameters.b
        delta = pybamm.standard_parameters.delta
        nu = pybamm.standard_parameters.nu
        t_plus = pybamm.standard_parameters.t_plus
        ce0 = pybamm.standard_parameters.ce0

        electrolyte_domain = ["whole cell"]
        c_e = pybamm.Variable("c_e", electrolyte_domain)

        N_e = -pybamm.grad(c_e)  <--------------------------------------------------(1)
        self.rhs = {
            c_e: -pybamm.div(N_e) / delta / epsilon + nu * (1 - t_plus) * G
        }  # / delta / epsilon + nu * (1 - t_plus) * G
        self.initial_conditions = {c_e: ce0}
        self.boundary_conditions = {
            N_e: {"left": pybamm.Scalar(0), "right": pybamm.Scalar(0)}
        } 
```
Within `test_electrolyte.py` I have
```
        G = pybamm.Scalar(1)
        model = pybamm.electrolyte.StefanMaxwellDiffusion(G)

        param = pybamm.ParameterValues(
            "input/parameters/lithium-ion/parameters/LCO.csv"
        )

        param.process_model(model)

        mesh = pybamm.FiniteVolumeMacroMesh(param, 2)
        disc = pybamm.FiniteVolumeDiscretisation(mesh)
        disc.process_model(model)

        y0 = model.initial_conditions
        model.rhs.evaluate(None, y0) <---------------------------------------(2)
```
However, if i change (1) to `N_e = epsilon * pybamm.grad(c_e)` , there is an error at (2). Link to the failed test output: https://gist.github.com/Scottmar93/b7bcbff685383d9a5dceaca630f3aa40
diff --git a/tests/test_models/test_electrolyte.py b/tests/test_models/test_electrolyte.py
index 8b8a2cd0..686f1096 100644
--- a/tests/test_models/test_electrolyte.py
+++ b/tests/test_models/test_electrolyte.py
@@ -6,6 +6,7 @@ from __future__ import print_function, unicode_literals
 import pybamm
 
 import unittest
+import numpy as np
 
 
 class TestStefanMaxwellDiffusion(unittest.TestCase):
@@ -33,8 +34,28 @@ class TestStefanMaxwellDiffusion(unittest.TestCase):
 
         param.process_model(model)
 
-        print(model.initial_conditions)
+        mesh = pybamm.FiniteVolumeMacroMesh(param, 2)
+        disc = pybamm.FiniteVolumeDiscretisation(mesh)
+        disc.process_model(model)
+
+    def test_solving(self):
+        G = pybamm.Scalar(0.001)
+        model = pybamm.electrolyte.StefanMaxwellDiffusion(G)
+
+        param = pybamm.ParameterValues(
+            "input/parameters/lithium-ion/parameters/LCO.csv"
+        )
+
+        param.process_model(model)
 
         mesh = pybamm.FiniteVolumeMacroMesh(param, 2)
         disc = pybamm.FiniteVolumeDiscretisation(mesh)
         disc.process_model(model)
+
+        y0 = model.concatenated_initial_conditions
+        np.testing.assert_array_equal(y0, np.ones_like(mesh["whole cell"].nodes))
+
+        # Solve
+        solver = pybamm.ScipySolver(tol=1e-8, method="RK45")
+        t_eval = mesh["time"]
+        solver.solve(model, t_eval)
diff --git a/tests/test_parameters/test_parameter_values.py b/tests/test_parameters/test_parameter_values.py
index 90321430..cc008556 100644
--- a/tests/test_parameters/test_parameter_values.py
+++ b/tests/test_parameters/test_parameter_values.py
@@ -156,18 +156,17 @@ class TestParameterValues(unittest.TestCase):
         self.assertTrue(isinstance(model.rhs[var].children[0], pybamm.Scalar))
         self.assertTrue(isinstance(model.rhs[var].children[1], pybamm.Gradient))
         self.assertEqual(model.rhs[var].children[0].value, 1)
-        # initial_conditions
+        # initial conditions
         self.assertTrue(isinstance(model.initial_conditions[var], pybamm.Scalar))
         self.assertEqual(model.initial_conditions[var].value, 2)
-        # boundary_conditions
-        self.assertTrue(
-            isinstance(model.boundary_conditions[var]["left"], pybamm.Scalar)
-        )
-        self.assertEqual(model.boundary_conditions[var]["left"].value, 3)
-        self.assertTrue(
-            isinstance(model.boundary_conditions[var]["right"], pybamm.Scalar)
-        )
-        self.assertEqual(model.boundary_conditions[var]["right"].value, 42)
+        # boundary conditions
+        bc_key = list(model.boundary_conditions.keys())[0]
+        self.assertTrue(isinstance(bc_key, pybamm.Variable))
+        bc_value = list(model.boundary_conditions.values())[0]
+        self.assertTrue(isinstance(bc_value["left"], pybamm.Scalar))
+        self.assertEqual(bc_value["left"].value, 3)
+        self.assertTrue(isinstance(bc_value["right"], pybamm.Scalar))
+        self.assertEqual(bc_value["right"].value, 42)
         # variables
         self.assertEqual(model.variables["var"].id, var.id)
         self.assertTrue(isinstance(model.variables["grad_var"], pybamm.Gradient))

pip install -e .[dev,docs]
parse_log_pytest
requirements.txt
pytest
3.6
requirements.txt requirements-dev.txt requirements-docs.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
anyio==3.6.2
anytree==2.8.0
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
async-generator==1.10
attrs==22.2.0
Babel==2.11.0
backcall==0.2.0
bleach==4.1.0
certifi==2021.5.30
cffi==1.15.1
charset-normalizer==2.0.12
comm==0.1.4
contextvars==2.4
cycler==0.11.0
dataclasses==0.8
decorator==5.1.1
defusedxml==0.7.1
docutils==0.18.1
entrypoints==0.4
flake8==3.9.2
guzzle-sphinx-theme==0.7.11
idna==3.10
imagesize==1.4.1
immutables==0.19
importlib-metadata==4.8.3
iniconfig==1.1.1
ipykernel==5.5.6
ipython==7.16.3
ipython-genutils==0.2.0
ipywidgets==7.8.5
jedi==0.17.2
Jinja2==3.0.3
json5==0.9.16
jsonschema==3.2.0
jupyter==1.1.1
jupyter-client==7.1.2
jupyter-console==6.4.3
jupyter-core==4.9.2
jupyter-server==1.13.1
jupyterlab==3.2.9
jupyterlab-pygments==0.1.2
jupyterlab-server==2.10.3
jupyterlab_widgets==1.1.11
kiwisolver==1.3.1
MarkupSafe==2.0.1
matplotlib==3.3.4
mccabe==0.6.1
mistune==0.8.4
nbclassic==0.3.5
nbclient==0.5.9
nbconvert==6.0.7
nbformat==5.1.3
nest-asyncio==1.6.0
notebook==6.4.10
numpy==1.19.5
packaging==21.3
pandas==1.1.5
pandocfilters==1.5.1
parso==0.7.1
pexpect==4.9.0
pickleshare==0.7.5
Pillow==8.4.0
pluggy==1.0.0
prometheus-client==0.17.1
prompt-toolkit==3.0.36
ptyprocess==0.7.0
py==1.11.0
-e git+https://github.com/tinosulzer/PyBaMM.git@a10e4d5a937cf685c02c7c2f40c52c43b3fd51e8#egg=pybamm
pycodestyle==2.7.0
pycparser==2.21
pyflakes==2.3.1
Pygments==2.14.0
pyparsing==3.1.4
pyrsistent==0.18.0
pytest==7.0.1
python-dateutil==2.9.0.post0
pytz==2025.2
pyzmq==25.1.2
requests==2.27.1
scipy==1.5.4
Send2Trash==1.8.3
six==1.17.0
sniffio==1.2.0
snowballstemmer==2.2.0
Sphinx==5.3.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
terminado==0.12.1
testpath==0.6.0
tomli==1.2.3
tornado==6.1
traitlets==4.3.3
typing_extensions==4.1.1
urllib3==1.26.20
wcwidth==0.2.13
webencodings==0.5.1
websocket-client==1.3.1
widgetsnbextension==3.6.10
zipp==3.6.0

name: PyBaMM
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - anyio==3.6.2
      - anytree==2.8.0
      - argon2-cffi==21.3.0
      - argon2-cffi-bindings==21.2.0
      - async-generator==1.10
      - attrs==22.2.0
      - babel==2.11.0
      - backcall==0.2.0
      - bleach==4.1.0
      - cffi==1.15.1
      - charset-normalizer==2.0.12
      - comm==0.1.4
      - contextvars==2.4
      - cycler==0.11.0
      - dataclasses==0.8
      - decorator==5.1.1
      - defusedxml==0.7.1
      - docutils==0.18.1
      - entrypoints==0.4
      - flake8==3.9.2
      - guzzle-sphinx-theme==0.7.11
      - idna==3.10
      - imagesize==1.4.1
      - immutables==0.19
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - ipykernel==5.5.6
      - ipython==7.16.3
      - ipython-genutils==0.2.0
      - ipywidgets==7.8.5
      - jedi==0.17.2
      - jinja2==3.0.3
      - json5==0.9.16
      - jsonschema==3.2.0
      - jupyter==1.1.1
      - jupyter-client==7.1.2
      - jupyter-console==6.4.3
      - jupyter-core==4.9.2
      - jupyter-server==1.13.1
      - jupyterlab==3.2.9
      - jupyterlab-pygments==0.1.2
      - jupyterlab-server==2.10.3
      - jupyterlab-widgets==1.1.11
      - kiwisolver==1.3.1
      - markupsafe==2.0.1
      - matplotlib==3.3.4
      - mccabe==0.6.1
      - mistune==0.8.4
      - nbclassic==0.3.5
      - nbclient==0.5.9
      - nbconvert==6.0.7
      - nbformat==5.1.3
      - nest-asyncio==1.6.0
      - notebook==6.4.10
      - numpy==1.19.5
      - packaging==21.3
      - pandas==1.1.5
      - pandocfilters==1.5.1
      - parso==0.7.1
      - pexpect==4.9.0
      - pickleshare==0.7.5
      - pillow==8.4.0
      - pluggy==1.0.0
      - prometheus-client==0.17.1
      - prompt-toolkit==3.0.36
      - ptyprocess==0.7.0
      - py==1.11.0
      - pycodestyle==2.7.0
      - pycparser==2.21
      - pyflakes==2.3.1
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pyrsistent==0.18.0
      - pytest==7.0.1
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyzmq==25.1.2
      - requests==2.27.1
      - scipy==1.5.4
      - send2trash==1.8.3
      - six==1.17.0
      - sniffio==1.2.0
      - snowballstemmer==2.2.0
      - sphinx==5.3.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - terminado==0.12.1
      - testpath==0.6.0
      - tomli==1.2.3
      - tornado==6.1
      - traitlets==4.3.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - wcwidth==0.2.13
      - webencodings==0.5.1
      - websocket-client==1.3.1
      - widgetsnbextension==3.6.10
      - zipp==3.6.0
prefix: /opt/conda/envs/PyBaMM

tests/test_models/test_electrolyte.py::TestStefanMaxwellDiffusion::test_solving
tests/test_models/test_electrolyte.py::TestStefanMaxwellDiffusion::test_make_tree tests/test_models/test_electrolyte.py::TestStefanMaxwellDiffusion::test_processing_disc tests/test_models/test_electrolyte.py::TestStefanMaxwellDiffusion::test_processing_parameters tests/test_parameters/test_parameter_values.py::TestParameterValues::test_get_parameter_value tests/test_parameters/test_parameter_values.py::TestParameterValues::test_init tests/test_parameters/test_parameter_values.py::TestParameterValues::test_overwrite tests/test_parameters/test_parameter_values.py::TestParameterValues::test_process_complex_expression tests/test_parameters/test_parameter_values.py::TestParameterValues::test_process_model tests/test_parameters/test_parameter_values.py::TestParameterValues::test_process_symbol tests/test_parameters/test_parameter_values.py::TestParameterValues::test_read_parameters_csv
.gitignore pybamm/parameters/parameter_values.py pybamm/models/submodels/electrolyte.py .flake8
.gitignore pybamm/parameters/parameter_values.py pybamm/models/submodels/electrolyte.py .flake8