fluctuations with specified mean velocity and amplitude
3 views (last 30 days)
Show older comments
Commented: Walter Roberson on 27 Feb 2023
Could you please help me with a code. How could I plot the random fluctuation plots with specified mean velocity and amplitude of fluctiations
My code is:
title('Reynolds Decomposition of Velocity')
ylabel('Mean+Fluctuating Velocity v')
VBBV on 26 Feb 2023
Do you mean the above ?
Walter Roberson on 26 Feb 2023
You say working with velocity, which is a vector, but you only have a single coordinate.
If you want your velocity functuations to have a specified amplitude then that means that you need to use at least two dimensions for your points, and you need to generate a vector at each location, with random angle(s) but particular amplitude. For example,
ang = rand(1,N) * 2 * pi;
amp = AppropriateConstant
deltax = sin(ang) .* amp;
deltay = cos(ang) .* amp;
x = cumsum([x0, deltax]);
y = cumsum([y0, deltay]);
If you needed a particular mean velocity then instead of using rand() you would have to use a beta distribution over 0 to 2*pi, which had been tuned so that the mean of the distribution was the desired mean.
Walter Roberson on 27 Feb 2023
t = (0:N) / SamplingFrequency;
for the case where you generate N points after the starting point.
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!