- diff to compute the differences of positions (the bracketed terms)
- .* dot product of same-size vectors
- sum of a vector
double gyre - compute absolute and relative dispersion
27 vues (au cours des 30 derniers jours)
Hello everyone! I wrote a routine to integrate numerical particle trajectories for a double gyre flow and now I am supposed to compute the absolute and relative dispersion based on the computed trajectories. Can anyobdy help me in building the for cycle? I believe the cycle has three indices ( i = length of the x-domain, j = length of the y-domain and, k = timesteps) but i have no idea how to build it. you can find attached the scripts that I am using. If you run" integrateDGtemp.m" you can quickly understand what it is about.
doublegyreVEC.m contains the double gyre vector field
rk4singlestep.m contains the Runge Kutta 4 scheme for solving the ODE
integrateDGtemp.m is the script used to plot the initial particle positions and then the double gyre field.
Also, attached here you can see the formulas that I am supposed to use for computing absolute and relative dispersion.
Thank you a lot if you can help.
Jiri Hajek le 9 Nov 2022
Hi, seems like you are almost there... But you have to make up your mind on the meaning of your dispersion formulae. In statistics, dispersion is not a concrete function, but rather a quality of a data set, which may be expressed by any of several statistical parameters. (I guess that the i, j, k indices all describe the same set of M particles and consequently the expressions in brackes have the meaning of eulerian distances between pairs of particles.)
To evaluate your formulae, you'll need just a few basic MATLAB functions:
Using these, you will be able to calculate single element of the A2 and R2 matricex. Then, to complete these matrices at a time instant, you would need two more for loops.