Constructing the fluctuation velocity vector from its evaluated components

17 views
Skip to first unread message

Abishek Sarkar

unread,
Jul 4, 2025, 6:24:42 AMJul 4
to Dedalus Users
Dear all, 
I have evaluated the fluctuation velocity components, can I construct the fluctuation velocity vector in the following manner,

ex = dist.VectorField(coords, name='ex')
ey = dist.VectorField(coords, name='ey')
ez = dist.VectorField(coords, name='ez')
ux = dot(u,ex)               
uy = dot(u,ey)
uz = dot(u,ez)
x_avg = lambda A: d3.Integrate(A, coords[0])/(Lx)
y_avg = lambda A: d3.Integrate(A, coords[1])/(Ly)
z_avg = lambda A: d3.Integrate(A, coords[2])/(Lz)

ux_mean = x_avg(ux)
uy_mean = y_avg(uy)
uz_mean = z_avg(uz)

# Fluctuation velocities
ux_fluc = ux - ux_mean
uy_fluc = uy - uy_mean
uz_fluc = uz - uz_mean

# Fluctuation velocities vector
U_fluc = ux_fluc * ex + uy_fluc * ey + uz_fluc * ez

Thank you in advance.
Sincerely
Abishek

Ben Brown

unread,
Jul 4, 2025, 6:31:38 PMJul 4
to dedalu...@googlegroups.com
Abishek,
      A cleaner version of the same is:

vol = Lx*Ly*Lz 
avg = lambda A: d3.Integrate(A)/vol
u_fluc = u - avg(u)

--Ben

--
You received this message because you are subscribed to the Google Groups "Dedalus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dedalus-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dedalus-users/ac378179-5c11-4d83-bc9e-2178b87c475cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages