-
Filter by Topic
Most Popular
All Topics
- List all discussions
Plot streamlines in matlab
|
Thread index | Previous thread | Next thread | Start a new discussion |
July 23, 2010 1:33pm UTC
Plot streamlines in matlab
Hi All,
Does anybody know how to extract velocity field (e.g. laminar flow) and plot streamlines in matlab? I am still playing but no luck so far.
Thanks,
Danial
Reply | Reply with Quote | Send private message | Report Abuse
July 23, 2010 8:35pm UTC in response to Danial Tz
Re: Plot streamlines in matlab
Hi Danial,
I have had luck using the following approach (4.0), though there may be better ways to go about it:
1. Use mpheval command to obtain grid point coordinates and corresponding velocities
2. Use meshgrid command to create regular coordinate grid for plotting
3. Use TriScatteredInterp command to obtain velocities at coordinates generated by meshgrid command
4. Use streamline command to generate and plot streamlines
A little clunky, but it seems to work. If you come up with a better approach, please let me know.
Paul
Reply | Reply with Quote | Send private message | Report Abuse
August 16, 2010 2:36pm UTC in response to Paul Hall
Re: Plot streamlines in matlab
Hi Danial,
I have had luck using the following approach (4.0), though there may be better ways to go about it:
1. Use mpheval command to obtain grid point coordinates and corresponding velocities
2. Use meshgrid command to create regular coordinate grid for plotting
3. Use TriScatteredInterp command to obtain velocities at coordinates generated by meshgrid command
4. Use streamline command to generate and plot streamlines
A little clunky, but it seems to work. If you come up with a better approach, please let me know.
Paul
Hi Paul,
Do you have a code snippet I can check? That will save a lot of time debugging.
Best,
Danial
Reply | Reply with Quote | Send private message | Report Abuse
Rules and guidelines

