# Implementing a potential problem with a current condition

**URL:** <https://fenicsproject.discourse.group/t/implementing-a-potential-problem-with-a-current-condition/14491>\
**Category:** variational formulation\
**Created:** [April 30, 2024, 3:35pm UTC](https://fenicsproject.discourse.group/t/implementing-a-potential-problem-with-a-current-condition/14491 "2024-04-30T15:35:41Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![raboynics](https://avatars.discourse-cdn.com/v4/letter/r/4bbf92/32.png) [@raboynics](https://fenicsproject.discourse.group/u/raboynics)\
**Post date:** [July 13, 2024, 12:13pm UTC](https://fenicsproject.discourse.group/t/implementing-a-potential-problem-with-a-current-condition/14491/27 "2024-07-13T12:13:37Z")

</div>

I’ve just revised my codes, and I believe that manually setting the input/output electric current is enough to fully determine the electrostatic potential (voltage), up to a constant, of course. You can find such a MWE code at [Lost with boundary conditions in ME spaces](https://fenicsproject.discourse.group/t/lost-with-boundary-conditions-in-me-spaces/15087) Daniel. Let me know what you think.

I do get consistent results (Ohm’s law safisfied), when I integrate the current density over the input and output surfaces I do get the correct current I have set. And I do get the full electrostatics potential field figured out everywhere, including on the boundaries, and it is far from being constant in my case (mixed element, coupling with temperature).

---

_[View the full topic](https://fenicsproject.discourse.group/t/implementing-a-potential-problem-with-a-current-condition/14491)._
