# Determine particle position knowing the velocity field

1. Jul 15, 2014

### Zoli

Dear all,

I solved the Navier-Stokes equations in Eulerian description. I would like to illustrate it as follows:
I thought to place particles in the domain which will characterize the fluid flow. However I must know the particle position in the Lagrangian specification. As I place the particles at specified positions at t=0, I know the initial state. But how to step further?

Thanks,
Zoli

2. Jul 15, 2014

### olivermsun

The idea is to integrate the velocity of the particle u(x0) for a time step. Then the particle has reached a new position (x1) where it has a new velocity u(x1), and so you integrate that velocity, and so on…

Many fancier schemes abound for doing this estimation more accurately, but that's the basic idea.

3. Jul 15, 2014

### vanhees71

This is given by the transformation between Euler and Lagrange coordinates:
$$\vec{r}=\vec{r}(t,\vec{R}).$$
It describes the motion of a fluid element that was at the initial time, $t=0$ at position $\vec{R}$. This mapping between $\vec{r}$ and $\vec{R}$ is invertible as long as there are no singularities like shock waves etc. Then you can express every quantity in both the Lagrange coordinates $\vec{R}$ and Euler coordinates $\vec{r}$. E.g., the velocity of a fluid element is given by
$$\vec{v}(t,\vec{R})=\partial_t \vec{r}(t,\vec{R}).$$
You can as well take the velocity field as function of the Euler coordinates. Then the relation is
$$\vec{v}(t,\vec{R})=\vec{v}[t,\vec{r}(t,\vec{R})] \equiv \vec{v}(t,\vec{r}).$$
Then you have to distinguish between partial time derivatives (at fixed Euler coordinates $\vec{r}$) and "material time derivatives (time derivatives at fixed Lagrange coordinates $\vec{R}$. E.g., for the equations of motion (Euler perfect fluid or viscous Navier Stokes etc) you need the acceleration of a given fluid element, i.e., the material time derivative
$$\mathrm{D}_t \vec{v}=\frac{\partial}{\partial t} \vec{v}(t,\vec{r})+\frac{\partial \vec{r}(t,\vec{R})}{\partial t} \cdot \vec{\nabla}_{\vec{r}} \vec{v}(t,\vec{r})=\frac{\partial}{\partial t} \vec{v}(t,\vec{r})+(\vec{v} \cdot \vec{\nabla}_r) \vec{v}(t,\vec{r}).$$

If you have the velocity field in Euler coordinates, $\vec{v}(t,\vec{r})$, you can thus simply calculate the trajectories of the fluid elements by solving the set of coupled differential equations as an initial-value problem:
$$\frac{\mathrm{d} \vec{r}}{\mathrm{d} t}=\vec{v}(t,\vec{r}), \quad \vec{r}(t=0)=\vec{R}$$
This gives you the Euler coordinates in terms of the Lagrange coordinates, $\vec{r}=\vec{r}(t,\vec{R}).$

4. Jul 15, 2014

### Zoli

So if I am not mistaken I should do the following for each particle:
1. Solve the initial-value problem to gain $\vec{r}(t,\vec{R})$ at different time steps. For this I must solve an IVP consisting of 2 equations because of the 2D-problem. But I have $\vec{v}$ at discrete points at each time.
2. How to continue?

Could you please specify algorithmically how to solve it? An example would help me a lot. E.g. let us regard I have the analytical solution $\vec{v} = e^{-t}\cos(x)\sin(y)$ on $[-1,1]\times[-1,1]$ in Euler coordinates given at $(x_1,y_1),\ldots, (x_N,y_N)$ at $t_0,t_1,\ldots,t_M$. How could I determine the position of the particle (that is $\vec{R}(t)$) starting at $\vec{R}(t=0)=(0,0)$?

5. Sep 27, 2014

### Zoli

Using this idea, I managed to perform what I wanted. Thank you!