How do I solve problems in 4d domains?

I’m trying to implement the Newman model of a battery. This model includes one macro domain (3d, x) and a microdomain (1d, r), where the microdomain represent small spherical particles. Here’s the equations for the macrodomain:

And for the microdomain:

I’m wondering how to assemble one 4d domain for all of this, or if there’s a workaround that I could use. I found one possible workaround, where the microdomain is approximated using Legendre polynomials (in “CONTINUUM-SCALE LITHIUM-ION BATTERY CELL MODEL”). But I’m wondering if there is any other method possible in dolfinx (the example I gave uses dolfin).