# Calculating Streamfunctions and Streamlines for a fluid flow

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

October 16, 2014, 19:39
Calculating Streamfunctions and Streamlines for a fluid flow
#1
New Member

He who must not be named
Join Date: Apr 2013
Posts: 2
Rep Power: 0
Hi,
I am making a simulation where i am trying to simulate a flow that flows sinusoidally by using sine wave equations to calculate the location of the points in the simulation. I used a constant shift between the x coordinates of the points and calculated the y coordinate using the formulas and i was wondering how i could calculate the velocity of the flow and subsequently the streamfuncions and then plot the streamlines. I tried to use the general v=d/t with t=1 between the points and integrated over the curve but i am unable to create a nice variation in the velocities. I am also attaching a picture of the simulated particles. Blue is the first point and green is the point in the flow after t=1. ANy help would be greatly useful.
Attached Images
 untitled.jpg (48.0 KB, 12 views)

October 17, 2014, 10:45
#2
Senior Member

Jonas T. Holdeman, Jr.
Join Date: Mar 2009
Location: Knoxville, Tennessee
Posts: 128
Rep Power: 17
Quote:
 Originally Posted by ananth1092 Hi, I am making a simulation where i am trying to simulate a flow that flows sinusoidally by using sine wave equations to calculate the location of the points in the simulation. I used a constant shift between the x coordinates of the points and calculated the y coordinate using the formulas and i was wondering how i could calculate the velocity of the flow and subsequently the streamfuncions and then plot the streamlines. I tried to use the general v=d/t with t=1 between the points and integrated over the curve but i am unable to create a nice variation in the velocities. I am also attaching a picture of the simulated particles. Blue is the first point and green is the point in the flow after t=1. ANy help would be greatly useful.
I don't know exactly what you are asking, but it sounds to me like you are tracking particles in a moving mesh problem. First, for incompressible flow I use Hermite finite elements, with stream function and velocities at each node as degrees-of-freedom. For stationary meshes I use 2D elements. For periodic moving meshes I use a 3D element, where the extra dimension is time (with periodic BC in time), so the problem is stationary in space and time. Having found a solution, I can plot the 2D stream function at any discrete time, or interpolate to find the stream function at intermediate times. As with space, the mesh need not be uniform in time. With this method, the variation is smooth in time and I can sample time intervals as small as I please.