Often I have seen users getting confused about how to define the work function of their custom semiconductor material. This is because the work function of a semiconductor depends on the level of doping and when creating a material model for a doped semiconductor, users often include the doping effect in their input work function values. However, this would be the wrong thing to do. The input work function of a custom semiconductor should be for the intrinsic material. When the user puts a doping object on top of their semiconductor, the CHARGE solver automatically accounts for the doping effects of the work function and recalculates it. So if you use a modified work function to begin with, the solver will adjust it again and you would end up with a wrong work function.