I'm modelling a system with a nanosized semiconductor in 1d, inside which I want to find the electrostatic potential. Having found this I am unsure what boundary conditions to put on this, when it is connected to a metal on one side and to vacuum on the other. So far I have put that it is continuous at the metal interface (inside which it is a constant). But what about at the boundary to vacuum. I want to say that it should be simply continiuous which then gives that V(x) has a finite value, non constant, outside the semiconductor. But on the other hand this seems unphysical, since it would imply that there is a finite electric field outside the semiconductor. Should I simply put that V(x)=0 at the boundary to vacuum?