Development of a two-dimensional fluid code and its application to the Doublet III divertor experiment