A coupled two-phase shear layer/liquid film calculation method. Formulation of the physical problem and solution algorithm