CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

MATLAB Streamslice error

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 23, 2013, 21:28
Default MATLAB Streamslice error
  #1
New Member
 
Join Date: May 2012
Location: USA
Posts: 14
Rep Power: 13
Hoggs17 is on a distinguished road
Greetings all -

I am trying to plot streamlines for my 2-D FVM Matlab code but my scale is not what I'd like it to be (this is more of a MATLAB plotting question rather than a CFD theory question)

My code snippet for the streamslice is as follows.

%%%%%%%%%%%%%%%%%%%%%%%%%%
% Generate Streamline plot
uvect=zeros(nodes_x,nodes_y);
vvect=zeros(nodes_x,nodes_y);
for i=1:nodes_x-1;
for j=1:nodes_y-1;
uvect(i,j)=0.5*(u(i,j)+u(i+1,j));
vvect(i,j)=0.5*(v(i,j)+v(i,j+1));
end
end

figure(5)
[X,Y]=meshgrid(0:x,0:y);
streamslice(X,Y,uvect,vvect);

%%%%%%%%%%%%%%%%%%%%%%%%%%

My plot window goes from 0 to 10 (x and y values) but I want it to go the width and length of my boundary (denoted as width and length). However when change the meshgrid (0:x,0:y) I keep getting an error

Anyone got any ideas? I'm pretty sure I'm just missing but I'm not seeing it. Thanks for reading!

Hoggs

Last edited by Hoggs17; January 23, 2013 at 22:03.
Hoggs17 is offline   Reply With Quote

Reply

Tags
fvm, matlab, simple, streamline, streamslice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 19:00
c++ libraries and solver compiling vaina74 OpenFOAM Installation 13 February 3, 2012 18:43
[OpenFOAM] Saving ParaFoam views and case sail ParaView 9 November 25, 2011 16:46
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51
user defined function cfduser CFX 0 April 29, 2006 11:58


All times are GMT -4. The time now is 16:08.