File Exchange

image thumbnail

TriStream

version 1.0 (78.4 KB) by

Compute streamlines on triangular mesh

2 Downloads

Updated

No License

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.

Algorithm:
TRISTREAM follows the approach outlined in the paper "Efficient Streamline Computations on Unstructured Grids" by Mihai Dorobantu
http://citeseer.ist.psu.edu/40044.html
This algorithm uses a second-order Runge-Kutta method to integrate particle paths with adaptive pseudo-time-stepping.

Comments and Ratings (8)

Dang Le Van

@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

Romain W

Hello Matthew, I was wondering how hard would it be to adapt this to 3D triangular mesh?

ali

ali (view profile)

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..

illoul lounes

illoul lounes

Diablo

Diablo (view profile)

This is just what i needed many thanks

shode chanf

good

MATLAB Release
MATLAB 6.1 (R12.1)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video