Assuming I have three domains (three cubes e.g.) placed side by side, the electrical potential equation ( which I am specifying as a User Defined Scalar (UDS)) is solved in the left and right domains but not in the middle one. Certain source terms are defined by the gradient of the electrical potential. However, I am encountering an issue where the first layer of cells adjacent to another domain shows incorrect gradient values. So, for example, the last cells of the left domain show a high gradient, since the neighbor cells (belonging to the middle domain are not solved)

I believe this occurs because the equation is not solved in the middle domain, causing those cells to retain their initialization values which is zero. What I need is a way to set the values of the middle cells to match, artificially, those in the left and right domains, respectively.

I think I would need to use macros like F_C0 and F_C1, THREAD_T0(t), and THREAD_T1(t); however, I haven't yet figured out how to code and access these cells correctly.

I believe this is a problem that a lot of people might encounter when modelling fuel cells and electrolyzer considering the GDL and the membrane.

Any ideas or suggestions?

More Diogo Loureiro Martinho's questions See All
Similar questions and discussions