Neumann BCs and Singular Error

193 views
Skip to first unread message

Jake Bowhay

unread,
Nov 14, 2023, 12:11:22 PM11/14/23
to Dedalus Users
Hi All,

I am trying to solve the following system of equations:
\frac{\partial u}{\partial t} &= \nabla^2u + a - (b + 1)u + u^2v,\\
 \frac{\partial v}{\partial t} &= D\nabla^2v + bu - u^2v
with the boundary conditions \mathbf{n}\cdot\nabla\mathbf{u}=0

I have introduced tau variables however I am getting "Factor is exactly singular". I am not sure if this is because dx(u)(x=0) is singular or because I need a Gauge Conditions?

Thanks in advance,
Jake

import numpy as np
import matplotlib.pyplot as plt
import dedalus.public as d3

# equation parameters
a = 1
b = 2
D = 1

# define domain and discretisation
coords = d3.CartesianCoordinates('x', 'y')
dist = d3.Distributor(coords, dtype=np.float64)
xbasis = d3.Chebyshev(coords['x'], size=32, bounds=(0,1), dealias=3/2)
ybasis = d3.Chebyshev(coords['y'], size=32, bounds=(0,1), dealias=3/2)

# Field quantities
u = dist.Field(name='u', bases=(xbasis, ybasis))
v = dist.Field(name='v', bases=(xbasis, ybasis))
tau1 = dist.VectorField(coords, name='tau1', bases=(xbasis))
tau2 = dist.VectorField(coords, name='tau2', bases=(ybasis))
tau3 = dist.VectorField(coords, name='tau3', bases=(xbasis))
tau4 = dist.VectorField(coords, name='tau4', bases=(ybasis))
problem = d3.IVP([u, v, tau1, tau2, tau3, tau4], namespace=locals())

# Substitutions
dx = lambda A: d3.Differentiate(A, coords['x'])
dy = lambda A: d3.Differentiate(A, coords['y'])

# Equations
problem.add_equation("dt(u) = lap(u) + a - (b + 1)*u + u*u*v")
problem.add_equation("dt(v) = D*lap(v) + b*u - u*u*v")

# Boundary Condition
problem.add_equation("dx(u)(x=0) = 0")
problem.add_equation("dx(v)(x=0) = 0")
problem.add_equation("dx(u)(x=1) = 0")
problem.add_equation("dx(v)(x=1) = 0")
problem.add_equation("dy(u)(y=0) = 0")
problem.add_equation("dy(v)(y=0) = 0")
problem.add_equation("dy(u)(y=1) = 0")
problem.add_equation("dy(v)(y=1) = 0")

# Initial Conditions
x = dist.local_grid(xbasis)
u['g'] = x
v['g'] = 1 - x

# Setup solver
solver = problem.build_solver(d3.SBDF3)
solver.stop_sim_time = 10

u.change_scales(1)
u_list = [np.copy(u['g'])]
t_list = [solver.sim_time]

# Main loop
timestep = 0.05
while solver.proceed:
    solver.step(timestep)
    if solver.iteration % 10 == 0:
        u.change_scales(1)
        u_list.append(np.copy(u['g']))
        t_list.append(solver.sim_time)

Jeffrey S. Oishi

unread,
Nov 14, 2023, 12:32:20 PM11/14/23
to dedalu...@googlegroups.com
Hi Jake,

Double Chebyshev problems, while technically possible in Dedalus, are not supported right now, partly because the taus are very non-trivial and an active research problem. You can read about some of the issues in this paper:


We welcome community contributions to the understanding of double Chebyshev taus, but we currently cannot offer specific support on them.

Jeff

--
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/741beba6-e222-47c0-bcf3-c34d1f9dd817n%40googlegroups.com.

Jake Bowhay

unread,
Nov 14, 2023, 12:52:45 PM11/14/23
to Dedalus Users
Hi Jeff,

Many thanks for the quick reply.

Regards,
Jake

Shuai Dong

unread,
Oct 14, 2024, 10:22:26 PM10/14/24
to Dedalus Users
Hi Jeff,

Is there any development in the double-chebyshev  expansion in Dedalus project? any examples?

best regards,

Simon

Reply all
Reply to author
Forward
0 new messages