Dear Dedalus Team,
I am currently working on a simulation project using Dedalus based on Rayleigh-Benard convection and I've encountered a couple of issues where I could use your expert guidance:
Boundary Condition Specification:
I need to implement a boundary condition where the first component of a vector field u
(u = (u,w)) is linearly related to the z
coordinate at x=0
. Specifically, I want to set problem.add_equation("u[1](x=0) = 0.25*z") . I am unsure how to properly implement this in Dedalus since my attempts have led to syntax and key errors. Could you guide me on the correct method to set this boundary condition?
Sponge Layer Implementation: Additionally, I am looking to create a sponge layer on the rightmost 20% of the domain to dampen outflow effects. Could you provide insights or examples on how to correctly implement a sponge layer in this part of the computational domain? I use the equation "problem.add_equation("dt(u) - nu*div(grad_u) + grad(p) - b*ez + lift(tau_u2) = - u@grad(u) - S*(u-z_linear)")", where S is a piecewise function that varies depending on the spatial location. S['g'] = np.where(x > x_sponge_start, sponge_strength * ((x - x_sponge_start) / (Lx - x_sponge_start)), 0) .
Any examples, documentation references, or code snippets you could provide would be immensely helpful.
Thank you for your time and assistance. I have attached my code for your reference.
Best regards,
Juntao