Quantcast
Channel: PTC Community : Discussion List - PTC Mathcad
Viewing all articles
Browse latest Browse all 2936

Need help in making an algorithm for plotting pathline, streamline, streakline and timeline

$
0
0

The goal is to generate streamline, pathline, streakline and timeline for any arbitary velocity field, 2D or 3D

 

attached is what I have so far...using odesolve.  at this point, the worksheet works for some velocity field, but not all...the problem is in the streakline program I guess, or it is the odesolve fail to converge.  Please see the red box in the file for my specific question..I have trouble with the steps used to define the initial condition of the odesolve.  The problem only show up for some function. 

 

Is there a better way to write this?  This seems to be quite long, long enough that I am not sure if I am writing the logic correctly.

 

I also need a more robust way too, because right now it seems it work sometimes only.  Please test it with any thing you can think of. 

 

it seems my streakline program, which attempts to calculate n particles (or n+1?) that pass through a marker point,  the way I do it is to:

say the streakline track n marked particles at time    t

and the first particle passes the marker point at time    t0

 

I create n initial condition at the marker position at different time with interval  (t-t0)/n

then repeatly call the the odesolve

 

but for some function, like the one used in the mathcad, I must use an interval of (t-t0)/ (n-1)  or anything with a denominator less than n

which means I will have a particle that passed the marker point after time t and I track it backward in time

 

I cannot use (t-t0)/n   or (t-t0)/ (n+1) , why is that?

and calculate n    (x, y, z)   useing the function generated from odesolve, then plot it...but this does not seem to be the smartest way...

 

 

similar logic is used for the time timeline..

 

 

ultimately I want to incoorperate this with WE vector field mathcad file ( the one that can draw arrow).  So I would like to keep all x , y, z paramertized.

Thank you

Please help


Viewing all articles
Browse latest Browse all 2936

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>