Why does flow direction from stream2 differ from direct calculation from vector components?
10 views (last 30 days)
Show older comments
Hello everybody,
I have wind flow data from a simple CFD model that I use to compute the flow over a Gauss hill. I am only interested in 2D flow, so I extract a 2D-plane from the model results. The mesh is structured with constant resolution in the center, then coarsening when moving away from the center (x=0)for +/-x direction. The same for z direction: Fine resolution close to the ground, the coarsening when moving upwards. It follows the surface, and the coordinates are defined with x from left to right = positive flow direction and z upwards.
Now, I need to calculate the streamlines and I am especially interested in the flow direction, i.e. the flow angle. I can claculate that from a simple interpolation as well:
Fu = scatteredInterpolant(tx(:),tz(:),tu(:)); % tx, tz, tu are 3D arrays from the CFD model, as explained above
Fw = scatteredInterpolant(tx(:),tz(:),tw(:));
U = Fu(thisX,thisZ);% U and W at abritrary points
W = Fw(thisX,thisZ);
beta = atand(W/U); % flow angle
That seems to work and I get the flow angle correctly.
I can also calculate streamline with the stream2 or streamline function. Then, I end up with stream lines from which the lower ones go through the surface of the hill. Also the flow angle is smaller and the stream lines do not follow the flow direction exactly everywhere.
streamoutput = stream2(tx,tz,tu,tw,startx,startz);
Can anyone tell me what might be the reason for wrong streamlines and a difference in flow angle? Did I miss something when calculating the stream lines?
BR
0 Comments
Answers (0)
See Also
Categories
Find more on Digital Filter Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!