Tau method in full 3D simulation

122 views
Skip to first unread message

Kyriacos Papademos

unread,
May 18, 2022, 7:27:24 AM5/18/22
to Dedalus Users
Dear all,

I am not sure how to use the tau method with a 3D simulation, I couldn't find examples. I have:

dealias = 3/2
dtype = np.float64
# Domain and Bases
coords = d3.CartesianCoordinates('x', 'y', 'z')
dist = d3.Distributor(coords, dtype=dtype)
xbasis = d3.RealFourier(coords['x'], size=nx, bounds=(0, lx), dealias=dealias)
ybasis = d3.RealFourier(coords['y'], size=ny, bounds=(0, ly), dealias=dealias)
zbasis = d3.Chebyshev(coords['z'], size=nz, bounds=(-lz/2, lz/2), dealias=dealias)

# Fields
p = dist.Field(name='p', bases=(xbasis,ybasis,zbasis))
u = dist.VectorField(coords, name='u', bases=(xbasis,ybasis,zbasis))
tau_p = dist.Field(name='tau_p')
tau_u1 = dist.VectorField(coords, name='tau_u1', bases=(xbasis,ybasis)) #is this correct?
tau_u2 = dist.VectorField(coords, name='tau_u2', bases=(xbasis,ybasis))

# Substitutions
x, y, z = dist.local_grids(xbasis, ybasis, zbasis)
ex = dist.VectorField(coords, name='ex')
ey = dist.VectorField(coords, name='ey')
ez = dist.VectorField(coords, name='ez')
ex['g'][0] = 1
ey['g'][1] = 1
ez['g'][2] = 1
integ = lambda A: d3.Integrate(d3.Integrate(A, ('x','y')), 'z')  #is this correct?
lift_basis = zbasis.clone_with(a=1/2, b=1/2) # First derivative basis
lift = lambda A: d3.Lift(A, lift_basis, -1)
grad_u = d3.grad(u) + ez*lift(tau_u1) + ey*lift(tau_u1)# First-order reduction  #is this correct?

problem.add_equation("dt(u) + grad(p) - div(grad_u)/Reynolds + lift(tau_u2) =  -dot(u,grad(u))") #is this correct?

# Boundary conditions (just one boundary)
problem.add_equation("dot(ez, dot(ex,e_ij))(z=-lz/2) = 0")
problem.add_equation("dot(ey, dot(ex,e_ij))(z=-lz/2) = 0")
problem.add_equation("dot(ez, u)(z=-lz/2) = 0")

Thank you.
Regards,
Kyriacos

Daniel Lecoanet

unread,
May 18, 2022, 9:10:51 AM5/18/22
to Dedalus Users
Hi Kyriacos,

That’s almost right. For grad_u you want to only include the ez*lift(tau_u1) term. Then you need to specify 6 BCs. Also, for stress-free BCs, typically you would set the normal-tangential components of the stress to be zero (the yz and xz components), whereas you’re setting some tangential-tangential components of the stress to zero.

Daniel

--
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 on the web visit https://groups.google.com/d/msgid/dedalus-users/71b4e49c-01b6-4771-a577-3634a9d4f0b2n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages