Modeling of micro-Barkhausen-Kurz devices for terahertz applications