Computing anode heating voltage in high-pressure arc discharges and modelling rod electrodes in dc and ac regimes