I am working on a multiphysics problem involving electrostatics (direct current) and heat transfer. I was messing around with the Joule Heating tutorial case and need to answer some questions to apply this to my problem.

The tutorial uses Dirichlet boundary conditions for the voltage. How could you calculate the corresponding electric current going through the system? Would you just integrate the electrical conductivity multiplied with the voltage gradient over the boundary surfaces?

If the above regarding the calculation of the current is correct, I assume, I could use the electric current as boundary condition by setting the required voltage gradient at the boundary?

Unfortunately my problem is far more complex than the tutorial as it involves very large temperature gradients, hence the thermal and electric conductivities can not be considered constant. I’ve been looking at other multiphysics problems (Buoyancy driven flow) and noticed, I can combine the electric pde with the heat pde to be solved coupled with ndsolve.

However, I can’t use static boundary conditions for the voltage gradient as the conductivity changes with the temperature field. I was thinking, I could use a WhenEvent to calculate the required voltage gradient at the boundary from the desired current by integrating the electric conductivity over the boundary’s surface at the beginning of each step. Is this the way to go on this, or is there a more elegant solution to this?