# How do I solve problems in 4d domains?

**URL:** <https://fenicsproject.discourse.group/t/how-do-i-solve-problems-in-4d-domains/10943>\
**Category:** dolfinx\
**Created:** [April 14, 2023, 2:03pm UTC](https://fenicsproject.discourse.group/t/how-do-i-solve-problems-in-4d-domains/10943 "2023-04-14T14:03:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hjalmar](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/hjalmar/32/4943_2.png) [@Hjalmar](https://fenicsproject.discourse.group/u/Hjalmar)\
**Post date:** [April 14, 2023, 2:03pm UTC](https://fenicsproject.discourse.group/t/how-do-i-solve-problems-in-4d-domains/10943/1 "2023-04-14T14:03:31Z")

</div>

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:

 ![image](https://global.discourse-cdn.com/free1/uploads/fenicsproject1/original/2X/c/c7a15fc99299210242912bdd80bdd5e3d9995bce.png)  
And for the microdomain:  
 ![image](https://global.discourse-cdn.com/free1/uploads/fenicsproject1/original/2X/c/cd1b41fd00c2f6fbc152e38994a64f4c7445d6e4.png)  
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).
