TRISTREAM Trace streamlines on a triangular mesh using nodal velocities
FlowP=TriStream(tri,x,y,u,v,x0,y0) computes streamlines on the triangular mesh specified by tri with nodal coordinates [x,y]. Streamlines are traced using the nodal velocities u and v, and one streamline is produced for each seed point in the input vectors [x0,y0]. Streamlines are traced until one of four conditions is met: 1) The particle travels beyond the mesh. 2) The particle intersects its own path, creating a cycle. 3) The particle enters a stagnant zone (U~V~0). 4) A maximum number of iterations is exceeded. The output of TRISTREAM is a structure array, FlowP, containing particle flowpaths, and can be displayed using PLOTTRISTREAM.
TRISTREAM follows the approach outlined in the paper "Efficient Streamline Computations on Unstructured Grids" by Mihai Dorobantu
This algorithm uses a second-order Runge-Kutta method to integrate particle paths with adaptive pseudo-time-stepping.
@Alessandro Masullo, The function tsearch(x,y,t,x0,y0) can be replace by tsearchn(x',y',t,x0',y0') in newest version.
It doesn't work on the last version of Matlab. The function tsearch has been removed
Hello Matthew, I was wondering how hard would it be to adapt this to 3D triangular mesh?
Thanks I needed this, and I think you can propose to include this in pdetoolbox because this is a major thing pdetoolbox doesn't have..
This is just what i needed many thanks
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.