Resistance of an object with arbitrary shape Suppose to have a conductor with a non-trivial geometry, like the one in the picture:

The shape does not really matter for this question, as long as you suppose to have at least one "hole" in the $z-x$ plane and the sectional area is not constant along the $y$ direction.
I want to calculate the effective resistance of this conductor, that can be supposed to be homogeneous with conductivity $\sigma$, between the two extreme points on the $y$ axis.
Normally, to calculate the resistance of a material, I would proceed in the following way:


*

*Solve numerically the Laplace equation $\nabla^2V=0$ with boundary conditions:


*

*$V(x,y=0)=1$ and $V(x,y=L)=0$

*$\nabla V \cdot \hat n=0$ at every other boundary


*Integrate the Ohm's law
$$ I=\int \mathbf J \cdot d\mathbf S = \int \sigma \mathbf E\cdot d\mathbf S =-\int \sigma \nabla V \cdot d\mathbf S = \Delta V/R$$

*Solve with respect to $R$
If the section $A$ was constant this algorithm would give you the well-known formula $R=\rho\frac{L}{A}$, but it's clear that in this case is not appliable since the section is different at different $y$ points.
How is then possible to calculate $R$?
Without any holes, I think the formula
$$R=\int_0^LdR=\int_0^L\rho\frac{dy}{A(y)}$$
should work, but I have the feeling that if I have a bifurcation things become more complicated.
 A: It's necessary only to use your numerical results to calculate the total current entering or leaving one of the connections. At each discretized point at the boundary, calculate the gradient of the voltage normal to the connection and divide it by the material's resistivity. Since you've set the voltage drop to 1, you can take the reciprocal of the sum of these values weighted by boundary area to determine the object's electrical resistance.
For improved accuracy, you could average the current at both connections (the values should be identical in theory, but some discrepancy will arise in a numerical solution).
The same approach can be used to find the total thermal resistance of an object by replacing the voltage by temperature and the resistivity by the reciprocal of the thermal conductivity.
A: Using a numerical model of current flow in a conductor with such a geometry, we can calculate the resistance. The Laplace equation is solved, with the boundary conditions formulated by the author. It will be enough to calculate the total current in the initial and in the final section (for comparison). In fig. The distribution of potential and current density is shown at $\sigma =1$. In this case $I=-\int {\sigma \nabla V \vec {dS}} =0.133\sigma \delta$, $\delta $ - is thickness.
 
