Repository: pybamm-team/PyBaMM

Issue:
Can we create KNOWN_DOMAINS dict instead of hard coding it?
Can we create the KNOWN_DOMAINS dictionary from the domains we enter in the geometry? 

For the add simple model notebook, I want to include a very simple model of SEI growth which I think covers a good range of useful things PyBaMM can do. But the domains currently in KNOWN_DOMAINS aren't really applicable. It would be useful for the domains to be added when they are defined in the geometry.  

Maybe there is a half way of being able to add an additional domains whilst still allowing us to take advantage of the structure of domains already in KNOWN DOMAINS.

#### Motivation
I really like what has been done in having a `BaseModel` and a `BatteryBaseModel` as it allows other simple models to be created which don't need to follow a full battery structure, which is useful for adding simple models. I think we should have something similar for domains.

Discussion:

Patch:
diff --git a/docs/tutorials/add-parameter-values.rst b/docs/tutorials/add-parameter-values.rst
index 6109f924c..dd4da5eae 100644
--- a/docs/tutorials/add-parameter-values.rst
+++ b/docs/tutorials/add-parameter-values.rst
@@ -75,7 +75,7 @@ To test this, add something like the following test to one of the model test fil
         parameter_values = pybamm.ParameterValues(
             "path/to/parameter/file.csv",
             {
-                "Typical current density": 1,
+                "Typical current": 1,
                 "Current function": os.path.join(
                     os.getcwd(),
                     "pybamm",
diff --git a/examples/notebooks/create-model.ipynb b/examples/notebooks/create-model.ipynb
index 1440a2372..d5da4ceef 100644
--- a/examples/notebooks/create-model.ipynb
+++ b/examples/notebooks/create-model.ipynb
@@ -276,7 +276,7 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "c = pybamm.Variable(\"Solvent concentration\", domain=\"negative electrode\")\n",
+    "c = pybamm.Variable(\"Solvent concentration\", domain=\"SEI layer\")\n",
     "L = pybamm.Variable(\"SEI thickness\")"
    ]
   },
@@ -537,8 +537,8 @@
    "outputs": [],
    "source": [
     "# define geometry\n",
-    "x = pybamm.SpatialVariable(\"x\", domain=\"negative electrode\", coord_sys=\"cartesian\")\n",
-    "geometry = {\"negative electrode\": {\"primary\": {x: {\"min\": pybamm.Scalar(0), \"max\": pybamm.Scalar(1)}}}}"
+    "x = pybamm.SpatialVariable(\"x\", domain=\"SEI layer\", coord_sys=\"cartesian\")\n",
+    "geometry = {\"SEI layer\": {\"primary\": {x: {\"min\": pybamm.Scalar(0), \"max\": pybamm.Scalar(1)}}}}"
    ]
   },
   {
@@ -590,11 +590,11 @@
    ],
    "source": [
     "# mesh and discretise\n",
-    "submesh_types = {\"negative electrode\": pybamm.Uniform1DSubMesh}\n",
+    "submesh_types = {\"SEI layer\": pybamm.Uniform1DSubMesh}\n",
     "var_pts = {x: 100}\n",
     "mesh = pybamm.Mesh(geometry, submesh_types, var_pts)\n",
     "                   \n",
-    "spatial_methods = {\"negative electrode\": pybamm.FiniteVolume}\n",
+    "spatial_methods = {\"SEI layer\": pybamm.FiniteVolume}\n",
     "disc = pybamm.Discretisation(mesh, spatial_methods)\n",
     "disc.process_model(model)"
    ]
diff --git a/examples/scripts/create-model.py b/examples/scripts/create-model.py
index 8f9f6bb0e..470dc44ee 100644
--- a/examples/scripts/create-model.py
+++ b/examples/scripts/create-model.py
@@ -33,7 +33,7 @@ def D(cc):
 
 
 # Define variables
-c = pybamm.Variable("Solvent concentration", domain="negative electrode")
+c = pybamm.Variable("Solvent concentration", domain="SEI layer")
 L = pybamm.Variable("SEI thickness")
 
 # 3. State governing equations ---------------------------------------------------------
