Tau method for high-order equation,

156 views
Skip to first unread message

Guangpu Zhu

unread,
Apr 24, 2024, 10:55:49 AM4/24/24
to Dedalus Users
Dear Dedalus experts,
 
         I am trying to solve a fourth-order equation in a rectangular domain with periodic conditions in the x-direction and Neumann conditions in the z-direction. The equation is like:
Equation.png
Here, w can be viewed as an intermediate variable.  We consider Neumann boundary conditions for both \phi and w in the z-direction. 
 
To impose 4 boundary conditions, I introduce four tau variables using the tau method introduced here, and the resultant equations are:
Equation_Tau.png

I further simplify these four equations into two and then implement them in Dedalus. However, I found that the obtained results are not desired. After carefully checking the parameters and implementation, I think maybe my understanding of the Tau method is not correct but I don't where I am wrong. 

I would greatly appreciate it if any experts can help me.

Best,

Guangpu

Daniel Lecoanet

unread,
Apr 28, 2024, 12:16:07 PM4/28/24
to Dedalus Users
Hi Guangpu,

I think you have pretty much the right idea… However, tau_w1 and tau_phi1 need to be multiplied by a z-dependent term, and all four tau variables should be x-dependent.

Daniel

On Apr 24, 2024, at 9:55 AM, Guangpu Zhu <zhug...@gmail.com> wrote:

Dear Dedalus experts,
 
         I am trying to solve a fourth-order equation in a rectangular domain with periodic conditions in the x-direction and Neumann conditions in the z-direction. The equation is like:
<Equation.png>
Here, w can be viewed as an intermediate variable.  We consider Neumann boundary conditions for both \phi and w in the z-direction. 
 
To impose 4 boundary conditions, I introduce four tau variables using the tau method introduced here, and the resultant equations are:
<Equation_Tau.png>

I further simplify these four equations into two and then implement them in Dedalus. However, I found that the obtained results are not desired. After carefully checking the parameters and implementation, I think maybe my understanding of the Tau method is not correct but I don't where I am wrong. 

I would greatly appreciate it if any experts can help me.

Best,

Guangpu


--
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/b88f99e3-d72f-4752-bf7c-e7f3721b6b53n%40googlegroups.com.
<Equation.png><Equation_Tau.png>

Guangpu Zhu

unread,
Apr 29, 2024, 2:40:12 AM4/29/24
to Dedalus Users
Dear Prof.  Lecoanet,

         I am sorry for the typos in the above equation, the correct version I implemented is
微信截图_20240429142544.png

Then I substitute the first and third equations into the second and fourth ones, respectively, which yields

微信截图_20240429142702.png

We further introduce the intermediate vectors G_w and G_{\phi}, like 
微信截图_20240429142820.png
We eventually get the following equation
微信截图_20240429142915.png
In Dedalus, they are implemented as

-------
tau_ph1 = dist.Field(name='tau_ph1', bases=xbasis)
tau_ph2 = dist.Field(name='tau_ph2', bases=xbasis)
tau_w1 = dist.Field(name='tau_w1', bases=xbasis)
tau_w2 = dist.Field(name='tau_w2', bases=xbasis)

ex, ez = coords.unit_vector_fields(dist)
lift_basis = zbasis.derivative_basis(1)
lift = lambda A: d3.Lift(A, lift_basis, -1)
grad_ph = d3.grad(ph) - ez*lift(tau_ph1)
grad_w = d3.grad(w) - ez*lift(tau_w1)


problem = d3.IVP([ph, w, tau_ph1, tau_ph2, tau_w1, tau_w2], namespace=locals())
problem.add_equation("dt(ph) - div(grad_w) + lift(tau_w2) = 0")
problem.add_equation("w + div(grad_ph) - lift(tau_ph2) + ph = ph**3 ")

problem.add_equation("dz(ph)(z=-Lz/2) = 0")
problem.add_equation("dz(ph)(z=Lz/2) = 0")
problem.add_equation("dz(w)(z=-Lz/2) = 0")
problem.add_equation("dz(w)(z=Lz/2) = 0")
----------

Note that in the above code snippet, we consider the Neumann boundary conditions for both \phi and w:
微信截图_20240429143607.png

Is my understanding of the tau method for this fourth-order equation right?  Thanks in advance.

Best,

Guangpu

Keaton Burns

unread,
Apr 29, 2024, 9:00:21 AM4/29/24
to dedalu...@googlegroups.com
Hi Guangpu,

Nothing is jumping out to me as incorrect about your problem formulation — can you describe a little more what issues you’re seeing? Is the system singular / blowing up, or just giving what seems to be a wrong result?  One problem could be that the w equation is purely algebraic, so the Dedalus timestepper is essentially doing a single fixed-point iteration on it, rather than something like a Newton solve, each step. You may need to check that you’re starting with consistent initial conditions (they satisfy the algebraic equation) and use small timesteps to keep this stable/accurate.

Best,
-Keaton


Guangpu Zhu

unread,
Apr 29, 2024, 9:39:23 PM4/29/24
to Dedalus Users
Hi,  Keaton,

           Thanks for your kind reply. In my previous verification, I coupled this equation with the Navier-Stokes equation and failed to get the reference solution. Now I only implement this equation in Dedalus and compared the solution with that obtained by COMSOL. These two results agree very well.  Hence, I believe this implementation is right and my previous implementation (with hydrodynamics) is wrong. Thanks.

Best, 

Guangpu
Reply all
Reply to author
Forward
0 new messages