Self consistent description of the bulk and edge plasma in fusion reactor