Improved treatment of the open boundary in the method of Lattice Boltzmann equation: general description of the method. (9th December 2004)