

Our study ends with an example of multiphase flow simulation conducted using the lattice Boltzmann method. The GPU with the Jacket plugin for MATLAB speeds up gradient computation by a factor of up to 138 xin the more challenging case. We then present details of the MATLAB implementation of these ideas, along with speedup comparisons of convolution performed on a single core of an Intel® Core i7-970 processor and on an Nvidia® GeForce GTX 580 GPU using the Jacket plugin for MATLAB developed by AccelerEyes®. This is followed by a description of how convolution can be used to reduce computer time in the gradient calculation. īelow, we describe isotropic and anisotropic discretizations that will and will not conserve the isotropic property of the differentiated function respectively.
#Convolution matlab 2012 series#
We also believe that optimal or maximal isotropy can only be reached with a discrete filter when the error terms of Taylor’s series expansion are isotropic, as explained in detail by. The method is based on a filter which is generally not split along any direction, and there is no need to make the assumption of a continuous filter to reach isotropy, as done by. This "omnidirectional" approach makes it possible to improve the limitations inherent in handling high density ratios between the phases and to significantly reduce spurious currents at the interface.

To address this issue, we present an efficient computational method for obtaining discrete isotropic gradients that was previously applied to simulate two-phase flows within the lattice Boltzman framework. Although it can still be a viable tool, it is clear that the 1D-based method is becoming less useful for simulating these phenomena, which are not, in general, biased toward any particular direction. As a result, definition of the geometric progress of the interface requires many gradient estimation computations, as is the case in moving and deforming bubbles or droplets, for example. In this respect, traditional gradient calculation methods based on 1D edge detection are not necessarily suited for the underlying physics, because there is no direction in which the gradients of the phase contours tend to evolve over time. A threshold is then applied to obtain an edge shape.įor multiphase flows, an edge or contour corresponds to the interface between the fluids. In this field, edge detection techniques rely on the application of convolution masks to provide a filter or kernel to calculate gradients in two perpendicular directions. Commonly used edge detection methods are Canny, Prewitt, Robertsand Sobel, which can be found in MATLAB’s platform. Typical applications are gradient reconstruction in computational fluid dynamics, edge detection in computer graphics and biomedical imaging, and phase boundary definition in the modeling of multiphase flows.Įdge detection, which is widely performed in image analysis, is an operation that requires gradient calculation. The design of discrete operators or filters for the calculation of gradients is a classical topic in scientific computing.
