diff --git a/pybamm/discretisations/meshes.py b/pybamm/discretisations/meshes.py
index 49a51303..cbc267d9 100644
--- a/pybamm/discretisations/meshes.py
+++ b/pybamm/discretisations/meshes.py
@@ -7,7 +7,14 @@ from __future__ import print_function, unicode_literals
 import numpy as np
 import pybamm
 
-KNOWN_DOMAINS = ["negative electrode", "separator", "positive electrode", "test"]
+KNOWN_DOMAINS = [
+    "negative electrode",
+    "separator",
+    "positive electrode",
+    "test",
+    "negative particle",
+    "positive particle",
+]
 
 
 class Mesh(dict):
diff --git a/pybamm/geometry/geometry.py b/pybamm/geometry/geometry.py
index 62a3e2f8..8b47ee8c 100644
--- a/pybamm/geometry/geometry.py
+++ b/pybamm/geometry/geometry.py
@@ -25,12 +25,14 @@ class Geometry(dict):
 class Geometry1DMacro(Geometry):
     def __init__(self, custom_geometry={}):
         super().__init__()
+        whole_cell = ["negative electrode", "separator", "positive electrode"]
+        x = pybamm.IndependentVariable("x", whole_cell)
         ln = pybamm.standard_parameters.ln
         ls = pybamm.standard_parameters.ls
 
-        self["negative electrode"] = {"x": {"min": pybamm.Scalar(0), "max": ln}}
-        self["separator"] = {"x": {"min": ln, "max": ln + ls}}
-        self["positive electrode"] = {"x": {"min": ln + ls, "max": pybamm.Scalar(1)}}
+        self["negative electrode"] = {x: {"min": pybamm.Scalar(0), "max": ln}}
+        self["separator"] = {x: {"min": ln, "max": ln + ls}}
+        self["positive electrode"] = {x: {"min": ln + ls, "max": pybamm.Scalar(1)}}
 
         # update with custom geometry if non empty
         self.update(custom_geometry)
@@ -40,11 +42,13 @@ class Geometry1DMicro(Geometry):
     def __init__(self, custom_geometry={}):
         super().__init__()
 
+        r = pybamm.IndependentVariable("r", ["negative particle", "positive particle"])
+
         self["negative particle"] = {
-            "r": {"min": pybamm.Scalar(0), "max": pybamm.Scalar(1)}
+            r: {"min": pybamm.Scalar(0), "max": pybamm.Scalar(1)}
         }
         self["positive particle"] = {
-            "r": {"min": pybamm.Scalar(0), "max": pybamm.Scalar(1)}
+            r: {"min": pybamm.Scalar(0), "max": pybamm.Scalar(1)}
         }
         # update with custom geometry if non empty
         self.update(custom_geometry)
@@ -64,11 +68,16 @@ class Geometry3DMacro(Geometry1DMacro):
     def __init__(self, custom_geometry={}):
         super().__init__()
 
-        y = {"min": pybamm.Scalar(0), "max": pybamm.standard_parameters.ly}
+        whole_cell = ["negative electrode", "separator", "positive electrode"]
+        y = pybamm.IndependentVariable("y", whole_cell)
+        z = pybamm.IndependentVariable("z", whole_cell)
+
+        y_lim = {"min": pybamm.Scalar(0), "max": pybamm.standard_parameters.ly}
 
-        z = {"min": pybamm.Scalar(0), "max": pybamm.Scalar(1)}
+        z_lim = {"min": pybamm.Scalar(0), "max": pybamm.Scalar(1)}
 
-        for domain in self["macro"]:
-            self["macro"][domain]["y"] = y
-            self["macro"][domain]["z"] = z
+        MACRO_DOMAINS = ["negative electrode", "separator", "positive electrode"]
+        for domain in MACRO_DOMAINS:
+            self[domain][y] = y_lim
+            self[domain][z] = z_lim
         self.update(custom_geometry)
diff --git a/pybamm/parameters/standard_parameters.py b/pybamm/parameters/standard_parameters.py
index efa65d97..d7117f46 100644
--- a/pybamm/parameters/standard_parameters.py
+++ b/pybamm/parameters/standard_parameters.py
@@ -82,6 +82,10 @@ Ls = Parameter("Ls")
 Lp = Parameter("Lp")
 Lx = Ln + Ls + Lp
 
+# 3D Geometry
+Ly = Parameter("Ly")
+Lz = Parameter("Lz")
+
 # Microscale Geometry
 R_n = Parameter("R_n")
 R_p = Parameter("R_p")
@@ -119,6 +123,8 @@ cp0_dimensional = Parameter("cp0")  # Initial li concentration in pos electrode
 ln = Ln / Lx
 ls = Ls / Lx
 lp = Lp / Lx
+ly = Ly / Lz
+lz = Lz / Lz
 
 # Microscale Geometry
 epsilon_n = Parameter("epsilon_n")  # Electrolyte volume fraction in neg electrode

