The non-uniqueness of solution and compatibility between the coupled boundary conditions in computing velocity potential and streamfunction from horizontal velocity in a limited domain of arbitrary shape are revisited theoretically with rigorous mathematic treatments.Classic integral formulas and their variants are used to formulate solutions for the coupled problems.In the absence of data holes,the total solution is the sum of two integral solutions.One is the internally induced solution produced purely and uniquely by the domain internal divergence and vorticity,and its two components(velocity potential and streamfunction) can be constructed by applying Green's function for Poisson equation in unbounded domain to the divergence and vorticity inside the domain.The other is the externally induced solution produced purely but non-uniquely by the domain external divergence and vorticity,and the non-uniqueness is caused by the harmonic nature of the solution and the unknown divergence and vorticity distributions outside the domain.By setting either the velocity potential(or streamfunction) component to zero,the other component of the externally induced solution can be expressed by the imaginary(or real) part of the Cauchy integral constructed using the coupled boundary conditions and solvability conditions that exclude the internally induced solution.The streamfunction(or velocity potential) for the externally induced solution can also be expressed by the boundary integral of a double-layer(or singlelayer) density function.In the presence of data holes,the total solution includes a data-hole-induced solution in addition to the above internally and externally induced solutions.
Built on the integral formulas in Part I,numerical methods are developed for computing velocity potential and streamfunction in a limited domain.When there is no inner boundary(around a data hole) inside the domain,the total solution is the sum of the internally and externally induced parts.For the internally induced part,three numerical schemes(grid-staggering,local-nesting and piecewise continuous integration) are designed to deal with the singularity of the Green's function encountered in numerical calculations.For the externally induced part,by setting the velocity potential(or streamfunction) component to zero,the other component of the solution can be computed in two ways:(1) Solve for the density function from its boundary integral equation and then construct the solution from the boundary integral of the density function.(2) Use the Cauchy integral to construct the solution directly.The boundary integral can be discretized on a uniform grid along the boundary.By using local-nesting(or piecewise continuous integration),the scheme is refined to enhance the discretization accuracy of the boundary integral around each corner point(or along the entire boundary).When the domain is not free of data holes,the total solution contains a data-hole-induced part,and the Cauchy integral method is extended to construct the externally induced solution with irregular external and internal boundaries.An automated algorithm is designed to facilitate the integrations along the irregular external and internal boundaries.Numerical experiments are performed to evaluate the accuracy and efficiency of each scheme relative to others.