Global numerical modeling of magnetized plasma in a linear device A thesis submitted for the degree of Doctor of Philosophy to the Department of Physics Technical University of Denmark by Michael Løiten