Convert Geometry Keys to Variables
Convert the keys in the Geometry class from strings (e.g. "x") to pybamm independent variables
diff --git a/tests/test_geometry/test_geometry.py b/tests/test_geometry/test_geometry.py
index e8df45e0..cf7236ea 100644
--- a/tests/test_geometry/test_geometry.py
+++ b/tests/test_geometry/test_geometry.py
@@ -2,19 +2,78 @@
 # Tests for the base model class
 #
 import pybamm
+import unittest
 
 
-class TestGeometry:
+class TestGeometry1DMacro(unittest.TestCase):
     def test_add_custom_geometry(self):
+        geometry = pybamm.Geometry1DMacro()
+        whole_cell = ["negative electrode", "separator", "positive electrode"]
+        x = pybamm.IndependentVariable("x", whole_cell)
         custom_geometry = {
             "negative electrode": {
-                "x": {"min": pybamm.Scalar(1), "max": pybamm.Scalar(2)}
+                x: {"min": pybamm.Scalar(1), "max": pybamm.Scalar(2)}
+            }
+        }
+        geometry.update(custom_geometry)
+        self.assertEqual(
+            geometry["negative electrode"], custom_geometry["negative electrode"]
+        )
+
+    def test_geometry_keys(self):
+        geometry = pybamm.Geometry1DMacro()
+        for spatial_vars in geometry.values():
+            all(
+                self.assertIsInstance(spatial_var, pybamm.IndependentVariable)
+                for spatial_var in spatial_vars.keys()
+            )
+
+
+class TestGeometry1DMicro(unittest.TestCase):
+    def test_add_custom_geometry(self):
+        geometry = pybamm.Geometry1DMicro()
+        whole_cell = ["negative electrode", "separator", "positive electrode"]
+        x = pybamm.IndependentVariable("x", whole_cell)
+        custom_geometry = {
+            "negative electrode": {
+                x: {"min": pybamm.Scalar(1), "max": pybamm.Scalar(2)}
+            }
+        }
+        geometry.update(custom_geometry)
+
+        self.assertEqual(
+            geometry["negative electrode"], custom_geometry["negative electrode"]
+        )
+
+    def test_geometry_keys(self):
+        geometry = pybamm.Geometry1DMicro()
+        for spatial_vars in geometry.values():
+            all(
+                self.assertIsInstance(spatial_var, pybamm.IndependentVariable)
+                for spatial_var in spatial_vars.keys()
+            )
+
+
+class TestGeometry3DMacro(unittest.TestCase):
+    def test_add_custom_geometry(self):
+        geometry = pybamm.Geometry3DMacro()
+        whole_cell = ["negative electrode", "separator", "positive electrode"]
+        x = pybamm.IndependentVariable("x", whole_cell)
+        custom_geometry = {
+            "negative electrode": {
+                x: {"min": pybamm.Scalar(1), "max": pybamm.Scalar(2)}
             }
         }
-        geometry = pybamm.Geometry1DMacro(custom_geometry)
 
+        geometry.update(custom_geometry)
         self.assertEqual(
             geometry["negative electrode"], custom_geometry["negative electrode"]
         )
 
-    # process geometry test conducted within TestParameterValues
+    def test_geometry_keys(self):
+        geometry = pybamm.Geometry3DMacro()
+        for spatial_vars in geometry.values():
+            all(
+                self.assertIsInstance(spatial_var, pybamm.IndependentVariable)
+                for spatial_var in spatial_vars.keys()
+            )

pip install -e .[dev,docs]
parse_log_pytest
requirements.txt
flake8 pytest
apt-get update apt-get install -y python3-dev gfortran gcc libopenblas-dev liblapack-dev
3.6
requirements.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.17.1
entrypoints==0.4
flake8==5.0.4
guzzle-sphinx-theme==0.7.11
idna==3.10
imagesize==1.4.1
immutables==0.19
importlib-metadata==4.2.0
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.7.0
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@a688cd09ab28f59d9fa47bc95a5bcceb6199607e#egg=pybamm
pycodestyle==2.9.1
pycparser==2.21
pyflakes==2.5.0
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==4.3.2
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.17.1
      - entrypoints==0.4
      - flake8==5.0.4
      - guzzle-sphinx-theme==0.7.11
      - idna==3.10
      - imagesize==1.4.1
      - immutables==0.19
      - importlib-metadata==4.2.0
      - 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.7.0
      - 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.9.1
      - pycparser==2.21
      - pyflakes==2.5.0
      - 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==4.3.2
      - 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_geometry/test_geometry.py::TestGeometry1DMacro::test_geometry_keys tests/test_geometry/test_geometry.py::TestGeometry1DMicro::test_geometry_keys tests/test_geometry/test_geometry.py::TestGeometry3DMacro::test_add_custom_geometry tests/test_geometry/test_geometry.py::TestGeometry3DMacro::test_geometry_keys
tests/test_geometry/test_geometry.py::TestGeometry1DMacro::test_add_custom_geometry tests/test_geometry/test_geometry.py::TestGeometry1DMicro::test_add_custom_geometry
pybamm/geometry/geometry.py pybamm/parameters/standard_parameters.py pybamm/discretisations/meshes.py
pybamm/geometry/geometry.py pybamm/parameters/standard_parameters.py pybamm/discretisations/meshes.py