@@ -70,11 +70,9 @@ model.variables = {
 "Using the model"
 
 # define geometry
-x = pybamm.SpatialVariable("x", domain="negative electrode", coord_sys="cartesian")
+x = pybamm.SpatialVariable("x", domain="SEI layer", coord_sys="cartesian")
 geometry = {
-    "negative electrode": {
-        "primary": {x: {"min": pybamm.Scalar(0), "max": pybamm.Scalar(1)}}
-    }
+    "SEI layer": {"primary": {x: {"min": pybamm.Scalar(0), "max": pybamm.Scalar(1)}}}
 }
 
 
@@ -87,25 +85,23 @@ def Diffusivity(cc):
 param = pybamm.ParameterValues(
     {
         "Reaction rate constant": 10,
-        "Initial thickness": 0.1,
-        "Partial molar volume": 0.01,
-        "Bulk electrolyte solvent concentration": 100,
+        "Initial thickness": 2,
+        "Partial molar volume": 10,
+        "Bulk electrolyte solvent concentration": 1,
         "Diffusivity": Diffusivity,
     }
 )
 
-param.process_symbol(D_dim(c))
-
 # process model and geometry
 param.process_model(model)
 param.process_geometry(geometry)
 
 # mesh and discretise
-submesh_types = {"negative electrode": pybamm.Uniform1DSubMesh}
+submesh_types = {"SEI layer": pybamm.Uniform1DSubMesh}
 var_pts = {x: 100}
 mesh = pybamm.Mesh(geometry, submesh_types, var_pts)
 
-spatial_methods = {"negative electrode": pybamm.FiniteVolume}
+spatial_methods = {"SEI layer": pybamm.FiniteVolume}
 disc = pybamm.Discretisation(mesh, spatial_methods)
 disc.process_model(model)
 
@@ -118,8 +114,7 @@ solver.solve(model, t)
 L_dim_out = pybamm.ProcessedVariable(
     model.variables["SEI thickness"], solver.t, solver.y, mesh
 )
-pybamm.LithiumIonBaseModel().defa
+
 # plot
 plt.plot(solver.t, L_dim_out(solver.t))
 plt.show()
-
diff --git a/input/parameters/lithium-ion/mcmb2528_lif6-in-ecdmc_lico2_parameters_Dualfoil.csv b/input/parameters/lithium-ion/mcmb2528_lif6-in-ecdmc_lico2_parameters_Dualfoil.csv
index 08c6d65a9..5ad2863b5 100644
--- a/input/parameters/lithium-ion/mcmb2528_lif6-in-ecdmc_lico2_parameters_Dualfoil.csv
+++ b/input/parameters/lithium-ion/mcmb2528_lif6-in-ecdmc_lico2_parameters_Dualfoil.csv
@@ -17,7 +17,7 @@ Positive current collector thickness,2.5E-05,m,Scott Moura FastDFN,
 Number of electrodes connected in parallel to make a cell,1,-,- ,
 Lower voltage cut-off,3.105,V,-,
 Upper voltage cut-off,4.7,V,-,
-Typical current density,24,A/m^2,-,
+Typical current,24,A/m^2,-,
 ,,,,
 # Electrolyte properties,,,,
 Typical electrolyte concentration,1000,mol.m-3,Scott Moura FastDFN,
diff --git a/pybamm/__init__.py b/pybamm/__init__.py
index 9381efc8f..d00512dca 100644
--- a/pybamm/__init__.py
+++ b/pybamm/__init__.py
@@ -113,7 +113,6 @@ from .expression_tree.simplify import (
 #
 # Model classes
 #
-from .meshes.meshes import KNOWN_DOMAINS  # need this for importing standard variables
 from .models import standard_variables
 from .models.base_models import (
     BaseModel,
diff --git a/pybamm/expression_tree/concatenations.py b/pybamm/expression_tree/concatenations.py
index 736680b08..9009310c6 100644
--- a/pybamm/expression_tree/concatenations.py
+++ b/pybamm/expression_tree/concatenations.py
@@ -40,11 +40,6 @@ class Concatenation(pybamm.Symbol):
                 domain += child_domain
             else:
                 raise pybamm.DomainError("""domain of children must be disjoint""")
-
-        # ensure domain is sorted according to KNOWN_DOMAINS
-        domain_dict = {d: pybamm.KNOWN_DOMAINS.index(d) for d in domain}
-        domain = sorted(domain_dict, key=domain_dict.__getitem__)
-
         return domain
 
     def _concatenation_evaluate(self, children_eval):
@@ -121,7 +116,7 @@ class DomainConcatenation(Concatenation):
     careful about domains.
 
     It is assumed that each child has a domain, and the final concatenated vector will
-    respect the sizes and ordering of domains established in pybamm.KNOWN_DOMAINS
+    respect the sizes and ordering of domains established in mesh keys
 
     **Extends**: :class:`pybamm.Concatenation`
 
@@ -149,6 +144,10 @@ class DomainConcatenation(Concatenation):
         # Allow the base class to sort the domains into the correct order
         super().__init__(*children, name="domain concatenation")
 
+        # ensure domain is sorted according to mesh keys
+        domain_dict = {d: mesh.domain_order.index(d) for d in self.domain}
+        self.domain = sorted(domain_dict, key=domain_dict.__getitem__)
+
         if copy_this is None:
             # store mesh
             self._mesh = mesh
diff --git a/pybamm/expression_tree/symbol.py b/pybamm/expression_tree/symbol.py
index 05d64a446..21ba6a3ea 100644
--- a/pybamm/expression_tree/symbol.py
+++ b/pybamm/expression_tree/symbol.py
@@ -84,27 +84,6 @@ class Symbol(anytree.NodeMixin):
         except TypeError:
             raise TypeError("Domain: argument domain is not iterable")
         else:
-            # check that domains are all known domains
-            try:
-                indicies = [pybamm.KNOWN_DOMAINS.index(d) for d in domain]
-            except ValueError:
-                raise ValueError(
-                    """domain "{}" is not in known domains ({})""".format(
-                        domain, str(pybamm.KNOWN_DOMAINS)
-                    )
-                )
-
-            # check that domains are sorted correctly
-            is_sorted = all(a <= b for a, b in zip(indicies, indicies[1:]))
-            if not is_sorted:
-                raise ValueError(
-                    """
-                    domain "{}" is not sorted according to known domains ({})
-                    """.format(
-                        domain, str(pybamm.KNOWN_DOMAINS)
-                    )
-                )
-
             self._domain = domain
             # Update id since domain has changed
             self.set_id()
diff --git a/pybamm/meshes/meshes.py b/pybamm/meshes/meshes.py
index d6116d97c..80be672c8 100644
--- a/pybamm/meshes/meshes.py
+++ b/pybamm/meshes/meshes.py
@@ -7,15 +7,6 @@ from __future__ import print_function, unicode_literals
 import numpy as np
 import pybamm
 
-KNOWN_DOMAINS = [
-    "negative electrode",
-    "separator",
-    "positive electrode",
-    "test",
-    "negative particle",
-    "positive particle",
-]
-
 
 class Mesh(dict):
     """
@@ -42,7 +33,7 @@ class Mesh(dict):
 
         # create submesh_pts from var_pts
         submesh_pts = {}
-        for domain in list(geometry.keys()):
+        for domain in geometry:
             submesh_pts[domain] = {}
             for prim_sec in list(geometry[domain].keys()):
                 for var in list(geometry[domain][prim_sec].keys()):
@@ -55,6 +46,17 @@ class Mesh(dict):
                     submesh_pts[domain][var.id] = var_id_pts[var.id]
         self.submesh_pts = submesh_pts
 
+        # Input domain order manually
+        self.domain_order = []
+        # First the macroscale domains, whose order we care about
+        for domain in ["negative electrode", "separator", "positive electrode"]:
+            if domain in geometry:
+                self.domain_order.append(domain)
+        # Then the remaining domains
+        for domain in geometry:
+            if domain not in ["negative electrode", "separator", "positive electrode"]:
+                self.domain_order.append(domain)
+
         for domain in geometry:
             if "secondary" in geometry[domain].keys():
                 for var in geometry[domain]["secondary"].keys():
@@ -64,7 +66,6 @@ class Mesh(dict):
             self[domain] = [
                 submesh_types[domain](geometry[domain]["primary"], submesh_pts[domain])
             ] * repeats
-        self.add_ghost_meshes()
 
         # add ghost meshes
         self.add_ghost_meshes()
diff --git a/pybamm/models/base_models.py b/pybamm/models/base_models.py
index ae2099acb..0f2d2c8fb 100644
--- a/pybamm/models/base_models.py
+++ b/pybamm/models/base_models.py
@@ -339,7 +339,7 @@ class StandardBatteryBaseModel(BaseModel):
                 input_path, "mcmb2528_lif6-in-ecdmc_lico2_parameters_Dualfoil.csv"
             ),
             {
-                "Typical current density": 1,
+                "Typical current": 1,
                 "Current function": os.path.join(
                     os.getcwd(),
                     "pybamm",
@@ -511,7 +511,7 @@ class LeadAcidBaseModel(StandardBatteryBaseModel):
         self.default_parameter_values = pybamm.ParameterValues(
             "input/parameters/lead-acid/default.csv",
             {
-                "Typical current density": 1,
+                "Typical current": 1,
                 "Current function": os.path.join(
                     os.getcwd(),
                     "pybamm",
diff --git a/pybamm/parameters/electrical_parameters.py b/pybamm/parameters/electrical_parameters.py
index d20c3001d..0c3d1b161 100644
--- a/pybamm/parameters/electrical_parameters.py
+++ b/pybamm/parameters/electrical_parameters.py
@@ -26,7 +26,7 @@ def abs_non_zero(x):
 # --------------------------------------------------------------------------------------
 "Dimensional Parameters"
 # Electrical
-I_typ = pybamm.Parameter("Typical current density")
+I_typ = pybamm.Parameter("Typical current")
 Q = pybamm.Parameter("Cell capacity")
 C_rate = abs(I_typ / Q)
 n_electrodes_parallel = pybamm.Parameter(
diff --git a/pybamm3.5/pip-selfcheck.json b/pybamm3.5/pip-selfcheck.json
new file mode 100644
index 000000000..304dee62c
--- /dev/null
+++ b/pybamm3.5/pip-selfcheck.json
@@ -0,0 +1,1 @@
+{"last_check":"2019-05-10T20:48:18Z","pypi_version":"19.1.1"}
\ No newline at end of file


Test patch:
diff --git a/tests/convergence/test_models/test_lead_acid/test_asymptotics_convergence.py b/tests/convergence/test_models/test_lead_acid/test_asymptotics_convergence.py
index 3b7d1a6d4..1a9eeb61c 100644
--- a/tests/convergence/test_models/test_lead_acid/test_asymptotics_convergence.py
+++ b/tests/convergence/test_models/test_lead_acid/test_asymptotics_convergence.py
@@ -42,7 +42,7 @@ class TestAsymptoticConvergence(unittest.TestCase):
             # Update current (and hence C_e) in the parameters
             param = pybamm.ParameterValues(
                 base_parameters=full_model.default_parameter_values,
-                optional_parameters={"Typical current density": current},
+                optional_parameters={"Typical current": current},
             )
             param.update_model(leading_order_model, loqs_disc)
             param.update_model(composite_model, comp_disc)
diff --git a/tests/unit/test_expression_tree/test_concatenations.py b/tests/unit/test_expression_tree/test_concatenations.py
index 5b7444e9f..38eba0ca0 100644
--- a/tests/unit/test_expression_tree/test_concatenations.py
+++ b/tests/unit/test_expression_tree/test_concatenations.py
@@ -2,7 +2,7 @@
 # Tests for the Concatenation class and subclasses
 #
 import pybamm
-from tests import get_discretisation_for_testing
+from tests import get_mesh_for_testing, get_discretisation_for_testing
 import numpy as np
 import unittest
 
@@ -40,13 +40,6 @@ class TestConcatenations(unittest.TestCase):
         with self.assertRaises(pybamm.DomainError):
             pybamm.Concatenation(a, b, d)
 
-        # ensure concatenated domains are sorted correctly
-        conc = pybamm.Concatenation(c, a, b)
-        self.assertEqual(
-            conc.domain,
-            ["negative electrode", "separator", "positive electrode", "test"],
-        )
-
     def test_numpy_concatenation_vectors(self):
         # with entries
         y = np.linspace(0, 1, 15)
@@ -142,6 +135,23 @@ class TestConcatenations(unittest.TestCase):
             (mesh[b_dom[0]][0].npts + mesh[a_dom[0]][0].npts + mesh[b_dom[1]][0].npts,),
         )
 
+    def test_domain_concatenation_domains(self):
+        mesh = get_mesh_for_testing()
+        # ensure concatenated domains are sorted correctly
+        a = pybamm.Symbol("a", domain=["negative electrode"])
+        b = pybamm.Symbol("b", domain=["separator", "positive electrode"])
+        c = pybamm.Symbol("c", domain=["negative particle"])
+        conc = pybamm.DomainConcatenation([c, a, b], mesh)
+        self.assertEqual(
+            conc.domain,
+            [
+                "negative electrode",
+                "separator",
+                "positive electrode",
+                "negative particle",
+            ],
+        )
+
     def test_concatenation_orphans(self):
         a = pybamm.Variable("a")
         b = pybamm.Variable("b")
diff --git a/tests/unit/test_expression_tree/test_symbol.py b/tests/unit/test_expression_tree/test_symbol.py
index 90bb54510..51ed57753 100644
--- a/tests/unit/test_expression_tree/test_symbol.py
+++ b/tests/unit/test_expression_tree/test_symbol.py
@@ -39,18 +39,12 @@ class TestSymbol(unittest.TestCase):
         check_are_equal(super(pybamm.Symbol, symp).children, (symc1, symc2, symc3))
 
     def test_symbol_domains(self):
-        a = pybamm.Symbol("a", domain=pybamm.KNOWN_DOMAINS[0])
-        self.assertEqual(a.domain, [pybamm.KNOWN_DOMAINS[0]])
-        a = pybamm.Symbol("a", domain=pybamm.KNOWN_DOMAINS[:2])
-        self.assertEqual(a.domain, pybamm.KNOWN_DOMAINS[:2])
+        a = pybamm.Symbol("a", domain="test")
+        self.assertEqual(a.domain, ["test"])
+        a = pybamm.Symbol("a", domain=["t", "e", "s"])
+        self.assertEqual(a.domain, ["t", "e", "s"])
         with self.assertRaises(TypeError):
             a = pybamm.Symbol("a", domain=1)
-        with self.assertRaises(ValueError):
-            a = pybamm.Symbol("a", domain=["unknown domain"])
-        with self.assertRaises(ValueError):
-            a = pybamm.Symbol(
-                "a", domain=[pybamm.KNOWN_DOMAINS[1], pybamm.KNOWN_DOMAINS[0]]
-            )
 
     def test_symbol_methods(self):
         a = pybamm.Symbol("a")
diff --git a/tests/unit/test_models/standard_output_tests.py b/tests/unit/test_models/standard_output_tests.py
index e5264e8ed..26f02b777 100644
--- a/tests/unit/test_models/standard_output_tests.py
+++ b/tests/unit/test_models/standard_output_tests.py
@@ -21,7 +21,7 @@ class StandardOutputTests(object):
         elif isinstance(self.model, pybamm.LeadAcidBaseModel):
             self.chemistry = "Lead acid"
 
-        current_sign = np.sign(parameter_values["Typical current density"])
+        current_sign = np.sign(parameter_values["Typical current"])
         if current_sign == 1:
             self.operating_condition = "discharge"
         elif current_sign == -1:
@@ -63,10 +63,11 @@ class BaseOutputTest(object):
         self.x_p_edge = disc.mesh["positive electrode"][0].edges
         self.x_edge = disc.mesh.combine_submeshes(*whole_cell)[0].edges
 
-        self.r_n = disc.mesh["negative particle"][0].nodes
-        self.r_p = disc.mesh["positive particle"][0].nodes
-        self.r_n_edge = disc.mesh["negative particle"][0].edges
-        self.r_p_edge = disc.mesh["positive particle"][0].edges
+        if isinstance(self.model, pybamm.LithiumIonBaseModel):
+            self.r_n = disc.mesh["negative particle"][0].nodes
+            self.r_p = disc.mesh["positive particle"][0].nodes
+            self.r_n_edge = disc.mesh["negative particle"][0].edges
+            self.r_p_edge = disc.mesh["positive particle"][0].edges
 
     def get_var(self, var):
         "Helper function to reduce repeated code."
@@ -451,10 +452,10 @@ class CurrentTests(BaseOutputTest):
         current_param = pybamm.electrical_parameters.current_with_time
         parameter_values = self.model.default_parameter_values
         i_cell = parameter_values.process_symbol(current_param).evaluate(t=t)
-        np.testing.assert_array_almost_equal(self.i_s_n(t, x_n[0]), i_cell, decimal=5)
-        np.testing.assert_array_almost_equal(self.i_s_n(t, x_n[-1]), 0)
-        np.testing.assert_array_almost_equal(self.i_s_p(t, x_p[-1]), i_cell)
-        np.testing.assert_array_almost_equal(self.i_s_p(t, x_p[0]), 0)
+        np.testing.assert_array_almost_equal(self.i_s_n(t, x_n[0]), i_cell, decimal=4)
+        np.testing.assert_array_almost_equal(self.i_s_n(t, x_n[-1]), 0, decimal=4)
+        np.testing.assert_array_almost_equal(self.i_s_p(t, x_p[-1]), i_cell, decimal=4)
+        np.testing.assert_array_almost_equal(self.i_s_p(t, x_p[0]), 0, decimal=4)
 
     def test_all(self):
         self.test_interfacial_current_average()
diff --git a/tests/unit/test_models/test_lead_acid/test_loqs.py b/tests/unit/test_models/test_lead_acid/test_loqs.py
index 290e36a96..5178c0986 100644
--- a/tests/unit/test_models/test_lead_acid/test_loqs.py
+++ b/tests/unit/test_models/test_lead_acid/test_loqs.py
@@ -31,14 +31,14 @@ class TestLeadAcidLOQS(unittest.TestCase):
     def test_charge(self):
         model = pybamm.lead_acid.LOQS()
         parameter_values = model.default_parameter_values
-        parameter_values.update({"Typical current density": -1})
+        parameter_values.update({"Typical current": -1})
         modeltest = tests.StandardModelTest(model, parameter_values=parameter_values)
         modeltest.test_all()
 
     def test_zero_current(self):
         model = pybamm.lead_acid.LOQS()
         parameter_values = model.default_parameter_values
-        parameter_values.update({"Typical current density": 0})
+        parameter_values.update({"Typical current": 0})
         modeltest = tests.StandardModelTest(model, parameter_values=parameter_values)
         modeltest.test_all()
 
diff --git a/tests/unit/test_models/test_lithium_ion/test_lithium_ion_spm.py b/tests/unit/test_models/test_lithium_ion/test_lithium_ion_spm.py
index 2a9133969..153a515ac 100644
--- a/tests/unit/test_models/test_lithium_ion/test_lithium_ion_spm.py
+++ b/tests/unit/test_models/test_lithium_ion/test_lithium_ion_spm.py
@@ -30,14 +30,14 @@ class TestSPM(unittest.TestCase):
     def test_charge(self):
         model = pybamm.lithium_ion.SPM()
         parameter_values = model.default_parameter_values
-        parameter_values.update({"Typical current density": -1})
+        parameter_values.update({"Typical current": -1})
         modeltest = tests.StandardModelTest(model, parameter_values=parameter_values)
         modeltest.test_all()
 
     def test_zero_current(self):
         model = pybamm.lithium_ion.SPM()
         parameter_values = model.default_parameter_values
-        parameter_values.update({"Typical current density": 0})
+        parameter_values.update({"Typical current": 0})
         modeltest = tests.StandardModelTest(model, parameter_values=parameter_values)
         modeltest.test_all()
 
diff --git a/tests/unit/test_parameters/test_dimensionless_parameter_values_lithium_ion.py b/tests/unit/test_parameters/test_dimensionless_parameter_values_lithium_ion.py
index 350711fc7..a8f1a5627 100644
--- a/tests/unit/test_parameters/test_dimensionless_parameter_values_lithium_ion.py
+++ b/tests/unit/test_parameters/test_dimensionless_parameter_values_lithium_ion.py
@@ -21,7 +21,7 @@ class TestDimensionlessParameterValues(unittest.TestCase):
                 input_path, "mcmb2528_lif6-in-ecdmc_lico2_parameters_Dualfoil.csv"
             ),
             {
-                "Typical current density": 1,
+                "Typical current": 1,
                 "Current function": os.path.join(
                     os.getcwd(),
                     "pybamm",
diff --git a/tests/unit/test_parameters/test_electrical_parameters.py b/tests/unit/test_parameters/test_electrical_parameters.py
index 55b1e0044..4f7d1e053 100644
--- a/tests/unit/test_parameters/test_electrical_parameters.py
+++ b/tests/unit/test_parameters/test_electrical_parameters.py
@@ -19,7 +19,7 @@ class TestElectricalParameters(unittest.TestCase):
                 "Electrode height": 0.1,
                 "Electrode depth": 0.1,
                 "Number of electrodes connected in parallel to make a cell": 8,
-                "Typical current density": 2,
+                "Typical current": 2,
                 "Current function": os.path.join(
                     os.getcwd(),
                     "pybamm",
diff --git a/tests/unit/test_parameters/test_standard_parameters_lead_acid.py b/tests/unit/test_parameters/test_standard_parameters_lead_acid.py
index 7bca63eab..ccacb1f57 100644
--- a/tests/unit/test_parameters/test_standard_parameters_lead_acid.py
+++ b/tests/unit/test_parameters/test_standard_parameters_lead_acid.py
@@ -34,7 +34,7 @@ class TestStandardParametersLeadAcid(unittest.TestCase):
         parameter_values = pybamm.ParameterValues(
             "input/parameters/lead-acid/default.csv",
             {
-                "Typical current density": 1,
+                "Typical current": 1,
                 "Electrolyte diffusivity": os.path.join(
                     input_path, "electrolyte_diffusivity_Gu1997.py"
                 ),
@@ -69,7 +69,7 @@ class TestStandardParametersLeadAcid(unittest.TestCase):
 
         # process parameters and discretise
         parameter_values = pybamm.ParameterValues(
-            "input/parameters/lead-acid/default.csv", {"Typical current density": 1}
+            "input/parameters/lead-acid/default.csv", {"Typical current": 1}
         )
         disc = get_discretisation_for_testing()
         processed_s = disc.process_symbol(parameter_values.process_symbol(s_param))
@@ -93,7 +93,7 @@ class TestStandardParametersLeadAcid(unittest.TestCase):
                 "Electrode height": 0.1,
                 "Electrode depth": 0.1,
                 "Number of electrodes connected in parallel to make a cell": 8,
-                "Typical current density": 2,
+                "Typical current": 2,
                 "Current function": os.path.join(
                     os.getcwd(),
                     "pybamm",
@@ -129,7 +129,7 @@ class TestStandardParametersLeadAcid(unittest.TestCase):
         parameter_values = pybamm.ParameterValues(
             "input/parameters/lead-acid/default.csv",
             {
-                "Typical current density": 1,
+                "Typical current": 1,
                 "Current function": os.path.join(
                     os.getcwd(),
                     "pybamm",
diff --git a/tests/unit/test_parameters/test_update_parameters.py b/tests/unit/test_parameters/test_update_parameters.py
index 6a0a04e41..a2d637df9 100644
--- a/tests/unit/test_parameters/test_update_parameters.py
+++ b/tests/unit/test_parameters/test_update_parameters.py
@@ -50,7 +50,7 @@ class TestUpdateParameters(unittest.TestCase):
         # process and solve with updated parameter values
         parameter_values_update = pybamm.ParameterValues(
             base_parameters=model2.default_parameter_values,
-            optional_parameters={"Typical current density": 2},
+            optional_parameters={"Typical current": 2},
         )
         modeltest2.test_update_parameters(parameter_values_update)
         modeltest2.test_solving(t_eval=t_eval)