stream3: how to use it

8 visualizzazioni (ultimi 30 giorni)
Romain W
Romain W il 1 Mag 2012
Hello everyone,
I am having some troubles using the stream3 function.
Context:
I have a complex vehicle geometry that I read in Matlab from a CAD software file (.stl file). Now, I want to use stream3 to generate surface streamlines over this unstructured grid (a tri-surface defined by f and v matrices representing an aeroplane, i.e. a collection of triangles). What I want to do is to generate an approximate velocity vector flow field v, i.e. matrix dimension [nb_vertices, 3] for which I am using simple approximation.
So, to sum up what I got, I have the Cartesian coordinates [x y z] of the vehicle vertices (given by my v matrix) and an estimate of the velocity vectors at each of those vertices (giving me an approx. velocity field).
Question:
Do you know how I can calculate the streamlines over the entire vehicle geometry from the rear of the vehicle to the front so as to evaluate the location of the stagnation point (velocity components u,v,w equal to 0)?
Is it possible to use a built-in function like stream3? I need to know if I have to implement my own script.
Any help much appreciated,
Romain

Risposte (2)

Sean de Wolski
Sean de Wolski il 1 Mag 2012
If x,y,z are not on a uniform grid, you will need to interpolate to a uniform grid ( TriScatteredInterp will be your friend). If you could provide us with a small example data set, we could be more useful.
  2 Commenti
Romain W
Romain W il 3 Mag 2012
Hello Sean, could you please have a look at my answer. I added a sample of data and I really hope you will be able to help me saving time. Thank you very much;
Romain W
Romain W il 11 Mag 2012
Did you have time to have a look at my problem?

Accedi per commentare.


Romain W
Romain W il 3 Mag 2012
Hello Sean,
I cannot really give an exact set of data, but as an example, here is a small sample of data I have as input:
tri_centroid =
1.9532 8.7901 -10.5087
1.8135 9.0050 -10.5516
1.9770 8.9306 -11.0297
2.0414 8.8322 -11.0099
1.7361 9.4613 -11.1039
1.7496 9.4180 -11.0997
1.6468 9.3691 -10.6030
1.7960 9.2919 -11.0854
1.7114 9.2123 -10.5831
1.8672 9.1358 -11.0635
my vector field calculated at each of my triangle centroid coordinates:
Vsurf =
1.0e+003 *
7.8329 0.7648 1.0391
2.7899 -1.2464 3.6206
7.1033 -0.4890 2.5403
7.9342 0.7390 0.5804
2.4620 3.6410 -0.6997
7.7611 0.9389 1.1512
2.6628 3.4398 1.5814
7.9451 0.1895 0.8725
7.5720 0.5906 1.7990
5.0765 1.3230 3.6499
6.6181 -0.4446 3.0411
4.9157 -0.0903 3.9213
0.3407 0.5860 -1.5106
1.8112 -3.0800 -1.3435
0.3348 -0.5858 -1.4961
0.3348 -0.5858 -1.4961
Now, I would like to use these information by calling the stream3 function so as to calculate the surface streamlines around my tri surface (collection of triangles). Can I actually use stream3 providing only this set of information?
  1 Commento
Romain W
Romain W il 3 Mag 2012
By the way, what get as an error is:
Error using stream3 (line 50)
U,V,W must all be a 3D arrays.

Accedi per commentare.

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by