How to plot Z velocity in X Y plane when i have the z velocity dependent on x and y locations.

3 views (last 30 days)
So i have an ansys velocity UDF which i want to visualize using matlab. The velocity profile consists of regions of space. i want to plot this velocity in the xy plane. An example region is -
if( (y>=-29.6 && y<=29.6 && z>=0 && z<1)||( (pow((y+29.6),2) + pow((z+10),2)>=100) &&
(pow((y+29.6),2) + pow((z+10),2)<=pow((10+1),2)) && ((y+29.6)<0) && (((z+10)/(y+29.6))<0.2872) )||
( (pow((y-29.6),2) + pow((z+10),2)>=100) && (pow((y-29.6),2) + pow((z+10),2)<=pow((10+1),2)) &&
((y-29.6)>0) && (((z+10)/(y-29.6))>-0.2872) )||( (pow((y+19.4),2) + pow((z+7.23),2)>=pow(20.05,2)) &&
(pow((y+19.4),2) + pow((z+7.23),2)<=pow((20.05+1),2)) && (((z+7.23)/(y+19.4))<=1) &&
(((z+7.23)/(y+19.4))>0.2872) && ((y+19.4)<=0) )||
( (pow((y-19.4),2) + pow((z+7.23),2)>=pow(20.05,2)) &&
(pow((y-19.4),2) + pow((z+7.23),2)<=pow((20.05+1),2)) &&
(((z+7.23)/(y-19.4))>=-1) && (((z+7.23)/(y-19.4))<0.2872) &&
((y-19.4)>=0) )||( ((y+z)<=-(39.34*1.414)) && (y+z>=-((40.34)*1.414)) &&
(y-z<=(27.60)) && (y-z>=(-12.71)) )||( (y-z>=(39.34*1.414)) && (y-z<=((40.34)*1.414)) &&
(y+z>=(-27.60)) && (y+z<=(12.71)) )|| ( (pow((y),2) + pow((z+27.6),2)>=pow((20),2)) &&
(pow((y),2) + pow((z+27.6),2)<=pow((20+1),2)) && ( (y/(z+27.6))>=-1) && ( (y/(z+27.6))<=1) &&
(z+27.6<0) ) )
end
the velocity in this region is 0 while everywhere else it is 30.
How would i plot this?
  8 Comments

Sign in to comment.

Answers (0)

Categories

Find more on Graphics Performance in Help Center and File Exchange

Tags

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!